public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Kubacki, Michael A" <michael.a.kubacki@intel.com>
To: devel@edk2.groups.io
Cc: Chasel Chiu <chasel.chiu@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Liming Gao <liming.gao@intel.com>
Subject: [edk2-platforms][PATCH V2 29/47] MinPlatformPkg: Add FvAdvancedPreMemory
Date: Wed, 27 Nov 2019 17:05:56 -0800	[thread overview]
Message-ID: <20191128010614.43628-30-michael.a.kubacki@intel.com> (raw)
In-Reply-To: <20191128010614.43628-1-michael.a.kubacki@intel.com>

This change adds a new firmware volume to MinPlatformPkg called
FvAdvancedPreMemory. This firmware volume is used to hold advanced
feature modules that must be available in pre-memory.

Previously, these modules were kept as an uncompressed child FV in
FvAdvanced. However, in memory constrained environments before
permanent memory is initialized, it is preferable to have a
dedicated firmware volume that can simply be installed as a
standalone firmware volume to reduce the need for creating FV HOBs
for other post-memory advanced features if they are not needed and
to simplify the FV layout and FV installation process.

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                                     |  3 ++
 Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf | 42 ++++++++++----------
 Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c   | 24 ++++++++---
 3 files changed, 44 insertions(+), 25 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
index 6a765d689d..21013cc87c 100644
--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
+++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec
@@ -168,6 +168,9 @@ SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityBase|0x00000000|UINT32|0x20000010
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecuritySize|0x00000000|UINT32|0x20000011
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityOffset|0x00000000|UINT32|0x20000012
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemoryBase|0x00000000|UINT32|0x2000002D
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemorySize|0x00000000|UINT32|0x2000002E
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemoryOffset|0x00000000|UINT32|0x2000002F
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedBase|0x00000000|UINT32|0x20000013
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedSize|0x00000000|UINT32|0x20000014
   gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedOffset|0x00000000|UINT32|0x20000015
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
index 4d96c9cf31..1ce3034fcc 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
@@ -1,7 +1,7 @@
 ### @file
 # Component information file for the Report Firmware Volume (FV) library.
 #
-# Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -30,22 +30,24 @@
   PeiReportFvLib.c
 
 [Pcd]
