Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant