public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Stuart Yoder" <stuart.yoder@arm.com>
To: Andrew Fish <afish@apple.com>,
	edk2-devel-groups-io <devel@edk2.groups.io>
Subject: Re: [edk2-devel] edk2 memory map on QEMU
Date: Fri, 30 Jul 2021 16:50:23 -0500	[thread overview]
Message-ID: <4d7aafe3-5e5b-cc7f-14be-2054b7341196@arm.com> (raw)
In-Reply-To: <975C0799-99BF-4C5C-9628-EF7604670117@apple.com>



On 7/30/21 3:36 PM, Andrew Fish wrote:
> 
> 
>> On Jul 30, 2021, at 12:32 PM, Stuart Yoder <stuart.yoder@arm.com <mailto:stuart.yoder@arm.com>> wrote:
>>
>> 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.
>>
> 
> You can run the `memmap` command at the EFI Shell to see the layout.
> 
>> But, when I print the address returned by AllocatePool the value is "0x39177018".
>>
> 
> Print != printf on some of the format string so be careful about that….
> 

I figured it out.  It was a dumb Print() formatting error that resulted in
the address getting truncated to 8 bytes.

Thanks,
Stuart

      reply	other threads:[~2021-07-30 21:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 19:32 edk2 memory map on QEMU Stuart Yoder
2021-07-30 20:36 ` [edk2-devel] " Andrew Fish
2021-07-30 21:50   ` Stuart Yoder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d7aafe3-5e5b-cc7f-14be-2054b7341196@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox