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
> -----邮件原件-----
> 发件人: [email protected] <[email protected]> 代表 Oliver
> Smith-Denny via groups.io
> 发送时间: 2024年12月4日 23:40
> 收件人: [email protected]; [email protected];
> [email protected]; [email protected]
> 主题: 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
> > <[email protected]> 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/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to