Add FspStatusCode to report FSP progress. Add FspDataTable to produce FSP2.0 component information. Update GlobalData to align with FSP2.0. Update MeasureId to use full name instead of abbreviate.
Cc: Giri P Mudusuru <giri.p.mudus...@intel.com> Cc: Maurice Ma <maurice...@intel.com> Cc: Ravi P Rangarajan <ravi.p.rangara...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao <jiewen....@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudus...@intel.com> Reviewed-by: Maurice Ma <maurice...@intel.com> Reviewed-by: Ravi P Rangarajan <ravi.p.rangara...@intel.com> --- IntelFspPkg/Include/Private/FspDataTable.h | 32 ++++++++++++++ IntelFspPkg/Include/Private/FspGlobalData.h | 29 ++++++++++-- IntelFspPkg/Include/Private/FspMeasurePointId.h | 6 +-- IntelFspPkg/Include/Private/FspStatusCode.h | 46 ++++++++++++++++++++ 4 files changed, 106 insertions(+), 7 deletions(-) diff --git a/IntelFspPkg/Include/Private/FspDataTable.h b/IntelFspPkg/Include/Private/FspDataTable.h new file mode 100644 index 0000000..3c79f34 --- /dev/null +++ b/IntelFspPkg/Include/Private/FspDataTable.h @@ -0,0 +1,32 @@ +/** @file + The header file of FSP data table + + Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef _FSP_DATA_TABLE_H_ +#define _FSP_DATA_TABLE_H_ + +#pragma pack(1) + +#define FSP_DATA_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'D') + +typedef struct { + UINT32 Signature; + UINT32 Length; + UINT32 FsptBase; + UINT32 FspmBase; + UINT32 FspsBase; +} FSP_DATA_TABLE; + +#pragma pack() + +#endif diff --git a/IntelFspPkg/Include/Private/FspGlobalData.h b/IntelFspPkg/Include/Private/FspGlobalData.h index be33e89..4712bfb 100644 --- a/IntelFspPkg/Include/Private/FspGlobalData.h +++ b/IntelFspPkg/Include/Private/FspGlobalData.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -18,26 +18,47 @@ #pragma pack(1) +typedef enum { + TempRamInitApiIndex, + FspInitApiIndex, + NotifyPhaseApiIndex, + FspMemoryInitApiIndex, + TempRamExitApiIndex, + FspSiliconInitApiIndex, + FspApiIndexMax +} FSP_API_INDEX; + typedef struct { VOID *DataPtr; UINT32 MicrocodeRegionBase; UINT32 MicrocodeRegionSize; UINT32 CodeRegionBase; UINT32 CodeRegionSize; + UINT32 CarBase; + UINT32 CarSize; } FSP_PLAT_DATA; #define FSP_GLOBAL_DATA_SIGNATURE SIGNATURE_32 ('F', 'S', 'P', 'D') +#define FSP_PERFORMANCE_DATA_SIGNATURE SIGNATURE_32 ('P', 'E', 'R', 'F') typedef struct { UINT32 Signature; + UINT8 Version; + UINT8 Reserved1[3]; UINT32 CoreStack; + UINT32 StatusCode; + UINT32 Reserved2[8]; FSP_PLAT_DATA PlatformData; FSP_INFO_HEADER *FspInfoHeader; - VOID *UpdDataRgnPtr; + VOID *UpdDataPtr; + VOID *TempRamInitUpdPtr; VOID *MemoryInitUpdPtr; VOID *SiliconInitUpdPtr; - UINT8 ApiMode; - UINT8 Reserved[3]; + UINT8 ApiIdx; + UINT8 Reserved3[31]; + UINT32 PerfSig; + UINT16 PerfLen; + UINT16 Reserved4; UINT32 PerfIdx; UINT64 PerfData[32]; } FSP_GLOBAL_DATA; diff --git a/IntelFspPkg/Include/Private/FspMeasurePointId.h b/IntelFspPkg/Include/Private/FspMeasurePointId.h index 765bd0b..c5bd00a 100644 --- a/IntelFspPkg/Include/Private/FspMeasurePointId.h +++ b/IntelFspPkg/Include/Private/FspMeasurePointId.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2014, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -33,8 +33,8 @@ // // 0xF0 - 0xFF are reserved for FSP API // -#define FSP_PERF_ID_API_TMPRAMINIT_ENTRY 0xF0 -#define FSP_PERF_ID_API_TMPRAMINIT_EXIT (FSP_PERF_ID_API_TMPRAMINIT_ENTRY + 1) +#define FSP_PERF_ID_API_TEMPRAMINIT_ENTRY 0xF0 +#define FSP_PERF_ID_API_TEMPRAMINIT_EXIT (FSP_PERF_ID_API_TEMPRAMINIT_ENTRY + 1) #define FSP_PERF_ID_API_FSPINIT_ENTRY 0xF2 #define FSP_PERF_ID_API_FSPINIT_EXIT (FSP_PERF_ID_API_FSPINIT_ENTRY + 1) diff --git a/IntelFspPkg/Include/Private/FspStatusCode.h b/IntelFspPkg/Include/Private/FspStatusCode.h new file mode 100644 index 0000000..c9a316e --- /dev/null +++ b/IntelFspPkg/Include/Private/FspStatusCode.h @@ -0,0 +1,46 @@ +/** @file + Intel FSP status code definition + + Copyright (c) 2016, Intel Corporation. All rights reserved.<BR> + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef _FSP_STATUS_CODE_H_ +#define _FSP_STATUS_CODE_H_ + +// +// FSP API - 4 BITS +// +#define FSP_STATUS_CODE_TEMP_RAM_INIT 0xF000 +#define FSP_STATUS_CODE_MEMORY_INIT 0xD000 +#define FSP_STATUS_CODE_TEMP_RAM_EXIT 0xB000 +#define FSP_STATUS_CODE_SILICON_INIT 0x9000 +#define FSP_STATUS_CODE_POST_PCIE_ENUM_NOTIFICATION 0x6000 +#define FSP_STATUS_CODE_READY_TO_BOOT_NOTIFICATION 0x4000 +#define FSP_STATUS_CODE_END_OF_FIRMWARE_NOTIFICATION 0x2000 + +// +// MODULE - 4 BITS +// +#define FSP_STATUS_CODE_GFX_PEIM 0x0700 +#define FSP_STATUS_CODE_COMMON_CODE 0x0800 +#define FSP_STATUS_CODE_SILICON_COMMON_CODE 0x0900 +#define FSP_STATUS_CODE_SYSTEM_AGENT 0x0A00 +#define FSP_STATUS_CODE_PCH 0x0B00 +#define FSP_STATUS_CODE_CPU 0x0C00 +#define FSP_STATUS_CODE_MRC 0x0D00 +#define FSP_STATUS_CODE_ME_BIOS 0x0E00 +// +// Individual Codes - 1 BYTE +// +#define FSP_STATUS_CODE_API_ENTRY 0x0000 +#define FSP_STATUS_CODE_API_EXIT 0x007F + +#endif -- 2.7.4.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel