Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp7537707ioo; Fri, 3 Jun 2022 08:27:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5VIKZVH2KLp+nB7wBfrdIa8tmOxzxIWpCaurqBBB8CwxC8kDzIntghZlyEgsBdQL4/Lrn X-Received: by 2002:a17:906:7313:b0:6fe:ed0b:9964 with SMTP id di19-20020a170906731300b006feed0b9964mr9127254ejc.95.1654270051893; Fri, 03 Jun 2022 08:27:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654270051; cv=none; d=google.com; s=arc-20160816; b=jn/iu0y/bbGtxs9xtGADP2Kq0AC+R0BV59hstfyjdaEDqA9PAv6oXgBuiMwejV7mN+ O4WZOrWR3lU/nn+iL0IrgX7/aupF5mmbkfub2NyX1yzAZ1RXQRnTpl/givO8Cda2GHqD TLXcMRcMnzYVFIBqSGLYkfdGIUWEty7bXjy4U50c8JMahZlF3ziGY7Qot2ixH5zpBNSA Wp9YHf8LiI+rLv6wNNmXj94/H4RZwxwJBk1Zuvz26pBEXaTVPpQ6hRk/k5rilg/D656y WAPQlULA7Nsw7M8fccnknFlJmtyU8YtRDJ7aopD1rqSa9elpaZ3R4rH2scy/+4rLqyGy ycYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=nCU5EZSGrj1xtKqHMnWzbFXmac9hkfjHsoihKp2bkpg=; b=xpHu34j+TMXDPI5gx7aSYCKvXKxyMijpg9FqP8kDhXG9A+AqvLAs8LaWipMdIrOwOP vwEWZO28+NgM5rWLwdK5GsMwjOkgGW8PghlZLAD3T9sGhAjgIlhccu8uJGbBoDbj8cDd 6Hsn2hlQnaZ2pJbUaH2buiv1sCC9WwMRuKfHSrLl0F8syJujhFWL7VwRkrBkhXQgxgsq e2GcW0WDH1zzpwkthd8dbnbOcnxiMb6B8TmSSe0vwx1IxfxnhCS8ua1K4JQaXguSSLTT xYd+FCFHUP1pb7Jd9rU8NrrYsH9BgXwHWrKgNQej6Th3NQG4Dq2hleEZ8svVP4hzi3Iv FFqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=DI0cW03w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q24-20020a1709060e5800b006e878a53334si798259eji.363.2022.06.03.08.27.03; Fri, 03 Jun 2022 08:27:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=DI0cW03w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240167AbiFCJ1Z (ORCPT + 99 others); Fri, 3 Jun 2022 05:27:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243019AbiFCJ1S (ORCPT ); Fri, 3 Jun 2022 05:27:18 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1A6EAE46; Fri, 3 Jun 2022 02:27:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1654248423; bh=oQntFm2y2gRdIgVM6uePwTdKkmbjITVDupEjuLyfrH4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=DI0cW03w1Jl8rAV+WAYoUa17HCSK0XiL/W0RhTy2rpttmFaMTHzU97bTmWxnt9n29 S5D8OxcEBk60OBnPogWciCMyYkC/m6S0EXbRQ+K+Qpb2DShne7hwUm2EJFUf6T28iE F2MxAmHRlswrz1L4vVeWZSl461TLYQsxwVFGbktY= Received: from [192.168.9.172] (unknown [101.88.28.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id 006CB60104; Fri, 3 Jun 2022 17:27:02 +0800 (CST) Message-ID: <4213df91-c762-ae56-f08d-8c925759fa63@xen0n.name> Date: Fri, 3 Jun 2022 17:27:02 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Thunderbird/103.0a1 Subject: Re: [PATCH V15 11/24] LoongArch: Add boot and setup routines Content-Language: en-US To: Ard Biesheuvel , Huacai Chen , Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Jonathan Corbet , Linus Torvalds Cc: linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Yanteng Si , Huacai Chen , Guo Ren , Xuerui Wang , Jiaxun Yang , Stephen Rothwell , linux-efi@vger.kernel.org, WANG Xuerui , Yun Liu References: <20220603072053.35005-1-chenhuacai@loongson.cn> <20220603072053.35005-12-chenhuacai@loongson.cn> From: WANG Xuerui In-Reply-To: <20220603072053.35005-12-chenhuacai@loongson.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi Ard, 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. Thanks in advance.