On 06/05/17 11:54, Igor Mammedov wrote:
BTW: how OVMF would deal with booting 32-bit OS if it would allocate ACPI tables above 4Gb? For BIOS on baremetal I'd expect some switch in settings, something like "Disable 32-bit OS support".
In order to answer your question exhaustively, I'd have to ponder this a lot longer. For now my basic answer is the following:
- If you can allocate memory above 4GB in the DXE phase, that means your DXE and BDS phases are 64-bit. Which in turn implies you *cannot* boot a 32-bit OS at all.
Generally speaking, with PI / UEFI, the bitness of the firmware (the DXE and the BDS phases) and the bitness of the OS (incl. its UEFI boot loader) must be identical.
As a trick, Linux can work around this, in *one* direction -- 64-bit Linux can run on 32-bit UEFI firmware (on x86; not sure about other arches). But, the other direction (32-bit UEFI OS on 64-bit firmware) cannot work, minimally because you can only call the UEFI runtime services in 64-bit mode.
In short (again, this is quite rudimentary), if your memory allocation in the DXE and/or BDS phases ends up being served from above 4GB, you won't be booting a 32-bit-only OS.
Thanks Laszlo