X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFspWrapperPkg%2FLibrary%2FPeiFspHobProcessLibSample%2FFspHobProcessLibSample.c;h=099980e5255655e7a316a0fa41766cce556e008c;hp=b370a4ad5674a211784d483d1d6bf05175e8b2c0;hb=03195ad324c19bbd1bbc221c6642df4de7a41514;hpb=a0e0fb6d9fa37f430c483c04e6333e3c32308a56 diff --git a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c index b370a4ad56..099980e525 100644 --- a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c +++ b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c @@ -1,7 +1,7 @@ /** @file Sample to provide FSP hob process related function. - Copyright (c) 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -132,7 +132,7 @@ GetPeiMemSize ( } /** - BIOS process FspBobList. + BIOS process FspBobList for Memory Resource Descriptor. @param[in] FspHobList Pointer to the HOB data structure produced by FSP. @@ -140,7 +140,7 @@ GetPeiMemSize ( **/ EFI_STATUS EFIAPI -FspHobProcess ( +FspHobProcessForMemoryResource ( IN VOID *FspHobList ) { @@ -155,7 +155,7 @@ FspHobProcess ( BOOLEAN FoundFspMemHob; EFI_STATUS Status; EFI_BOOT_MODE BootMode; - PEI_CAPSULE_PPI *Capsule; + EFI_PEI_CAPSULE_PPI *Capsule; VOID *CapsuleBuffer; UINTN CapsuleBufferLength; UINT64 RequiredMemSize; @@ -246,12 +246,12 @@ FspHobProcess ( S3PeiMemBase = 0; S3PeiMemSize = 0; - Status = GetS3MemoryInfo (&S3PeiMemBase, &S3PeiMemSize); + Status = GetS3MemoryInfo (&S3PeiMemSize, &S3PeiMemBase); ASSERT_EFI_ERROR (Status); DEBUG((DEBUG_INFO, "S3 memory %Xh - %Xh bytes\n", S3PeiMemBase, S3PeiMemSize)); // - // Make sure Stack and PeiMemory are not overlap - JYAO1 + // Make sure Stack and PeiMemory are not overlap // Status = PeiServicesInstallPeiMemory ( @@ -271,7 +271,7 @@ FspHobProcess ( CapsuleBufferLength = 0; if (BootMode == BOOT_ON_FLASH_UPDATE) { Status = PeiServicesLocatePpi ( - &gPeiCapsulePpiGuid, + &gEfiPeiCapsulePpiGuid, 0, NULL, (VOID **) &Capsule @@ -280,7 +280,7 @@ FspHobProcess ( if (Status == EFI_SUCCESS) { // - // Make sure Stack and CapsuleBuffer are not overlap - JYAO1 + // Make sure Stack and CapsuleBuffer are not overlap // CapsuleBuffer = (VOID *)(UINTN)BASE_1MB; CapsuleBufferLength = (UINTN)(LowMemorySize - PeiMemSize); @@ -313,7 +313,7 @@ FspHobProcess ( ); // - // Make sure Stack and CapsuleBuffer are not overlap - JYAO1 + // Make sure Stack and CapsuleBuffer are not overlap // // @@ -331,9 +331,45 @@ FspHobProcess ( } } - // - // NV Storage Hob - // + return EFI_SUCCESS; +} + +/** + BIOS process FspBobList for other data (not Memory Resource Descriptor). + + @param[in] FspHobList Pointer to the HOB data structure produced by FSP. + @return If platform process the FSP hob list successfully. +**/ +EFI_STATUS +EFIAPI +FspHobProcessForOtherData ( + IN VOID *FspHobList + ) +{ return EFI_SUCCESS; } + +/** + BIOS process FspBobList. + + @param[in] FspHobList Pointer to the HOB data structure produced by FSP. + + @return If platform process the FSP hob list successfully. +**/ +EFI_STATUS +EFIAPI +FspHobProcess ( + IN VOID *FspHobList + ) +{ + EFI_STATUS Status; + + Status = FspHobProcessForMemoryResource (FspHobList); + if (EFI_ERROR (Status)) { + return Status; + } + Status = FspHobProcessForOtherData (FspHobList); + + return Status; +}