public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming via groups.io" <gaoliming=byosoft.com.cn@groups.io>
To: <devel@edk2.groups.io>, <dhaval@rivosinc.com>
Subject: 回复: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type
Date: Sat, 15 Jun 2024 11:04:37 +0800	[thread overview]
Message-ID: <045501dabed0$c1e5d170$45b17450$@byosoft.com.cn> (raw)
In-Reply-To: <20240611040910.93238-2-dhaval@rivosinc.com>

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]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-06-15  3:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='045501dabed0$c1e5d170$45b17450$@byosoft.com.cn' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox