public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-platforms][PATCH V2 39/47] MinPlatformPkg: Install advanced feature FVs by stage enabled
@ 2019-11-28  2:18 Kubacki, Michael A
  2019-11-28  2:18 ` [edk2-platforms][PATCH V2 40/47] Platform/Intel/AdvancedFeaturePkg: Remove the S3 feature Kubacki, Michael A
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Kubacki, Michael A @ 2019-11-28  2:18 UTC (permalink / raw)
  To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao

This change updates the FvReportLib instance in MinPlatformPkg to
only install advanced feature firmware volumes if the advanced
feature stage should be active.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
---
 Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec                                     |  1 +
 Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf |  1 +
 Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c   | 50 +++++++++++---------
 3 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
index 21013cc87c..7f74ac9380 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
@@ -272,6 +272,7 @@ SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h
   # Stage 3 - boot to shell only
   # Stage 4 - boot to OS
   # Stage 5 - boot to OS with security boot enabled
+  # Stage 6 - boot with advanced features enabled
   #
   gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4|UINT8|0xF00000A0
 
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
index 1ce3034fcc..ef03e110bd 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
@@ -30,6 +30,7 @@
   PeiReportFvLib.c
 
 [Pcd]
+  gMinPlatformPkgTokenSpaceGuid.PcdBootStage                      ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode             ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress           ## CONSUMES
   gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize                  ## CONSUMES
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
index b61587f6e3..0d805d6fe7 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
@@ -40,20 +40,22 @@ ReportPreMemFv (
     NULL,
     0
     );
-  DEBUG ((
-    DEBUG_INFO,
-    "Install FlashFvAdvancedPreMemory - 0x%x, 0x%x\n",
-    PcdGet32 (PcdFlashFvAdvancedPreMemoryBase),
-    PcdGet32 (PcdFlashFvAdvancedPreMemorySize)
-    ));
-  PeiServicesInstallFvInfo2Ppi (
-    &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase))->FileSystemGuid),
-    (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase),
-    PcdGet32 (PcdFlashFvAdvancedPreMemorySize),
-    NULL,
-    NULL,
-    0
-    );
+  if (PcdGet8 (PcdBootStage) >= 6) {
+    DEBUG ((
+      DEBUG_INFO,
+      "Install FlashFvAdvancedPreMemory - 0x%x, 0x%x\n",
+      PcdGet32 (PcdFlashFvAdvancedPreMemoryBase),
+      PcdGet32 (PcdFlashFvAdvancedPreMemorySize)
+      ));
+    PeiServicesInstallFvInfo2Ppi (
+      &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase))->FileSystemGuid),
+      (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase),
+      PcdGet32 (PcdFlashFvAdvancedPreMemorySize),
+      NULL,
+      NULL,
+      0
+      );
+  }
 }
 
 VOID
@@ -122,15 +124,17 @@ ReportPostMemFv (
       NULL,
       0
       );
-    DEBUG ((DEBUG_INFO, "Install FlashFvAdvanced - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvAdvancedBase), PcdGet32 (PcdFlashFvAdvancedSize)));
-    PeiServicesInstallFvInfo2Ppi (
-      &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvancedBase))->FileSystemGuid),
-      (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedBase),
-      PcdGet32 (PcdFlashFvAdvancedSize),
-      NULL,
-      NULL,
-      0
-      );
+    if (PcdGet8 (PcdBootStage) >= 6) {
+      DEBUG ((DEBUG_INFO, "Install FlashFvAdvanced - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvAdvancedBase), PcdGet32 (PcdFlashFvAdvancedSize)));
+      PeiServicesInstallFvInfo2Ppi (
+        &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvancedBase))->FileSystemGuid),
+        (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedBase),
+        PcdGet32 (PcdFlashFvAdvancedSize),
+        NULL,
+        NULL,
+        0
+        );
+    }
   }
 
   //
-- 
2.16.2.windows.1


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

end of thread, other threads:[~2019-12-03 23:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-28  2:18 [edk2-platforms][PATCH V2 39/47] MinPlatformPkg: Install advanced feature FVs by stage enabled Kubacki, Michael A
2019-11-28  2:18 ` [edk2-platforms][PATCH V2 40/47] Platform/Intel/AdvancedFeaturePkg: Remove the S3 feature Kubacki, Michael A
2019-11-28  2:18 ` [edk2-platforms][PATCH V2 41/47] Platform/Intel/AdvancedFeaturePkg: Remove the IPMI feature Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-11-28  2:18 ` [edk2-platforms][PATCH V2 42/47] Platform/Intel/AdvancedFeaturePkg: Remove the SMBIOS feature Kubacki, Michael A
2019-11-28  2:18 ` [edk2-platforms][PATCH V2 43/47] Platform/Intel/AdvancedFeaturePkg: Remove remaining contents Kubacki, Michael A
2019-11-28  2:18 ` [edk2-platforms][PATCH V2 44/47] DebugFeaturePkg: Remove the ACPI Debug feature Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-11-28  2:18 ` [edk2-platforms][PATCH V2 45/47] DebugFeaturePkg: Remove the USB3 " Kubacki, Michael A
2019-11-28  2:18 ` [edk2-platforms][PATCH V2 46/47] UserInterfaceFeaturePkg: Remove the User Authentication feature Kubacki, Michael A
2019-12-03 23:58   ` [edk2-devel] " Nate DeSimone
2019-11-28  2:18 ` [edk2-platforms][PATCH V2 47/47] Maintainers.txt: Update Intel feature maintainers Kubacki, Michael A
2019-11-29  7:04 ` [edk2-platforms][PATCH V2 39/47] MinPlatformPkg: Install advanced feature FVs by stage enabled Chiu, Chasel

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