From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E64C7C for ; Sat, 17 Sep 2022 08:03:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E14E1C433C1 for ; Sat, 17 Sep 2022 08:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663401794; bh=8MWqPLxycta7tKDmQhpCi+rXytPZGqnpbu/RfHFSaF0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=r6m0qqiQaI9yOp46mhoaKsYPVLf6bp2zLBiZR9kKNc7o9/lq1ofiYdzuvmz7hagQ5 yuySXqA69fVpEOsrUlU66NatUvw8AlMlbALkZ5JvjOIS2DgpXttT3X/c3/aCV1cslU VCn5XBqUSDakl+AVfs3gmnfYGJBbC1dC7DlOvWOfFvnGsqsGMa0sOTL7VZD/4sIhJk wtD0C74EHzNLZtddi4oghQSXO227E9xq3L21fafMgB14tT5Zznakz+j7mo1Gb3zpAG lp9Ze5Fd2fU3TrQYq4LJwQRH65QGYwylWaKdQQP6VVpmmuxjclnszUWMUd5uQ+OiFW yCKz0dsS2pxsg== Received: by mail-lj1-f172.google.com with SMTP id bn9so28318099ljb.6 for ; Sat, 17 Sep 2022 01:03:14 -0700 (PDT) X-Gm-Message-State: ACrzQf2s7uKr4fGVvFB7prwhTbz5Lfzn6ns40qqULjJvxfTTCHGv78yM FW23Iu8+CXg+FVtvhQ1kujdz85xcw+zd/cr7sUY= X-Google-Smtp-Source: AMsMyM6VO6TctadgQr+j6O8q5pfpHZy4486aMDlGwGPZSbQmQSa8SEA7yK1XWHhp7DdXR+TokGYMk3vp+9N3TRVxwDA= X-Received: by 2002:a05:651c:1a14:b0:26a:c8ca:7ed8 with SMTP id by20-20020a05651c1a1400b0026ac8ca7ed8mr2274601ljb.415.1663401792929; Sat, 17 Sep 2022 01:03:12 -0700 (PDT) Precedence: bulk X-Mailing-List: loongarch@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Ard Biesheuvel Date: Sat, 17 Sep 2022 10:03:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Removing DT dependency from LoongArch EFI stub To: Huacai Chen Cc: Xuerui Wang , linux-efi , loongarch@lists.linux.dev Content-Type: text/plain; charset="UTF-8" On Sat, 17 Sept 2022 at 09:59, Huacai Chen wrote: > > Hi, Ard, > > On Sat, Sep 17, 2022 at 2:37 AM Ard Biesheuvel wrote: > > > > Hello, > > > > One of the things I didn't quite like was that LoongArch now uses > > libfdt only because our EFI stub code depends on it. I would like to > > fix this. > > > > I have pushed a branch here that implements this. Unfortunately, it > > doesn't proceed beyond > > > > and I need some help debugging the error. > > > > EFI stub: Booting Linux Kernel... > > EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path > > EFI stub: Exiting boot services ... > > > > https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?h=efi-cleanups-for-v6.1 > > > > The idea is to pass the EFI system table pointer and the command line > > pointer directly. In previous patches, the initrd and memmap code is > > updated so it exposes the information via configuration tables that > > the generic code can parse. > > > > Any help is greatly appreciated. > I'm sorry but I suggest keeping the current light FDT approach. Of > course the upstream LoongArch kernel uses UEFI+ACPI, but it only > supports high-end systems (Loongson-3A/3C CPU with LS7A chipset). In > fact, low-end systems (Loongson-2K CPU in SoC) support is already on > the way and target for 6.2, which uses FDT in order to share a number > of existing drivers. Using the current approach can share lots of boot > code for both high-end and low-end systems, and doesn't break boot > again. > Ah fair enough. I didn't realize you were planning on using FDT as a platform description. I may still propose some enhancements that clean up the way we use FDT in the EFI stub, but omitting it entirely is not going to be a priority then. Thanks, Ard.