From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id A0E1FAC0EE3 for ; Tue, 18 Jun 2024 10:55:41 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=lp96kpge7XzWcHuih/d2SSgRT3t//VtECpSSPzHgatk=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1718708141; v=1; b=R/NG69q5LDZe8YRhvqeUowCuv3uQOeg27F8VO1kRHd+NpMDLe/Q5DOMY+RDUthGavS73DFCl CiTcGStXxi9cYEYxeIP8BSp6JELS8z9brDxUQkwh7Qnb/OxoStoMHpFygMuTnCIRrEnWqGtEEXh uw9tbNAtN2SYHoTp/PoISVz7GCxSn67mqoGOkMVqzhgwescOeYwlF/6aZUgx0CWTJdDcOdK47K+ j3wtfVeJRY/s9ch47dyHcdDhUnSRTrIP/xKWsEAJ1nPEPfgLA9nDkJQPoR2W4mjnXrFHa6DMoxh Se0QsXSNx3u+f2znziiqJmXtBpX2oo++76BtFpZuiVS/Q== X-Received: by 127.0.0.2 with SMTP id QhPhYY7687511xx53Ht5au58; Tue, 18 Jun 2024 03:55:40 -0700 X-Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by mx.groups.io with SMTP id smtpd.web11.83220.1718708138837159086 for ; Tue, 18 Jun 2024 03:55:39 -0700 X-Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a6f176c5c10so640353066b.2 for ; Tue, 18 Jun 2024 03:55:38 -0700 (PDT) X-Gm-Message-State: cNLQaOnPV562CVi6fI1XMDI3x7686176AA= X-Google-Smtp-Source: AGHT+IEtyCpbAlh+J4Sk2YMVZPnZmDTeH/IqnQ+ldFP5yc36ikoXe7vzEuDrDygyASvGm9XFdvsiqCpsaiamMl2zQZs= X-Received: by 2002:a17:906:3bd1:b0:a6f:ea6:9534 with SMTP id a640c23a62f3a-a6f60deb626mr831606866b.76.1718708136842; Tue, 18 Jun 2024 03:55:36 -0700 (PDT) MIME-Version: 1.0 References: <20240611040910.93238-1-dhaval@rivosinc.com> <20240611040910.93238-2-dhaval@rivosinc.com> <045501dabed0$c1e5d170$45b17450$@byosoft.com.cn> In-Reply-To: From: "Dhaval Sharma" Date: Tue, 18 Jun 2024 16:25:25 +0530 Message-ID: Subject: Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type To: "Kinney, Michael D" Cc: "devel@edk2.groups.io" , "gaoliming@byosoft.com.cn" Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Tue, 18 Jun 2024 03:55:39 -0700 Resent-From: dhaval@rivosinc.com Reply-To: devel@edk2.groups.io,dhaval@rivosinc.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: multipart/alternative; boundary="000000000000f8353d061b27eb2d" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b="R/NG69q5"; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --000000000000f8353d061b27eb2d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I already sent out an update yesterday. PTAL when you get a chance. Thanks! On Sat, Jun 15, 2024 at 10:24=E2=80=AFAM 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 On Behalf Of > gaoliming via > > groups.io > > Sent: Friday, June 14, 2024 8:05 PM > > To: devel@edk2.groups.io; dhaval@rivosinc.com > > Subject: =E5=9B=9E=E5=A4=8D: [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 i= t. > > > > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =E4=BB=A3=E8=A1=A8 Dhaval Sharma > > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B46=E6=9C=8811=E6=97= =A5 12:09 > > > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > > > =E6=8A=84=E9=80=81: Liming Gao > > > =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid e= fi 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 > > > Signed-off-by: Dhaval Sharma > > > --- > > > 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) !=3D 0) { > > > > > > + continue; > > > > > > + } > > > > > > + > > > > > > DescStart =3D Entry->Start; > > > > > > DescEnd =3D Entry->End; > > > > > > > > > > > > -- > > > 2.40.1 > > > > > > > > > > > > -=3D-=3D-=3D-=3D-=3D-=3D > > > 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] > > > -=3D-=3D-=3D-=3D-=3D-=3D > > > > > > > > > > > > > > >=20 > > > > --=20 Thanks! =3DD -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --000000000000f8353d061b27eb2d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I already sent out an update yesterday. PTAL when you get = a chance. Thanks!

On Sat, Jun 15, 2024 at 10:24=E2=80=AFAM Kinney, Michael D= <michael.d.kinney@intel.c= om> wrote:
https://github.com/tianocore/edk2/pull/5760

Mike

> -----Original Message-----
> From: devel@= edk2.groups.io <devel@edk2.groups.io> On Behalf Of gaoliming via
> grou= ps.io
> Sent: Friday, June 14, 2024 8:05 PM
> To: devel@ed= k2.groups.io; = dhaval@rivosinc.com
> Subject: =E5=9B=9E=E5=A4=8D: [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.
>
> > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6-----
> > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io <devel@edk2.groups.io> =E4=BB=A3=E8= =A1=A8 Dhaval Sharma
> > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2024=E5=B9=B46=E6=9C=8811= =E6=97=A5 12:09
> > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io
> > =E6=8A=84=E9=80=81: Liming Gao <gaoliming@byosoft.com.cn>
> > =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avo= id 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>
> > ---
> >=C2=A0 MdeModulePkg/Core/Dxe/Mem/Page.c | 7 +++++++
> >=C2=A0 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 (
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 continue;
> >
> >=C2=A0 =C2=A0 =C2=A0 }
> >
> >
> >
> > +=C2=A0 =C2=A0 //
> >
> > +=C2=A0 =C2=A0 // Don't allocate out of Special-Purpose memor= y.
> >
> > +=C2=A0 =C2=A0 //
> >
> > +=C2=A0 =C2=A0 if ((Entry->Attribute & EFI_MEMORY_SP) !=3D= 0) {
> >
> > +=C2=A0 =C2=A0 =C2=A0 continue;
> >
> > +=C2=A0 =C2=A0 }
> >
> > +
> >
> >=C2=A0 =C2=A0 =C2=A0 DescStart =3D Entry->Start;
> >
> >=C2=A0 =C2=A0 =C2=A0 DescEnd=C2=A0 =C2=A0=3D Entry->End;
> >
> >
> >
> > --
> > 2.40.1
> >
> >
> >
> > -=3D-=3D-=3D-=3D-=3D-=3D
> > Groups.io Links: You receive all messages sent to this group.
> > View/Reply Online (#119545): https://edk2.gro= ups.io/g/devel/message/119545
> > Mute This Topic: https://groups.io/mt/106607739/4905= 953
> > Group Owner: devel+owner@edk2.groups.io
> > Unsubscribe: https://edk2.groups.io/g/devel/unsub<= br> > > [ga= oliming@byosoft.com.cn]
> > -=3D-=3D-=3D-=3D-=3D-=3D
> >
>
>
>
>
>
>
>



--
Thanks!
=3DD
_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#119607) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--000000000000f8353d061b27eb2d--