From: "gaoliming via groups.io" <gaoliming=byosoft.com.cn@groups.io>
To: <devel@edk2.groups.io>, <osde@linux.microsoft.com>,
<leif.lindholm@oss.qualcomm.com>, <discuss@edk2.groups.io>,
<adwags@gmail.com>
Subject: 回复: [edk2-devel] [edk2-discuss] Attempted runtime pool allocation returns non-runtime pool
Date: Thu, 5 Dec 2024 09:31:27 +0800 [thread overview]
Message-ID: <01a301db46b5$67766980$36633c80$@byosoft.com.cn> (raw)
In-Reply-To: <1c4d0af6-106c-4db0-80e2-b2dc66d82500@linux.microsoft.com>
Adam:
Coud you show the code and boot log for this problem? How do you verify whether the allocated memory space is runtime memory?
Thanks
Liming
> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Oliver
> Smith-Denny via groups.io
> 发送时间: 2024年12月4日 23:40
> 收件人: devel@edk2.groups.io; leif.lindholm@oss.qualcomm.com;
> discuss@edk2.groups.io; adwags@gmail.com
> 主题: Re: [edk2-devel] [edk2-discuss] Attempted runtime pool allocation
> returns non-runtime pool
>
> Hi Adam,
>
> > On Wed, 4 Dec 2024 at 04:21, Adam Wagner via groups.io
> > <adwags=gmail.com@groups.io> wrote:
> >>
> >> Hello,
> >>
> >> I have a DXE runtime driver that is attempting to allocate runtime pool
> >> (via AllocateRuntimeZeroPool). I'm getting back a non-NULL pointer, but it
> >> isn't in the runtime memory map so ConvertPointer fails later. It looks
> >> like the returned address is in a memory region of "conventional" type
> >> which if I understand correctly is where free memory lives?
> >>
> >> I think I may be hitting the "Attempt to find free pages in the default
> >> allocation bin" case here...
> >>
> https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe/
> Mem/Page.c#L1281
> >>
>
> This piece is fine if it doesn't hit the normal memory bin, it will
> still get the type converted in the call to CoreConvertPages. I agree
> with Leif that AllocateRuntimeZeroPool should not be returning the
> memory if anything failed; what I would recommend is adding some prints
> or using a debugger to tell if the memory is getting the correct type
> on that allocate call and then checking if it is getting freed later
> by some entity.
>
> Oliver
>
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120877): https://edk2.groups.io/g/devel/message/120877
Mute This Topic: https://groups.io/mt/109932354/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
prev parent reply other threads:[~2024-12-05 1:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAB8Y2ryo86XH2s=avss4s4nC8sp68rWv1NsnJHqv+qvxGWEkuA@mail.gmail.com>
2024-12-04 12:31 ` [edk2-devel] [edk2-discuss] Attempted runtime pool allocation returns non-runtime pool Leif Lindholm via groups.io
2024-12-04 15:39 ` Oliver Smith-Denny via groups.io
2024-12-05 1:31 ` gaoliming via groups.io [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='01a301db46b5$67766980$36633c80$@byosoft.com.cn' \
--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