Subrata Banik | 20fe24b | 2021-12-09 02:46:38 +0530 | [diff] [blame] | 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 | /// |
| 56 | /// 0: FSP in API mode; 1: FSP in DISPATCH mode |
| 57 | /// |
| 58 | UINT8 FspMode; |
| 59 | UINT8 OnSeparateStack; |
| 60 | UINT8 Reserved3; |
| 61 | UINT32 NumberOfPhases; |
| 62 | UINT32 PhasesExecuted; |
| 63 | /// |
| 64 | /// To store function parameters pointer |
| 65 | /// so it can be retrieved after stack switched. |
| 66 | /// |
| 67 | VOID *FunctionParameterPtr; |
| 68 | UINT8 Reserved4[16]; |
| 69 | UINT32 PerfSig; |
| 70 | UINT16 PerfLen; |
| 71 | UINT16 Reserved5; |
| 72 | UINT32 PerfIdx; |
| 73 | UINT64 PerfData[32]; |
| 74 | } FSP_GLOBAL_DATA; |
| 75 | |
| 76 | #pragma pack() |
| 77 | |
| 78 | #endif |