From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BF9FC43334 for ; Fri, 3 Jun 2022 09:32:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243070AbiFCJc0 (ORCPT ); Fri, 3 Jun 2022 05:32:26 -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 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