public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel][edk2-platforms][PATCH V1 0/3] Update PlatformPayloadPkg to match feature conventions
@ 2022-08-10 22:46 Oram, Isaac W
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue Oram, Isaac W
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Oram, Isaac W @ 2022-08-10 22:46 UTC (permalink / raw)
  To: devel; +Cc: Isaac Oram, Sai Chaganty, Nate DeSimone, Liming Gao, Ray Ni,
	Guo Dong

The integration of the PlatformPayloadPkg breaks the AdvancedFeaturePkg build.
The first patch fixes the build issue with executing
  build -a IA32 -a X64 -p AdvancedFeaturePkg/AdvancedFeaturePkg.dsc

The PlatformPayloadPkg doesn't match advanced feature build and naming conventions.  The second patch
simply renames the files and does exact search and replace on the changes.

The third patch fixes token space guid name, feature enable name, and the like to match the conventions of
other features.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>

Isaac Oram (3):
  PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue
  PlatformPayloadPkg: Rename to match other feature conventions
  PlatformPayloadFeaturePkg: Update contents to match feature
    conventions

 .../AdvancedFeaturePkg/AdvancedFeaturePkg.dsc |  2 +-
 .../Include/AdvancedFeatures.dsc              |  4 +-
 .../Include/AdvancedFeaturesPcd.dsc           |  4 +-
 .../AdvancedFeaturePkg/Include/PostMemory.fdf |  4 +-
 .../AdvancedFeaturePkg/Include/PreMemory.fdf  |  4 +-
 .../Fvb/FvbInfo.c                             |  0
 .../Fvb/FvbService.c                          |  0
 .../Fvb/FvbService.h                          |  0
 .../Fvb/FvbServiceSmm.c                       |  0
 .../Fvb/FvbSmm.inf                            |  4 +-
 .../Fvb/FvbSmmCommon.h                        |  0
 .../Include/Guid/NvVariableInfoGuid.h         |  0
 .../Include/Guid/SpiFlashInfoGuid.h           |  0
 .../Include/Library/FlashDeviceLib.h          |  0
 .../Include/Library/SpiFlashLib.h             |  0
 .../Include/PlatformPayloadFeature.dsc        | 50 +++++------
 .../Include/PostMemory.fdf                    |  4 +-
 .../Include/PreMemory.fdf                     |  0
 .../Library/FlashDeviceLib/FlashDeviceLib.c   |  0
 .../Library/FlashDeviceLib/FlashDeviceLib.inf |  3 +-
 .../Library/PcdInitLib/PcdInitLib.c           |  0
 .../Library/PcdInitLib/PcdInitLib.inf         |  3 +-
 .../Library/SpiFlashLib/PchSpi.c              |  0
 .../Library/SpiFlashLib/RegsSpi.h             |  0
 .../Library/SpiFlashLib/SpiCommon.h           |  0
 .../Library/SpiFlashLib/SpiFlashLib.c         |  0
 .../Library/SpiFlashLib/SpiFlashLib.inf       |  2 +-
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.c     |  0
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.h     |  0
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.inf   |  0
 .../PlatformPayloadFeaturePkg.dec}            |  8 +-
 .../PlatformPayloadFeaturePkg.dsc}            | 30 ++++++-
 .../PlatformPayloadFeaturePkg.fdf}            |  0
 .../PlatformPayloadFeaturePkg.py}             |  4 +-
 .../Readme.md                                 | 82 ++++++++++---------
 35 files changed, 117 insertions(+), 91 deletions(-)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbInfo.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbService.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbService.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbServiceSmm.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbSmm.inf (89%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbSmmCommon.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Guid/NvVariableInfoGuid.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Guid/SpiFlashInfoGuid.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Library/FlashDeviceLib.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Library/SpiFlashLib.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PlatformPayloadFeature.dsc (72%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PostMemory.fdf (77%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PreMemory.fdf (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/FlashDeviceLib/FlashDeviceLib.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/FlashDeviceLib/FlashDeviceLib.inf (90%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/PcdInitLib/PcdInitLib.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/PcdInitLib/PcdInitLib.inf (92%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/PchSpi.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/RegsSpi.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiCommon.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiFlashLib.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiFlashLib.inf (90%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.inf (100%)
 rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.dec => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec} (73%)
 rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.dsc => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc} (77%)
 rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.fdf => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf} (100%)
 rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.py => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py} (93%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Readme.md (50%)

--
2.36.1.windows.1

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

* [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue
  2022-08-10 22:46 [edk2-devel][edk2-platforms][PATCH V1 0/3] Update PlatformPayloadPkg to match feature conventions Oram, Isaac W
@ 2022-08-10 22:46 ` Oram, Isaac W
  2022-08-12 17:41   ` Chaganty, Rangasai V
  2022-08-12 22:53   ` Guo Dong
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions Oram, Isaac W
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match " Oram, Isaac W
  2 siblings, 2 replies; 10+ messages in thread
From: Oram, Isaac W @ 2022-08-10 22:46 UTC (permalink / raw)
  To: devel; +Cc: Isaac Oram, Sai Chaganty, Nate DeSimone, Liming Gao, Ray Ni,
	Guo Dong

Feature packages should build with -a IA32 -a X64.
The commonly board selected libraries were moved to the
PlatformPayloadPkg build so as not to conflict with other
advanced features.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../Include/PlatformPayloadFeature.dsc        | 42 +++++++++----------
 .../PlatformPayloadPkg/PlatformPayloadPkg.dsc | 26 +++++++++++-
 2 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc b/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
index 3003c563c9..bc776659b6 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+++ b/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
@@ -19,7 +19,9 @@
     !error "DXE_ARCH must be specified to build this feature!"
   !endif
 
-  DEFINE SMM_VARIABLE                 = TRUE
+  !ifndef SMM_VARIABLE
+    DEFINE SMM_VARIABLE                 = TRUE
+  !endif
 
 
 ################################################################################
@@ -28,7 +30,7 @@
 #
 ################################################################################
 
-[PcdsPatchableInModule.X64]
+[PcdsPatchableInModule]
 !if $(SMM_VARIABLE) == TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
@@ -45,24 +47,11 @@
 #
 ################################################################################
 
-[LibraryClasses]
-  !if $(SMM_VARIABLE) == TRUE
-    PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
-    PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
-    # (Optional for variable modules debug output
-    PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
-    PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-    DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  !endif
-
 [LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
   !if $(SMM_VARIABLE) == TRUE
     SpiFlashLib|PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
     FlashDeviceLib|PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
     DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
-    HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
-    TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
   !endif
 
 ################################################################################
@@ -90,13 +79,20 @@
   # SMM Variable Support
   #
   !if $(SMM_VARIABLE) == TRUE
-    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
-      PlatformPayloadPkg/Fvb/FvbSmm.inf {
-        <LibraryClasses>
-          NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
-      }
+    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+    }
+
+    PlatformPayloadPkg/Fvb/FvbSmm.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+    }
+
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
       <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
         NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
         NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
         NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
@@ -106,7 +102,11 @@
 
     MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf {
       <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
         NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
     }
-    MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
+    MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+    }
   !endif
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc b/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
index adf028c511..702523a73f 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
+++ b/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
@@ -27,6 +27,10 @@
   PCD_DYNAMIC_AS_DYNAMICEX            = TRUE
   DXE_ARCH                            = X64
 
+  !ifndef SMM_VARIABLE
+    DEFINE SMM_VARIABLE                 = TRUE
+  !endif
+
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
@@ -55,7 +59,7 @@
   gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
   gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
 
-[PcdsPatchableInModule.X64]
+[PcdsPatchableInModule]
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
 !if $(SOURCE_DEBUG_ENABLE)
@@ -90,6 +94,26 @@
 !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
 !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
 
+#
+# For standalone platform payload package build there are specific library requirements
+#
+
+[LibraryClasses]
+  !if $(SMM_VARIABLE) == TRUE
+    PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+    PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
+    # (Optional for variable modules debug output
+    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+    PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+    DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
+  !endif
+
+[LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
+  !if $(SMM_VARIABLE) == TRUE
+    HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
+    TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
+  !endif
+
 #
 # This package always builds the feature.
 #
-- 
2.36.1.windows.1


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

* [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions
  2022-08-10 22:46 [edk2-devel][edk2-platforms][PATCH V1 0/3] Update PlatformPayloadPkg to match feature conventions Oram, Isaac W
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue Oram, Isaac W
@ 2022-08-10 22:46 ` Oram, Isaac W
  2022-08-12 21:55   ` Chaganty, Rangasai V
  2022-08-12 22:51   ` Guo Dong
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match " Oram, Isaac W
  2 siblings, 2 replies; 10+ messages in thread
From: Oram, Isaac W @ 2022-08-10 22:46 UTC (permalink / raw)
  To: devel; +Cc: Isaac Oram, Sai Chaganty, Nate DeSimone, Liming Gao, Ray Ni,
	Guo Dong

Rename PlatformPayloadPkg to PlatformPayloadFeaturePkg.
Rename Package DEC, DSC, FDF and py scripts to match.
Search and replace PlatformPayloadPkg with PlatformPayloadFeaturePkg.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../Include/AdvancedFeatures.dsc                   |  2 +-
 .../Include/AdvancedFeaturesPcd.dsc                |  2 +-
 .../AdvancedFeaturePkg/Include/PostMemory.fdf      |  2 +-
 .../Intel/AdvancedFeaturePkg/Include/PreMemory.fdf |  2 +-
 .../Fvb/FvbInfo.c                                  |  0
 .../Fvb/FvbService.c                               |  0
 .../Fvb/FvbService.h                               |  0
 .../Fvb/FvbServiceSmm.c                            |  0
 .../Fvb/FvbSmm.inf                                 |  2 +-
 .../Fvb/FvbSmmCommon.h                             |  0
 .../Include/Guid/NvVariableInfoGuid.h              |  0
 .../Include/Guid/SpiFlashInfoGuid.h                |  0
 .../Include/Library/FlashDeviceLib.h               |  0
 .../Include/Library/SpiFlashLib.h                  |  0
 .../Include/PlatformPayloadFeature.dsc             | 14 +++++++-------
 .../Include/PostMemory.fdf                         |  4 ++--
 .../Include/PreMemory.fdf                          |  0
 .../Library/FlashDeviceLib/FlashDeviceLib.c        |  0
 .../Library/FlashDeviceLib/FlashDeviceLib.inf      |  3 +--
 .../Library/PcdInitLib/PcdInitLib.c                |  0
 .../Library/PcdInitLib/PcdInitLib.inf              |  3 +--
 .../Library/SpiFlashLib/PchSpi.c                   |  0
 .../Library/SpiFlashLib/RegsSpi.h                  |  0
 .../Library/SpiFlashLib/SpiCommon.h                |  0
 .../Library/SpiFlashLib/SpiFlashLib.c              |  0
 .../Library/SpiFlashLib/SpiFlashLib.inf            |  2 +-
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.c          |  0
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.h          |  0
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.inf        |  0
 .../PlatformPayloadFeaturePkg.dec}                 |  2 +-
 .../PlatformPayloadFeaturePkg.dsc}                 |  4 ++--
 .../PlatformPayloadFeaturePkg.fdf}                 |  0
 .../PlatformPayloadFeaturePkg.py}                  |  4 ++--
 .../Readme.md                                      |  9 ++++-----
 34 files changed, 26 insertions(+), 29 deletions(-)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbInfo.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbService.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbService.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbServiceSmm.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbSmm.inf (92%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbSmmCommon.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Guid/NvVariableInfoGuid.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Guid/SpiFlashInfoGuid.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Library/FlashDeviceLib.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Library/SpiFlashLib.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PlatformPayloadFeature.dsc (87%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PostMemory.fdf (77%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PreMemory.fdf (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/FlashDeviceLib/FlashDeviceLib.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/FlashDeviceLib/FlashDeviceLib.inf (90%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/PcdInitLib/PcdInitLib.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/PcdInitLib/PcdInitLib.inf (92%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/PchSpi.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/RegsSpi.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiCommon.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiFlashLib.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiFlashLib.inf (90%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.c (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.h (100%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.inf (100%)
 rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.dec => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec} (94%)
 rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.dsc => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc} (95%)
 rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.fdf => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf} (100%)
 rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.py => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py} (93%)
 rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Readme.md (86%)

diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
index 2a93ca1ec7..6a80546592 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
@@ -80,5 +80,5 @@
 # Individual features
 #
 !if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
-  !include PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+  !include PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
index 4e0054c226..08f258a48c 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
@@ -56,7 +56,7 @@
   #
   # Individual features
   #
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 #
 # The section below sets all PCDs to FALSE in this DSC file so the feature is not enabled by default.
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
index a0975d4d43..66032ba117 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
@@ -81,5 +81,5 @@
 # Individual features
 #
 !if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
-  !include PlatformPayloadPkg/Include/PostMemory.fdf
+  !include PlatformPayloadFeaturePkg/Include/PostMemory.fdf
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
index b2b821c9c4..9cd6de833b 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
@@ -81,5 +81,5 @@
 # Individual features
 #
 !if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
-  !include PlatformPayloadPkg/Include/PreMemory.fdf
+  !include PlatformPayloadFeaturePkg/Include/PreMemory.fdf
 !endif
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbInfo.c b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbInfo.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbInfo.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbInfo.c
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbService.c b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbService.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.c
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbService.h b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbService.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.h
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbServiceSmm.c b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbServiceSmm.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbServiceSmm.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbServiceSmm.c
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbSmm.inf b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
similarity index 92%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbSmm.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
index a56654ba09..f973465cba 100644
--- a/Features/Intel/PlatformPayloadPkg/Fvb/FvbSmm.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
@@ -28,7 +28,7 @@
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   UefiCpuPkg/UefiCpuPkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   FlashDeviceLib
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbSmmCommon.h b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmmCommon.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbSmmCommon.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmmCommon.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Guid/NvVariableInfoGuid.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/NvVariableInfoGuid.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Guid/NvVariableInfoGuid.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/NvVariableInfoGuid.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Guid/SpiFlashInfoGuid.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/SpiFlashInfoGuid.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Guid/SpiFlashInfoGuid.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/SpiFlashInfoGuid.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Library/FlashDeviceLib.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Library/FlashDeviceLib.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Library/FlashDeviceLib.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Library/FlashDeviceLib.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Library/SpiFlashLib.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Library/SpiFlashLib.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Library/SpiFlashLib.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Library/SpiFlashLib.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc b/Features/Intel/PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
similarity index 87%
rename from Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
index bc776659b6..8056b06548 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
@@ -49,8 +49,8 @@
 
 [LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
   !if $(SMM_VARIABLE) == TRUE
-    SpiFlashLib|PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
-    FlashDeviceLib|PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
+    SpiFlashLib|PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
+    FlashDeviceLib|PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
     DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
   !endif
 
@@ -79,15 +79,15 @@
   # SMM Variable Support
   #
   !if $(SMM_VARIABLE) == TRUE
-    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
+    PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
       <LibraryClasses>
         PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
     }
 
-    PlatformPayloadPkg/Fvb/FvbSmm.inf {
+    PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf {
       <LibraryClasses>
         PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+        NULL|PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
     }
 
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
@@ -97,13 +97,13 @@
         NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
         NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
         NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf
-        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+        NULL|PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
     }
 
     MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf {
       <LibraryClasses>
         PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+        NULL|PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
     }
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf {
       <LibraryClasses>
diff --git a/Features/Intel/PlatformPayloadPkg/Include/PostMemory.fdf b/Features/Intel/PlatformPayloadFeaturePkg/Include/PostMemory.fdf
similarity index 77%
rename from Features/Intel/PlatformPayloadPkg/Include/PostMemory.fdf
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/PostMemory.fdf
index 54800b972c..33a0a4c6b2 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PostMemory.fdf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Include/PostMemory.fdf
@@ -11,8 +11,8 @@
 # SMM Support
 #
 !if $(SMM_VARIABLE) == TRUE
-  INF PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
-  INF PlatformPayloadPkg/Fvb/FvbSmm.inf
+  INF PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
+  INF PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
   INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
   INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
   INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
diff --git a/Features/Intel/PlatformPayloadPkg/Include/PreMemory.fdf b/Features/Intel/PlatformPayloadFeaturePkg/Include/PreMemory.fdf
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/PreMemory.fdf
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/PreMemory.fdf
diff --git a/Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf b/Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
similarity index 90%
rename from Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
index 7285a37944..bddce099b3 100644
--- a/Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
@@ -29,10 +29,9 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   DebugLib
   BaseMemoryLib
   SpiFlashLib
-
diff --git a/Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf b/Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
similarity index 92%
rename from Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
index 05411b00d8..02c98d9c4d 100644
--- a/Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
@@ -27,7 +27,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   BaseLib
@@ -47,4 +47,3 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
-
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/PchSpi.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/PchSpi.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/PchSpi.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/PchSpi.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/RegsSpi.h b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/RegsSpi.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/RegsSpi.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/RegsSpi.h
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiCommon.h b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiCommon.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiCommon.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiCommon.h
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
similarity index 90%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
index fae851c12f..f09714f3f2 100644
--- a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
@@ -30,7 +30,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   BaseLib
diff --git a/Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c b/Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c
rename to Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c
diff --git a/Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h b/Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h
rename to Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h
diff --git a/Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf b/Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dec b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
similarity index 94%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dec
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
index 549f96d85f..78d36f12eb 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dec
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
@@ -10,7 +10,7 @@
 
 [Defines]
   DEC_SPECIFICATION              = 0x00010005
-  PACKAGE_NAME                   = PlatformPayloadPkg
+  PACKAGE_NAME                   = PlatformPayloadFeaturePkg
   PACKAGE_GUID                   = 17F3ACAC-079D-4518-9EBF-E33289733E8C
   PACKAGE_VERSION                = 0.1
 
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc
similarity index 95%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc
index 702523a73f..32e33ac53e 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc
@@ -15,7 +15,7 @@
 #
 ################################################################################
 [Defines]
-  PLATFORM_NAME                       = PlatformPayloadPkg
+  PLATFORM_NAME                       = PlatformPayloadFeaturePkg
   PLATFORM_GUID                       = D3C551BE-9BC6-48F5-AA8A-F49425C28CA9
   PLATFORM_VERSION                    = 0.1
   DSC_SPECIFICATION                   = 0x00010005
@@ -23,7 +23,7 @@
   BUILD_TARGETS                       = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER                    = DEFAULT
   OUTPUT_DIRECTORY                    = Build/$(PLATFORM_NAME)
-  FLASH_DEFINITION                    = $(PLATFORM_NAME)/PlatformPayloadPkg.fdf
+  FLASH_DEFINITION                    = $(PLATFORM_NAME)/PlatformPayloadFeaturePkg.fdf
   PCD_DYNAMIC_AS_DYNAMICEX            = TRUE
   DXE_ARCH                            = X64
 
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.fdf b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.fdf
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.py b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py
similarity index 93%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.py
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py
index 1e3e1cce21..2fbb821563 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.py
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py
@@ -45,11 +45,11 @@ def BuildUniversalPayload(Args, MacroList):
     if not os.path.exists (Edk2PayloadBuildScript):
         raise Exception("Could not find universal UEFI payload build script UniversalPayloadBuild.py")
 
-    PlatformFvDscPath      = os.path.normpath("PlatformPayloadPkg/PlatformPayloadPkg.dsc")
+    PlatformFvDscPath      = os.path.normpath("PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc")
     BuildDir               = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/UefiPayloadPkgX64"))
     PlatformFvReportPath   = os.path.join(BuildDir, "PlatformPayloadReport.txt")
     UniversalUefiPld       = os.path.join(BuildDir, 'UniversalPayload.elf')
-    PlatformFv             = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/PlatformPayloadPkg"), f"{BuildTarget}_{ToolChain}", os.path.normpath("FV/PlatformPayload.Fv"))
+    PlatformFv             = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/PlatformPayloadFeaturePkg"), f"{BuildTarget}_{ToolChain}", os.path.normpath("FV/PlatformPayload.Fv"))
 
     if "CLANG_BIN" in os.environ:
         LlvmObjcopyPath = os.path.join(os.environ["CLANG_BIN"], "llvm-objcopy")
diff --git a/Features/Intel/PlatformPayloadPkg/Readme.md b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
similarity index 86%
rename from Features/Intel/PlatformPayloadPkg/Readme.md
rename to Features/Intel/PlatformPayloadFeaturePkg/Readme.md
index 938b557f30..1067196388 100644
--- a/Features/Intel/PlatformPayloadPkg/Readme.md
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
@@ -15,7 +15,7 @@ or bootloader dependency (only for coreboot). These modules would be located in
 edk2-platform repo.
 
 The generic UEFI payload could be built from EDK2 UefiPayloadPkg in ELF format following
-universal payload specification. And a Platform Payload could be built from PlatformPayloadPkg
+universal payload specification. And a Platform Payload could be built from PlatformPayloadFeaturePkg
 to provide Intel platform specific features (e.g. SPI module, PCH SMM) in FV/FD format.
 This platform payload could be inserted into universal UEFI payload as an ELF section
 to generate a full-feature payload.
@@ -32,11 +32,10 @@ set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Features\Intel;
 edk2\edksetup.bat
 
 ** Build universal UEFI payload with platform Payload
-python edk2-platforms\Features\Intel\PlatformPayloadPkg\PlatformPayloadPkg.py -t VS2019
-  -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -D SMM_VARIABLE=TRUE
+python edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayloadFeaturePkg.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -D SMM_VARIABLE=TRUE
 or
 python edk2\UefiPayloadPkg\UniversalPayloadBuild.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE
-python edk2-platforms\Features\Intel\PlatformPayloadPkg\PlatformPayloadPkg.py -t VS2019 -D SMM_VARIABLE=TRUE -s
+python edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayloadFeaturePkg.py -t VS2019 -D SMM_VARIABLE=TRUE -s
 
   If build success, the final UEFI payload is at Build\UefiPayloadPkgX64\UniversalPayload.elf.
 
@@ -55,7 +54,7 @@ Several build macros are used as below for SMM variable feature modules.
 
 2. Data Flows
 SMM variable:
-The interface with bootloader are defined in PlatformPayloadPkg\Include\Guid
+The interface with bootloader are defined in PlatformPayloadFeaturePkg\Include\Guid
 SpiFlashInfoGuid.h    -- SPI related information for SPI flash operation.
 NvVariableInfoGuid.h  -- Variable related information for SPI NV variables.
 
-- 
2.36.1.windows.1


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

* [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match feature conventions
  2022-08-10 22:46 [edk2-devel][edk2-platforms][PATCH V1 0/3] Update PlatformPayloadPkg to match feature conventions Oram, Isaac W
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue Oram, Isaac W
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions Oram, Isaac W
@ 2022-08-10 22:46 ` Oram, Isaac W
  2022-08-12 22:54   ` Guo Dong
  2022-08-16 21:31   ` Chaganty, Rangasai V
  2 siblings, 2 replies; 10+ messages in thread
From: Oram, Isaac W @ 2022-08-10 22:46 UTC (permalink / raw)
  To: devel; +Cc: Isaac Oram, Sai Chaganty, Nate DeSimone, Liming Gao, Ray Ni,
	Guo Dong

Rename gPlatformPayloadPkgTokenSpaceGuid to
gPlatformPayloadFeaturePkgTokenSpaceGuid

Rename PcdPayloadPackageFeatureEnable to PcdPlatformPayloadFeatureEnable

Update Readme including format improvements

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../AdvancedFeaturePkg/AdvancedFeaturePkg.dsc |  2 +-
 .../Include/AdvancedFeatures.dsc              |  2 +-
 .../Include/AdvancedFeaturesPcd.dsc           |  2 +-
 .../AdvancedFeaturePkg/Include/PostMemory.fdf |  2 +-
 .../AdvancedFeaturePkg/Include/PreMemory.fdf  |  2 +-
 .../PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf  |  2 +-
 .../PlatformPayloadFeaturePkg.dec             |  6 +-
 .../Intel/PlatformPayloadFeaturePkg/Readme.md | 73 ++++++++++---------
 8 files changed, 48 insertions(+), 43 deletions(-)

diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index df8e678ae8..236c5570ca 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -84,7 +84,7 @@
   #
   # Individual features
   #
-  gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable          |TRUE
+  gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnable  |TRUE
 
 #
 # PCD that are required to be set by the build target should be configured here for test purposes
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
index 6a80546592..804aab89bc 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
@@ -79,6 +79,6 @@
 #
 # Individual features
 #
-!if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
+!if gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnable == TRUE
   !include PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
index 08f258a48c..0af5a8bfbc 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
@@ -82,7 +82,7 @@
   gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable      |FALSE
   gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnable  |FALSE
 
-  gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable          |FALSE
+  gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnable  |FALSE
 
 #
 # There seems to be some build parsing odd behavior that requires this PCD to be specified even though
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
index 66032ba117..349bdcc491 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
@@ -80,6 +80,6 @@
 #
 # Individual features
 #
-!if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
+!if gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnable == TRUE
   !include PlatformPayloadFeaturePkg/Include/PostMemory.fdf
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
index 9cd6de833b..b991a5aabf 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
@@ -80,6 +80,6 @@
 #
 # Individual features
 #
-!if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
+!if gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnable == TRUE
   !include PlatformPayloadFeaturePkg/Include/PreMemory.fdf
 !endif
diff --git a/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
index f973465cba..a692d9bf41 100644
--- a/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
@@ -60,7 +60,7 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
-  gPlatformPayloadPkgTokenSpaceGuid.PcdNvsDataFile
+  gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdNvsDataFile
 
 [Depex]
   TRUE
diff --git a/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
index 78d36f12eb..f02c5f70ca 100644
--- a/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
@@ -21,7 +21,7 @@
   #
   ## Defines the token space for the Payload platform Package PCDs.
   #
-  gPlatformPayloadPkgTokenSpaceGuid  = {0xa375ddc6, 0x74fb, 0x4de1, {0x82, 0x6d, 0xa3, 0x10, 0xa3, 0x3b, 0x89, 0x77}}
+  gPlatformPayloadFeaturePkgTokenSpaceGuid  = {0xa375ddc6, 0x74fb, 0x4de1, {0x82, 0x6d, 0xa3, 0x10, 0xa3, 0x3b, 0x89, 0x77}}
 
   #
   # SPI variable support
@@ -41,9 +41,9 @@
 [PcdsFeatureFlag]
   ## Feature enabling control
   # @Prompt Enable payload platform FV common for most Intel platforms
-  gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable|FALSE|BOOLEAN|0x00000001
+  gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnable|FALSE|BOOLEAN|0x00000001
 
 [PcdsFixedAtBuild, PcdsPatchableInModule]
   ## FFS filename to find the default variable initial data file.
   # @Prompt FFS Name of variable initial data file
-  gPlatformPayloadPkgTokenSpaceGuid.PcdNvsDataFile |{ 0x1a, 0xf1, 0xb1, 0xae, 0x42, 0xcc, 0xcf, 0x4e, 0xac, 0x60, 0xdb, 0xab, 0xf6, 0xca, 0x69, 0xe6 }|VOID*|0x00000025
+  gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdNvsDataFile |{ 0x1a, 0xf1, 0xb1, 0xae, 0x42, 0xcc, 0xcf, 0x4e, 0xac, 0x60, 0xdb, 0xab, 0xf6, 0xca, 0x69, 0xe6 }|VOID*|0x00000025
diff --git a/Features/Intel/PlatformPayloadFeaturePkg/Readme.md b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
index 1067196388..9cdb26285c 100644
--- a/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
@@ -19,31 +19,45 @@ universal payload specification. And a Platform Payload could be built from Plat
 to provide Intel platform specific features (e.g. SPI module, PCH SMM) in FV/FD format.
 This platform payload could be inserted into universal UEFI payload as an ELF section
 to generate a full-feature payload.
+
 ## Firmware Volumes
-* FvPlatformPayload
+* PlatformPayload.fv
 
 ## Build Flows
-use windows host as example to generate a full-feature payload:
+Use Windows host as example to generate a full-feature payload:
 
-** Setup the build env
+* Setup the build env
+<pre>
 set WORKSPACE=c:\payload
-set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Features\Intel;
-    %WORKSPACE%\edk2-platforms\Platform\Intel
+set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Features\Intel;%WORKSPACE%\edk2-platforms\Platform\Intel
 edk2\edksetup.bat
-
-** Build universal UEFI payload with platform Payload
+</pre>
+* Build universal UEFI payload with platform payload
+<pre>
 python edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayloadFeaturePkg.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -D SMM_VARIABLE=TRUE
-or
+</pre>
+* Build universal UEFI payload then build the platform payload and patch it to the universal UEFI payload
+<pre>
 python edk2\UefiPayloadPkg\UniversalPayloadBuild.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE
 python edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayloadFeaturePkg.py -t VS2019 -D SMM_VARIABLE=TRUE -s
+</pre>
 
-  If build success, the final UEFI payload is at Build\UefiPayloadPkgX64\UniversalPayload.elf.
+If build succeeds, the final UEFI payload is at <B>Build\UefiPayloadPkgX64\UniversalPayload.elf</B>
 
+Note that standalone feature package build works with "-a X64" or "-a IA32 -a X64" but "-a IA32" is not supported.
+Note that this does not patch the universal UEFI payload, it only creates a PlatformPayload.fv.
+<pre>
+build -p PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc -a X64 -a IA32
+</pre>
 ## Features
 
-1. Modules
-Currently only SMM veriable feature is available.
+1. SMM variable feature configuration
+  * PcdPlatformPayloadFeatureEnable - Enables this feature.
+  * SMM_VARIABLE - TRUE enables the SPI SMM variable feature implementation.
+
+2. Modules: Currently only SMM variable feature is available.
 Several build macros are used as below for SMM variable feature modules.
+<pre>
 !if $(SMM_VARIABLE) == TRUE
   ## PchSmiDispatchSmm
   ## FvbSmm
@@ -51,11 +65,16 @@ Several build macros are used as below for SMM variable feature modules.
   ## VariableSmm
   ## VariableSmmRuntimeDxe
 !endif
+</pre>
+
+3. Data Flows
 
-2. Data Flows
 SMM variable:
+
 The interface with bootloader are defined in PlatformPayloadFeaturePkg\Include\Guid
+
 SpiFlashInfoGuid.h    -- SPI related information for SPI flash operation.
+
 NvVariableInfoGuid.h  -- Variable related information for SPI NV variables.
 
 ## Control Flows
@@ -63,33 +82,19 @@ EDK2 DXE/SMM core from universal UEFI payload would dispatch all the modules
 from this platform payload.
 
 ## Test Point Results
-*_TODO_*
-The test(s) that can verify porting is complete for the feature.
-
-Each feature must describe at least one test point to verify the feature is successful. If the test point is not
-implemented, this should be stated.
+None implemented
 
 ## Functional Exit Criteria
-*_TODO_*
-The testable functionality for the feature.
-
-This section should provide an ordered list of criteria that a board integrator can reference to ensure the feature is
-functional on their board.
+Boot to UEFI shell and verify variable functionality over resets
 
 ## Feature Enabling Checklist
-*_TODO_*
-An ordered list of required activities to achieve desired functionality for the feature.
+Verify configuration of PcdPlatformPayloadFeatureEnable and SMM_VARIABLE
+Boot to UEFI Shell
+Update a variable
+Reset the system and verify variable remains updated
 
 ## Performance Impact
-A general expectation for the impact on overall boot performance due to using this feature.
-
-This section is expected to provide guidance on:
-* How to estimate performance impact due to the feature
-* How to measure performance impact of the feature
-* How to manage performance impact of the feature
+Minimal expected
 
 ## Common Optimizations
-*_TODO_*
-Common size or performance tuning options for this feature.
-
-This section is recommended but not required. If not used, the contents should be left empty.
+None
-- 
2.36.1.windows.1


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

* Re: [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue Oram, Isaac W
@ 2022-08-12 17:41   ` Chaganty, Rangasai V
  2022-08-12 22:53   ` Guo Dong
  1 sibling, 0 replies; 10+ messages in thread
From: Chaganty, Rangasai V @ 2022-08-12 17:41 UTC (permalink / raw)
  To: Oram, Isaac W, devel@edk2.groups.io
  Cc: Desimone, Nathaniel L, Gao, Liming, Ni, Ray, Dong, Guo

Small cosmetic feedback. There is an (unnecessary) open "(" in line 145. Please remove it before checking in.
# (Optional for variable modules debug output

With that:
Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com> 
Sent: Wednesday, August 10, 2022 3:47 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue

Feature packages should build with -a IA32 -a X64.
The commonly board selected libraries were moved to the PlatformPayloadPkg build so as not to conflict with other advanced features.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../Include/PlatformPayloadFeature.dsc        | 42 +++++++++----------
 .../PlatformPayloadPkg/PlatformPayloadPkg.dsc | 26 +++++++++++-
 2 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc b/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
index 3003c563c9..bc776659b6 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+++ b/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.d
+++ sc
@@ -19,7 +19,9 @@
     !error "DXE_ARCH must be specified to build this feature!"
   !endif
 
-  DEFINE SMM_VARIABLE                 = TRUE
+  !ifndef SMM_VARIABLE
+    DEFINE SMM_VARIABLE                 = TRUE
+  !endif
 
 
 ################################################################################
@@ -28,7 +30,7 @@
 #
 ################################################################################
 
-[PcdsPatchableInModule.X64]
+[PcdsPatchableInModule]
 !if $(SMM_VARIABLE) == TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
@@ -45,24 +47,11 @@
 #
 ################################################################################
 
-[LibraryClasses]
-  !if $(SMM_VARIABLE) == TRUE
-    PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
-    PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
-    # (Optional for variable modules debug output
-    PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
-    PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-    DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  !endif
-
 [LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
   !if $(SMM_VARIABLE) == TRUE
     SpiFlashLib|PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
     FlashDeviceLib|PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
     DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
-    HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
-    TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
   !endif
 
 ################################################################################
@@ -90,13 +79,20 @@
   # SMM Variable Support
   #
   !if $(SMM_VARIABLE) == TRUE
-    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
-      PlatformPayloadPkg/Fvb/FvbSmm.inf {
-        <LibraryClasses>
-          NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
-      }
+    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+    }
+
+    PlatformPayloadPkg/Fvb/FvbSmm.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+    }
+
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
       <LibraryClasses>
+        
+ PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib
+ .inf
         NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
         NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
         NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
@@ -106,7 +102,11 @@
 
     MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf {
       <LibraryClasses>
+        
+ PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib
+ .inf
         NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
     }
-    MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
+    MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+    }
   !endif
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc b/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
index adf028c511..702523a73f 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
+++ b/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
@@ -27,6 +27,10 @@
   PCD_DYNAMIC_AS_DYNAMICEX            = TRUE
   DXE_ARCH                            = X64
 
+  !ifndef SMM_VARIABLE
+    DEFINE SMM_VARIABLE                 = TRUE
+  !endif
+
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
@@ -55,7 +59,7 @@
   gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
   gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
 
-[PcdsPatchableInModule.X64]
+[PcdsPatchableInModule]
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
 !if $(SOURCE_DEBUG_ENABLE)
@@ -90,6 +94,26 @@
 !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
 !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
 
+#
+# For standalone platform payload package build there are specific 
+library requirements #
+
+[LibraryClasses]
+  !if $(SMM_VARIABLE) == TRUE
+    PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+    PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
+    # (Optional for variable modules debug output
+    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+    PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+    
+DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.i
+nf
+  !endif
+
+[LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME
+_DRIVER]
+  !if $(SMM_VARIABLE) == TRUE
+    HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
+    TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
+  !endif
+
 #
 # This package always builds the feature.
 #
--
2.36.1.windows.1


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

* Re: [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions Oram, Isaac W
@ 2022-08-12 21:55   ` Chaganty, Rangasai V
  2022-08-12 22:51   ` Guo Dong
  1 sibling, 0 replies; 10+ messages in thread
From: Chaganty, Rangasai V @ 2022-08-12 21:55 UTC (permalink / raw)
  To: Oram, Isaac W, devel@edk2.groups.io
  Cc: Desimone, Nathaniel L, Gao, Liming, Ni, Ray, Dong, Guo

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com> 
Sent: Wednesday, August 10, 2022 3:47 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions

Rename PlatformPayloadPkg to PlatformPayloadFeaturePkg.
Rename Package DEC, DSC, FDF and py scripts to match.
Search and replace PlatformPayloadPkg with PlatformPayloadFeaturePkg.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../Include/AdvancedFeatures.dsc                   |  2 +-
 .../Include/AdvancedFeaturesPcd.dsc                |  2 +-
 .../AdvancedFeaturePkg/Include/PostMemory.fdf      |  2 +-
 .../Intel/AdvancedFeaturePkg/Include/PreMemory.fdf |  2 +-
 .../Fvb/FvbInfo.c                                  |  0
 .../Fvb/FvbService.c                               |  0
 .../Fvb/FvbService.h                               |  0
 .../Fvb/FvbServiceSmm.c                            |  0
 .../Fvb/FvbSmm.inf                                 |  2 +-
 .../Fvb/FvbSmmCommon.h                             |  0
 .../Include/Guid/NvVariableInfoGuid.h              |  0
 .../Include/Guid/SpiFlashInfoGuid.h                |  0
 .../Include/Library/FlashDeviceLib.h               |  0
 .../Include/Library/SpiFlashLib.h                  |  0
 .../Include/PlatformPayloadFeature.dsc             | 14 +++++++-------
 .../Include/PostMemory.fdf                         |  4 ++--
 .../Include/PreMemory.fdf                          |  0
 .../Library/FlashDeviceLib/FlashDeviceLib.c        |  0
 .../Library/FlashDeviceLib/FlashDeviceLib.inf      |  3 +--
 .../Library/PcdInitLib/PcdInitLib.c                |  0
 .../Library/PcdInitLib/PcdInitLib.inf              |  3 +--
 .../Library/SpiFlashLib/PchSpi.c                   |  0
 .../Library/SpiFlashLib/RegsSpi.h                  |  0
 .../Library/SpiFlashLib/SpiCommon.h                |  0
 .../Library/SpiFlashLib/SpiFlashLib.c              |  0
 .../Library/SpiFlashLib/SpiFlashLib.inf            |  2 +-
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.c          |  0
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.h          |  0
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.inf        |  0
 .../PlatformPayloadFeaturePkg.dec}                 |  2 +-
 .../PlatformPayloadFeaturePkg.dsc}                 |  4 ++--
 .../PlatformPayloadFeaturePkg.fdf}                 |  0
 .../PlatformPayloadFeaturePkg.py}                  |  4 ++--
 .../Readme.md                                      |  9 ++++-----
 34 files changed, 26 insertions(+), 29 deletions(-)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbInfo.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbService.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbService.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbServiceSmm.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbSmm.inf (92%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbSmmCommon.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Guid/NvVariableInfoGuid.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Guid/SpiFlashInfoGuid.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Library/FlashDeviceLib.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Library/SpiFlashLib.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PlatformPayloadFeature.dsc (87%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PostMemory.fdf (77%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PreMemory.fdf (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/FlashDeviceLib/FlashDeviceLib.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/FlashDeviceLib/FlashDeviceLib.inf (90%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/PcdInitLib/PcdInitLib.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/PcdInitLib/PcdInitLib.inf (92%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/PchSpi.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/RegsSpi.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiCommon.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiFlashLib.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiFlashLib.inf (90%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.inf (100%)  rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.dec => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec} (94%)  rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.dsc => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc} (95%)  rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.fdf => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf} (100%)  rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.py => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py} (93%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Readme.md (86%)

diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
index 2a93ca1ec7..6a80546592 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
@@ -80,5 +80,5 @@
 # Individual features
 #
 !if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
-  !include PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+  !include PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
index 4e0054c226..08f258a48c 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
@@ -56,7 +56,7 @@
   #
   # Individual features
   #
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 #
 # The section below sets all PCDs to FALSE in this DSC file so the feature is not enabled by default.
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
index a0975d4d43..66032ba117 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
@@ -81,5 +81,5 @@
 # Individual features
 #
 !if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
-  !include PlatformPayloadPkg/Include/PostMemory.fdf
+  !include PlatformPayloadFeaturePkg/Include/PostMemory.fdf
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
index b2b821c9c4..9cd6de833b 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
@@ -81,5 +81,5 @@
 # Individual features
 #
 !if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
-  !include PlatformPayloadPkg/Include/PreMemory.fdf
+  !include PlatformPayloadFeaturePkg/Include/PreMemory.fdf
 !endif
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbInfo.c b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbInfo.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbInfo.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbInfo.c
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbService.c b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbService.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.c
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbService.h b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbService.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.h
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbServiceSmm.c b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbServiceSmm.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbServiceSmm.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbServiceSmm.c
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbSmm.inf b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
similarity index 92%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbSmm.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
index a56654ba09..f973465cba 100644
--- a/Features/Intel/PlatformPayloadPkg/Fvb/FvbSmm.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
@@ -28,7 +28,7 @@
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   UefiCpuPkg/UefiCpuPkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   FlashDeviceLib
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbSmmCommon.h b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmmCommon.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbSmmCommon.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmmCommon.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Guid/NvVariableInfoGuid.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/NvVariableInfoGuid.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Guid/NvVariableInfoGuid.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/NvVariableInfoGuid.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Guid/SpiFlashInfoGuid.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/SpiFlashInfoGuid.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Guid/SpiFlashInfoGuid.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/SpiFlashInfoGuid.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Library/FlashDeviceLib.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Library/FlashDeviceLib.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Library/FlashDeviceLib.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Library/FlashDeviceLib.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Library/SpiFlashLib.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Library/SpiFlashLib.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Library/SpiFlashLib.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Library/SpiFlashLib.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc b/Features/Intel/PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
similarity index 87%
rename from Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
index bc776659b6..8056b06548 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Include/PlatformPayloadFe
+++ ature.dsc
@@ -49,8 +49,8 @@
 
 [LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
   !if $(SMM_VARIABLE) == TRUE
-    SpiFlashLib|PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
-    FlashDeviceLib|PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
+    SpiFlashLib|PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
+    
+ FlashDeviceLib|PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashD
+ eviceLib.inf
     DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
   !endif
 
@@ -79,15 +79,15 @@
   # SMM Variable Support
   #
   !if $(SMM_VARIABLE) == TRUE
-    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
+    PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
       <LibraryClasses>
         PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
     }
 
-    PlatformPayloadPkg/Fvb/FvbSmm.inf {
+    PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf {
       <LibraryClasses>
         PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+        
+ NULL|PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
     }
 
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { @@ -97,13 +97,13 @@
         NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
         NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
         NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf
-        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+        
+ NULL|PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
     }
 
     MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf {
       <LibraryClasses>
         PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+        
+ NULL|PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
     }
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf {
       <LibraryClasses>
diff --git a/Features/Intel/PlatformPayloadPkg/Include/PostMemory.fdf b/Features/Intel/PlatformPayloadFeaturePkg/Include/PostMemory.fdf
similarity index 77%
rename from Features/Intel/PlatformPayloadPkg/Include/PostMemory.fdf
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/PostMemory.fdf
index 54800b972c..33a0a4c6b2 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PostMemory.fdf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Include/PostMemory.fdf
@@ -11,8 +11,8 @@
 # SMM Support
 #
 !if $(SMM_VARIABLE) == TRUE
-  INF PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
-  INF PlatformPayloadPkg/Fvb/FvbSmm.inf
+  INF PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
+  INF PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
   INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
   INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
   INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
diff --git a/Features/Intel/PlatformPayloadPkg/Include/PreMemory.fdf b/Features/Intel/PlatformPayloadFeaturePkg/Include/PreMemory.fdf
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/PreMemory.fdf
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/PreMemory.fdf
diff --git a/Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf b/Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
similarity index 90%
rename from Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
index 7285a37944..bddce099b3 100644
--- a/Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/Fl
+++ ashDeviceLib.inf
@@ -29,10 +29,9 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   DebugLib
   BaseMemoryLib
   SpiFlashLib
-
diff --git a/Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf b/Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
similarity index 92%
rename from Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
index 05411b00d8..02c98d9c4d 100644
--- a/Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdIni
+++ tLib.inf
@@ -27,7 +27,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   BaseLib
@@ -47,4 +47,3 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
-
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/PchSpi.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/PchSpi.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/PchSpi.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/PchSpi.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/RegsSpi.h b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/RegsSpi.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/RegsSpi.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/RegsSpi.h
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiCommon.h b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiCommon.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiCommon.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiCommon.h
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
similarity index 90%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
index fae851c12f..f09714f3f2 100644
--- a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFl
+++ ashLib.inf
@@ -30,7 +30,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   BaseLib
diff --git a/Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c b/Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c
rename to Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c
diff --git a/Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h b/Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h
rename to Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h
diff --git a/Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf b/Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dec b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
similarity index 94%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dec
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
index 549f96d85f..78d36f12eb 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dec
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg
+++ .dec
@@ -10,7 +10,7 @@
 
 [Defines]
   DEC_SPECIFICATION              = 0x00010005
-  PACKAGE_NAME                   = PlatformPayloadPkg
+  PACKAGE_NAME                   = PlatformPayloadFeaturePkg
   PACKAGE_GUID                   = 17F3ACAC-079D-4518-9EBF-E33289733E8C
   PACKAGE_VERSION                = 0.1
 
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc
similarity index 95%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc
index 702523a73f..32e33ac53e 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg
+++ .dsc
@@ -15,7 +15,7 @@
 #
 ################################################################################
 [Defines]
-  PLATFORM_NAME                       = PlatformPayloadPkg
+  PLATFORM_NAME                       = PlatformPayloadFeaturePkg
   PLATFORM_GUID                       = D3C551BE-9BC6-48F5-AA8A-F49425C28CA9
   PLATFORM_VERSION                    = 0.1
   DSC_SPECIFICATION                   = 0x00010005
@@ -23,7 +23,7 @@
   BUILD_TARGETS                       = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER                    = DEFAULT
   OUTPUT_DIRECTORY                    = Build/$(PLATFORM_NAME)
-  FLASH_DEFINITION                    = $(PLATFORM_NAME)/PlatformPayloadPkg.fdf
+  FLASH_DEFINITION                    = $(PLATFORM_NAME)/PlatformPayloadFeaturePkg.fdf
   PCD_DYNAMIC_AS_DYNAMICEX            = TRUE
   DXE_ARCH                            = X64
 
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.fdf b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.fdf
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.py b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py
similarity index 93%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.py
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py
index 1e3e1cce21..2fbb821563 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.py
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg
+++ .py
@@ -45,11 +45,11 @@ def BuildUniversalPayload(Args, MacroList):
     if not os.path.exists (Edk2PayloadBuildScript):
         raise Exception("Could not find universal UEFI payload build script UniversalPayloadBuild.py")
 
-    PlatformFvDscPath      = os.path.normpath("PlatformPayloadPkg/PlatformPayloadPkg.dsc")
+    PlatformFvDscPath      = os.path.normpath("PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc")
     BuildDir               = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/UefiPayloadPkgX64"))
     PlatformFvReportPath   = os.path.join(BuildDir, "PlatformPayloadReport.txt")
     UniversalUefiPld       = os.path.join(BuildDir, 'UniversalPayload.elf')
-    PlatformFv             = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/PlatformPayloadPkg"), f"{BuildTarget}_{ToolChain}", os.path.normpath("FV/PlatformPayload.Fv"))
+    PlatformFv             = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/PlatformPayloadFeaturePkg"), f"{BuildTarget}_{ToolChain}", os.path.normpath("FV/PlatformPayload.Fv"))
 
     if "CLANG_BIN" in os.environ:
         LlvmObjcopyPath = os.path.join(os.environ["CLANG_BIN"], "llvm-objcopy") diff --git a/Features/Intel/PlatformPayloadPkg/Readme.md b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
similarity index 86%
rename from Features/Intel/PlatformPayloadPkg/Readme.md
rename to Features/Intel/PlatformPayloadFeaturePkg/Readme.md
index 938b557f30..1067196388 100644
--- a/Features/Intel/PlatformPayloadPkg/Readme.md
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
@@ -15,7 +15,7 @@ or bootloader dependency (only for coreboot). These modules would be located in  edk2-platform repo.
 
 The generic UEFI payload could be built from EDK2 UefiPayloadPkg in ELF format following -universal payload specification. And a Platform Payload could be built from PlatformPayloadPkg
+universal payload specification. And a Platform Payload could be built 
+from PlatformPayloadFeaturePkg
 to provide Intel platform specific features (e.g. SPI module, PCH SMM) in FV/FD format.
 This platform payload could be inserted into universal UEFI payload as an ELF section  to generate a full-feature payload.
@@ -32,11 +32,10 @@ set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Features\Intel;
 edk2\edksetup.bat
 
 ** Build universal UEFI payload with platform Payload -python edk2-platforms\Features\Intel\PlatformPayloadPkg\PlatformPayloadPkg.py -t VS2019
-  -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -D SMM_VARIABLE=TRUE
+python 
+edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayload
+FeaturePkg.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -D 
+SMM_VARIABLE=TRUE
 or
 python edk2\UefiPayloadPkg\UniversalPayloadBuild.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -python edk2-platforms\Features\Intel\PlatformPayloadPkg\PlatformPayloadPkg.py -t VS2019 -D SMM_VARIABLE=TRUE -s
+python 
+edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayload
+FeaturePkg.py -t VS2019 -D SMM_VARIABLE=TRUE -s
 
   If build success, the final UEFI payload is at Build\UefiPayloadPkgX64\UniversalPayload.elf.
 
@@ -55,7 +54,7 @@ Several build macros are used as below for SMM variable feature modules.
 
 2. Data Flows
 SMM variable:
-The interface with bootloader are defined in PlatformPayloadPkg\Include\Guid
+The interface with bootloader are defined in 
+PlatformPayloadFeaturePkg\Include\Guid
 SpiFlashInfoGuid.h    -- SPI related information for SPI flash operation.
 NvVariableInfoGuid.h  -- Variable related information for SPI NV variables.
 
--
2.36.1.windows.1


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

* Re: [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions Oram, Isaac W
  2022-08-12 21:55   ` Chaganty, Rangasai V
@ 2022-08-12 22:51   ` Guo Dong
  1 sibling, 0 replies; 10+ messages in thread
From: Guo Dong @ 2022-08-12 22:51 UTC (permalink / raw)
  To: Oram, Isaac W, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Desimone, Nathaniel L, Gao, Liming, Ni, Ray


Reviewed-by: Guo Dong <guo.dong@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com> 
Sent: Wednesday, August 10, 2022 3:47 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions

Rename PlatformPayloadPkg to PlatformPayloadFeaturePkg.
Rename Package DEC, DSC, FDF and py scripts to match.
Search and replace PlatformPayloadPkg with PlatformPayloadFeaturePkg.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../Include/AdvancedFeatures.dsc                   |  2 +-
 .../Include/AdvancedFeaturesPcd.dsc                |  2 +-
 .../AdvancedFeaturePkg/Include/PostMemory.fdf      |  2 +-
 .../Intel/AdvancedFeaturePkg/Include/PreMemory.fdf |  2 +-
 .../Fvb/FvbInfo.c                                  |  0
 .../Fvb/FvbService.c                               |  0
 .../Fvb/FvbService.h                               |  0
 .../Fvb/FvbServiceSmm.c                            |  0
 .../Fvb/FvbSmm.inf                                 |  2 +-
 .../Fvb/FvbSmmCommon.h                             |  0
 .../Include/Guid/NvVariableInfoGuid.h              |  0
 .../Include/Guid/SpiFlashInfoGuid.h                |  0
 .../Include/Library/FlashDeviceLib.h               |  0
 .../Include/Library/SpiFlashLib.h                  |  0
 .../Include/PlatformPayloadFeature.dsc             | 14 +++++++-------
 .../Include/PostMemory.fdf                         |  4 ++--
 .../Include/PreMemory.fdf                          |  0
 .../Library/FlashDeviceLib/FlashDeviceLib.c        |  0
 .../Library/FlashDeviceLib/FlashDeviceLib.inf      |  3 +--
 .../Library/PcdInitLib/PcdInitLib.c                |  0
 .../Library/PcdInitLib/PcdInitLib.inf              |  3 +--
 .../Library/SpiFlashLib/PchSpi.c                   |  0
 .../Library/SpiFlashLib/RegsSpi.h                  |  0
 .../Library/SpiFlashLib/SpiCommon.h                |  0
 .../Library/SpiFlashLib/SpiFlashLib.c              |  0
 .../Library/SpiFlashLib/SpiFlashLib.inf            |  2 +-
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.c          |  0
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.h          |  0
 .../PchSmiDispatchSmm/PchSmiDispatchSmm.inf        |  0
 .../PlatformPayloadFeaturePkg.dec}                 |  2 +-
 .../PlatformPayloadFeaturePkg.dsc}                 |  4 ++--
 .../PlatformPayloadFeaturePkg.fdf}                 |  0
 .../PlatformPayloadFeaturePkg.py}                  |  4 ++--
 .../Readme.md                                      |  9 ++++-----
 34 files changed, 26 insertions(+), 29 deletions(-)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbInfo.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbService.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbService.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbServiceSmm.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbSmm.inf (92%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Fvb/FvbSmmCommon.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Guid/NvVariableInfoGuid.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Guid/SpiFlashInfoGuid.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Library/FlashDeviceLib.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/Library/SpiFlashLib.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PlatformPayloadFeature.dsc (87%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PostMemory.fdf (77%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Include/PreMemory.fdf (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/FlashDeviceLib/FlashDeviceLib.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/FlashDeviceLib/FlashDeviceLib.inf (90%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/PcdInitLib/PcdInitLib.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/PcdInitLib/PcdInitLib.inf (92%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/PchSpi.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/RegsSpi.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiCommon.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiFlashLib.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Library/SpiFlashLib/SpiFlashLib.inf (90%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.c (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.h (100%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/PchSmiDispatchSmm/PchSmiDispatchSmm.inf (100%)  rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.dec => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec} (94%)  rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.dsc => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc} (95%)  rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.fdf => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf} (100%)  rename Features/Intel/{PlatformPayloadPkg/PlatformPayloadPkg.py => PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py} (93%)  rename Features/Intel/{PlatformPayloadPkg => PlatformPayloadFeaturePkg}/Readme.md (86%)

diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
index 2a93ca1ec7..6a80546592 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
@@ -80,5 +80,5 @@
 # Individual features
 #
 !if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
-  !include PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+  !include PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
index 4e0054c226..08f258a48c 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
@@ -56,7 +56,7 @@
   #
   # Individual features
   #
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 #
 # The section below sets all PCDs to FALSE in this DSC file so the feature is not enabled by default.
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
index a0975d4d43..66032ba117 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
@@ -81,5 +81,5 @@
 # Individual features
 #
 !if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
-  !include PlatformPayloadPkg/Include/PostMemory.fdf
+  !include PlatformPayloadFeaturePkg/Include/PostMemory.fdf
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
index b2b821c9c4..9cd6de833b 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
@@ -81,5 +81,5 @@
 # Individual features
 #
 !if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
-  !include PlatformPayloadPkg/Include/PreMemory.fdf
+  !include PlatformPayloadFeaturePkg/Include/PreMemory.fdf
 !endif
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbInfo.c b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbInfo.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbInfo.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbInfo.c
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbService.c b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbService.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.c
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbService.h b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbService.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbService.h
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbServiceSmm.c b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbServiceSmm.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbServiceSmm.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbServiceSmm.c
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbSmm.inf b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
similarity index 92%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbSmm.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
index a56654ba09..f973465cba 100644
--- a/Features/Intel/PlatformPayloadPkg/Fvb/FvbSmm.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
@@ -28,7 +28,7 @@
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
   UefiCpuPkg/UefiCpuPkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   FlashDeviceLib
diff --git a/Features/Intel/PlatformPayloadPkg/Fvb/FvbSmmCommon.h b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmmCommon.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Fvb/FvbSmmCommon.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmmCommon.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Guid/NvVariableInfoGuid.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/NvVariableInfoGuid.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Guid/NvVariableInfoGuid.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/NvVariableInfoGuid.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Guid/SpiFlashInfoGuid.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/SpiFlashInfoGuid.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Guid/SpiFlashInfoGuid.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Guid/SpiFlashInfoGuid.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Library/FlashDeviceLib.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Library/FlashDeviceLib.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Library/FlashDeviceLib.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Library/FlashDeviceLib.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/Library/SpiFlashLib.h b/Features/Intel/PlatformPayloadFeaturePkg/Include/Library/SpiFlashLib.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/Library/SpiFlashLib.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/Library/SpiFlashLib.h
diff --git a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc b/Features/Intel/PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
similarity index 87%
rename from Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
index bc776659b6..8056b06548 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Include/PlatformPayloadFe
+++ ature.dsc
@@ -49,8 +49,8 @@
 
 [LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
   !if $(SMM_VARIABLE) == TRUE
-    SpiFlashLib|PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
-    FlashDeviceLib|PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
+    SpiFlashLib|PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
+    
+ FlashDeviceLib|PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashD
+ eviceLib.inf
     DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
   !endif
 
@@ -79,15 +79,15 @@
   # SMM Variable Support
   #
   !if $(SMM_VARIABLE) == TRUE
-    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
+    PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
       <LibraryClasses>
         PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
     }
 
-    PlatformPayloadPkg/Fvb/FvbSmm.inf {
+    PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf {
       <LibraryClasses>
         PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+        
+ NULL|PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
     }
 
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf { @@ -97,13 +97,13 @@
         NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
         NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
         NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.inf
-        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+        
+ NULL|PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
     }
 
     MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf {
       <LibraryClasses>
         PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+        
+ NULL|PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
     }
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf {
       <LibraryClasses>
diff --git a/Features/Intel/PlatformPayloadPkg/Include/PostMemory.fdf b/Features/Intel/PlatformPayloadFeaturePkg/Include/PostMemory.fdf
similarity index 77%
rename from Features/Intel/PlatformPayloadPkg/Include/PostMemory.fdf
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/PostMemory.fdf
index 54800b972c..33a0a4c6b2 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PostMemory.fdf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Include/PostMemory.fdf
@@ -11,8 +11,8 @@
 # SMM Support
 #
 !if $(SMM_VARIABLE) == TRUE
-  INF PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
-  INF PlatformPayloadPkg/Fvb/FvbSmm.inf
+  INF PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
+  INF PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
   INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf
   INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf
   INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
diff --git a/Features/Intel/PlatformPayloadPkg/Include/PreMemory.fdf b/Features/Intel/PlatformPayloadFeaturePkg/Include/PreMemory.fdf
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Include/PreMemory.fdf
rename to Features/Intel/PlatformPayloadFeaturePkg/Include/PreMemory.fdf
diff --git a/Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf b/Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
similarity index 90%
rename from Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/FlashDeviceLib.inf
index 7285a37944..bddce099b3 100644
--- a/Features/Intel/PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Library/FlashDeviceLib/Fl
+++ ashDeviceLib.inf
@@ -29,10 +29,9 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   DebugLib
   BaseMemoryLib
   SpiFlashLib
-
diff --git a/Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf b/Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
similarity index 92%
rename from Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdInitLib.inf
index 05411b00d8..02c98d9c4d 100644
--- a/Features/Intel/PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Library/PcdInitLib/PcdIni
+++ tLib.inf
@@ -27,7 +27,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   BaseLib
@@ -47,4 +47,3 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase
-
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/PchSpi.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/PchSpi.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/PchSpi.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/PchSpi.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/RegsSpi.h b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/RegsSpi.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/RegsSpi.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/RegsSpi.h
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiCommon.h b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiCommon.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiCommon.h
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiCommon.h
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.c
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.c
diff --git a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
similarity index 90%
rename from Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFlashLib.inf
index fae851c12f..f09714f3f2 100644
--- a/Features/Intel/PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Library/SpiFlashLib/SpiFl
+++ ashLib.inf
@@ -30,7 +30,7 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  PlatformPayloadPkg/PlatformPayloadPkg.dec
+  PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
 
 [LibraryClasses]
   BaseLib
diff --git a/Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c b/Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c
rename to Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.c
diff --git a/Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h b/Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h
rename to Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.h
diff --git a/Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf b/Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
rename to Features/Intel/PlatformPayloadFeaturePkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dec b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
similarity index 94%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dec
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
index 549f96d85f..78d36f12eb 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dec
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg
+++ .dec
@@ -10,7 +10,7 @@
 
 [Defines]
   DEC_SPECIFICATION              = 0x00010005
-  PACKAGE_NAME                   = PlatformPayloadPkg
+  PACKAGE_NAME                   = PlatformPayloadFeaturePkg
   PACKAGE_GUID                   = 17F3ACAC-079D-4518-9EBF-E33289733E8C
   PACKAGE_VERSION                = 0.1
 
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc
similarity index 95%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc
index 702523a73f..32e33ac53e 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg
+++ .dsc
@@ -15,7 +15,7 @@
 #
 ################################################################################
 [Defines]
-  PLATFORM_NAME                       = PlatformPayloadPkg
+  PLATFORM_NAME                       = PlatformPayloadFeaturePkg
   PLATFORM_GUID                       = D3C551BE-9BC6-48F5-AA8A-F49425C28CA9
   PLATFORM_VERSION                    = 0.1
   DSC_SPECIFICATION                   = 0x00010005
@@ -23,7 +23,7 @@
   BUILD_TARGETS                       = DEBUG|RELEASE|NOOPT
   SKUID_IDENTIFIER                    = DEFAULT
   OUTPUT_DIRECTORY                    = Build/$(PLATFORM_NAME)
-  FLASH_DEFINITION                    = $(PLATFORM_NAME)/PlatformPayloadPkg.fdf
+  FLASH_DEFINITION                    = $(PLATFORM_NAME)/PlatformPayloadFeaturePkg.fdf
   PCD_DYNAMIC_AS_DYNAMICEX            = TRUE
   DXE_ARCH                            = X64
 
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.fdf b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf
similarity index 100%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.fdf
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.fdf
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.py b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py
similarity index 93%
rename from Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.py
rename to Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.py
index 1e3e1cce21..2fbb821563 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.py
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg
+++ .py
@@ -45,11 +45,11 @@ def BuildUniversalPayload(Args, MacroList):
     if not os.path.exists (Edk2PayloadBuildScript):
         raise Exception("Could not find universal UEFI payload build script UniversalPayloadBuild.py")
 
-    PlatformFvDscPath      = os.path.normpath("PlatformPayloadPkg/PlatformPayloadPkg.dsc")
+    PlatformFvDscPath      = os.path.normpath("PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc")
     BuildDir               = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/UefiPayloadPkgX64"))
     PlatformFvReportPath   = os.path.join(BuildDir, "PlatformPayloadReport.txt")
     UniversalUefiPld       = os.path.join(BuildDir, 'UniversalPayload.elf')
-    PlatformFv             = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/PlatformPayloadPkg"), f"{BuildTarget}_{ToolChain}", os.path.normpath("FV/PlatformPayload.Fv"))
+    PlatformFv             = os.path.join(os.environ['WORKSPACE'], os.path.normpath("Build/PlatformPayloadFeaturePkg"), f"{BuildTarget}_{ToolChain}", os.path.normpath("FV/PlatformPayload.Fv"))
 
     if "CLANG_BIN" in os.environ:
         LlvmObjcopyPath = os.path.join(os.environ["CLANG_BIN"], "llvm-objcopy") diff --git a/Features/Intel/PlatformPayloadPkg/Readme.md b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
similarity index 86%
rename from Features/Intel/PlatformPayloadPkg/Readme.md
rename to Features/Intel/PlatformPayloadFeaturePkg/Readme.md
index 938b557f30..1067196388 100644
--- a/Features/Intel/PlatformPayloadPkg/Readme.md
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
@@ -15,7 +15,7 @@ or bootloader dependency (only for coreboot). These modules would be located in  edk2-platform repo.
 
 The generic UEFI payload could be built from EDK2 UefiPayloadPkg in ELF format following -universal payload specification. And a Platform Payload could be built from PlatformPayloadPkg
+universal payload specification. And a Platform Payload could be built 
+from PlatformPayloadFeaturePkg
 to provide Intel platform specific features (e.g. SPI module, PCH SMM) in FV/FD format.
 This platform payload could be inserted into universal UEFI payload as an ELF section  to generate a full-feature payload.
@@ -32,11 +32,10 @@ set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Features\Intel;
 edk2\edksetup.bat
 
 ** Build universal UEFI payload with platform Payload -python edk2-platforms\Features\Intel\PlatformPayloadPkg\PlatformPayloadPkg.py -t VS2019
-  -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -D SMM_VARIABLE=TRUE
+python 
+edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayload
+FeaturePkg.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -D 
+SMM_VARIABLE=TRUE
 or
 python edk2\UefiPayloadPkg\UniversalPayloadBuild.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -python edk2-platforms\Features\Intel\PlatformPayloadPkg\PlatformPayloadPkg.py -t VS2019 -D SMM_VARIABLE=TRUE -s
+python 
+edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayload
+FeaturePkg.py -t VS2019 -D SMM_VARIABLE=TRUE -s
 
   If build success, the final UEFI payload is at Build\UefiPayloadPkgX64\UniversalPayload.elf.
 
@@ -55,7 +54,7 @@ Several build macros are used as below for SMM variable feature modules.
 
 2. Data Flows
 SMM variable:
-The interface with bootloader are defined in PlatformPayloadPkg\Include\Guid
+The interface with bootloader are defined in 
+PlatformPayloadFeaturePkg\Include\Guid
 SpiFlashInfoGuid.h    -- SPI related information for SPI flash operation.
 NvVariableInfoGuid.h  -- Variable related information for SPI NV variables.
 
--
2.36.1.windows.1


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

* Re: [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue Oram, Isaac W
  2022-08-12 17:41   ` Chaganty, Rangasai V
@ 2022-08-12 22:53   ` Guo Dong
  1 sibling, 0 replies; 10+ messages in thread
From: Guo Dong @ 2022-08-12 22:53 UTC (permalink / raw)
  To: Oram, Isaac W, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Desimone, Nathaniel L, Gao, Liming, Ni, Ray


Reviewed-by: Guo Dong <guo.dong@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com> 
Sent: Wednesday, August 10, 2022 3:47 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue

Feature packages should build with -a IA32 -a X64.
The commonly board selected libraries were moved to the PlatformPayloadPkg build so as not to conflict with other advanced features.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../Include/PlatformPayloadFeature.dsc        | 42 +++++++++----------
 .../PlatformPayloadPkg/PlatformPayloadPkg.dsc | 26 +++++++++++-
 2 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc b/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
index 3003c563c9..bc776659b6 100644
--- a/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.dsc
+++ b/Features/Intel/PlatformPayloadPkg/Include/PlatformPayloadFeature.d
+++ sc
@@ -19,7 +19,9 @@
     !error "DXE_ARCH must be specified to build this feature!"
   !endif
 
-  DEFINE SMM_VARIABLE                 = TRUE
+  !ifndef SMM_VARIABLE
+    DEFINE SMM_VARIABLE                 = TRUE
+  !endif
 
 
 ################################################################################
@@ -28,7 +30,7 @@
 #
 ################################################################################
 
-[PcdsPatchableInModule.X64]
+[PcdsPatchableInModule]
 !if $(SMM_VARIABLE) == TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0
@@ -45,24 +47,11 @@
 #
 ################################################################################
 
-[LibraryClasses]
-  !if $(SMM_VARIABLE) == TRUE
-    PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
-    PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
-    # (Optional for variable modules debug output
-    PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
-    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
-    PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
-    DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  !endif
-
 [LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER]
   !if $(SMM_VARIABLE) == TRUE
     SpiFlashLib|PlatformPayloadPkg/Library/SpiFlashLib/SpiFlashLib.inf
     FlashDeviceLib|PlatformPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.inf
     DxeHobListLib|UefiPayloadPkg/Library/DxeHobListLib/DxeHobListLib.inf
-    HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
-    TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
   !endif
 
 ################################################################################
@@ -90,13 +79,20 @@
   # SMM Variable Support
   #
   !if $(SMM_VARIABLE) == TRUE
-    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf
-      PlatformPayloadPkg/Fvb/FvbSmm.inf {
-        <LibraryClasses>
-          NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
-      }
+    PlatformPayloadPkg/PchSmiDispatchSmm/PchSmiDispatchSmm.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+    }
+
+    PlatformPayloadPkg/Fvb/FvbSmm.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+        NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
+    }
+
     MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf {
       <LibraryClasses>
+        
+ PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib
+ .inf
         NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf
         NULL|MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.inf
         NULL|MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdLib.inf
@@ -106,7 +102,11 @@
 
     MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf {
       <LibraryClasses>
+        
+ PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib
+ .inf
         NULL|PlatformPayloadPkg/Library/PcdInitLib/PcdInitLib.inf
     }
-    MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf
+    MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf {
+      <LibraryClasses>
+        PlatformHookLib|UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf
+    }
   !endif
diff --git a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc b/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
index adf028c511..702523a73f 100644
--- a/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
+++ b/Features/Intel/PlatformPayloadPkg/PlatformPayloadPkg.dsc
@@ -27,6 +27,10 @@
   PCD_DYNAMIC_AS_DYNAMICEX            = TRUE
   DXE_ARCH                            = X64
 
+  !ifndef SMM_VARIABLE
+    DEFINE SMM_VARIABLE                 = TRUE
+  !endif
+
 [Packages]
   MinPlatformPkg/MinPlatformPkg.dec
 
@@ -55,7 +59,7 @@
   gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable                   |FALSE
   gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable                      |FALSE
 
-[PcdsPatchableInModule.X64]
+[PcdsPatchableInModule]
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x7
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000004F
 !if $(SOURCE_DEBUG_ENABLE)
@@ -90,6 +94,26 @@
 !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
 !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
 
+#
+# For standalone platform payload package build there are specific 
+library requirements #
+
+[LibraryClasses]
+  !if $(SMM_VARIABLE) == TRUE
+    PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
+    PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
+    # (Optional for variable modules debug output
+    DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
+    PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+    
+DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.i
+nf
+  !endif
+
+[LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.DXE_RUNTIME
+_DRIVER]
+  !if $(SMM_VARIABLE) == TRUE
+    HobLib|UefiPayloadPkg/Library/DxeHobLib/DxeHobLib.inf
+    TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf
+  !endif
+
 #
 # This package always builds the feature.
 #
--
2.36.1.windows.1


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

* Re: [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match feature conventions
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match " Oram, Isaac W
@ 2022-08-12 22:54   ` Guo Dong
  2022-08-16 21:31   ` Chaganty, Rangasai V
  1 sibling, 0 replies; 10+ messages in thread
From: Guo Dong @ 2022-08-12 22:54 UTC (permalink / raw)
  To: Oram, Isaac W, devel@edk2.groups.io
  Cc: Chaganty, Rangasai V, Desimone, Nathaniel L, Gao, Liming, Ni, Ray

Reviewed-by: Guo Dong <guo.dong@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com> 
Sent: Wednesday, August 10, 2022 3:47 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match feature conventions

Rename gPlatformPayloadPkgTokenSpaceGuid to gPlatformPayloadFeaturePkgTokenSpaceGuid

Rename PcdPayloadPackageFeatureEnable to PcdPlatformPayloadFeatureEnable

Update Readme including format improvements

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../AdvancedFeaturePkg/AdvancedFeaturePkg.dsc |  2 +-
 .../Include/AdvancedFeatures.dsc              |  2 +-
 .../Include/AdvancedFeaturesPcd.dsc           |  2 +-
 .../AdvancedFeaturePkg/Include/PostMemory.fdf |  2 +-  .../AdvancedFeaturePkg/Include/PreMemory.fdf  |  2 +-  .../PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf  |  2 +-
 .../PlatformPayloadFeaturePkg.dec             |  6 +-
 .../Intel/PlatformPayloadFeaturePkg/Readme.md | 73 ++++++++++---------
 8 files changed, 48 insertions(+), 43 deletions(-)

diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index df8e678ae8..236c5570ca 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -84,7 +84,7 @@
   #
   # Individual features
   #
-  gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable          |TRUE
+  
+ gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnab
+ le  |TRUE
 
 #
 # PCD that are required to be set by the build target should be configured here for test purposes diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
index 6a80546592..804aab89bc 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
@@ -79,6 +79,6 @@
 #
 # Individual features
 #
-!if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
+!if 
+gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnabl
+e == TRUE
   !include PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
index 08f258a48c..0af5a8bfbc 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
@@ -82,7 +82,7 @@
   gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable      |FALSE
   gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnable  |FALSE
 
-  gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable          |FALSE
+  
+ gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnab
+ le  |FALSE
 
 #
 # There seems to be some build parsing odd behavior that requires this PCD to be specified even though diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
index 66032ba117..349bdcc491 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
@@ -80,6 +80,6 @@
 #
 # Individual features
 #
-!if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
+!if 
+gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnabl
+e == TRUE
   !include PlatformPayloadFeaturePkg/Include/PostMemory.fdf
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
index 9cd6de833b..b991a5aabf 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
@@ -80,6 +80,6 @@
 #
 # Individual features
 #
-!if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
+!if 
+gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnabl
+e == TRUE
   !include PlatformPayloadFeaturePkg/Include/PreMemory.fdf
 !endif
diff --git a/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
index f973465cba..a692d9bf41 100644
--- a/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
@@ -60,7 +60,7 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
-  gPlatformPayloadPkgTokenSpaceGuid.PcdNvsDataFile
+  gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdNvsDataFile
 
 [Depex]
   TRUE
diff --git a/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
index 78d36f12eb..f02c5f70ca 100644
--- a/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg
+++ .dec
@@ -21,7 +21,7 @@
   #
   ## Defines the token space for the Payload platform Package PCDs.
   #
-  gPlatformPayloadPkgTokenSpaceGuid  = {0xa375ddc6, 0x74fb, 0x4de1, {0x82, 0x6d, 0xa3, 0x10, 0xa3, 0x3b, 0x89, 0x77}}
+  gPlatformPayloadFeaturePkgTokenSpaceGuid  = {0xa375ddc6, 0x74fb, 
+ 0x4de1, {0x82, 0x6d, 0xa3, 0x10, 0xa3, 0x3b, 0x89, 0x77}}
 
   #
   # SPI variable support
@@ -41,9 +41,9 @@
 [PcdsFeatureFlag]
   ## Feature enabling control
   # @Prompt Enable payload platform FV common for most Intel platforms
-  gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable|FALSE|BOOLEAN|0x00000001
+  
+ gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnab
+ le|FALSE|BOOLEAN|0x00000001
 
 [PcdsFixedAtBuild, PcdsPatchableInModule]
   ## FFS filename to find the default variable initial data file.
   # @Prompt FFS Name of variable initial data file
-  gPlatformPayloadPkgTokenSpaceGuid.PcdNvsDataFile |{ 0x1a, 0xf1, 0xb1, 0xae, 0x42, 0xcc, 0xcf, 0x4e, 0xac, 0x60, 0xdb, 0xab, 0xf6, 0xca, 0x69, 0xe6 }|VOID*|0x00000025
+  gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdNvsDataFile |{ 0x1a, 
+ 0xf1, 0xb1, 0xae, 0x42, 0xcc, 0xcf, 0x4e, 0xac, 0x60, 0xdb, 0xab, 
+ 0xf6, 0xca, 0x69, 0xe6 }|VOID*|0x00000025
diff --git a/Features/Intel/PlatformPayloadFeaturePkg/Readme.md b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
index 1067196388..9cdb26285c 100644
--- a/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
@@ -19,31 +19,45 @@ universal payload specification. And a Platform Payload could be built from Plat  to provide Intel platform specific features (e.g. SPI module, PCH SMM) in FV/FD format.
 This platform payload could be inserted into universal UEFI payload as an ELF section  to generate a full-feature payload.
+
 ## Firmware Volumes
-* FvPlatformPayload
+* PlatformPayload.fv
 
 ## Build Flows
-use windows host as example to generate a full-feature payload:
+Use Windows host as example to generate a full-feature payload:
 
-** Setup the build env
+* Setup the build env
+<pre>
 set WORKSPACE=c:\payload
-set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Features\Intel;
-    %WORKSPACE%\edk2-platforms\Platform\Intel
+set 
+PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Features\Inte
+l;%WORKSPACE%\edk2-platforms\Platform\Intel
 edk2\edksetup.bat
-
-** Build universal UEFI payload with platform Payload
+</pre>
+* Build universal UEFI payload with platform payload <pre>
 python edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayloadFeaturePkg.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -D SMM_VARIABLE=TRUE -or
+</pre>
+* Build universal UEFI payload then build the platform payload and 
+patch it to the universal UEFI payload <pre>
 python edk2\UefiPayloadPkg\UniversalPayloadBuild.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE  python edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayloadFeaturePkg.py -t VS2019 -D SMM_VARIABLE=TRUE -s
+</pre>
 
-  If build success, the final UEFI payload is at Build\UefiPayloadPkgX64\UniversalPayload.elf.
+If build succeeds, the final UEFI payload is at 
+<B>Build\UefiPayloadPkgX64\UniversalPayload.elf</B>
 
+Note that standalone feature package build works with "-a X64" or "-a IA32 -a X64" but "-a IA32" is not supported.
+Note that this does not patch the universal UEFI payload, it only creates a PlatformPayload.fv.
+<pre>
+build -p PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc -a X64 
+-a IA32 </pre>
 ## Features
 
-1. Modules
-Currently only SMM veriable feature is available.
+1. SMM variable feature configuration
+  * PcdPlatformPayloadFeatureEnable - Enables this feature.
+  * SMM_VARIABLE - TRUE enables the SPI SMM variable feature implementation.
+
+2. Modules: Currently only SMM variable feature is available.
 Several build macros are used as below for SMM variable feature modules.
+<pre>
 !if $(SMM_VARIABLE) == TRUE
   ## PchSmiDispatchSmm
   ## FvbSmm
@@ -51,11 +65,16 @@ Several build macros are used as below for SMM variable feature modules.
   ## VariableSmm
   ## VariableSmmRuntimeDxe
 !endif
+</pre>
+
+3. Data Flows
 
-2. Data Flows
 SMM variable:
+
 The interface with bootloader are defined in PlatformPayloadFeaturePkg\Include\Guid
+
 SpiFlashInfoGuid.h    -- SPI related information for SPI flash operation.
+
 NvVariableInfoGuid.h  -- Variable related information for SPI NV variables.
 
 ## Control Flows
@@ -63,33 +82,19 @@ EDK2 DXE/SMM core from universal UEFI payload would dispatch all the modules  from this platform payload.
 
 ## Test Point Results
-*_TODO_*
-The test(s) that can verify porting is complete for the feature.
-
-Each feature must describe at least one test point to verify the feature is successful. If the test point is not -implemented, this should be stated.
+None implemented
 
 ## Functional Exit Criteria
-*_TODO_*
-The testable functionality for the feature.
-
-This section should provide an ordered list of criteria that a board integrator can reference to ensure the feature is -functional on their board.
+Boot to UEFI shell and verify variable functionality over resets
 
 ## Feature Enabling Checklist
-*_TODO_*
-An ordered list of required activities to achieve desired functionality for the feature.
+Verify configuration of PcdPlatformPayloadFeatureEnable and 
+SMM_VARIABLE Boot to UEFI Shell Update a variable Reset the system and 
+verify variable remains updated
 
 ## Performance Impact
-A general expectation for the impact on overall boot performance due to using this feature.
-
-This section is expected to provide guidance on:
-* How to estimate performance impact due to the feature
-* How to measure performance impact of the feature
-* How to manage performance impact of the feature
+Minimal expected
 
 ## Common Optimizations
-*_TODO_*
-Common size or performance tuning options for this feature.
-
-This section is recommended but not required. If not used, the contents should be left empty.
+None
--
2.36.1.windows.1


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

* Re: [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match feature conventions
  2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match " Oram, Isaac W
  2022-08-12 22:54   ` Guo Dong
@ 2022-08-16 21:31   ` Chaganty, Rangasai V
  1 sibling, 0 replies; 10+ messages in thread
From: Chaganty, Rangasai V @ 2022-08-16 21:31 UTC (permalink / raw)
  To: Oram, Isaac W, devel@edk2.groups.io
  Cc: Desimone, Nathaniel L, Gao, Liming, Ni, Ray, Dong, Guo

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com> 
Sent: Wednesday, August 10, 2022 3:47 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Ni, Ray <ray.ni@intel.com>; Dong, Guo <guo.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match feature conventions

Rename gPlatformPayloadPkgTokenSpaceGuid to gPlatformPayloadFeaturePkgTokenSpaceGuid

Rename PcdPayloadPackageFeatureEnable to PcdPlatformPayloadFeatureEnable

Update Readme including format improvements

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
 .../AdvancedFeaturePkg/AdvancedFeaturePkg.dsc |  2 +-
 .../Include/AdvancedFeatures.dsc              |  2 +-
 .../Include/AdvancedFeaturesPcd.dsc           |  2 +-
 .../AdvancedFeaturePkg/Include/PostMemory.fdf |  2 +-  .../AdvancedFeaturePkg/Include/PreMemory.fdf  |  2 +-  .../PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf  |  2 +-
 .../PlatformPayloadFeaturePkg.dec             |  6 +-
 .../Intel/PlatformPayloadFeaturePkg/Readme.md | 73 ++++++++++---------
 8 files changed, 48 insertions(+), 43 deletions(-)

diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index df8e678ae8..236c5570ca 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -84,7 +84,7 @@
   #
   # Individual features
   #
-  gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable          |TRUE
+  
+ gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnab
+ le  |TRUE
 
 #
 # PCD that are required to be set by the build target should be configured here for test purposes diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
index 6a80546592..804aab89bc 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
@@ -79,6 +79,6 @@
 #
 # Individual features
 #
-!if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
+!if 
+gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnabl
+e == TRUE
   !include PlatformPayloadFeaturePkg/Include/PlatformPayloadFeature.dsc
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
index 08f258a48c..0af5a8bfbc 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
@@ -82,7 +82,7 @@
   gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable      |FALSE
   gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnable  |FALSE
 
-  gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable          |FALSE
+  
+ gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnab
+ le  |FALSE
 
 #
 # There seems to be some build parsing odd behavior that requires this PCD to be specified even though diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
index 66032ba117..349bdcc491 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
@@ -80,6 +80,6 @@
 #
 # Individual features
 #
-!if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
+!if 
+gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnabl
+e == TRUE
   !include PlatformPayloadFeaturePkg/Include/PostMemory.fdf
 !endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
index 9cd6de833b..b991a5aabf 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
@@ -80,6 +80,6 @@
 #
 # Individual features
 #
-!if gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable == TRUE
+!if 
+gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnabl
+e == TRUE
   !include PlatformPayloadFeaturePkg/Include/PreMemory.fdf
 !endif
diff --git a/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
index f973465cba..a692d9bf41 100644
--- a/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Fvb/FvbSmm.inf
@@ -60,7 +60,7 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
-  gPlatformPayloadPkgTokenSpaceGuid.PcdNvsDataFile
+  gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdNvsDataFile
 
 [Depex]
   TRUE
diff --git a/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
index 78d36f12eb..f02c5f70ca 100644
--- a/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dec
+++ b/Features/Intel/PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg
+++ .dec
@@ -21,7 +21,7 @@
   #
   ## Defines the token space for the Payload platform Package PCDs.
   #
-  gPlatformPayloadPkgTokenSpaceGuid  = {0xa375ddc6, 0x74fb, 0x4de1, {0x82, 0x6d, 0xa3, 0x10, 0xa3, 0x3b, 0x89, 0x77}}
+  gPlatformPayloadFeaturePkgTokenSpaceGuid  = {0xa375ddc6, 0x74fb, 
+ 0x4de1, {0x82, 0x6d, 0xa3, 0x10, 0xa3, 0x3b, 0x89, 0x77}}
 
   #
   # SPI variable support
@@ -41,9 +41,9 @@
 [PcdsFeatureFlag]
   ## Feature enabling control
   # @Prompt Enable payload platform FV common for most Intel platforms
-  gPlatformPayloadPkgTokenSpaceGuid.PcdPayloadPackageFeatureEnable|FALSE|BOOLEAN|0x00000001
+  
+ gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdPlatformPayloadFeatureEnab
+ le|FALSE|BOOLEAN|0x00000001
 
 [PcdsFixedAtBuild, PcdsPatchableInModule]
   ## FFS filename to find the default variable initial data file.
   # @Prompt FFS Name of variable initial data file
-  gPlatformPayloadPkgTokenSpaceGuid.PcdNvsDataFile |{ 0x1a, 0xf1, 0xb1, 0xae, 0x42, 0xcc, 0xcf, 0x4e, 0xac, 0x60, 0xdb, 0xab, 0xf6, 0xca, 0x69, 0xe6 }|VOID*|0x00000025
+  gPlatformPayloadFeaturePkgTokenSpaceGuid.PcdNvsDataFile |{ 0x1a, 
+ 0xf1, 0xb1, 0xae, 0x42, 0xcc, 0xcf, 0x4e, 0xac, 0x60, 0xdb, 0xab, 
+ 0xf6, 0xca, 0x69, 0xe6 }|VOID*|0x00000025
diff --git a/Features/Intel/PlatformPayloadFeaturePkg/Readme.md b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
index 1067196388..9cdb26285c 100644
--- a/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
+++ b/Features/Intel/PlatformPayloadFeaturePkg/Readme.md
@@ -19,31 +19,45 @@ universal payload specification. And a Platform Payload could be built from Plat  to provide Intel platform specific features (e.g. SPI module, PCH SMM) in FV/FD format.
 This platform payload could be inserted into universal UEFI payload as an ELF section  to generate a full-feature payload.
+
 ## Firmware Volumes
-* FvPlatformPayload
+* PlatformPayload.fv
 
 ## Build Flows
-use windows host as example to generate a full-feature payload:
+Use Windows host as example to generate a full-feature payload:
 
-** Setup the build env
+* Setup the build env
+<pre>
 set WORKSPACE=c:\payload
-set PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Features\Intel;
-    %WORKSPACE%\edk2-platforms\Platform\Intel
+set 
+PACKAGES_PATH=%WORKSPACE%\edk2;%WORKSPACE%\edk2-platforms\Features\Inte
+l;%WORKSPACE%\edk2-platforms\Platform\Intel
 edk2\edksetup.bat
-
-** Build universal UEFI payload with platform Payload
+</pre>
+* Build universal UEFI payload with platform payload <pre>
 python edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayloadFeaturePkg.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE -D SMM_VARIABLE=TRUE -or
+</pre>
+* Build universal UEFI payload then build the platform payload and 
+patch it to the universal UEFI payload <pre>
 python edk2\UefiPayloadPkg\UniversalPayloadBuild.py -t VS2019 -D SMM_SUPPORT=TRUE -DVARIABLE_SUPPORT=NONE  python edk2-platforms\Features\Intel\PlatformPayloadFeaturePkg\PlatformPayloadFeaturePkg.py -t VS2019 -D SMM_VARIABLE=TRUE -s
+</pre>
 
-  If build success, the final UEFI payload is at Build\UefiPayloadPkgX64\UniversalPayload.elf.
+If build succeeds, the final UEFI payload is at 
+<B>Build\UefiPayloadPkgX64\UniversalPayload.elf</B>
 
+Note that standalone feature package build works with "-a X64" or "-a IA32 -a X64" but "-a IA32" is not supported.
+Note that this does not patch the universal UEFI payload, it only creates a PlatformPayload.fv.
+<pre>
+build -p PlatformPayloadFeaturePkg/PlatformPayloadFeaturePkg.dsc -a X64 
+-a IA32 </pre>
 ## Features
 
-1. Modules
-Currently only SMM veriable feature is available.
+1. SMM variable feature configuration
+  * PcdPlatformPayloadFeatureEnable - Enables this feature.
+  * SMM_VARIABLE - TRUE enables the SPI SMM variable feature implementation.
+
+2. Modules: Currently only SMM variable feature is available.
 Several build macros are used as below for SMM variable feature modules.
+<pre>
 !if $(SMM_VARIABLE) == TRUE
   ## PchSmiDispatchSmm
   ## FvbSmm
@@ -51,11 +65,16 @@ Several build macros are used as below for SMM variable feature modules.
   ## VariableSmm
   ## VariableSmmRuntimeDxe
 !endif
+</pre>
+
+3. Data Flows
 
-2. Data Flows
 SMM variable:
+
 The interface with bootloader are defined in PlatformPayloadFeaturePkg\Include\Guid
+
 SpiFlashInfoGuid.h    -- SPI related information for SPI flash operation.
+
 NvVariableInfoGuid.h  -- Variable related information for SPI NV variables.
 
 ## Control Flows
@@ -63,33 +82,19 @@ EDK2 DXE/SMM core from universal UEFI payload would dispatch all the modules  from this platform payload.
 
 ## Test Point Results
-*_TODO_*
-The test(s) that can verify porting is complete for the feature.
-
-Each feature must describe at least one test point to verify the feature is successful. If the test point is not -implemented, this should be stated.
+None implemented
 
 ## Functional Exit Criteria
-*_TODO_*
-The testable functionality for the feature.
-
-This section should provide an ordered list of criteria that a board integrator can reference to ensure the feature is -functional on their board.
+Boot to UEFI shell and verify variable functionality over resets
 
 ## Feature Enabling Checklist
-*_TODO_*
-An ordered list of required activities to achieve desired functionality for the feature.
+Verify configuration of PcdPlatformPayloadFeatureEnable and 
+SMM_VARIABLE Boot to UEFI Shell Update a variable Reset the system and 
+verify variable remains updated
 
 ## Performance Impact
-A general expectation for the impact on overall boot performance due to using this feature.
-
-This section is expected to provide guidance on:
-* How to estimate performance impact due to the feature
-* How to measure performance impact of the feature
-* How to manage performance impact of the feature
+Minimal expected
 
 ## Common Optimizations
-*_TODO_*
-Common size or performance tuning options for this feature.
-
-This section is recommended but not required. If not used, the contents should be left empty.
+None
--
2.36.1.windows.1


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

end of thread, other threads:[~2022-08-16 21:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10 22:46 [edk2-devel][edk2-platforms][PATCH V1 0/3] Update PlatformPayloadPkg to match feature conventions Oram, Isaac W
2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 1/3] PlatformPayloadPkg: Fix AdvancedFeaturePkg build issue Oram, Isaac W
2022-08-12 17:41   ` Chaganty, Rangasai V
2022-08-12 22:53   ` Guo Dong
2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 2/3] PlatformPayloadPkg: Rename to match other feature conventions Oram, Isaac W
2022-08-12 21:55   ` Chaganty, Rangasai V
2022-08-12 22:51   ` Guo Dong
2022-08-10 22:46 ` [edk2-devel][edk2-platforms][PATCH V1 3/3] PlatformPayloadFeaturePkg: Update contents to match " Oram, Isaac W
2022-08-12 22:54   ` Guo Dong
2022-08-16 21:31   ` Chaganty, Rangasai V

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