Debian Codegraph @

src/vendorcode/amd/fsp/picasso/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 #if CONFIG(PLATFORM_USES_FSP2_X86_32)
39 typedef struct __packed {
40 uint8_t Revision;
41 uint8_t Reserved[3];
42 /* Note: This ought to be void*, but that won't allow calling this binary on x86_64. */
43 uint32_t NvsBufferPtr;
44 /* Note: This ought to be void*, but that won't allow calling this binary on x86_64. */
45 uint32_t StackBase;
46 uint32_t StackSize;
47 uint32_t BootLoaderTolumSize;
48 uint32_t BootMode;
49 uint8_t Reserved1[8];
50 } FSPM_ARCH_UPD;
51
52 _Static_assert(sizeof(FSPM_ARCH_UPD) == 32, "FSPM_ARCH_UPD not packed");
53 #else
54 #error You need to implement this struct for x86_64 FSP
55 #endif
56
57 #endif /* FSP_H_C99_H */