From: Heinrich Schuchardt Date: Mon, 11 Mar 2019 12:44:24 +0100 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: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. Best regards Heinrich