On 1/22/2024 1:24 PM, Oliver Smith-Denny wrote:
Allocating pool memory will never be 4KB aligned because of the
POOL_HEAD. See:
https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Core/Dxe/Mem/Pool.c#L463-L537.
The allocated page is 4KB aligned, of course, but we store the POOL_HEAD
at the beginning of that page and return Head->Data to the caller.
In addition, this is only in the case where you allocate a new page for
the pool. In the case where the pool has the pages it needs, you don't
have any alignment guarantee, I believe, it is just offset further
into one of the already allocated pages.
Thanks. I'll update the script to require users to pass in the address
of the EFI_SYSTEM_TABLE instead of searching for it!
--
Rebecca Cran
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#114149): https://edk2.groups.io/g/devel/message/114149
Mute This Topic: https://groups.io/mt/103894456/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-