1 /** @file 2 3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR> 4 5 6 This program and the accompanying materials are licensed and made available under 7 8 the terms and conditions of the BSD License that accompanies this distribution. 9 10 The full text of the license may be found at 11 12 http://opensource.org/licenses/bsd-license.php. 13 14 15 16 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 17 18 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 19 20 21 22 23 Module Name: 24 25 FvInfoPei.c 26 27 Abstract: 28 29 EFI 2.0 PEIM to initialize the cache and program for unlock processor 30 31 32 33 --*/ 34 35 #include <PiPei.h> 36 #include <Guid/FirmwareFileSystem2.h> 37 #include <Ppi/FirmwareVolumeInfo.h> 38 #include <Library/PcdLib.h> 39 #include <Library/DebugLib.h> 40 41 EFI_PEI_FIRMWARE_VOLUME_INFO_PPI mAddtionFVPpi = { 42 EFI_FIRMWARE_FILE_SYSTEM2_GUID, 43 (VOID*)(UINTN)FixedPcdGet32(PcdFlashFvRecovery2Base), 44 FixedPcdGet32(PcdFlashFvRecovery2Size), 45 NULL, 46 NULL 47 }; 48 49 EFI_PEI_PPI_DESCRIPTOR mPpiList[] = { 50 (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), 51 &gEfiPeiFirmwareVolumeInfoPpiGuid, 52 &mAddtionFVPpi 53 }; 54 55 56 /** PeimInitializeFvInfo(IN EFI_PEI_FILE_HANDLE FileHandle,IN CONST EFI_PEI_SERVICES ** PeiServices)57 Add Recovery Fv Info to the Pei Core. 58 59 @param PeiServices General purpose services available to every PEIM. 60 61 @retval Status 62 63 **/ 64 EFI_STATUS 65 EFIAPI 66 PeimInitializeFvInfo ( 67 IN EFI_PEI_FILE_HANDLE FileHandle, 68 IN CONST EFI_PEI_SERVICES **PeiServices 69 ) 70 71 // 72 // GC_TODO: FfsHeader - add argument and description to function comment 73 // 74 { 75 EFI_STATUS Status; 76 Status = (**PeiServices).InstallPpi (PeiServices, &mPpiList[0]); 77 ASSERT_EFI_ERROR (Status); 78 79 DEBUG ((EFI_D_INFO, "\nFvInfo Add Fv Info\n")); 80 81 return Status; 82 } 83