public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yao, Jiewen" <jiewen.yao@intel.com>
To: Sachin Ganesh <sachinganesh@ami.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "gaoliming@byosoft.com.cn" <gaoliming@byosoft.com.cn>,
	"ardb+tianocore@kernel.org" <ardb+tianocore@kernel.org>,
	"kraxel@redhat.com" <kraxel@redhat.com>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	"Xu, Min M" <min.m.xu@intel.com>,
	"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
	"POLUDOV, FELIX" <felixp@ami.com>, Dhanaraj V <vdhanaraj@ami.com>
Subject: Re: [edk2-devel] [PATCH 6/6] OvmfPkg: Use newly defined Unaccepted Memory Type
Date: Thu, 18 Apr 2024 13:35:11 +0000	[thread overview]
Message-ID: <MW4PR11MB5872DA890B623279B6A18F3D8C0E2@MW4PR11MB5872.namprd11.prod.outlook.com> (raw)
In-Reply-To: <BL3PR10MB616140D55275926E10497E12D80E2@BL3PR10MB6161.namprd10.prod.outlook.com>

Ah. That is good. I did not realize they are in one set.

For this one, reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>


> -----Original Message-----
> From: Sachin Ganesh <sachinganesh@ami.com>
> Sent: Thursday, April 18, 2024 9:32 PM
> To: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io
> Cc: gaoliming@byosoft.com.cn; ardb+tianocore@kernel.org; kraxel@redhat.com;
> Aktas, Erdem <erdemaktas@google.com>; Xu, Min M <min.m.xu@intel.com>;
> thomas.lendacky@amd.com; POLUDOV, FELIX <felixp@ami.com>; Dhanaraj V
> <vdhanaraj@ami.com>
> Subject: RE: [EXTERNAL] RE: [PATCH 6/6] OvmfPkg: Use newly defined
> Unaccepted Memory Type
> 
> Hi Jiewen,
> 
> The other patches are as follows. They are all related to UEFI 2.10 and PI 1.8
> Specification updates:
> 
> 1)  MdePkg: Add definition for NVMe Over Fabric Device Path -
> https://edk2.groups.io/g/devel/message/117845?p=%2C%2C%2C20%2C0%2C0
> %2C0%3A%3Arecentpostdate%2Fsticky%2C%2Csachin%2C20%2C2%2C0%2C105
> 551420
> 2) MdePkg: Add new Resource Attributes defined in PI 1.8 Spec -
> https://edk2.groups.io/g/devel/message/117796?p=%2C%2C%2C20%2C0%2C0
> %2C0%3A%3Arecentpostdate%2Fsticky%2C%2Csachin%2C20%2C2%2C0%2C105
> 540404
> 3) MdePkg: Use newly defined Unaccepted Memory Type -
> https://edk2.groups.io/g/devel/message/117797?p=%2C%2C%2C20%2C0%2C0
> %2C0%3A%3Arecentpostdate%2Fsticky%2C%2Csachin%2C20%2C2%2C0%2C105
> 540405
> 4) MdePkg: Update Delayed Dispatch PPI as per PI 1.8 Spec -
> https://edk2.groups.io/g/devel/message/117798?p=%2C%2C%2C20%2C0%2C0
> %2C0%3A%3Arecentpostdate%2Fsticky%2C%2Csachin%2C20%2C2%2C0%2C105
> 540406
> 5) MdePkg: Update to PI 1.8 Revision -
> https://edk2.groups.io/g/devel/message/117799?p=%2C%2C%2C20%2C0%2C0
> %2C0%3A%3Arecentpostdate%2Fsticky%2C%2Csachin%2C20%2C2%2C0%2C105
> 540407
> 
> This is the related MR - https://github.com/tianocore/edk2/pull/5569
> 
> Thank You,
> Sachin.
> 
> -----Original Message-----
> From: Yao, Jiewen <jiewen.yao@intel.com>
> Sent: Thursday, April 18, 2024 5:44 AM
> To: Sachin Ganesh <sachinganesh@ami.com>; devel@edk2.groups.io
> Cc: gaoliming@byosoft.com.cn; ardb+tianocore@kernel.org; kraxel@redhat.com;
> Aktas, Erdem <erdemaktas@google.com>; Xu, Min M <min.m.xu@intel.com>;
> thomas.lendacky@amd.com; Felix Polyudov <Felixp@ami.com>; Dhanaraj V
> <vdhanaraj@ami.com>
> Subject: [EXTERNAL] RE: [PATCH 6/6] OvmfPkg: Use newly defined Unaccepted
> Memory Type
> 
> 
> **CAUTION: The e-mail below is from an external source. Please exercise
> caution before opening attachments, clicking links, or following guidance.**
> 
> Hi Sachin
> I like this clean up. Thanks for doing this.
> 
> I saw this patch is 6/6, but I did not see any other such as 1/6 ~ 5/6 in my
> mailbox. Not sure what is happening on my side.
> 
> Just double confirm, have you sent those patches?
> 
> Thank you
> Yao, Jiewen
> 
> > -----Original Message-----
> > From: Sachin Ganesh <sachinganesh@ami.com>
> > Sent: Thursday, April 18, 2024 3:45 AM
> > To: devel@edk2.groups.io
> > Cc: gaoliming@byosoft.com.cn; ardb+tianocore@kernel.org;
> > kraxel@redhat.com; Yao, Jiewen <jiewen.yao@intel.com>; Aktas, Erdem
> > <erdemaktas@google.com>; Xu, Min M <min.m.xu@intel.com>;
> > thomas.lendacky@amd.com; POLUDOV, FELIX <felixp@ami.com>; Dhanaraj V
> > <vdhanaraj@ami.com>; Sachin Ganesh <sachinganesh@ami.com>
> > Subject: [PATCH 6/6] OvmfPkg: Use newly defined Unaccepted Memory Type
> >
> > EFI_RESOURCE_MEMORY_UNACCEPTED has been officially defined in the PI
> > 1.8 specification. So all temporary solutions have been replaced with
> > the actual definition.
> >
> > Cc: Felix Polyudov <felixp@ami.com>
> > Cc: Dhanaraj V <vdhanaraj@ami.com>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Erdem Aktas <erdemaktas@google.com>
> > Cc: Min Xu <min.m.xu@intel.com>
> > Cc: Tom Lendacky <thomas.lendacky@amd.com>
> > Signed-off-by: Sachin Ganesh <sachinganesh@ami.com>
> > ---
> >  OvmfPkg/AmdSevDxe/AmdSevDxe.c                | 4 ++--
> >  OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c | 8 ++++----
> >  OvmfPkg/Library/PeilessStartupLib/Hob.c      | 4 ++--
> >  OvmfPkg/Library/PlatformInitLib/IntelTdx.c   | 8 ++++----
> >  OvmfPkg/PlatformPei/AmdSev.c                 | 4 ++--
> >  5 files changed, 14 insertions(+), 14 deletions(-)
> >
> > diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> > b/OvmfPkg/AmdSevDxe/AmdSevDxe.c index db3675ae86..d497a343d3 100644
> > --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> > +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
> > @@ -20,7 +20,7 @@
> >  #include <Library/UefiBootServicesTableLib.h>
> >
> >  #include <Guid/ConfidentialComputingSevSnpBlob.h>
> >
> >  #include <Library/PcdLib.h>
> >
> > -#include <Pi/PrePiDxeCis.h>
> >
> > +#include <Pi/PiDxeCis.h>
> >
> >  #include <Protocol/SevMemoryAcceptance.h>
> >
> >  #include <Protocol/MemoryAccept.h>
> >
> >  #include <Uefi/UefiSpec.h>
> >
> > @@ -119,7 +119,7 @@ AcceptAllMemory (
> >      CONST EFI_GCD_MEMORY_SPACE_DESCRIPTOR  *Desc;
> >
> >
> >
> >      Desc = &AllDescMap[Index];
> >
> > -    if (Desc->GcdMemoryType != EFI_GCD_MEMORY_TYPE_UNACCEPTED) {
> >
> > +    if (Desc->GcdMemoryType != EfiGcdMemoryTypeUnaccepted) {
> >
> >        continue;
> >
> >      }
> >
> >
> >
> > diff --git a/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c
> > b/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c
> > index 3372cee2f7..b6085eab44 100644
> > --- a/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c
> > +++ b/OvmfPkg/IntelTdx/TdxHelperLib/SecTdxHelper.c
> > @@ -19,7 +19,7 @@
> >  #include <Library/TdxLib.h>
> >
> >  #include <Library/TdxMailboxLib.h>
> >
> >  #include <Library/SynchronizationLib.h>
> >
> > -#include <Pi/PrePiHob.h>
> >
> > +#include <Pi/PiHob.h>
> >
> >  #include <WorkArea.h>
> >
> >  #include <ConfidentialComputingGuestAttr.h>
> >
> >  #include <Library/TdxHelperLib.h>
> >
> > @@ -351,7 +351,7 @@ AcceptMemoryForAPsStack (
> >      if (Hob.Header->HobType == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {
> >
> >        DEBUG ((DEBUG_INFO, "\nResourceType: 0x%x\n",
> > Hob.ResourceDescriptor-
> > >ResourceType));
> >
> >
> >
> > -      if (Hob.ResourceDescriptor->ResourceType ==
> > BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED) {
> >
> > +      if (Hob.ResourceDescriptor->ResourceType ==
> > EFI_RESOURCE_MEMORY_UNACCEPTED) {
> >
> >          ResourceLength = Hob.ResourceDescriptor->ResourceLength;
> >
> >          PhysicalStart  = Hob.ResourceDescriptor->PhysicalStart;
> >
> >          PhysicalEnd    = PhysicalStart + ResourceLength;
> >
> > @@ -427,7 +427,7 @@ AcceptMemory (
> >    //
> >
> >    while (!END_OF_HOB_LIST (Hob)) {
> >
> >      if (Hob.Header->HobType == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {
> >
> > -      if (Hob.ResourceDescriptor->ResourceType ==
> > BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED) {
> >
> > +      if (Hob.ResourceDescriptor->ResourceType ==
> > EFI_RESOURCE_MEMORY_UNACCEPTED) {
> >
> >          PhysicalStart = Hob.ResourceDescriptor->PhysicalStart;
> >
> >          PhysicalEnd   = PhysicalStart + Hob.ResourceDescriptor->ResourceLength;
> >
> >
> >
> > @@ -563,7 +563,7 @@ ValidateHobList (
> >      EFI_RESOURCE_MEMORY_MAPPED_IO_PORT,
> >
> >      EFI_RESOURCE_MEMORY_RESERVED,
> >
> >      EFI_RESOURCE_IO_RESERVED,
> >
> > -    BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED
> >
> > +    EFI_RESOURCE_MEMORY_UNACCEPTED
> >
> >    };
> >
> >
> >
> >    if (VmmHobList == NULL) {
> >
> > diff --git a/OvmfPkg/Library/PeilessStartupLib/Hob.c
> > b/OvmfPkg/Library/PeilessStartupLib/Hob.c
> > index 318b74c95d..725927da73 100644
> > --- a/OvmfPkg/Library/PeilessStartupLib/Hob.c
> > +++ b/OvmfPkg/Library/PeilessStartupLib/Hob.c
> > @@ -20,7 +20,7 @@
> >  #include <IndustryStandard/UefiTcgPlatform.h>
> >
> >  #include <Library/PlatformInitLib.h>
> >
> >  #include <OvmfPlatforms.h>
> >
> > -#include <Pi/PrePiHob.h>
> >
> > +#include <Pi/PiHob.h>
> >
> >  #include "PeilessStartupInternal.h"
> >
> >
> >
> >  /**
> >
> > @@ -92,7 +92,7 @@ ConstructFwHobList (
> >    //
> >
> >    while (!END_OF_HOB_LIST (Hob)) {
> >
> >      if (Hob.Header->HobType == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {
> >
> > -      if (Hob.ResourceDescriptor->ResourceType ==
> > BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED) {
> >
> > +      if (Hob.ResourceDescriptor->ResourceType ==
> > EFI_RESOURCE_MEMORY_UNACCEPTED) {
> >
> >          PhysicalEnd    = Hob.ResourceDescriptor->PhysicalStart +
> > Hob.ResourceDescriptor->ResourceLength;
> >
> >          ResourceLength = Hob.ResourceDescriptor->ResourceLength;
> >
> >
> >
> > diff --git a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
> > b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
> > index ada8592ddd..e561cee30b 100644
> > --- a/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
> > +++ b/OvmfPkg/Library/PlatformInitLib/IntelTdx.c
> > @@ -17,7 +17,7 @@
> >  #include <IndustryStandard/Tdx.h>
> >
> >  #include <IndustryStandard/IntelTdx.h>
> >
> >  #include <Library/PeiServicesLib.h>
> >
> > -#include <Pi/PrePiHob.h>
> >
> > +#include <Pi/PiHob.h>
> >
> >  #include <WorkArea.h>
> >
> >  #include <ConfidentialComputingGuestAttr.h>
> >
> >
> >
> > @@ -40,9 +40,9 @@ BuildResourceDescriptorHobForUnacceptedMemory (
> >    EFI_RESOURCE_ATTRIBUTE_TYPE  ResourceAttribute;
> >
> >    UINT64                       MaxAcceptedMemoryAddress;
> >
> >
> >
> > -  ASSERT (Hob->ResourceType ==
> > BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED);
> >
> > +  ASSERT (Hob->ResourceType == EFI_RESOURCE_MEMORY_UNACCEPTED);
> >
> >
> >
> > -  ResourceType      = BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED;
> >
> > +  ResourceType      = EFI_RESOURCE_MEMORY_UNACCEPTED;
> >
> >    ResourceAttribute = Hob->ResourceAttribute;
> >
> >    PhysicalStart     = Hob->PhysicalStart;
> >
> >    ResourceLength    = Hob->ResourceLength;
> >
> > @@ -104,7 +104,7 @@ TransferTdxHobList (
> >          ResourceType      = Hob.ResourceDescriptor->ResourceType;
> >
> >          ResourceAttribute =
> > Hob.ResourceDescriptor->ResourceAttribute;
> >
> >
> >
> > -        if (ResourceType == BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED) {
> >
> > +        if (ResourceType == EFI_RESOURCE_MEMORY_UNACCEPTED) {
> >
> >            BuildResourceDescriptorHobForUnacceptedMemory
> > (Hob.ResourceDescriptor);
> >
> >          } else {
> >
> >            BuildResourceDescriptorHob (
> >
> > diff --git a/OvmfPkg/PlatformPei/AmdSev.c
> > b/OvmfPkg/PlatformPei/AmdSev.c index e6b602d79a..52fb4a7202 100644
> > --- a/OvmfPkg/PlatformPei/AmdSev.c
> > +++ b/OvmfPkg/PlatformPei/AmdSev.c
> > @@ -16,7 +16,7 @@
> >  #include <Library/MemEncryptSevLib.h>
> >
> >  #include <Library/MemoryAllocationLib.h>
> >
> >  #include <Library/PcdLib.h>
> >
> > -#include <Pi/PrePiHob.h>
> >
> > +#include <Pi/PiHob.h>
> >
> >  #include <PiPei.h>
> >
> >  #include <Register/Amd/Msr.h>
> >
> >  #include <Register/Intel/SmramSaveStateMap.h>
> >
> > @@ -67,7 +67,7 @@ AmdSevSnpInitialize (
> >
> >
> >        if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY) {
> >
> >          if (ResourceHob->PhysicalStart >= SIZE_4GB) {
> >
> > -          ResourceHob->ResourceType =
> > BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED;
> >
> > +          ResourceHob->ResourceType =
> EFI_RESOURCE_MEMORY_UNACCEPTED;
> >
> >            continue;
> >
> >          }
> >
> >
> >
> > --
> > 2.24.1.windows.2
> > -The information contained in this message may be confidential and
> > proprietary to American Megatrends (AMI). This communication is
> > intended to be read only by the individual or entity to whom it is
> > addressed or by their designee. If the reader of this message is not
> > the intended recipient, you are on notice that any distribution of
> > this message, in any form, is strictly prohibited. Please promptly
> > notify the sender by reply e-mail or by telephone at 770-246-8600, and then
> delete or destroy all copies of the transmission.
> -The information contained in this message may be confidential and proprietary
> to American Megatrends (AMI). This communication is intended to be read only by
> the individual or entity to whom it is addressed or by their designee. If the reader
> of this message is not the intended recipient, you are on notice that any
> distribution of this message, in any form, is strictly prohibited. Please promptly
> notify the sender by reply e-mail or by telephone at 770-246-8600, and then
> delete or destroy all copies of the transmission.


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



      reply	other threads:[~2024-04-18 13:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fe47810cf665e0600067dc78306c425d0181be79.1713382643.git.sachinganesh@ami.com>
2024-04-17 19:44 ` [edk2-devel] [PATCH 6/6] OvmfPkg: Use newly defined Unaccepted Memory Type Sachin Ganesh via groups.io
2024-04-18  0:14   ` Yao, Jiewen
2024-04-18 13:31     ` Sachin Ganesh via groups.io
2024-04-18 13:35       ` Yao, Jiewen [this message]

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=MW4PR11MB5872DA890B623279B6A18F3D8C0E2@MW4PR11MB5872.namprd11.prod.outlook.com \
    --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