2 Intel FSP Header File definition from Intel Firmware Support Package External
3 Architecture Specification v2.0 and above.
5 Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
12 #ifndef __FSP_HEADER_FILE_H__
13 #define __FSP_HEADER_FILE_H__
15 #define FSP_HEADER_REVISION_3 3
17 #define FSPE_HEADER_REVISION_1 1
18 #define FSPP_HEADER_REVISION_1 1
21 /// Fixed FSP header offset in the FSP image
23 #define FSP_INFO_HEADER_OFF 0x94
25 #define OFFSET_IN_FSP_INFO_HEADER(x) (UINT32)&((FSP_INFO_HEADER *)(UINTN)0)->x
27 #define FSP_INFO_HEADER_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'H')
29 #define IMAGE_ATTRIBUTE_GRAPHICS_SUPPORT BIT0
30 #define IMAGE_ATTRIBUTE_DISPATCH_MODE_SUPPORT BIT1
31 #define IMAGE_ATTRIBUTE_64BIT_MODE_SUPPORT BIT2
38 /// FSP Information Header as described in FSP v2.0 Spec section 5.1.1.
42 /// Byte 0x00: Signature ('FSPH') for the FSP Information Header.
46 /// Byte 0x04: Length of the FSP Information Header.
50 /// Byte 0x08: Reserved.
54 /// Byte 0x0A: Indicates compliance with a revision of this specification in the BCD format.
55 /// For revision v2.3 the value will be 0x23.
59 /// Byte 0x0B: Revision of the FSP Information Header.
60 /// The Current value for this field is 0x7.
64 /// Byte 0x0C: Revision of the FSP binary.
65 /// Major.Minor.Revision.Build
66 /// If FSP HeaderRevision is <= 5, the ImageRevision can be decoded as follows:
67 /// 7 : 0 - Build Number
69 /// 23 : 16 - Minor Version
70 /// 31 : 24 - Major Version
71 /// If FSP HeaderRevision is >= 6, ImageRevision specifies the low-order bytes of the build number and revision
72 /// while ExtendedImageRevision specifies the high-order bytes of the build number and revision.
73 /// 7 : 0 - Low Byte of Build Number
74 /// 15 : 8 - Low Byte of Revision
75 /// 23 : 16 - Minor Version
76 /// 31 : 24 - Major Version
80 /// Byte 0x10: Signature string that will help match the FSP Binary to a supported HW configuration.
84 /// Byte 0x18: Size of the entire FSP binary.
88 /// Byte 0x1C: FSP binary preferred base address.
92 /// Byte 0x20: Attribute for the FSP binary.
93 /// Bit 0: Graphics Support - Set to 1 when FSP supports enabling Graphics Display.
94 /// Bit 1: Dispatch Mode Support - Set to 1 when FSP supports the optional Dispatch Mode API defined in Section 7.2 and 9. This bit is only valid if FSP HeaderRevision is >= 4.
95 /// Bit 2: 64-bit mode support - Set to 1 to indicate FSP supports 64-bit long mode interfaces. Set to 0 to indicate FSP supports 32-bit mode interfaces. This bit is only valid if FSP HeaderRevision is >= 7.
96 /// Bits 15:3 - Reserved
98 UINT16 ImageAttribute
;
100 /// Byte 0x22: Attributes of the FSP Component.
102 UINT16 ComponentAttribute
;
104 /// Byte 0x24: Offset of the FSP configuration region.
106 UINT32 CfgRegionOffset
;
108 /// Byte 0x28: Size of the FSP configuration region.
110 UINT32 CfgRegionSize
;
112 /// Byte 0x2C: Reserved2.
116 /// Byte 0x30: The offset for the API to setup a temporary stack till the memory is initialized.
118 UINT32 TempRamInitEntryOffset
;
120 /// Byte 0x34: Reserved3.
124 /// Byte 0x38: The offset for the API to inform the FSP about the different stages in the boot process.
126 UINT32 NotifyPhaseEntryOffset
;
128 /// Byte 0x3C: The offset for the API to initialize the memory.
130 UINT32 FspMemoryInitEntryOffset
;
132 /// Byte 0x40: The offset for the API to tear down temporary RAM.
134 UINT32 TempRamExitEntryOffset
;
136 /// Byte 0x44: The offset for the API to initialize the CPU and chipset.
138 UINT32 FspSiliconInitEntryOffset
;
140 /// Byte 0x48: Offset for the API for the optional Multi-Phase processor and chipset initialization.
141 /// This value is only valid if FSP HeaderRevision is >= 5.
142 /// If the value is set to 0x00000000, then this API is not available in this component.
144 UINT32 FspMultiPhaseSiInitEntryOffset
;
146 /// Byte 0x4C: Extended revision of the FSP binary.
147 /// This value is only valid if FSP HeaderRevision is >= 6.
148 /// ExtendedImageRevision specifies the high-order byte of the revision and build number in the FSP binary revision.
149 /// 7 : 0 - High Byte of Build Number
150 /// 15 : 8 - High Byte of Revision
151 /// The FSP binary build number can be decoded as follows:
152 /// Build Number = (ExtendedImageRevision[7:0] << 8) | ImageRevision[7:0]
153 /// Revision = (ExtendedImageRevision[15:8] << 8) | ImageRevision[15:8]
154 /// Minor Version = ImageRevision[23:16]
155 /// Major Version = ImageRevision[31:24]
157 UINT16 ExtendedImageRevision
;
159 /// Byte 0x4E: Reserved4.
165 /// Signature of the FSP Extended Header
167 #define FSP_INFO_EXTENDED_HEADER_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'E')
170 /// FSP Information Extended Header as described in FSP v2.0 Spec section 5.1.2.
174 /// Byte 0x00: Signature ('FSPE') for the FSP Extended Information Header.
178 /// Byte 0x04: Length of the table in bytes, including all additional FSP producer defined data.
182 /// Byte 0x08: FSP producer defined revision of the table.
186 /// Byte 0x09: Reserved for future use.
190 /// Byte 0x0A: FSP producer identification string
192 CHAR8 FspProducerId
[6];
194 /// Byte 0x10: FSP producer implementation revision number. Larger numbers are assumed to be newer revisions.
196 UINT32 FspProducerRevision
;
198 /// Byte 0x14: Size of the FSP producer defined data (n) in bytes.
200 UINT32 FspProducerDataSize
;
202 /// Byte 0x18: FSP producer defined data of size (n) defined by FspProducerDataSize.
204 } FSP_INFO_EXTENDED_HEADER
;
207 // A generic table search algorithm for additional tables can be implemented with a
208 // signature search algorithm until a terminator signature 'FSPP' is found.
210 #define FSP_FSPP_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'P')
211 #define FSP_PATCH_TABLE_SIGNATURE FSP_FSPP_SIGNATURE
214 /// FSP Patch Table as described in FSP v2.0 Spec section 5.1.5.
218 /// Byte 0x00: FSP Patch Table Signature "FSPP".
222 /// Byte 0x04: Size including the PatchData.
226 /// Byte 0x06: Revision is set to 0x01.
228 UINT8 HeaderRevision
;
230 /// Byte 0x07: Reserved for future use.
234 /// Byte 0x08: Number of entries to Patch.
236 UINT32 PatchEntryNum
;
238 /// Byte 0x0C: Patch Data.
240 // UINT32 PatchData[];
245 extern EFI_GUID gFspHeaderFileGuid
;