EFIAPI GetFspInfoHeaderFromApiContext ( VOID ) { FSP_GLOBAL_DATA *FspData; FspData = GetFspGlobalDataPointer (); return (FSP_INFO_HEADER *)(*(UINT32 *)(UINTN)(FspData->CoreStack + CONTEXT_STACK_OFFSET(FspInfoHeader))); }
EFIAPI GetFspEntryStack ( VOID ) { FSP_GLOBAL_DATA *FspData; FspData = GetFspGlobalDataPointer (); return (VOID*)(FspData->CoreStack + CONTEXT_STACK_OFFSET(ApiParam[0])); }
/** This function gets back the FSP API first parameter passed by the bootloader. @retval ApiParameter FSP API first parameter passed by the bootloader. **/ UINT32 EFIAPI GetFspApiParameter ( VOID ) { FSP_GLOBAL_DATA *FspData; FspData = GetFspGlobalDataPointer (); return *(UINT32 *)(UINTN)(FspData->CoreStack + CONTEXT_STACK_OFFSET(ApiParam[0])); }
/** This function set the API status code returned to the BootLoader. @param[in] ReturnStatus Status code to return. **/ VOID EFIAPI SetFspApiReturnStatus ( IN UINT32 ReturnStatus ) { FSP_GLOBAL_DATA *FspData; FspData = GetFspGlobalDataPointer (); *(UINT32 *)(UINTN)(FspData->CoreStack + CONTEXT_STACK_OFFSET(Eax)) = ReturnStatus; }
/** This function sets the FSP API parameter in the stack. @param[in] Value New parameter value. **/ VOID EFIAPI SetFspApiParameter ( IN UINT32 Value ) { FSP_GLOBAL_DATA *FspData; FspData = GetFspGlobalDataPointer (); *(UINT32 *)(UINTN)(FspData->CoreStack + CONTEXT_STACK_OFFSET(ApiParam)) = Value; }
/** This function sets the FSP continuation function parameters in the stack. @param[in] Value New parameter value to set. @param[in] Index Parameter index. **/ VOID EFIAPI SetFspContinuationFuncParameter ( IN UINT32 Value, IN UINT32 Index ) { FSP_GLOBAL_DATA *FspData; FspData = GetFspGlobalDataPointer (); *(UINT32 *)(UINTN)(FspData->CoreStack + CONTEXT_STACK_OFFSET(ApiParam) + (Index + 1) * sizeof(UINT32)) = Value; }