]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2WrapperPkg/Library/PeiFspWrapperHobProcessLibSample/FspWrapperHobProcessLibSample.c
IntelFsp2WrapperPkg: Perform post FSP-S process.
[mirror_edk2.git] / IntelFsp2WrapperPkg / Library / PeiFspWrapperHobProcessLibSample / FspWrapperHobProcessLibSample.c
index 1c7f661c477320e1862ca8c41b803266cb0e9d52..54cebe127c8feea1306e36e1a307fa3628dbe94e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Sample to provide FSP wrapper hob process related function.\r
 \r
-  Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -378,7 +378,19 @@ PostFspsHobProcess (
   IN VOID                 *FspHobList\r
   )\r
 {\r
-  ProcessFspHobList (FspHobList);\r
-\r
+  //\r
+  // PostFspsHobProcess () will be called in both FSP API and Dispatch modes to\r
+  // align the same behavior and support a variety of boot loader implementations.\r
+  // Boot loader provided library function is recommended to support both API and\r
+  // Dispatch modes by checking PcdFspModeSelection.\r
+  //\r
+  if (PcdGet8 (PcdFspModeSelection) == 1) {\r
+    //\r
+    // Only in FSP API mode the wrapper has to build hobs basing on FSP output data.\r
+    // In this case FspHobList cannot be NULL.\r
+    //\r
+    ASSERT (FspHobList != NULL);\r
+    ProcessFspHobList (FspHobList);\r
+  }\r
   return EFI_SUCCESS;\r
 }\r