mirror of
https://github.com/ipxe/ipxe
synced 2026-01-01 00:07:27 +03:00
[prefix] Use 16-bit protected mode for access to high memory
Flat real mode works perfectly on real hardware, but seems to cause problems for some hypervisors. Revert to using 16-bit protected mode (and returning to real mode with 4GB limits, so as not to break PMM BIOSes). Allow the code specific to the .mrom format to continue to assume that flat real mode works, since this format is specific to real hardware. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -151,7 +151,12 @@ find_mem_bar:
|
||||
/* Copy payload to buffer, or set buffer address to BAR address */
|
||||
testl %esi, %esi
|
||||
jz 1f
|
||||
/* We have a buffer; copy payload to it */
|
||||
/* We have a buffer; copy payload to it. Since .mrom is
|
||||
* designed specifically for real hardware, we assume that
|
||||
* flat real mode is working properly. (In the unlikely event
|
||||
* that this code is run inside a hypervisor that doesn't
|
||||
* properly support flat real mode, it will die horribly.)
|
||||
*/
|
||||
pushl %esi
|
||||
pushw %es
|
||||
movl %esi, %edi
|
||||
|
||||
Reference in New Issue
Block a user