Comment 12 for bug 1593605

Revision history for this message
Laszlo Ersek (Red Hat) (lersek) wrote :

... In addition to what I said above in comment #9 (which stands), the technical problem with turning the memory allocation in question into AcpiNVS type is that it would prevent *all* OSes from reusing the area.

It would prevent the Windows 7 memory manager from deallocating page #0 (thereby saving Windows 7 HAL's buttocks), correct, but the page would also be lost for other, actually UEFI-abiding, OSes as well. That's a way too high price to pay for bug-compatibility with Windows 7.

This is actually documented in the commit message of https://github.com/tianocore/edk2/commit/90803342b1b6 . An excerpt:

    The Int10h real-mode IVT entry is covered with a Boot Services Code page,
    making that too unaccessible to the rest of edk2. (Thus UEFI guest OSes
    different from the Windows 2008 family can reclaim the page. The Windows
    2008 family accesses the page at zero regardless of the allocation type.)

This was in fact a difference between v1 and v2 of the patch. V1 used EfiReservedMemoryType, but v2 changed that, so that no other OSes would be punished. See esp. the Notes section of v2:

http://thread.gmane.org/gmane.comp.bios.tianocore.devel/7047
http://thread.gmane.org/gmane.comp.bios.tianocore.devel/7127