public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH v1 0/1] Avoid EFI memory alloc from SP_MEMORY
@ 2024-06-11  4:09 Dhaval Sharma
  2024-06-11  4:09 ` [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type Dhaval Sharma
  2024-06-11 17:08 ` [edk2-devel] [PATCH v1 0/1] Avoid EFI memory alloc from SP_MEMORY Oliver Smith-Denny
  0 siblings, 2 replies; 6+ messages in thread
From: Dhaval Sharma @ 2024-06-11  4:09 UTC (permalink / raw)
  To: devel

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.

https://github.com/tianocore/edk2/pull/5760

Dhaval (1):
  MdeModulePkg: Avoid efi memory allocation for SP type

 MdeModulePkg/Core/Dxe/Mem/Page.c | 7 +++++++
 1 file changed, 7 insertions(+)

-- 
2.40.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119544): https://edk2.groups.io/g/devel/message/119544
Mute This Topic: https://groups.io/mt/106607737/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type
  2024-06-11  4:09 [edk2-devel] [PATCH v1 0/1] Avoid EFI memory alloc from SP_MEMORY Dhaval Sharma
@ 2024-06-11  4:09 ` Dhaval Sharma
  2024-06-15  3:04   ` 回复: " gaoliming via groups.io
  2024-06-11 17:08 ` [edk2-devel] [PATCH v1 0/1] Avoid EFI memory alloc from SP_MEMORY Oliver Smith-Denny
  1 sibling, 1 reply; 6+ messages in thread
From: Dhaval Sharma @ 2024-06-11  4:09 UTC (permalink / raw)
  To: devel; +Cc: Liming Gao

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 <gaoliming@byosoft.com.cn>
Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
---
 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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH v1 0/1] Avoid EFI memory alloc from SP_MEMORY
  2024-06-11  4:09 [edk2-devel] [PATCH v1 0/1] Avoid EFI memory alloc from SP_MEMORY Dhaval Sharma
  2024-06-11  4:09 ` [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type Dhaval Sharma
@ 2024-06-11 17:08 ` Oliver Smith-Denny
  1 sibling, 0 replies; 6+ messages in thread
From: Oliver Smith-Denny @ 2024-06-11 17:08 UTC (permalink / raw)
  To: devel, dhaval

On 6/10/2024 9:09 PM, Dhaval Sharma wrote:
> 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.
> 
> https://github.com/tianocore/edk2/pull/5760
> 
> Dhaval (1):
>    MdeModulePkg: Avoid efi memory allocation for SP type
> 
>   MdeModulePkg/Core/Dxe/Mem/Page.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 

In case you missed it, edk2 has moved to a PR process for
patches now: 
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process.

I have left a comment on your PR, thanks.

Oliver


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119551): https://edk2.groups.io/g/devel/message/119551
Mute This Topic: https://groups.io/mt/106607737/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

* 回复: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type
  2024-06-11  4:09 ` [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type Dhaval Sharma
@ 2024-06-15  3:04   ` gaoliming via groups.io
  2024-06-15  4:54     ` Michael D Kinney
  0 siblings, 1 reply; 6+ messages in thread
From: gaoliming via groups.io @ 2024-06-15  3:04 UTC (permalink / raw)
  To: devel, dhaval

Can you create pull request for this change? I will add my review for it. 

> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Dhaval Sharma
> 发送时间: 2024年6月11日 12:09
> 收件人: devel@edk2.groups.io
> 抄送: Liming Gao <gaoliming@byosoft.com.cn>
> 主题: [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 <gaoliming@byosoft.com.cn>
> Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
> ---
>  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: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaoliming@byosoft.com.cn]
> -=-=-=-=-=-=
> 





-=-=-=-=-=-=-=-=-=-=-=-
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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type
  2024-06-15  3:04   ` 回复: " gaoliming via groups.io
@ 2024-06-15  4:54     ` Michael D Kinney
  2024-06-18 10:55       ` Dhaval Sharma
  0 siblings, 1 reply; 6+ messages in thread
From: Michael D Kinney @ 2024-06-15  4:54 UTC (permalink / raw)
  To: devel@edk2.groups.io, gaoliming@byosoft.com.cn,
	dhaval@rivosinc.com
  Cc: Kinney, Michael D

Liming,

It is here, but needs some commit message updates

https://github.com/tianocore/edk2/pull/5760

Mike

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming via
> groups.io
> Sent: Friday, June 14, 2024 8:05 PM
> To: devel@edk2.groups.io; dhaval@rivosinc.com
> Subject: 回复: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory
> allocation for SP type
> 
> Can you create pull request for this change? I will add my review for it.
> 
> > -----邮件原件-----
> > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Dhaval Sharma
> > 发送时间: 2024年6月11日 12:09
> > 收件人: devel@edk2.groups.io
> > 抄送: Liming Gao <gaoliming@byosoft.com.cn>
> > 主题: [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 <gaoliming@byosoft.com.cn>
> > Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
> > ---
> >  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: devel+owner@edk2.groups.io
> > Unsubscribe: https://edk2.groups.io/g/devel/unsub
> > [gaoliming@byosoft.com.cn]
> > -=-=-=-=-=-=
> >
> 
> 
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119584): https://edk2.groups.io/g/devel/message/119584
Mute This Topic: https://groups.io/mt/106683481/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type
  2024-06-15  4:54     ` Michael D Kinney
@ 2024-06-18 10:55       ` Dhaval Sharma
  0 siblings, 0 replies; 6+ messages in thread
From: Dhaval Sharma @ 2024-06-18 10:55 UTC (permalink / raw)
  To: Kinney, Michael D; +Cc: devel@edk2.groups.io, gaoliming@byosoft.com.cn

[-- Attachment #1: Type: text/plain, Size: 3198 bytes --]

I already sent out an update yesterday. PTAL when you get a chance. Thanks!

On Sat, Jun 15, 2024 at 10:24 AM Kinney, Michael D <
michael.d.kinney@intel.com> wrote:

> Liming,
>
> It is here, but needs some commit message updates
>
> https://github.com/tianocore/edk2/pull/5760
>
> Mike
>
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> gaoliming via
> > groups.io
> > Sent: Friday, June 14, 2024 8:05 PM
> > To: devel@edk2.groups.io; dhaval@rivosinc.com
> > Subject: 回复: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory
> > allocation for SP type
> >
> > Can you create pull request for this change? I will add my review for it.
> >
> > > -----邮件原件-----
> > > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Dhaval Sharma
> > > 发送时间: 2024年6月11日 12:09
> > > 收件人: devel@edk2.groups.io
> > > 抄送: Liming Gao <gaoliming@byosoft.com.cn>
> > > 主题: [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 <gaoliming@byosoft.com.cn>
> > > Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
> > > ---
> > >  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: devel+owner@edk2.groups.io
> > > Unsubscribe: https://edk2.groups.io/g/devel/unsub
> > > [gaoliming@byosoft.com.cn]
> > > -=-=-=-=-=-=
> > >
> >
> >
> >
> >
> >
> > 
> >
>
>

-- 
Thanks!
=D


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119607): https://edk2.groups.io/g/devel/message/119607
Mute This Topic: https://groups.io/mt/106683481/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 5887 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-06-18 10:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11  4:09 [edk2-devel] [PATCH v1 0/1] Avoid EFI memory alloc from SP_MEMORY Dhaval Sharma
2024-06-11  4:09 ` [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type Dhaval Sharma
2024-06-15  3:04   ` 回复: " gaoliming via groups.io
2024-06-15  4:54     ` Michael D Kinney
2024-06-18 10:55       ` Dhaval Sharma
2024-06-11 17:08 ` [edk2-devel] [PATCH v1 0/1] Avoid EFI memory alloc from SP_MEMORY Oliver Smith-Denny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox