On 6/9/2024 6:44 PM, Dhaval Sharma wrote:
Related to this, I also faced this issue where in order to prevent edk2 from allocating this memory I had to modify CoreFindFreePagesI
     //
     // Don't allocate out of Special-Purpose memory.
     //
     if ((Entry->Attribute & EFI_MEMORY_SP) != 0) {
       continue;
     }
Can't we add PCD based logic here to selectively NOT use SP memory for edk2 allocations? I think "reserved-memory" attr does not work well because it would force OS/drivers not to use it. Which is not what we want. We really want special drivers to make use of it.

We've had some other conversations around this and I agree, we don't
want DXE Core to allocate this memory unless it has no other option.
I don't think this should be a PCD, I think DXE can make the statement
that it won't allocate EFI_MEMORY_SP memory unless it has run out of
other memory.

Thanks,
Oliver


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119550): https://edk2.groups.io/g/devel/message/119550
Mute This Topic: https://groups.io/mt/106165072/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to