]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2Pkg/Include/FspGlobalData.h
IntelFsp2Pkg: Support Multi-Phase SiInit and debug handlers.
[mirror_edk2.git] / IntelFsp2Pkg / Include / FspGlobalData.h
1 /** @file
2
3 Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6 **/
7
8 #ifndef _FSP_GLOBAL_DATA_H_
9 #define _FSP_GLOBAL_DATA_H_
10
11 #include <FspEas.h>
12
13 #define FSP_IN_API_MODE 0
14 #define FSP_IN_DISPATCH_MODE 1
15
16 #pragma pack(1)
17
18 typedef enum {
19 TempRamInitApiIndex,
20 FspInitApiIndex,
21 NotifyPhaseApiIndex,
22 FspMemoryInitApiIndex,
23 TempRamExitApiIndex,
24 FspSiliconInitApiIndex,
25 FspMultiPhaseSiInitApiIndex,
26 FspApiIndexMax
27 } FSP_API_INDEX;
28
29 typedef struct {
30 VOID *DataPtr;
31 UINT32 MicrocodeRegionBase;
32 UINT32 MicrocodeRegionSize;
33 UINT32 CodeRegionBase;
34 UINT32 CodeRegionSize;
35 } FSP_PLAT_DATA;
36
37 #define FSP_GLOBAL_DATA_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'D')
38 #define FSP_PERFORMANCE_DATA_SIGNATURE SIGNATURE_32 ('P', 'E', 'R', 'F')
39 #define FSP_PERFORMANCE_DATA_TIMER_MASK 0xFFFFFFFFFFFFFF
40
41 typedef struct {
42 UINT32 Signature;
43 UINT8 Version;
44 UINT8 Reserved1[3];
45 UINT32 CoreStack;
46 UINT32 StatusCode;
47 UINT32 Reserved2[8];
48 FSP_PLAT_DATA PlatformData;
49 FSP_INFO_HEADER *FspInfoHeader;
50 VOID *UpdDataPtr;
51 VOID *TempRamInitUpdPtr;
52 VOID *MemoryInitUpdPtr;
53 VOID *SiliconInitUpdPtr;
54 UINT8 ApiIdx;
55 UINT8 FspMode; // 0: FSP in API mode; 1: FSP in DISPATCH mode
56 UINT8 OnSeparateStack;
57 UINT8 Reserved3;
58 UINT32 NumberOfPhases;
59 UINT32 PhasesExecuted;
60 UINT8 Reserved4[20];
61 UINT32 PerfSig;
62 UINT16 PerfLen;
63 UINT16 Reserved5;
64 UINT32 PerfIdx;
65 UINT64 PerfData[32];
66 } FSP_GLOBAL_DATA;
67
68 #pragma pack()
69
70 #endif