]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2Pkg/Include/Guid/FspHeaderFile.h
16f43a127312c73c97c3a4f98441988710e92088
[mirror_edk2.git] / IntelFsp2Pkg / Include / Guid / FspHeaderFile.h
1 /** @file
2 Intel FSP Header File definition from Intel Firmware Support Package External
3 Architecture Specification v2.0.
4
5 Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef __FSP_HEADER_FILE_H__
11 #define __FSP_HEADER_FILE_H__
12
13 #define FSP_HEADER_REVISION_3 3
14
15 #define FSPE_HEADER_REVISION_1 1
16 #define FSPP_HEADER_REVISION_1 1
17
18 ///
19 /// Fixed FSP header offset in the FSP image
20 ///
21 #define FSP_INFO_HEADER_OFF 0x94
22
23 #define OFFSET_IN_FSP_INFO_HEADER(x) (UINT32)&((FSP_INFO_HEADER *)(UINTN)0)->x
24
25 #define FSP_INFO_HEADER_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'H')
26
27 #pragma pack(1)
28
29 ///
30 /// FSP Information Header as described in FSP v2.0 Spec section 5.1.1.
31 ///
32 typedef struct {
33 ///
34 /// Byte 0x00: Signature ('FSPH') for the FSP Information Header.
35 ///
36 UINT32 Signature;
37 ///
38 /// Byte 0x04: Length of the FSP Information Header.
39 ///
40 UINT32 HeaderLength;
41 ///
42 /// Byte 0x08: Reserved.
43 ///
44 UINT8 Reserved1[2];
45 ///
46 /// Byte 0x0A: Indicates compliance with a revision of this specification in the BCD format.
47 ///
48 UINT8 SpecVersion;
49 ///
50 /// Byte 0x0B: Revision of the FSP Information Header.
51 ///
52 UINT8 HeaderRevision;
53 ///
54 /// Byte 0x0C: Revision of the FSP binary.
55 ///
56 UINT32 ImageRevision;
57 ///
58 /// Byte 0x10: Signature string that will help match the FSP Binary to a supported HW configuration.
59 ///
60 CHAR8 ImageId[8];
61 ///
62 /// Byte 0x18: Size of the entire FSP binary.
63 ///
64 UINT32 ImageSize;
65 ///
66 /// Byte 0x1C: FSP binary preferred base address.
67 ///
68 UINT32 ImageBase;
69 ///
70 /// Byte 0x20: Attribute for the FSP binary.
71 ///
72 UINT16 ImageAttribute;
73 ///
74 /// Byte 0x22: Attributes of the FSP Component.
75 ///
76 UINT16 ComponentAttribute;
77 ///
78 /// Byte 0x24: Offset of the FSP configuration region.
79 ///
80 UINT32 CfgRegionOffset;
81 ///
82 /// Byte 0x28: Size of the FSP configuration region.
83 ///
84 UINT32 CfgRegionSize;
85 ///
86 /// Byte 0x2C: Reserved2.
87 ///
88 UINT32 Reserved2;
89 ///
90 /// Byte 0x30: The offset for the API to setup a temporary stack till the memory is initialized.
91 ///
92 UINT32 TempRamInitEntryOffset;
93 ///
94 /// Byte 0x34: Reserved3.
95 ///
96 UINT32 Reserved3;
97 ///
98 /// Byte 0x38: The offset for the API to inform the FSP about the different stages in the boot process.
99 ///
100 UINT32 NotifyPhaseEntryOffset;
101 ///
102 /// Byte 0x3C: The offset for the API to initialize the memory.
103 ///
104 UINT32 FspMemoryInitEntryOffset;
105 ///
106 /// Byte 0x40: The offset for the API to tear down temporary RAM.
107 ///
108 UINT32 TempRamExitEntryOffset;
109 ///
110 /// Byte 0x44: The offset for the API to initialize the CPU and chipset.
111 ///
112 UINT32 FspSiliconInitEntryOffset;
113 } FSP_INFO_HEADER;
114
115 ///
116 /// Signature of the FSP Extended Header
117 ///
118 #define FSP_INFO_EXTENDED_HEADER_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'E')
119
120 ///
121 /// FSP Information Extended Header as described in FSP v2.0 Spec section 5.1.2.
122 ///
123 typedef struct {
124 ///
125 /// Byte 0x00: Signature ('FSPE') for the FSP Extended Information Header.
126 ///
127 UINT32 Signature;
128 ///
129 /// Byte 0x04: Length of the table in bytes, including all additional FSP producer defined data.
130 ///
131 UINT32 Length;
132 ///
133 /// Byte 0x08: FSP producer defined revision of the table.
134 ///
135 UINT8 Revision;
136 ///
137 /// Byte 0x09: Reserved for future use.
138 ///
139 UINT8 Reserved;
140 ///
141 /// Byte 0x0A: FSP producer identification string
142 ///
143 CHAR8 FspProducerId[6];
144 ///
145 /// Byte 0x10: FSP producer implementation revision number. Larger numbers are assumed to be newer revisions.
146 ///
147 UINT32 FspProducerRevision;
148 ///
149 /// Byte 0x14: Size of the FSP producer defined data (n) in bytes.
150 ///
151 UINT32 FspProducerDataSize;
152 ///
153 /// Byte 0x18: FSP producer defined data of size (n) defined by FspProducerDataSize.
154 ///
155 } FSP_INFO_EXTENDED_HEADER;
156
157 //
158 // A generic table search algorithm for additional tables can be implemented with a
159 // signature search algorithm until a terminator signature 'FSPP' is found.
160 //
161 #define FSP_FSPP_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'P')
162 #define FSP_PATCH_TABLE_SIGNATURE FSP_FSPP_SIGNATURE
163
164 ///
165 /// FSP Patch Table as described in FSP v2.0 Spec section 5.1.5.
166 ///
167 typedef struct {
168 ///
169 /// Byte 0x00: FSP Patch Table Signature "FSPP".
170 ///
171 UINT32 Signature;
172 ///
173 /// Byte 0x04: Size including the PatchData.
174 ///
175 UINT16 HeaderLength;
176 ///
177 /// Byte 0x06: Revision is set to 0x01.
178 ///
179 UINT8 HeaderRevision;
180 ///
181 /// Byte 0x07: Reserved for future use.
182 ///
183 UINT8 Reserved;
184 ///
185 /// Byte 0x08: Number of entries to Patch.
186 ///
187 UINT32 PatchEntryNum;
188 ///
189 /// Byte 0x0C: Patch Data.
190 ///
191 //UINT32 PatchData[];
192 } FSP_PATCH_TABLE;
193
194 #pragma pack()
195
196 extern EFI_GUID gFspHeaderFileGuid;
197
198 #endif