summaryrefslogtreecommitdiff
path: root/Include/PPI/LoadFile.h
blob: 47660e451aa0624a25b7b1ee60ea4cc8f4a87f72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2011, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/BIN/Core/Include/PPI/LoadFile.h 7     6/16/11 3:18p Felixp $
//
// $Revision: 7 $
//
// $Date: 6/16/11 3:18p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/BIN/Core/Include/PPI/LoadFile.h $
// 
// 7     6/16/11 3:18p Felixp
// Surround backward compatibility definitions with #if
// BACKWARD_COMPATIBLE_MODE
// 
// 6     5/27/11 5:52p Felixp
// Headers are updated to improve separation of the Framework and PI
// interfaces.
// The definitions that will be removed in the future versions are marked
// with the comments.
// 
// 5     2/05/11 2:10p Artems
// Added PI 1.0 support
// 
// 4     3/13/06 1:16a Felixp
// 
// 3     3/24/05 11:45a Felixp
// 
// 2     3/04/05 10:26a Mandal
// 
// 1     1/28/05 12:44p Felixp
// 
// 2     1/18/05 3:21p Felixp
// PrintDebugMessage renamed to Trace
// 
// 1     12/23/04 9:41a Felixp
// 
// 1     10/14/04 12:06p Felixp
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:	LoadFile.h
//
// Description:	EFI_PEI_FV_FILE_LOADER_PPI PPI definition
//
//<AMI_FHDR_END>
//**********************************************************************
#ifndef __LoadFile__H__
#define __LoadFile__H__
#ifdef __cplusplus
extern "C" {
#endif

#include <PEI.h>

#if PI_SPECIFICATION_VERSION >= 0x00010000
#define EFI_PEI_LOAD_FILE_PPI_GUID \
  { 0xb9e0abfe, 0x5979, 0x4914, 0x97, 0x7f, 0x6d, 0xee, 0x78, 0xc2, 0x78, 0xa6 }
#if BACKWARD_COMPATIBLE_MODE
#define EFI_PEI_FV_FILE_LOADER_GUID EFI_PEI_LOAD_FILE_PPI_GUID
#endif
#else
#define EFI_PEI_FV_FILE_LOADER_GUID \
    { 0x7e1f0d85, 0x4ff, 0x4bb2, 0x86, 0x6a, 0x31, 0xa2, 0x99, 0x6a, 0x48, 0xa8 }
GUID_VARIABLE_DECLARATION(gPeiFvFileLoaderPpiGuid, EFI_PEI_FV_FILE_LOADER_GUID);
#define EFI_PEI_LOAD_FILE_PPI_GUID EFI_PEI_FV_FILE_LOADER_GUID
#endif //#if PI_SPECIFICATION_VERSION >= 0x00010000

GUID_VARIABLE_DECLARATION(gEfiPeiLoadFilePpiGuid, EFI_PEI_LOAD_FILE_PPI_GUID);

#if PI_SPECIFICATION_VERSION >= 0x00010000
typedef struct _EFI_PEI_LOAD_FILE_PPI EFI_PEI_LOAD_FILE_PPI;

typedef EFI_STATUS (EFIAPI *EFI_PEI_LOAD_FILE)(
  IN  CONST  EFI_PEI_LOAD_FILE_PPI   *This,
  IN  EFI_PEI_FILE_HANDLE            FileHandle,
  OUT EFI_PHYSICAL_ADDRESS           *ImageAddress,
  OUT UINT64                         *ImageSize,
  OUT EFI_PHYSICAL_ADDRESS           *EntryPoint,
  OUT UINT32                         *AuthenticationState
);

struct _EFI_PEI_LOAD_FILE_PPI {
  EFI_PEI_LOAD_FILE LoadFile;
};

#else //#if PI_SPECIFICATION_VERSION >= 0x00010000

typedef struct _EFI_PEI_FV_FILE_LOADER_PPI EFI_PEI_FV_FILE_LOADER_PPI;

typedef EFI_STATUS (EFIAPI *EFI_PEI_FV_LOAD_FILE) (
	IN EFI_PEI_FV_FILE_LOADER_PPI *This,
	IN EFI_FFS_FILE_HEADER *FfsHeader,
	OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
	OUT UINT64 *ImageSize,
	OUT EFI_PHYSICAL_ADDRESS *EntryPoint
);

struct _EFI_PEI_FV_FILE_LOADER_PPI {
	EFI_PEI_FV_LOAD_FILE FvLoadFile;
};
#endif //#if PI_SPECIFICATION_VERSION >= 0x00010000

/****** DO NOT WRITE BELOW THIS LINE *******/
#ifdef __cplusplus
}
#endif
#endif
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2011, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************