public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nate DeSimone" <nathaniel.l.desimone@intel.com>
To: "Kubacki, Michael A" <michael.a.kubacki@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Chiu, Chasel" <chasel.chiu@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [edk2-platforms][PATCH V1 48/49] MinPlatformPkg: Install advanced feature FVs by stage enabled
Date: Sat, 16 Nov 2019 00:35:34 +0000	[thread overview]
Message-ID: <02A34F284D1DA44BB705E61F7180EF0AB5BDB71A@ORSMSX114.amr.corp.intel.com> (raw)
In-Reply-To: <20191113040657.38540-9-michael.a.kubacki@intel.com>

Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>

-----Original Message-----
From: Kubacki, Michael A <michael.a.kubacki@intel.com> 
Sent: Tuesday, November 12, 2019 8:07 PM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: [edk2-platforms][PATCH V1 48/49] MinPlatformPkg: Install advanced feature FVs by stage enabled

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>
---
 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 28713108ed..cbbe3b2005 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
@@ -272,6 +272,7 @@ gMinPlatformPkgTokenSpaceGuid.PcdPcIoApicEnable|0x0|UINT32|0x90000019
   # 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


  parent reply	other threads:[~2019-11-16  0:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191113040657.38540-1-michael.a.kubacki@intel.com>
     [not found] ` <20191113040657.38540-2-michael.a.kubacki@intel.com>
2019-11-16  0:35   ` [edk2-platforms][PATCH V1 41/49] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Add FvAdvancedPreMemory Nate DeSimone
     [not found] ` <20191113040657.38540-3-michael.a.kubacki@intel.com>
2019-11-16  0:35   ` [edk2-platforms][PATCH V1 42/49] Platform/Intel: Add advanced feature build support Nate DeSimone
     [not found] ` <20191113040657.38540-4-michael.a.kubacki@intel.com>
2019-11-16  0:35   ` [edk2-platforms][PATCH V1 43/49] Platform/Intel/Readme.md Content update Nate DeSimone
     [not found] ` <20191113040657.38540-5-michael.a.kubacki@intel.com>
2019-11-16  0:35   ` [edk2-platforms][PATCH V1 44/49] KabylakeOpenBoardPkg/GalagoPro3: Enable advanced features Nate DeSimone
     [not found] ` <20191113040657.38540-6-michael.a.kubacki@intel.com>
2019-11-16  0:35   ` [edk2-platforms][PATCH V1 45/49] KabylakeOpenBoardPkg/KabylakeRvp3: " Nate DeSimone
     [not found] ` <20191113040657.38540-7-michael.a.kubacki@intel.com>
2019-11-16  0:35   ` [edk2-platforms][PATCH V1 46/49] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: " Nate DeSimone
     [not found] ` <20191113040657.38540-9-michael.a.kubacki@intel.com>
2019-11-16  0:35   ` Nate DeSimone [this message]
2019-11-13  4:37 [edk2-platforms][PATCH V1 24/49] DebugFeaturePkg: Remove the USB3 Debug feature Kubacki, Michael A
2019-11-13  4:37 ` [edk2-platforms][PATCH V1 48/49] MinPlatformPkg: Install advanced feature FVs by stage enabled Kubacki, Michael A
2019-11-16  0:37   ` Nate DeSimone
  -- strict thread matches above, loose matches on Subject: below --
2019-11-13  3:27 [edk2-platforms][PATCH V1 00/49] Intel Advanced Feature Refactor Kubacki, Michael A
     [not found] ` <20191113032816.4056-49-michael.a.kubacki@intel.com>
2019-11-16  0:34   ` [edk2-platforms][PATCH V1 48/49] MinPlatformPkg: Install advanced feature FVs by stage enabled Nate DeSimone

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=02A34F284D1DA44BB705E61F7180EF0AB5BDB71A@ORSMSX114.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

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

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