Update IntelFspPkg according to FSP1.1.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com> Reviewed-by: "Rangarajan, Ravi P" <ravi.p.rangarajan@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16825 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
Intel FSP API definition from Intel Firmware Support Package External
|
||||
Architecture Specification, April 2014, revision 001.
|
||||
|
||||
Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2014 - 2015, 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
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef _FSP_API_H_
|
||||
#define _FSP_API_H_
|
||||
|
||||
typedef UINT32 FSP_STATUS;
|
||||
#define FSP_STATUS EFI_STATUS
|
||||
#define FSPAPI EFIAPI
|
||||
|
||||
/**
|
||||
@@ -29,7 +29,7 @@ typedef UINT32 FSP_STATUS;
|
||||
typedef
|
||||
VOID
|
||||
(* CONTINUATION_PROC) (
|
||||
IN FSP_STATUS Status,
|
||||
IN EFI_STATUS Status,
|
||||
IN VOID *HobListPtr
|
||||
);
|
||||
|
||||
@@ -107,6 +107,21 @@ typedef struct {
|
||||
FSP_INIT_PHASE Phase;
|
||||
} NOTIFY_PHASE_PARAMS;
|
||||
|
||||
typedef struct {
|
||||
///
|
||||
/// Non-volatile storage buffer pointer.
|
||||
///
|
||||
VOID *NvsBufferPtr;
|
||||
///
|
||||
/// Runtime buffer pointer
|
||||
///
|
||||
VOID *RtBufferPtr;
|
||||
///
|
||||
/// Pointer to the HOB data structure defined in the PI specification
|
||||
///
|
||||
VOID **HobListPtr;
|
||||
} FSP_MEMORY_INIT_PARAMS;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
/**
|
||||
@@ -126,11 +141,11 @@ typedef struct {
|
||||
|
||||
@param[in] TempRaminitParamPtr Address pointer to the FSP_TEMP_RAM_INIT_PARAMS structure.
|
||||
|
||||
@retval FSP_SUCCESS Temp RAM was initialized successfully.
|
||||
@retval FSP_INVALID_PARAMETER Input parameters are invalid..
|
||||
@retval FSP_NOT_FOUND No valid microcode was found in the microcode region.
|
||||
@retval FSP_UNSUPPORTED The FSP calling conditions were not met.
|
||||
@retval FSP_DEVICE_ERROR Temp RAM initialization failed.
|
||||
@retval EFI_SUCCESS Temp RAM was initialized successfully.
|
||||
@retval EFI_INVALID_PARAMETER Input parameters are invalid..
|
||||
@retval EFI_NOT_FOUND No valid microcode was found in the microcode region.
|
||||
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
|
||||
@retval EFI_DEVICE_ERROR Temp 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
|
||||
@@ -140,8 +155,8 @@ typedef struct {
|
||||
to the end of this returned range so that it can be used as a standard stack.
|
||||
**/
|
||||
typedef
|
||||
FSP_STATUS
|
||||
(FSPAPI *FSP_TEMP_RAM_INIT) (
|
||||
EFI_STATUS
|
||||
(EFIAPI *FSP_TEMP_RAM_INIT) (
|
||||
IN FSP_TEMP_RAM_INIT_PARAMS *FspTempRamInitPtr
|
||||
);
|
||||
|
||||
@@ -158,17 +173,19 @@ FSP_STATUS
|
||||
|
||||
@param[in] FspInitParamPtr Address pointer to the FSP_INIT_PARAMS structure.
|
||||
|
||||
@retval FSP_SUCCESS FSP execution environment was initialized successfully.
|
||||
@retval FSP_INVALID_PARAMETER Input parameters are invalid.
|
||||
@retval FSP_UNSUPPORTED The FSP calling conditions were not met.
|
||||
@retval FSP_DEVICE_ERROR FSP initialization failed.
|
||||
@retval EFI_SUCCESS FSP execution environment was initialized successfully.
|
||||
@retval EFI_INVALID_PARAMETER Input parameters are invalid.
|
||||
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
|
||||
@retval EFI_DEVICE_ERROR FSP initialization failed.
|
||||
**/
|
||||
typedef
|
||||
FSP_STATUS
|
||||
(FSPAPI *FSP_FSP_INIT) (
|
||||
EFI_STATUS
|
||||
(EFIAPI *FSP_INIT) (
|
||||
IN OUT FSP_INIT_PARAMS *FspInitParamPtr
|
||||
);
|
||||
|
||||
#define FSP_FSP_INIT FSP_INIT
|
||||
|
||||
/**
|
||||
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
|
||||
@@ -179,31 +196,107 @@ FSP_STATUS
|
||||
|
||||
@param[in] NotifyPhaseParamPtr Address pointer to the NOTIFY_PHASE_PRAMS
|
||||
|
||||
@retval FSP_SUCCESS The notification was handled successfully.
|
||||
@retval FSP_UNSUPPORTED The notification was not called in the proper order.
|
||||
@retval FSP_INVALID_PARAMETER The notification code is invalid.
|
||||
@retval EFI_SUCCESS The notification was handled successfully.
|
||||
@retval EFI_UNSUPPORTED The notification was not called in the proper order.
|
||||
@retval EFI_INVALID_PARAMETER The notification code is invalid.
|
||||
**/
|
||||
typedef
|
||||
FSP_STATUS
|
||||
(FSPAPI *FSP_NOTIFY_PHASE) (
|
||||
EFI_STATUS
|
||||
(EFIAPI *FSP_NOTIFY_PHASE) (
|
||||
IN NOTIFY_PHASE_PARAMS *NotifyPhaseParamPtr
|
||||
);
|
||||
|
||||
/**
|
||||
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 it<69>s 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.
|
||||
These APIs are mutually exclusive to the FspInit API.
|
||||
|
||||
@param[in][out] FspMemoryInitParamPtr Address pointer to the FSP_MEMORY_INIT_PARAMS
|
||||
structure.
|
||||
|
||||
@retval EFI_SUCCESS FSP execution environment was initialized successfully.
|
||||
@retval EFI_INVALID_PARAMETER Input parameters are invalid.
|
||||
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
|
||||
@retval EFI_DEVICE_ERROR FSP initialization failed.
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *FSP_MEMORY_INIT) (
|
||||
IN OUT FSP_MEMORY_INIT_PARAMS *FspMemoryInitParamPtr
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
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.
|
||||
These APIs are mutually exclusive to the FspInit API.
|
||||
|
||||
@param[in][out] TempRamExitParamPtr Pointer 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.
|
||||
|
||||
@retval EFI_SUCCESS FSP execution environment was initialized successfully.
|
||||
@retval EFI_INVALID_PARAMETER Input parameters are invalid.
|
||||
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
|
||||
@retval EFI_DEVICE_ERROR FSP initialization failed.
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *FSP_TEMP_RAM_EXIT) (
|
||||
IN OUT VOID *TempRamExitParamPtr
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
This FSP API is called after TempRamExit API.
|
||||
FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to complete the
|
||||
silicon initialization.
|
||||
These APIs are mutually exclusive to the FspInit API.
|
||||
|
||||
@param[in][out] FspSiliconInitParamPtr Pointer to the Silicon Init parameters structure.
|
||||
This structure is normally defined in the Integration Guide.
|
||||
And if it is not defined in the Integration Guide, pass NULL.
|
||||
|
||||
@retval EFI_SUCCESS FSP execution environment was initialized successfully.
|
||||
@retval EFI_INVALID_PARAMETER Input parameters are invalid.
|
||||
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
|
||||
@retval EFI_DEVICE_ERROR FSP initialization failed.
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *FSP_SILICON_INIT) (
|
||||
IN OUT VOID *FspSiliconInitParamPtr
|
||||
);
|
||||
|
||||
///
|
||||
/// FSP API Return Status Code
|
||||
///
|
||||
#define FSP_SUCCESS 0x00000000
|
||||
#define FSP_INVALID_PARAMETER 0x80000002
|
||||
#define FSP_UNSUPPORTED 0x80000003
|
||||
#define FSP_NOT_READY 0x80000006
|
||||
#define FSP_DEVICE_ERROR 0x80000007
|
||||
#define FSP_OUT_OF_RESOURCES 0x80000009
|
||||
#define FSP_VOLUME_CORRUPTED 0x8000000A
|
||||
#define FSP_NOT_FOUND 0x8000000E
|
||||
#define FSP_TIMEOUT 0x80000012
|
||||
#define FSP_ABORTED 0x80000015
|
||||
#define FSP_INCOMPATIBLE_VERSION 0x80000010
|
||||
#define FSP_SECURITY_VIOLATION 0x8000001A
|
||||
#define FSP_CRC_ERROR 0x8000001B
|
||||
/// FSP API Return Status Code for backward compatibility with v1.0
|
||||
///@{
|
||||
#define FSP_SUCCESS EFI_SUCCESS
|
||||
#define FSP_INVALID_PARAMETER EFI_INVALID_PARAMETER
|
||||
#define FSP_UNSUPPORTED EFI_UNSUPPORTED
|
||||
#define FSP_NOT_READY EFI_NOT_READY
|
||||
#define FSP_DEVICE_ERROR EFI_DEVICE_ERROR
|
||||
#define FSP_OUT_OF_RESOURCES EFI_OUT_OF_RESOURCES
|
||||
#define FSP_VOLUME_CORRUPTED EFI_VOLUME_CORRUPTED
|
||||
#define FSP_NOT_FOUND EFI_NOT_FOUND
|
||||
#define FSP_TIMEOUT EFI_TIMEOUT
|
||||
#define FSP_ABORTED EFI_ABORTED
|
||||
#define FSP_INCOMPATIBLE_VERSION EFI_INCOMPATIBLE_VERSION
|
||||
#define FSP_SECURITY_VIOLATION EFI_SECURITY_VIOLATION
|
||||
#define FSP_CRC_ERROR EFI_CRC_ERROR
|
||||
///@}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user