[edk2-devel] edk2 memory map on QEMU

Stuart Yoder stuart.yoder at arm.com
Fri Jul 30 19:32:43 UTC 2021


I am playing around with EDK2 on QEMU with a UEFI shell application and in the app I allocate some memory using gBS->AllocatePool(EfiBootServicesData, ...)

Programmatically accessing the pointer returned works fine, but when I print it, it does not seem to be what I would expect is a valid address.

I've allocated 4GB to the QEMU machine, which I believe starts at 0x40000000.

But, when I print the address returned by AllocatePool the value is "0x39177018".

I thought that all memory was identity mapped where phys=virt, so not sure where the 0x39177018 is coming from.  Trying to dump 0x39177018 from the QEMU console or GDB results in a bad address error.

Thanks,
Stuart


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#78455): https://edk2.groups.io/g/devel/message/78455
Mute This Topic: https://groups.io/mt/84558767/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210730/544f520c/attachment.htm>


More information about the edk2-devel-archive mailing list