]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
4b1e1121 HT |
3 | Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
3eb9473e | 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 | |
95d675b5 | 29 | #include <windows.h>\r |
3eb9473e | 30 | #include "ParseInf.h"\r |
31 | \r | |
32 | //\r | |
33 | // Following definition is used for FIT in IPF\r | |
34 | //\r | |
35 | #define COMP_TYPE_FIT_PEICORE 0x10\r | |
36 | #define COMP_TYPE_FIT_UNUSED 0x7F\r | |
37 | \r | |
38 | #define FIT_TYPE_MASK 0x7F\r | |
39 | #define CHECKSUM_BIT_MASK 0x80\r | |
40 | \r | |
41 | #pragma pack(1)\r | |
42 | \r | |
43 | typedef struct {\r | |
44 | UINT64 CompAddress;\r | |
45 | UINT32 CompSize;\r | |
46 | UINT16 CompVersion;\r | |
47 | UINT8 CvAndType;\r | |
48 | UINT8 CheckSum;\r | |
49 | } FIT_TABLE;\r | |
50 | \r | |
51 | #pragma pack()\r | |
52 | //\r | |
53 | // Exported function prototypes\r | |
54 | //\r | |
55 | EFI_STATUS\r | |
56 | GenerateFvImage (\r | |
57 | IN CHAR8 *InfFileImage,\r | |
58 | IN UINTN InfFileSize,\r | |
59 | OUT UINT8 **FvImage,\r | |
60 | OUT UINTN *FvImageSize,\r | |
61 | OUT CHAR8 **FvFileName,\r | |
62 | OUT UINT8 **SymImage,\r | |
63 | OUT UINTN *SymImageSize,\r | |
64 | OUT CHAR8 **SymFileName\r | |
e00e1d46 | 65 | );\r |
3eb9473e | 66 | \r |
67 | /*++\r | |
68 | \r | |
69 | Routine Description:\r | |
70 | \r | |
71 | This is the main function which will be called from application.\r | |
72 | \r | |
73 | Arguments:\r | |
74 | \r | |
75 | InfFileImage Buffer containing the INF file contents.\r | |
76 | InfFileSize Size of the contents of the InfFileImage buffer.\r | |
77 | FvImage Pointer to the FV image created.\r | |
78 | FvImageSize Size of the FV image created and pointed to by FvImage.\r | |
79 | FvFileName Requested name for the FV file.\r | |
80 | SymImage Pointer to the Sym image created.\r | |
81 | SymImageSize Size of the Sym image created and pointed to by SymImage.\r | |
82 | SymFileName Requested name for the Sym file.\r | |
83 | \r | |
84 | Returns:\r | |
85 | \r | |
86 | EFI_SUCCESS Function completed successfully.\r | |
87 | EFI_OUT_OF_RESOURCES Could not allocate required resources.\r | |
88 | EFI_ABORTED Error encountered.\r | |
89 | EFI_INVALID_PARAMETER A required parameter was NULL.\r | |
90 | \r | |
91 | --*/\r | |
92 | EFI_STATUS\r | |
93 | UpdatePeiCoreEntryInFit (\r | |
94 | IN FIT_TABLE *FitTablePtr,\r | |
95 | IN UINT64 PeiCorePhysicalAddress\r | |
e00e1d46 | 96 | );\r |
3eb9473e | 97 | \r |
98 | /*++\r | |
99 | \r | |
100 | Routine Description:\r | |
101 | \r | |
102 | This function is used to update the Pei Core address in FIT, this can be used by Sec core to pass control from\r | |
103 | Sec to Pei Core\r | |
104 | \r | |
105 | Arguments:\r | |
106 | \r | |
107 | FitTablePtr - The pointer of FIT_TABLE.\r | |
108 | PeiCorePhysicalAddress - The address of Pei Core entry.\r | |
109 | \r | |
110 | Returns:\r | |
111 | \r | |
112 | EFI_SUCCESS - The PEI_CORE FIT entry was updated successfully.\r | |
113 | EFI_NOT_FOUND - Not found the PEI_CORE FIT entry.\r | |
114 | \r | |
115 | --*/\r | |
116 | VOID\r | |
117 | UpdateFitCheckSum (\r | |
118 | IN FIT_TABLE *FitTablePtr\r | |
e00e1d46 | 119 | );\r |
3eb9473e | 120 | \r |
121 | /*++\r | |
122 | \r | |
123 | Routine Description:\r | |
124 | \r | |
125 | This function is used to update the checksum for FIT.\r | |
126 | \r | |
127 | \r | |
128 | Arguments:\r | |
129 | \r | |
130 | FitTablePtr - The pointer of FIT_TABLE.\r | |
131 | \r | |
132 | Returns:\r | |
133 | \r | |
134 | None.\r | |
135 | \r | |
136 | --*/\r | |
137 | #endif\r |