/** @file\r
Sample to provide FSP hob process related function.\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
}\r
\r
/**\r
- BIOS process FspBobList.\r
+ BIOS process FspBobList for Memory Resource Descriptor.\r
\r
@param[in] FspHobList Pointer to the HOB data structure produced by FSP.\r
\r
**/\r
EFI_STATUS\r
EFIAPI\r
-FspHobProcess (\r
+FspHobProcessForMemoryResource (\r
IN VOID *FspHobList\r
)\r
{\r
BOOLEAN FoundFspMemHob;\r
EFI_STATUS Status;\r
EFI_BOOT_MODE BootMode;\r
- PEI_CAPSULE_PPI *Capsule;\r
+ EFI_PEI_CAPSULE_PPI *Capsule;\r
VOID *CapsuleBuffer;\r
UINTN CapsuleBufferLength;\r
UINT64 RequiredMemSize;\r
\r
S3PeiMemBase = 0;\r
S3PeiMemSize = 0;\r
- Status = GetS3MemoryInfo (&S3PeiMemBase, &S3PeiMemSize);\r
+ Status = GetS3MemoryInfo (&S3PeiMemSize, &S3PeiMemBase);\r
ASSERT_EFI_ERROR (Status);\r
DEBUG((DEBUG_INFO, "S3 memory %Xh - %Xh bytes\n", S3PeiMemBase, S3PeiMemSize));\r
\r
//\r
- // Make sure Stack and PeiMemory are not overlap - JYAO1\r
+ // Make sure Stack and PeiMemory are not overlap\r
//\r
\r
Status = PeiServicesInstallPeiMemory (\r
CapsuleBufferLength = 0;\r
if (BootMode == BOOT_ON_FLASH_UPDATE) {\r
Status = PeiServicesLocatePpi (\r
- &gPeiCapsulePpiGuid,\r
+ &gEfiPeiCapsulePpiGuid,\r
0,\r
NULL,\r
(VOID **) &Capsule\r
\r
if (Status == EFI_SUCCESS) {\r
//\r
- // Make sure Stack and CapsuleBuffer are not overlap - JYAO1\r
+ // Make sure Stack and CapsuleBuffer are not overlap\r
//\r
CapsuleBuffer = (VOID *)(UINTN)BASE_1MB;\r
CapsuleBufferLength = (UINTN)(LowMemorySize - PeiMemSize);\r
);\r
\r
//\r
- // Make sure Stack and CapsuleBuffer are not overlap - JYAO1\r
+ // Make sure Stack and CapsuleBuffer are not overlap\r
//\r
\r
//\r
}\r
}\r
\r
- //\r
- // NV Storage Hob\r
- //\r
+ return EFI_SUCCESS;\r
+}\r
+\r
+/**\r
+ BIOS process FspBobList for other data (not Memory Resource Descriptor).\r
+\r
+ @param[in] FspHobList Pointer to the HOB data structure produced by FSP.\r
\r
+ @return If platform process the FSP hob list successfully.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FspHobProcessForOtherData (\r
+ IN VOID *FspHobList\r
+ )\r
+{\r
return EFI_SUCCESS;\r
}\r
+\r
+/**\r
+ BIOS process FspBobList.\r
+\r
+ @param[in] FspHobList Pointer to the HOB data structure produced by FSP.\r
+\r
+ @return If platform process the FSP hob list successfully.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+FspHobProcess (\r
+ IN VOID *FspHobList\r
+ )\r
+{\r
+ EFI_STATUS Status;\r
+\r
+ Status = FspHobProcessForMemoryResource (FspHobList);\r
+ if (EFI_ERROR (Status)) {\r
+ return Status;\r
+ }\r
+ Status = FspHobProcessForOtherData (FspHobList);\r
+\r
+ return Status;\r
+}\r