IntelFsp2Pkg[all]  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FspApi.h File Reference

Data Structures

struct  FSP_UPD_HEADER
 
struct  FSPT_ARCH_UPD
 
struct  FSPM_ARCH_UPD
 
struct  FSPS_ARCH_UPD
 
struct  FSPT_UPD_COMMON
 
struct  FSPT_UPD_COMMON_FSP22
 
struct  FSPM_UPD_COMMON
 
struct  FSPS_UPD_COMMON
 
struct  FSPS_UPD_COMMON_FSP22
 
struct  NOTIFY_PHASE_PARAMS
 
struct  FSP_MULTI_PHASE_GET_NUMBER_OF_PHASES_PARAMS
 
struct  FSP_MULTI_PHASE_PARAMS
 

Macros

#define FSP_EVENT_CODE   0xF5000000
 
#define FSP_POST_CODE   (FSP_EVENT_CODE | 0x00F80000)
 
#define FSP_STATUS_RESET_REQUIRED_COLD   0x40000001
 
#define FSP_STATUS_RESET_REQUIRED_WARM   0x40000002
 
#define FSP_STATUS_RESET_REQUIRED_3   0x40000003
 
#define FSP_STATUS_RESET_REQUIRED_4   0x40000004
 
#define FSP_STATUS_RESET_REQUIRED_5   0x40000005
 
#define FSP_STATUS_RESET_REQUIRED_6   0x40000006
 
#define FSP_STATUS_RESET_REQUIRED_7   0x40000007
 
#define FSP_STATUS_RESET_REQUIRED_8   0x40000008
 

Typedefs

typedef IN EFI_STATUS_CODE_VALUE Value
 
typedef IN
EFI_STATUS_CODE_VALUE IN
UINT32 
Instance
 
typedef IN
EFI_STATUS_CODE_VALUE IN
UINT32 IN EFI_GUID * 
CallerId
 
typedef IN
EFI_STATUS_CODE_VALUE IN
UINT32 IN EFI_GUID IN
EFI_STATUS_CODE_DATA * 
Data
 
typedef IN UINT32 MessageLength
 
typedef OUT VOID ** HobListPtr
 

Enumerations

enum  FSP_INIT_PHASE { EnumInitPhaseAfterPciEnumeration = 0x20, EnumInitPhaseReadyToBoot = 0x40, EnumInitPhaseEndOfFirmware = 0xF0 }
 
enum  FSP_MULTI_PHASE_ACTION { EnumMultiPhaseGetNumberOfPhases = 0x0, EnumMultiPhaseExecutePhase = 0x1 }
 

Functions

