]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | GenFvImageLib.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | This file contains describes the public interfaces to the GenFvImage Library.\r | |
19 | The basic purpose of the library is to create Firmware Volume images.\r | |
20 | \r | |
21 | --*/\r | |
22 | \r | |
23 | #ifndef _EFI_GEN_FV_IMAGE_LIB_H\r | |
24 | #define _EFI_GEN_FV_IMAGE_LIB_H\r | |
25 | \r | |
26 | //\r | |
27 | // Include files\r | |
28 | //\r | |
ce53a8c3 | 29 | #include <Common/UefiBaseTypes.h>\r |
30 | #include <Common/MultiPhase.h>\r | |
31 | \r | |
878ddf1f | 32 | #include "ParseInf.h"\r |
33 | \r | |
34 | //\r | |
35 | // Following definition is used for FIT in IPF\r | |
36 | //\r | |
37 | #define COMP_TYPE_FIT_PEICORE 0x10\r | |
38 | #define COMP_TYPE_FIT_UNUSED 0x7F\r | |
39 | \r | |
40 | #define FIT_TYPE_MASK 0x7F\r | |
41 | #define CHECKSUM_BIT_MASK 0x80\r | |
42 | \r | |
43 | #pragma pack(1)\r | |
44 | \r | |
45 | typedef struct {\r | |
46 | UINT64 CompAddress;\r | |
47 | UINT32 CompSize;\r | |
48 | UINT16 CompVersion;\r | |
49 | UINT8 CvAndType;\r | |
50 | UINT8 CheckSum;\r | |
51 | } FIT_TABLE;\r | |
52 | \r | |
53 | #pragma pack()\r | |
54 | //\r | |
55 | // Exported function prototypes\r | |
56 | //\r | |
57 | EFI_STATUS\r | |
58 | GenerateFvImage (\r | |
59 | IN CHAR8 *InfFileImage,\r | |
60 | IN UINTN InfFileSize,\r | |
61 | OUT UINT8 **FvImage,\r | |
62 | OUT UINTN *FvImageSize,\r | |
63 | OUT CHAR8 **FvFileName,\r | |
64 | OUT UINT8 **SymImage,\r | |
65 | OUT UINTN *SymImageSize,\r | |
66 | OUT CHAR8 **SymFileName\r | |
67 | )\r | |
68 | ;\r | |
69 | \r | |
70 | /*++\r | |
71 | \r | |
72 | Routine Description:\r | |
73 | \r | |
74 | This is the main function which will be called from application.\r | |
75 | \r | |
76 | Arguments:\r | |
77 | \r | |
78 | InfFileImage Buffer containing the INF file contents.\r | |
79 | InfFileSize Size of the contents of the InfFileImage buffer.\r | |
80 | FvImage Pointer to the FV image created.\r | |
81 | FvImageSize Size of the FV image created and pointed to by FvImage.\r | |
82 | FvFileName Requested name for the FV file.\r | |
83 | SymImage Pointer to the Sym image created.\r | |
84 | SymImageSize Size of the Sym image created and pointed to by SymImage.\r | |
85 | SymFileName Requested name for the Sym file.\r | |
86 | \r | |
87 | Returns:\r | |
88 | \r | |
89 | EFI_SUCCESS Function completed successfully.\r | |
90 | EFI_OUT_OF_RESOURCES Could not allocate required resources.\r | |
91 | EFI_ABORTED Error encountered.\r | |
92 | EFI_INVALID_PARAMETER A required parameter was NULL.\r | |
93 | \r | |
94 | --*/\r | |
95 | EFI_STATUS\r | |
96 | UpdatePeiCoreEntryInFit (\r | |
97 | IN FIT_TABLE *FitTablePtr,\r | |
98 | IN UINT64 PeiCorePhysicalAddress\r | |
99 | )\r | |
100 | ;\r | |
101 | \r | |
102 | /*++\r | |
103 | \r | |
104 | Routine Description:\r | |
105 | \r | |
106 | This function is used to update the Pei Core address in FIT, this can be used by Sec core to pass control from\r | |
107 | Sec to Pei Core\r | |
108 | \r | |
109 | Arguments:\r | |
110 | \r | |
111 | FitTablePtr - The pointer of FIT_TABLE.\r | |
112 | PeiCorePhysicalAddress - The address of Pei Core entry.\r | |
113 | \r | |
114 | Returns:\r | |
115 | \r | |
116 | EFI_SUCCESS - The PEI_CORE FIT entry was updated successfully.\r | |
117 | EFI_NOT_FOUND - Not found the PEI_CORE FIT entry.\r | |
118 | \r | |
119 | --*/\r | |
120 | VOID\r | |
121 | UpdateFitCheckSum (\r | |
122 | IN FIT_TABLE *FitTablePtr\r | |
123 | )\r | |
124 | ;\r | |
125 | \r | |
126 | /*++\r | |
127 | \r | |
128 | Routine Description:\r | |
129 | \r | |
130 | This function is used to update the checksum for FIT.\r | |
131 | \r | |
132 | \r | |
133 | Arguments:\r | |
134 | \r | |
135 | FitTablePtr - The pointer of FIT_TABLE.\r | |
136 | \r | |
137 | Returns:\r | |
138 | \r | |
139 | None.\r | |
140 | \r | |
141 | --*/\r | |
142 | #endif\r |