Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp7632131ioo; Fri, 3 Jun 2022 10:14:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8fxp4DK4fDzZfOjfHodBdVaSo54gAbuzyGvVfIGUC4YcrROsuBBlPYkCSMVsQDIUcXhk2 X-Received: by 2002:a05:6402:516e:b0:42d:c48b:b724 with SMTP id d14-20020a056402516e00b0042dc48bb724mr11968440ede.93.1654276462659; Fri, 03 Jun 2022 10:14:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654276462; cv=none; d=google.com; s=arc-20160816; b=zh2CzQml2qAzybyJdLyaWLm54Nrr24YjkjQUTIww6gGQDiLsIdifr1M5CKAzZ7RBS5 sBu1JWosuPLBOg4nM1XJt54DZjKjkb06zLYRa8+jFepxk06KQTusTdSeo8l26mShJ8S/ paLXHiaUnqhb8jCMFZV0PaNEr4twVxx0jrxcoSTrUBAqVvinnmThLgwyq15T9NlceE9C Mr2FLvjWACtM3frg6VeRHYecrpgCLJmPLoRflRUj2RNSTU1NPZbeU1jv1ypA4OSjRLyq g0jDH4GxRsQ0PVq99qax6NPBkCR8ioHBXTGd8OkVpuREcje0fXIBCq3/zk5HQ7eL5rBO aFdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=6E36+yG76B+KrAzSXFYwYrk/ebDphF1NofI+H0xzEAo=; b=bfYVBz3ILd4hC2fHUDGhIaNob74zUx5bphmllFVZy7KIlEE4HEuuKVd6PBVunmc8ZC wLJftFLKfZTGG9QvLyAhTfNkHwPvxyPQZjQ0xKDCtrGaGLIPt+EqPMVToQh8bhwOCz7h 5XtHBmmZsD9PhQQWEcMzEFwbxtrM6/IVvbwbqvuK4eT6NIKHnt8dLyVRbn9ZesT2Tpoi OalWdlVEt+oRGcyJrMMUbUM6AN4qMWJkj0tPrVF4B4XIaeYjDMzST8T9nzTKc0nyexyD t0HZAog2dvgsF1Ly/KADgxEACTqFhAMd0/kRgP//smK1o8UZtTA9m5J8r2DSAGW9J9fu goMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=aA2vWSFA; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q13-20020a056402518d00b0042dc6d820f2si3014191edd.606.2022.06.03.10.13.57; Fri, 03 Jun 2022 10:14:22 -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=@xry111.site header.s=default header.b=aA2vWSFA; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243067AbiFCJcZ (ORCPT + 99 others); Fri, 3 Jun 2022 05:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229792AbiFCJcW (ORCPT ); Fri, 3 Jun 2022 05:32:22 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 318C42B24E; Fri, 3 Jun 2022 02:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1654248735; bh=L6vnBNt1rIQ4ybJ0twJCwhIdxM9LDIUngFwqwnJ0+zg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=aA2vWSFARgbtMA6PZNK7yh2b1C4zoBwskJLD2/d8KUfXCx12jeBrzWeqzj6H1QyGO G+1eHFUDZyexjmiak1ycPPoPa2ea61VluhH2k3Q8h2932b5iRxb2SQ9dBxaWzZ4nDc LSpQ0WJnC00vkQ3vwhcvcnT1do1scpA4n6VCtumQ= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id E7EFD66830; Fri, 3 Jun 2022 05:32:09 -0400 (EDT) Message-ID: Subject: Re: Steps forward for the LoongArch UEFI bringup patch? (was: Re: [PATCH V14 11/24] LoongArch: Add boot and setup routines) From: Xi Ruoyao To: WANG Xuerui , Ard Biesheuvel , Huacai Chen Cc: linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Yanteng Si , Huacai Chen , Guo Ren , Jiaxun Yang , Stephen Rothwell , linux-efi@vger.kernel.org, WANG Xuerui , Yun Liu , Jonathan Corbet , Arnd Bergmann , Andy Lutomirski , Thomas Gleixner , Peter Zijlstra , Andrew Morton , David Airlie , Linus Torvalds Date: Fri, 03 Jun 2022 17:32:07 +0800 In-Reply-To: References: <20220602115141.3962749-1-chenhuacai@loongson.cn> <20220602115141.3962749-12-chenhuacai@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.2 MIME-Version: 1.0 X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_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 Thu, 2022-06-02 at 22:09 +0800, WANG Xuerui wrote: > For this, I don't know if Huacai should really just leave those=20 > modification in the downstream fork to keep the upstream Linux clean of= =20 > such hacks, because to some degree dealing with such notoriety is life,= =20 > it seems to me. I think at this point Huacai would cooperate and tweak > the patch to get rid of the SVAM and other nonstandard bits as much as > possible, and I'll help him where necessary too. To me any new firmware for PC-like platforms should implement UEFI. For embedded platforms device tree support will be added later. For those guys impossible or unwilling to upgrade the firmware, it may be possible to implement a compatibility layer and the booting procedure will be like: old firmware -> bootloongarch.efi -> customized u-boot -> bootloongarch64.e= fi (grub) -> efi stub (kernel) --------- compatibility layer -------- ^^^^^^^^ normal U= EFI compatible stuff ^^^^^^^^^ new firmware -> bootloongarch64.efi (grub) -> efi stub (kernel) The old firmware route would be similar to the booting procedure of Asahi Linux. I think this can be implemented because it's already implemented on M1 even while Apple is almost completely uncooperative. Just my 2 cents. I know almost nothing about booting. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University