Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp128032iof; Sun, 5 Jun 2022 23:12:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUhpePDYk+8uReYzAK5s3tSILPBgc/aB6tYvl5Ef1m9xBqs+7eAiAEpf3YqEE90sZ/6Vgi X-Received: by 2002:a63:894a:0:b0:3fc:a724:578c with SMTP id v71-20020a63894a000000b003fca724578cmr19947765pgd.499.1654495928410; Sun, 05 Jun 2022 23:12:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654495928; cv=none; d=google.com; s=arc-20160816; b=zrGjvLcp5Vw+2Tkt4Ir2Swu3Jx2tuVFZaJLvgIUzKEWtnQO5+rNR5oGE1cfkixytIm nhUbKv/Nc0wYeb1lh4Pt/w+G4zdYZzq4hDDnx1pU0fMqo9V8baVyDw5YLsG5gkzN+b7i 9Y+yuWFD8wrT25rgzIrL9hIaOAmLurY4rXANWuUQ8pX6Fo+h8dhlyygLSp3mc+wEJ70A 7BcZBnld7Dt9Dqs81ntNrrKLfYLa4SiTOujwweLeKnAunbk0BQVkmn6TqKC7xnN+dTf9 /5MScMeMaJpsywjNuyKo+4khQQomppRizJaPx9E/iBzoBiYOxJlZYd20r4rb/34PlZkn E0wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=HOmymWkX5sYsMAVzJPBpfBRK10oIeV8Kg9SBeKgsPXc=; b=FTQWz+0sl8v6giCQvZtuwevj0T9393lNjCXb5NAY5ADfNZRBrDh24im9J1EcjEXIUt ReRh3lPFbfTuJVHofT2HSJ6xjWyUh3yzHHc57xpwS78UybEy6ZnmD0kBYCQEJ2KsLgit Gh0RnuGqoWQ6UOctSqovPaRLEsRPXY5ZcJ0fgsMqs1UdIOYEoWQejnsYC6vnA1EqgeBS GuOGl0T85t0mJLX8/Gvhhcqe6NHoEUCAmJgcCtxxMZPsI7FlkYR8xfQus8s7uOfgfKQb vy5m/pOn/ZYmXzeMO2yoZgZpN9+q31clJLkAFFB4EIuSCBAfN2ngNiEG9fQDQLM4nQdZ j4Xg== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u2-20020a17090341c200b0015874d582f1si24013767ple.326.2022.06.05.23.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 23:12:08 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 572F531AE82; Sun, 5 Jun 2022 21:51:15 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243321AbiFCKCb (ORCPT + 99 others); Fri, 3 Jun 2022 06:02:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242870AbiFCKCZ (ORCPT ); Fri, 3 Jun 2022 06:02:25 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1169860E5; Fri, 3 Jun 2022 03:02:20 -0700 (PDT) Received: from mail-yb1-f171.google.com ([209.85.219.171]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.113]) with ESMTPSA (Nemesis) id 1MkIEJ-1nU5A3417J-00kczo; Fri, 03 Jun 2022 12:02:19 +0200 Received: by mail-yb1-f171.google.com with SMTP id p13so12887698ybm.1; Fri, 03 Jun 2022 03:02:18 -0700 (PDT) X-Gm-Message-State: AOAM530DNDQQjAlRlN5CRoyQAnG4L8ASTtbh+7o2aMm16A2Sk89/W3OL xENGT24wgcOoddKWgWxALYxQCYdLX+Vr58i2ogA= X-Received: by 2002:a25:bd8b:0:b0:657:8392:55c3 with SMTP id f11-20020a25bd8b000000b00657839255c3mr10076933ybh.452.1654250537444; Fri, 03 Jun 2022 03:02:17 -0700 (PDT) MIME-Version: 1.0 References: <20220603072053.35005-1-chenhuacai@loongson.cn> <20220603072053.35005-12-chenhuacai@loongson.cn> <4213df91-c762-ae56-f08d-8c925759fa63@xen0n.name> In-Reply-To: <4213df91-c762-ae56-f08d-8c925759fa63@xen0n.name> From: Arnd Bergmann Date: Fri, 3 Jun 2022 12:02:00 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH V15 11/24] LoongArch: Add boot and setup routines To: WANG Xuerui Cc: Ard Biesheuvel , Huacai Chen , Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Jonathan Corbet , Linus Torvalds , linux-arch , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Xuefeng Li , Yanteng Si , Huacai Chen , Guo Ren , Jiaxun Yang , Stephen Rothwell , linux-efi , WANG Xuerui , Yun Liu Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:s1NvRPCau0Hkty6Nm4xzlAtXdfIepDi+dFoTNUFwt24NqJmwVVU 7rD3h4+KwztsLVXD98ikXQqWVcU+KjvI76ly+j73c8uAxO8s9soQscJGi+s37zERGXG7JDz /f9thbrgD5KSYkTlq4b2OhndTZ2aqNJha2Pot5LNNsnSRl3zsgCoooOECkKtJNHIQgfLMgH Ti6PLPVPR0+wZKH8N4y/A== X-UI-Out-Filterresults: notj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EXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 3, 2022 at 11:27 AM WANG Xuerui wrote: > On 6/3/22 15:20, Huacai Chen wrote: > > Add basic boot, setup and reset routines for LoongArch. Now, LoongArch > > machines use UEFI-based firmware. The firmware passes configuration > > information to the kernel via ACPI and DMI/SMBIOS. > > > > Currently an existing interface between the kernel and the bootloader > > is implemented. Kernel gets 2 values from the bootloader, passed in > > registers a0 and a1; a0 is an "EFI boot flag" distinguishing UEFI and > > non-UEFI firmware, while a1 is a pointer to an FDT with systable, > > memmap, cmdline and initrd information. > > > > The standard UEFI boot protocol (EFISTUB) will be added later. > > > > Cc: linux-efi@vger.kernel.org > > Cc: Ard Biesheuvel > > Reviewed-by: WANG Xuerui > > Reviewed-by: Jiaxun Yang > > Co-developed-by: Yun Liu > > Signed-off-by: Yun Liu > > Signed-off-by: Huacai Chen > > Would you please look at this patch, which has all the arch-independent > changes backed out, and Ack if it is fit for mainlining? > > I communicated a little with Huacai about the approach for supporting > alternative boot protocols down the road, and we agreed to carry the > respective changes downstream. And if needs truly arise for modifying > common EFI logic, we can do so in a non-rushed manner later. > > For the current status of the code, apparently it just accepts the > standard efistub-shape FDT pointer from (whatever booting the image), > and everything onwards are fully using the common code without > modification as you can see from the diffstat. I rebased my BPI support > patch on top of this (basically translating Loongson BPI data structures > into the expected FDT form), and can confirm the boot can progress to > the same point as before -- indeed the SVAM changes etc. are not > necessary for a working system, and the code remains working. I'm a bit lost here: Does this mean the v15 version is back to the old pre-efistub interface and allows booting with existing firmware, or is it now left out completely? I still see a kernel_entry() function in head.S, and I see references to loongson_sysconf, but I don't see if that is what gets passed in from the bootloader. I really want to make sure that without the EFI stub, there is no other way to boot the kernel that would have to get maintained in the long run. Arnd