typedef EFI_STATUS (EFIAPI *FSP_EVENT_HANDLER)(IN EFI_STATUS_CODE_TYPE Type
 
typedef UINT32 (EFIAPI *FSP_DEBUG_HANDLER)(IN CHAR8 *DebugMessage
 

Detailed Description

Intel FSP API definition from Intel Firmware Support Package External Architecture Specification v2.0 - v2.2

Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Macro Definition Documentation

#define FSP_EVENT_CODE   0xF5000000

FSP Event related definition.

#define FSP_POST_CODE   (FSP_EVENT_CODE | 0x00F80000)
#define FSP_STATUS_RESET_REQUIRED_3   0x40000003

FSP Reset Status code These are defined in FSP EAS v2.0 section 11.2.2 - OEM Status Code

#define FSP_STATUS_RESET_REQUIRED_4   0x40000004

FSP Reset Status code These are defined in FSP EAS v2.0 section 11.2.2 - OEM Status Code

#define FSP_STATUS_RESET_REQUIRED_5   0x40000005

FSP Reset Status code These are defined in FSP EAS v2.0 section 11.2.2 - OEM Status Code

#define FSP_STATUS_RESET_REQUIRED_6   0x40000006

FSP Reset Status code These are defined in FSP EAS v2.0 section 11.2.2 - OEM Status Code

#define FSP_STATUS_RESET_REQUIRED_7   0x40000007

FSP Reset Status code These are defined in FSP EAS v2.0 section 11.2.2 - OEM Status Code

#define FSP_STATUS_RESET_REQUIRED_8   0x40000008

FSP Reset Status code These are defined in FSP EAS v2.0 section 11.2.2 - OEM Status Code

#define FSP_STATUS_RESET_REQUIRED_COLD   0x40000001

FSP Reset Status code These are defined in FSP EAS v2.0 section 11.2.2 - OEM Status Code

#define FSP_STATUS_RESET_REQUIRED_WARM   0x40000002

FSP Reset Status code These are defined in FSP EAS v2.0 section 11.2.2 - OEM Status Code

Typedef Documentation

typedef IN EFI_STATUS_CODE_VALUE IN UINT32 IN EFI_GUID* CallerId
typedef IN EFI_STATUS_CODE_VALUE IN UINT32 IN EFI_GUID IN EFI_STATUS_CODE_DATA* Data
typedef OUT VOID** HobListPtr
typedef IN EFI_STATUS_CODE_VALUE IN UINT32 Instance
typedef IN UINT32 MessageLength
typedef IN EFI_STATUS_CODE_VALUE Value

Enumeration Type Documentation

Enumeration of FSP_INIT_PHASE for NOTIFY_PHASE.

Enumerator
EnumInitPhaseAfterPciEnumeration 

This stage is notified when the bootloader completes the PCI enumeration and the resource allocation for the PCI devices is complete.

EnumInitPhaseReadyToBoot 

This stage is notified just before the bootloader hand-off to the OS loader.

EnumInitPhaseEndOfFirmware 

This stage is notified just before the firmware/Preboot environment transfers management of all system resources to the OS or next level execution environment.

Action definition for FspMultiPhaseSiInit API

Enumerator
EnumMultiPhaseGetNumberOfPhases 
EnumMultiPhaseExecutePhase 

Function Documentation

typedef EFI_STATUS ( EFIAPI *  FSP_TEMP_RAM_INIT)

This FSP API is called soon after coming out of reset and before memory and stack is available. This FSP API will load the microcode update, enable code caching for the region specified by the boot loader and also setup a temporary stack to be used until main memory is initialized.

A hardcoded stack can be set up with the following values, and the "esp" register initialized to point to this hardcoded stack.

  1. The return address where the FSP will return control after setting up a temporary stack.
  2. A pointer to the input parameter structure

However, since the stack is in ROM and not writeable, this FSP API cannot be called using the "call" instruction, but needs to be jumped to.

Parameters
[in]FsptUpdDataPtrPointer to the FSPT_UPD data structure.
Return values
EFI_SUCCESSTemporary RAM was initialized successfully.
EFI_INVALID_PARAMETERInput parameters are invalid.
EFI_UNSUPPORTEDThe FSP calling conditions were not met.
EFI_DEVICE_ERRORTemp RAM initialization failed.

If this function is successful, the FSP initializes the ECX and EDX registers to point to a temporary but writeable memory range available to the boot loader and returns with FSP_SUCCESS in register EAX. Register ECX points to the start of this temporary memory range and EDX points to the end of the range. Boot loader is free to use the whole range described. Typically the boot loader can reload the ESP register to point to the end of this returned range so that it can be used as a standard stack.

This FSP API is used to notify the FSP about the different phases in the boot process. This allows the FSP to take appropriate actions as needed during different initialization phases. The phases will be platform dependent and will be documented with the FSP release. The current FSP supports two notify phases: Post PCI enumeration Ready To Boot

Parameters
[in]NotifyPhaseParamPtrAddress pointer to the NOTIFY_PHASE_PRAMS
Return values
EFI_SUCCESSThe notification was handled successfully.
EFI_UNSUPPORTEDThe notification was not called in the proper order.
EFI_INVALID_PARAMETERThe notification code is invalid.

This FSP API is called after TempRamInit and initializes the memory. This FSP API accepts a pointer to a data structure that will be platform dependent and defined for each FSP binary. This will be documented in Integration guide with each FSP release. After FspMemInit completes its execution, it passes the pointer to the HobList and returns to the boot loader from where it was called. BootLoader is responsible to migrate its stack and data to Memory. FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to complete the silicon initialization and provides bootloader an opportunity to get control after system memory is available and before the temporary RAM is torn down.

Parameters
[in]FspmUpdDataPtrPointer to the FSPM_UPD data structure.
[out]HobListPtrPointer to receive the address of the HOB list.
Return values
EFI_SUCCESSFSP execution environment was initialized successfully.
EFI_INVALID_PARAMETERInput parameters are invalid.
EFI_UNSUPPORTEDThe FSP calling conditions were not met.
EFI_DEVICE_ERRORFSP initialization failed.
EFI_OUT_OF_RESOURCESStack range requested by FSP is not met.
FSP_STATUS_RESET_REQUIREDxA reset is reuired. These status codes will not be returned during S3.

This FSP API is called after FspMemoryInit API. This FSP API tears down the temporary memory setup by TempRamInit API. This FSP API accepts a pointer to a data structure that will be platform dependent and defined for each FSP binary. This will be documented in Integration Guide. FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to complete the silicon initialization and provides bootloader an opportunity to get control after system memory is available and before the temporary RAM is torn down.

Parameters
[in]TempRamExitParamPtrPointer to the Temp Ram Exit parameters structure. This structure is normally defined in the Integration Guide. And if it is not defined in the Integration Guide, pass NULL.
Return values
EFI_SUCCESSFSP execution environment was initialized successfully.
EFI_INVALID_PARAMETERInput parameters are invalid.
EFI_UNSUPPORTEDThe FSP calling conditions were not met.
EFI_DEVICE_ERRORFSP initialization failed.

This FSP API is called after TempRamExit API. FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to complete the silicon initialization.

Parameters
[in]FspsUpdDataPtrPointer to the FSPS_UPD data structure. If NULL, FSP will use the default parameters.
Return values
EFI_SUCCESSFSP execution environment was initialized successfully.
EFI_INVALID_PARAMETERInput parameters are invalid.
EFI_UNSUPPORTEDThe FSP calling conditions were not met.
EFI_DEVICE_ERRORFSP initialization failed.
FSP_STATUS_RESET_REQUIREDxA reset is required. These status codes will not be returned during S3.

This FSP API is expected to be called after FspSiliconInit but before FspNotifyPhase. This FSP API provides multi-phase silicon initialization; which brings greater modularity beyond the existing FspSiliconInit() API. Increased modularity is achieved by adding an extra API to FSP-S. This allows the bootloader to add board specific initialization steps throughout the SiliconInit flow as needed.

Parameters
[in,out]FSP_MULTI_PHASE_PARAMSFor action - EnumMultiPhaseGetNumberOfPhases: FSP_MULTI_PHASE_PARAMS->MultiPhaseParamPtr will contain how many phases supported by FSP. For action - EnumMultiPhaseExecutePhase: FSP_MULTI_PHASE_PARAMS->MultiPhaseParamPtr shall be NULL.
Return values
EFI_SUCCESSFSP execution environment was initialized successfully.
EFI_INVALID_PARAMETERInput parameters are invalid.
EFI_UNSUPPORTEDThe FSP calling conditions were not met.
EFI_DEVICE_ERRORFSP initialization failed.
FSP_STATUS_RESET_REQUIREDxA reset is required. These status codes will not be returned during S3.
typedef UINT32 ( EFIAPI *  FSP_DEBUG_HANDLER)