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

Data Structures

struct  _FSP_TEMP_RAM_EXIT_PPI
 

Macros

#define FSP_TEMP_RAM_EXIT_GUID
 

Typedefs

typedef struct
_FSP_TEMP_RAM_EXIT_PPI 
FSP_TEMP_RAM_EXIT_PPI
 

Functions

typedef EFI_STATUS (EFIAPI *FSP_TEMP_RAM_EXIT)(IN VOID *TempRamExitParamPtr)
 

Variables

EFI_GUID gFspTempRamExitPpiGuid
 

Detailed Description

This file defines the Silicon Temp Ram Exit PPI which implements the required programming steps for disabling temporary memory.

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

Macro Definition Documentation

#define FSP_TEMP_RAM_EXIT_GUID
Value:
{ \
0xbc1cfbdb, 0x7e50, 0x42be, { 0xb4, 0x87, 0x22, 0xe0, 0xa9, 0x0c, 0xb0, 0x52 } \
}

Global ID for the FSP_TEMP_RAM_EXIT_PPI.

Typedef Documentation

Function Documentation

typedef EFI_STATUS ( EFIAPI *  FSP_TEMP_RAM_EXIT)

Silicon function for disabling temporary memory.

Parameters
[in]TempRamExitParamPtr- Pointer to the TempRamExit parameters structure. This structure is normally defined in the Integration Guide. If it is not defined in the Integration Guide, pass NULL.
Return values
EFI_SUCCESS- FSP execution environment was initialized successfully.
EFI_INVALID_PARAMETER- Input parameters are invalid.
EFI_UNSUPPORTED- The FSP calling conditions were not met.
EFI_DEVICE_ERROR- Temporary memory exit.

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.

Variable Documentation

EFI_GUID gFspTempRamExitPpiGuid