Got strange reaction when trying to get memory map
Posted: Tue Jun 21, 2022 12:24 am
When I'm in EFI trying to get memory map and exit boot service, I use AllocatePool to get memory used by GetMemoryMap. But the efi application stuck after showing "Trying to get memory map with size xxx, buffer xxx. I try to Print something after function get_memory_map, and it shows:
This is the code after I added some debug part:
https://pastebin.com/NeD85uz6
Code: Select all
Trying to get memory map with size: 1920, buffer: BE6B5018...
1631 -1100263400 2448
Trying to get memory map with size: 3088, buffer: BE6B5018...
?
Trying to get memory map with size: 1920, buffer: BE6B4018...
1656 -1100267496 2448
Trying to get memory map with size: 3088, buffer: BE6B4018...
?
Trying to get memory map with size: 1920, buffer: BE6B3018...
1681 -1100271592 2448
Trying to get memory map with size: 3088, buffer: BE6B3018...
?
Unable to successfully exit boot services. Last status: 2
Error: Image at 000BE54D000 start failed: Aborted
https://pastebin.com/NeD85uz6