<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 30, 2021, at 12:32 PM, Stuart Yoder <<a href="mailto:stuart.yoder@arm.com" class="">stuart.yoder@arm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
<div class="">
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, ...)<br class="">
<br class="">
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.<br class="">
<br class="">
I've allocated 4GB to the QEMU machine, which I believe starts at
0x40000000.<br class="">
<br class=""></div></div></blockquote><div><br class=""></div><div>You can run the `memmap` command at the EFI Shell to see the layout. </div><br class=""><blockquote type="cite" class=""><div class=""><div class="">
But, when I print the address returned by AllocatePool the value is
"0x39177018".<br class="">
<br class=""></div></div></blockquote><div><br class=""></div><div>Print != printf on some of the format string so be careful about that….</div><div><br class=""></div><div>Thanks,</div><div><br class=""></div><div>Andrew Fish</div><br class=""><blockquote type="cite" class=""><div class=""><div class="">
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.<br class=""></div></div></blockquote><blockquote type="cite" class=""><div class=""><div class="">
Thanks,<br class="">
Stuart
</div>
</div></blockquote></div><br class=""></body></html>
<div width="1" style="color:white;clear:both">_._,_._,_</div> <hr> Groups.io Links:<p> You receive all messages sent to this group. <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/78457">View/Reply Online (#78457)</a> | | <a target="_blank" href="https://groups.io/mt/84558767/1813853">Mute This Topic</a> | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br> <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> | <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a> [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>