coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
info_header.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef _FSP2_0_INFO_HEADER_H_
4 #define _FSP2_0_INFO_HEADER_H_
5 
6 #include <types.h>
7 
8 #define FSP_HDR_OFFSET 0x94
9 #define FSP_HDR_SIGNATURE "FSPH"
10 #define FSP_HDR_ATTRIB_FSPT 1
11 #define FSP_HDR_ATTRIB_FSPM 2
12 #define FSP_HDR_ATTRIB_FSPS 3
13 #define FSP_IMAGE_ID_LENGTH 8
14 
15 #if CONFIG(PLATFORM_USES_FSP2_X86_32)
16 struct fsp_header {
17  uint32_t signature; //FSPH
18  uint32_t header_length;
19  uint8_t res1[2];
20  uint8_t spec_version;
21  uint8_t header_revision;
22  uint32_t image_revision;
23  char image_id[FSP_IMAGE_ID_LENGTH]; // not zero terminated
24  uint32_t image_size;
25  uint32_t image_base;
26  uint16_t image_attribute;
27  uint16_t component_attribute;
28  uint32_t cfg_region_offset;
29  uint32_t cfg_region_size;
30  uint32_t res2;
31  uint32_t temp_ram_init_entry_offset; //initial stack
32  uint32_t res3;
33  uint32_t notify_phase_entry_offset;
34  uint32_t fsp_memory_init_entry_offset;
35  uint32_t temp_ram_exit_entry_offset;
36  uint32_t fsp_silicon_init_entry_offset;
37  uint32_t fsp_multi_phase_si_init_entry_offset;
38  uint16_t extended_image_revision;
39  uint16_t res4;
40 } __packed;
41 #else
42 #error You need to implement this struct for x86_64 FSP
43 #endif
44 
45 
46 enum cb_err fsp_identify(struct fsp_header *hdr, const void *fsp_blob);
47 
48 /*
49  * This is a FSP_INFO_HEADER that came from fsps.bin blob. It contains
50  * both SiliconInit and Notify APIs. When SiliconInit is loaded the
51  * header is saved so that when Notify is called we do not have to start
52  * header parsing again.
53  */
54 extern struct fsp_header fsps_hdr;
55 
56 #endif /* _FSP2_0_INFO_HEADER_H_ */
cb_err
coreboot error codes
Definition: cb_err.h:15
#define __packed
Definition: compiler.h:10
#define FSP_IMAGE_ID_LENGTH
Definition: info_header.h:13
struct fsp_header fsps_hdr
Definition: silicon_init.c:19
enum cb_err fsp_identify(struct fsp_header *hdr, const void *fsp_blob)
Definition: util.c:48
unsigned short uint16_t
Definition: stdint.h:11
unsigned int uint32_t
Definition: stdint.h:14
unsigned char uint8_t
Definition: stdint.h:8