You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
136 lines
5.4 KiB
C
136 lines
5.4 KiB
C
/** @file
|
|
|
|
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_API_LIB_H_
|
|
#define _FSP_API_LIB_H_
|
|
|
|
#include <FspEas/FspApi.h>
|
|
|
|
/**
|
|
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'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.
|
|
|
|
@param[in] FspmBase The base address of FSPM.
|
|
@param[out] HobListPtr Pointer to receive the address of the HOB list.
|
|
|
|
@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.
|
|
@retval EFI_OUT_OF_RESOURCES Stack range requested by FSP is not met.
|
|
@retval FSP_STATUS_RESET_REQUIREDx A reset is reuired. These status codes will not be returned during S3.
|
|
**/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
CallFspMemoryInit (
|
|
UINT32 FspmBase,
|
|
VOID **HobList
|
|
);
|
|
|
|
/**
|
|
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.
|
|
|
|
@param[in] FspmBase The base address of FSPM.
|
|
@param[in] Params 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.
|
|
**/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
CallFspTempRamExit (
|
|
UINT32 FspmBase,
|
|
VOID *Params
|
|
);
|
|
|
|
|
|
/**
|
|
This FSP API is called after TempRamExit API.
|
|
FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to complete the
|
|
silicon initialization.
|
|
|
|
@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.
|
|
@retval FSP_STATUS_RESET_REQUIREDx A reset is reuired. These status codes will not be returned during S3.
|
|
**/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
CallFspSiliconInit (
|
|
VOID
|
|
);
|
|
|
|
/**
|
|
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 following notify phases:
|
|
Post PCI enumeration
|
|
Ready To Boot
|
|
End of firmware
|
|
|
|
@param[in] Phase Phase parameter for FspNotifyPhase
|
|
|
|
@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.
|
|
**/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
CallFspNotifyPhase (
|
|
FSP_INIT_PHASE Phase
|
|
);
|
|
|
|
|
|
/**
|
|
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 following notify phases:
|
|
Post PCI enumeration
|
|
Ready To Boot
|
|
End of firmware
|
|
|
|
@param[in] Delta The delta between the new and old base.
|
|
Delta = NewBase - OldBase
|
|
|
|
@retval EFI_SUCCESS The rebasing was handled successfully.
|
|
|
|
**/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
RebaseFspComponent (
|
|
UINT32 Delta
|
|
);
|
|
|
|
#endif
|