-  gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode       ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress     ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize            ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase          ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize          ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase          ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize          ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase          ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUSize          ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryBase    ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize    ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootBase      ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootSize      ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootBase        ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootSize        ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityBase      ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecuritySize      ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedBase      ## CONSUMES
-  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedSize      ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode             ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress           ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize                  ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMBase                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSBase                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUBase                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspUSize                ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemoryBase          ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPostMemorySize          ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootBase            ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvUefiBootSize            ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootBase              ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvOsBootSize              ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecurityBase            ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvSecuritySize            ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemoryBase   ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedPreMemorySize   ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedBase            ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashFvAdvancedSize            ## CONSUMES
diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
index 6e49b1239d..b61587f6e3 100644
--- a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
+++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.c
@@ -1,7 +1,7 @@
 /** @file
   Source code file for Report Firmware Volume (FV) library
 
-Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -40,11 +40,16 @@ ReportPreMemFv (
     NULL,
     0
     );
-  DEBUG ((DEBUG_INFO, "Install FlashFvAdvanced - 0x%x, 0x%x\n", PcdGet32 (PcdFlashFvAdvancedBase), PcdGet32 (PcdFlashFvAdvancedSize)));
+  DEBUG ((
+    DEBUG_INFO,
+    "Install FlashFvAdvancedPreMemory - 0x%x, 0x%x\n",
+    PcdGet32 (PcdFlashFvAdvancedPreMemoryBase),
+    PcdGet32 (PcdFlashFvAdvancedPreMemorySize)
+    ));
   PeiServicesInstallFvInfo2Ppi (
-    &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvancedBase))->FileSystemGuid),
-    (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedBase),
-    PcdGet32 (PcdFlashFvAdvancedSize),
+    &(((EFI_FIRMWARE_VOLUME_HEADER *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase))->FileSystemGuid),
+    (VOID *) (UINTN) PcdGet32 (PcdFlashFvAdvancedPreMemoryBase),
+    PcdGet32 (PcdFlashFvAdvancedPreMemorySize),
     NULL,
     NULL,
     0
@@ -117,6 +122,15 @@ 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
+      );
   }
 
   //
-- 
2.16.2.windows.1


  parent reply	other threads:[~2019-11-28  1:08 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28  1:05 [edk2-platforms][PATCH V2 00/47] Intel Advanced Feature Refactor Kubacki, Michael A
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 01/47] AdvancedFeaturePkg: Package DSC style cleanup Kubacki, Michael A
2019-12-03  8:45   ` Chaganty, Rangasai V
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 02/47] DebugFeaturePkg: " Kubacki, Michael A
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 03/47] UserInterfaceFeaturePkg: " Kubacki, Michael A
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 04/47] Features/Intel: Add Readme.md Kubacki, Michael A
2019-12-03  9:07   ` Chaganty, Rangasai V
2019-12-03 23:57   ` Nate DeSimone
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 05/47] Features/Intel/PowerManagement: " Kubacki, Michael A
2019-12-03  9:14   ` Chaganty, Rangasai V
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 06/47] Features/Intel/OutOfBandManagement: " Kubacki, Michael A
2019-12-03  9:22   ` Chaganty, Rangasai V
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 07/47] Features/Intel/SystemInformation: " Kubacki, Michael A
2019-12-03  9:30   ` Chaganty, Rangasai V
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 08/47] Features/Intel/Debugging: " Kubacki, Michael A
2019-12-03  9:32   ` Chaganty, Rangasai V
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 09/47] Features/Intel/UserInterface: " Kubacki, Michael A
2019-12-03  9:36   ` Chaganty, Rangasai V
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 10/47] Features/Intel/Network: " Kubacki, Michael A
2019-12-03  9:38   ` Chaganty, Rangasai V
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 11/47] TemplateFeaturePkg: Add initial package Kubacki, Michael A
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 12/47] Features/Intel/S3FeaturePkg: " Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 13/47] Features/Intel/IpmiFeaturePkg: " Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-12-04  7:53   ` Chaganty, Rangasai V
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 14/47] Features/Intel/IpmiFeaturePkg: Add libraries Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-12-04  8:10   ` Chaganty, Rangasai V
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 15/47] Features/Intel/IpmiFeaturePkg: Add modules Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-12-04  8:22   ` Chaganty, Rangasai V
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 16/47] Features/Intel/SmbiosFeaturePkg: Add initial package Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 17/47] Features/Intel/SmbiosFeaturePkg: Update default strings Kubacki, Michael A
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 18/47] Features/Intel/AcpiDebugFeaturePkg: Add initial package Kubacki, Michael A
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 19/47] Features/Intel/Usb3DebugFeaturePkg: " Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 20/47] Features/Intel/UserAuthFeaturePkg: " Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 21/47] Features/Intel/NetworkFeaturePkg: " Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 22/47] Features/Intel/AdvancedFeaturePkg: Add package Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " Nate DeSimone
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 23/47] Features/Intel/AdvancedFeaturePkg: Add temporary build workaround Kubacki, Michael A
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 24/47] Features/Intel/AdvancedFeaturePkg: Add FDF include files Kubacki, Michael A
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 25/47] KabylakeOpenBoardPkg/KabylakeRvp3: Add PEI_ARCH and DXE_ARCH Kubacki, Michael A
2019-11-29  6:42   ` [edk2-devel] " Chiu, Chasel
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 26/47] KabylakeOpenBoardPkg/GalagoPro3: " Kubacki, Michael A
2019-11-29  6:43   ` Chiu, Chasel
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 27/47] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: " Kubacki, Michael A
2019-11-29  6:43   ` [edk2-devel] " Chiu, Chasel
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 28/47] SimicsOpenBoardPkg/BoardX58Ich10: Use " Kubacki, Michael A
2019-11-28  1:05 ` Kubacki, Michael A [this message]
2019-11-29  6:43   ` [edk2-devel] [edk2-platforms][PATCH V2 29/47] MinPlatformPkg: Add FvAdvancedPreMemory Chiu, Chasel
2019-12-03 23:57   ` Nate DeSimone
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 30/47] KabylakeOpenBoardPkg/KabylakeRvp3: " Kubacki, Michael A
2019-11-29  6:45   ` Chiu, Chasel
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 31/47] KabylakeOpenBoardPkg/GalagoPro3: " Kubacki, Michael A
2019-11-29  6:49   ` Chiu, Chasel
2019-11-28  1:05 ` [edk2-platforms][PATCH V2 32/47] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: " Kubacki, Michael A
2019-11-29  6:50   ` Chiu, Chasel
2019-11-28  1:06 ` [edk2-platforms][PATCH V2 33/47] Platform/Intel: Add advanced feature build support Kubacki, Michael A
2019-11-29  6:52   ` Chiu, Chasel
2019-11-28  1:06 ` [edk2-platforms][PATCH V2 34/47] Platform/Intel/Readme.md Content update Kubacki, Michael A
2019-11-28  1:06 ` [edk2-platforms][PATCH V2 35/47] KabylakeOpenBoardPkg/GalagoPro3: Enable advanced features Kubacki, Michael A
2019-11-29  7:00   ` Chiu, Chasel
2019-11-28  1:06 ` [edk2-platforms][PATCH V2 36/47] KabylakeOpenBoardPkg/KabylakeRvp3: " Kubacki, Michael A
2019-11-29  7:01   ` Chiu, Chasel
2019-11-28  1:06 ` [edk2-platforms][PATCH V2 37/47] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: " Kubacki, Michael A
2019-11-29  7:02   ` Chiu, Chasel
2019-11-28  1:06 ` [edk2-platforms][PATCH V2 38/47] SimicsOpenBoardPkg: Use new advanced feature refactor Kubacki, Michael A
2019-12-03 23:57   ` [edk2-devel] " 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=20191128010614.43628-30-michael.a.kubacki@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