public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Leif Lindholm via groups.io" <leif.lindholm=oss.qualcomm.com@groups.io>
To: discuss@edk2.groups.io, adwags@gmail.com, devel@edk2.groups.io
Subject: Re: [edk2-devel] [edk2-discuss] Attempted runtime pool allocation returns non-runtime pool
Date: Wed, 4 Dec 2024 12:31:13 +0000	[thread overview]
Message-ID: <CAD=n3R2G_Rwrd_zu-isnfOgmGWnX9eS=eMnqB2D+Ckb6F-3C_g@mail.gmail.com> (raw)
In-Reply-To: <CAB8Y2ryo86XH2s=avss4s4nC8sp68rWv1NsnJHqv+qvxGWEkuA@mail.gmail.com>

Hi Adam,

I think this topic is better for the "devel" group, rather then
"discuss". I've added it to cc.

I don't see why you would get back a valid pointer if the request
failed. That would feel like a bug in AllocateRuntimeZeroPool.
But there could be some subtlety involving pool allocations I'm missing here.

You could always allocate memory with AllocatePages directly instead,
to cut out the middle man,
and if nothing else see if that turns up some other issue.

Regards,

Leif

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
>
> Is there a way to "relocate" or "promote" this to the runtime pool or
> otherwise get it into the runtime memory map? Sorry if my terminology is
> wrong, I'm obviously a newb. I poked around on the groups here and on
> bugzilla but couldn't find anything related.
>
> Thanks,
> Adam
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#120867): https://edk2.groups.io/g/devel/message/120867
Mute This Topic: https://groups.io/mt/109918571/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



       reply	other threads:[~2024-12-04 12: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 ` Leif Lindholm via groups.io [this message]
2024-12-04 15:39   ` [edk2-devel] [edk2-discuss] Attempted runtime pool allocation returns non-runtime pool Oliver Smith-Denny via groups.io
2024-12-05  1:31     ` 回复: " gaoliming via groups.io

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='CAD=n3R2G_Rwrd_zu-isnfOgmGWnX9eS=eMnqB2D+Ckb6F-3C_g@mail.gmail.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