From: Jonathan Gray Date: Wed, 13 Mar 2019 01:16:05 +1100 Subject: [U-Boot] [PATCH v4 1/1] efi_loader: Patch non-runtime code out at ExitBootServices already In-Reply-To: References: <20190311001643.29297-1-xypron.glpk@gmx.de> Message-ID: <20190312141605.GA46132@largo.jsg.id.au> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Mar 11, 2019 at 12:44:24PM +0100, Heinrich Schuchardt wrote: > On 3/11/19 9:03 AM, Ard Biesheuvel wrote: > > On Mon, 11 Mar 2019 at 01:16, Heinrich Schuchardt wrote: > >> > >> From: Alexander Graf > >> > >> While discussing something compeltely different, Ard pointed out > >> that it might be legal to omit calling SetVirtualAddressMap altogether. > >> > >> There is even a patch on the Linux Kernel Mailing List that implements > >> such behavior by now: > >> > >> https://patchwork.kernel.org/patch/10782393/ > >> > >> While that sounds great, we currently rely on the SetVirtualAddressMap > >> call to remove all references to code that would not work outside of > >> boot services. > >> > >> So let's patch out those bits already on the call to ExitBootServices, > >> so that we can successfully run even when an OS chooses to omit > >> any call to SetVirtualAddressMap. > >> > >> Reported-by: Ard Biesheuvel > >> Signed-off-by: Alexander Graf > >> > >> OpenBSD is not calling SetVirtualAddressMap on ARM 32 bit. > >> > > > > I take it this means that OpenBSD does not support runtime services at > > all on 32-bit ARM? > > References to runtime services exist, e.g.: > > sys/arch/armv7/stand/efiboot/efiboot.c:666: > EFI_CALL(RS->ResetSystem, EfiResetShutdown, EFI_SUCCESS, 0, NULL); > > But from what I see at first glance it seems to be for the interactive > console before booting the kernel. Runtime services are used on OpenBSD/arm64 to be able to access the rtc on amd seattle machines. Not currently used by the kernel on any other platform (including amd64). > > Best regards > > Heinrich > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > https://lists.denx.de/listinfo/u-boot