]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFspWrapperPkg/FspInitPei/SecMain.c
Update IntelFspWrapperPkg according to FSP1.1.
[mirror_edk2.git] / IntelFspWrapperPkg / FspInitPei / SecMain.c
index 10550e74de1a33af5aea5d9f20d2a544ea0da485..4d0878a9df0b3b8b00f59b5a66f89ea10cb9cdbf 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   C functions in SEC\r
 \r
 /** @file\r
   C functions in SEC\r
 \r
-  Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -28,6 +28,10 @@ EFI_PEI_PPI_DESCRIPTOR            mPeiSecMainPpi[] = {
   },\r
 };\r
 \r
   },\r
 };\r
 \r
+FSP_INIT_DONE_PPI gFspInitDonePpi = {\r
+  FspInitDoneGetFspHobList\r
+};\r
+\r
 //\r
 // These are IDT entries pointing to 10:FFFFFFE4h.\r
 //\r
 //\r
 // These are IDT entries pointing to 10:FFFFFFE4h.\r
 //\r
@@ -267,3 +271,40 @@ SecStartupPhase2(
   //\r
   return ;\r
 }\r
   //\r
   return ;\r
 }\r
+\r
+/**\r
+  Return Hob list produced by FSP.\r
+\r
+  @param[in]  PeiServices  The pointer to the PEI Services Table.\r
+  @param[in]  This         The pointer to this instance of this PPI.\r
+  @param[out] FspHobList   The pointer to Hob list produced by FSP.\r
+\r
+  @return EFI_SUCCESS FReturn Hob list produced by FSP successfully.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FspInitDoneGetFspHobList (\r
+  IN  CONST EFI_PEI_SERVICES         **PeiServices,\r
+  IN  FSP_INIT_DONE_PPI              *This,\r
+  OUT VOID                           **FspHobList\r
+  )\r
+{\r
+  VOID        *TopOfTemporaryRamPpi;\r
+  EFI_STATUS  Status;\r
+\r
+  Status = (*PeiServices)->LocatePpi (\r
+                             PeiServices,\r
+                             &gTopOfTemporaryRamPpiGuid,\r
+                             0,\r
+                             NULL,\r
+                             (VOID **) &TopOfTemporaryRamPpi\r
+                             );\r
+  if (EFI_ERROR (Status)) {\r
+    return EFI_NOT_FOUND;\r
+  }\r
+\r
+  *FspHobList = (VOID *)(UINTN)(*(UINT32 *)((UINTN)TopOfTemporaryRamPpi - sizeof(UINT32)));\r
+\r
+  return EFI_SUCCESS;\r
+}\r
+\r