Can you create pull request for this change? I will add my review for it. > -----邮件原件----- > 发件人: [email protected] <[email protected]> 代表 Dhaval Sharma > 发送时间: 2024年6月11日 12:09 > 收件人: [email protected] > 抄送: Liming Gao <[email protected]> > 主题: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation > for SP type > > Most of the times it is desirable not to use special purpose > memory for regular edk2 usages. That memory (HBm/CXL) are > either meant for special purposes or are less reliable to > be used. So avoid using them as long as possible. We could > also introduce PCD for this control. > > Cc: Liming Gao <[email protected]> > Signed-off-by: Dhaval Sharma <[email protected]> > --- > MdeModulePkg/Core/Dxe/Mem/Page.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c > b/MdeModulePkg/Core/Dxe/Mem/Page.c > index 5a51d9df1a29..e4daa741b971 100644 > --- a/MdeModulePkg/Core/Dxe/Mem/Page.c > +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c > @@ -1183,6 +1183,13 @@ CoreFindFreePagesI ( > continue; > > } > > > > + // > > + // Don't allocate out of Special-Purpose memory. > > + // > > + if ((Entry->Attribute & EFI_MEMORY_SP) != 0) { > > + continue; > > + } > > + > > DescStart = Entry->Start; > > DescEnd = Entry->End; > > > > -- > 2.40.1 > > > > -=-=-=-=-=-= > Groups.io Links: You receive all messages sent to this group. > View/Reply Online (#119545): https://edk2.groups.io/g/devel/message/119545 > Mute This Topic: https://groups.io/mt/106607739/4905953 > Group Owner: [email protected] > Unsubscribe: https://edk2.groups.io/g/devel/unsub > [[email protected]] > -=-=-=-=-=-= >
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119581): https://edk2.groups.io/g/devel/message/119581 Mute This Topic: https://groups.io/mt/106682610/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
