Hi Adam,
On Wed, 4 Dec 2024 at 04:21, Adam Wagner via groups.io
<adwags=gmail....@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 (#120871): https://edk2.groups.io/g/devel/message/120871
Mute This Topic: https://groups.io/mt/109918571/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-