Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Investigate forcing loading images below 4GiB if available #16

Open
andreiw opened this issue Mar 22, 2023 · 0 comments
Open

Investigate forcing loading images below 4GiB if available #16

andreiw opened this issue Mar 22, 2023 · 0 comments

Comments

@andreiw
Copy link
Contributor

andreiw commented Mar 22, 2023

As part of developing MultiArchUefiPkg we've seen UEFI apps (thankfully not drivers...yet) that are not 64-bit clean:

  • Treating stack (ESP) as 32-bit
  • Corrupting AllocatePool pointers to be non-64-bit clean

This appears on a system where UEFI prefers memory > 4GiB. MultiArchUefiPkg already tries putting the emulated stack below 4GiB if possible, and with #5 could also try keeping pool/page allocations below 4GiB as well.

For consistency, it could be interesting if the images themselves were loaded below 4GiB if that were available, i.e. if the whole emulated image handling by DXE supported taking a hint and then reloading the image. Maybe, just try loading the image first below 4GiB regardless if the image type is x64. This could be an EDK2 patch...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant