Re: [edk2-devel] [PATCH v3] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-11 Thread Ard Biesheuvel
On Mon, 11 Dec 2023 at 15:33, Laszlo Ersek wrote: > > On 12/11/23 11:55, Gerd Hoffmann wrote: > >> + // > >> + // Work around shim's terminally broken use of the EFI memory attributes > >> + // protocol, by uninstalling it if requested on the QEMU command line. > >> + // > >> + // E.g., > >>

Re: [edk2-devel] [PATCH v3] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-11 Thread Laszlo Ersek
On 12/11/23 11:55, Gerd Hoffmann wrote: >> + // >> + // Work around shim's terminally broken use of the EFI memory attributes >> + // protocol, by uninstalling it if requested on the QEMU command line. >> + // >> + // E.g., >> + // -fw_cfg

Re: [edk2-devel] [PATCH v3] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-11 Thread Gerd Hoffmann
> + // > + // Work around shim's terminally broken use of the EFI memory attributes > + // protocol, by uninstalling it if requested on the QEMU command line. > + // > + // E.g., > + // -fw_cfg opt/org.tianocore/UninstallMemAttrProtocol,string=y > + // > + // This is only needed on

[edk2-devel] [PATCH v3] ArmVirt: Allow memory attributes protocol to be disabled

2023-12-11 Thread Ard Biesheuvel
From: Ard Biesheuvel Shim's PE loader uses the EFI memory attributes protocol in a way that results in an immediate crash when invoking the loaded image, unless the base and size of its executable segment are both aligned to 4k. If this is not the case, it will strip the memory allocation of