• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   Load image file from fv to memory.
3 
4 Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9 
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 
13   @par Revision Reference:
14   This PPI is defined in PEI CIS spec Version 0.91.
15 
16 **/
17 
18 #ifndef _FV_FILE_LOADER_PPI_H_
19 #define _FV_FILE_LOADER_PPI_H_
20 
21 #define EFI_PEI_FV_FILE_LOADER_GUID \
22   { \
23     0x7e1f0d85, 0x4ff, 0x4bb2, {0x86, 0x6a, 0x31, 0xa2, 0x99, 0x6a, 0x48, 0xa8 } \
24   }
25 
26 typedef struct _EFI_PEI_FV_FILE_LOADER_PPI  EFI_PEI_FV_FILE_LOADER_PPI;
27 
28 /**
29   Loads a PEIM into memory for subsequent execution.
30 
31   @param  This           Interface pointer that implements the Load File PPI instance.
32   @param  FfsHeader      The pointer to the FFS header of the file to load.
33   @param  ImageAddress   The pointer to the address of the loaded Image
34   @param  ImageSize      The pointer to the size of the loaded image.
35   @param  EntryPoint     The pointer to the entry point of the image.
36 
37   @retval EFI_SUCCESS           The image was loaded successfully.
38   @retval EFI_OUT_OF_RESOURCES  There was not enough memory.
39   @retval EFI_INVALID_PARAMETER The contents of the FFS file did not
40                                 contain a valid PE/COFF image that could be loaded.
41 
42 **/
43 typedef
44 EFI_STATUS
45 (EFIAPI *EFI_PEI_FV_LOAD_FILE)(
46   IN  EFI_PEI_FV_FILE_LOADER_PPI                *This,
47   IN  EFI_FFS_FILE_HEADER                       *FfsHeader,
48   OUT EFI_PHYSICAL_ADDRESS                      *ImageAddress,
49   OUT UINT64                                    *ImageSize,
50   OUT EFI_PHYSICAL_ADDRESS                      *EntryPoint
51   );
52 
53 /**
54   This PPI is a pointer to the Load File service. This service will be
55   published by a PEIM. The PEI Foundation will use this service to
56   launch the known non-XIP PE/COFF PEIM images. This service may
57   depend upon the presence of the EFI_PEI_PERMANENT_MEMORY_INSTALLED_PPI.
58 **/
59 struct _EFI_PEI_FV_FILE_LOADER_PPI {
60   ///
61   /// Loads a PEIM into memory for subsequent execution.
62   ///
63   EFI_PEI_FV_LOAD_FILE  FvLoadFile;
64 };
65 
66 extern EFI_GUID gEfiPeiFvFileLoaderPpiGuid;
67 
68 #endif
69