Debian Codegraph @

src/vendorcode/amd/fsp/common/fsp_h_c99.h

raw symbols SCIP
1 /** @file
2 *
3 * C99 common FSP definitions from
4 * Intel Firmware Support Package External Architecture Specification v2.0
5 *
6 * These definitions come in a format that is usable outside an EFI environment.
7 **/
8 #ifndef FSP_H_C99_H
9 #define FSP_H_C99_H
10
11 #include <stdint.h>
12
13 enum {
14 FSP_STATUS_RESET_REQUIRED_COLD = 0x40000001,
15 FSP_STATUS_RESET_REQUIRED_WARM = 0x40000002,
16 FSP_STATUS_RESET_REQUIRED_3 = 0x40000003,
17 FSP_STATUS_RESET_REQUIRED_4 = 0x40000004,
18 FSP_STATUS_RESET_REQUIRED_5 = 0x40000005,
19 FSP_STATUS_RESET_REQUIRED_6 = 0x40000006,
20 FSP_STATUS_RESET_REQUIRED_7 = 0x40000007,
21 FSP_STATUS_RESET_REQUIRED_8 = 0x40000008,
22 };
23
24 typedef enum {
25 EnumInitPhaseAfterPciEnumeration = 0x20,
26 EnumInitPhaseReadyToBoot = 0x40,
27 EnumInitPhaseEndOfFirmware = 0xF0
28 } FSP_INIT_PHASE;
29
30 typedef struct __packed {
31 uint64_t Signature;
32 uint8_t Revision;
33 uint8_t Reserved[23];
34 } FSP_UPD_HEADER;
35
36 _Static_assert(sizeof(FSP_UPD_HEADER) == 32, "FSP_UPD_HEADER not packed");
37
38
39 #if CONFIG(PLATFORM_USES_FSP2_X86_32)
40 typedef struct __packed {
41 uint8_t Revision;
42 uint8_t Reserved[3];
43 /* Note: This ought to be void*, but that won't allow calling this binary on x86_64. */
44 uint32_t NvsBufferPtr;
45 /* Note: This ought to be void*, but that won't allow calling this binary on x86_64. */
46 uint32_t StackBase;
47 uint32_t StackSize;
48 uint32_t BootLoaderTolumSize;
49 uint32_t BootMode;
50 uint8_t Reserved1[8];
51 } FSPM_ARCH_UPD;
52
53 _Static_assert(sizeof(FSPM_ARCH_UPD) == 32, "FSPM_ARCH_UPD not packed");
54 #else
55 #error You need to implement this struct for x86_64 FSP
56 #endif
57
58 #endif /* FSP_H_C99_H */