47#define CONTEXT_STACK_OFFSET(x) (sizeof(UINTN) == sizeof (UINT32) ? (UINTN)&((CONTEXT_STACK *)(UINTN)0)->x : (UINTN)&((CONTEXT_STACK_64 *)(UINTN)0)->x)
63 ASSERT (FspData !=
NULL);
64 *((
volatile UINT32 *)(
UINTN)
PcdGet32 (PcdGlobalDataPointerAddress)) = (UINT32)(
UINTN)FspData;
77 UINT32 FspDataAddress;
79 FspDataAddress = *(UINT32 *)(
UINTN)
PcdGet32 (PcdGlobalDataPointerAddress);
97 return *(
UINTN *)(FspData->
CoreStack + CONTEXT_STACK_OFFSET (ApiParam[0]));
114 return (VOID *)(FspData->
CoreStack + CONTEXT_STACK_OFFSET (ApiParam[0]));
131 return *(
UINTN *)(FspData->
CoreStack + CONTEXT_STACK_OFFSET (ApiParam[1]));
149 *(
UINTN *)(FspData->
CoreStack + CONTEXT_STACK_OFFSET (ApiParam)) = Value;
167 *(
UINTN *)(FspData->
CoreStack + CONTEXT_STACK_OFFSET (Registers[7])) = ReturnStatus;
185 UINT32 StackContextLen;
194 NewStack = (
UINTN *)NewStackTop - StackContextLen - 2;
196 while (StackContextLen-- != 0) {
197 *NewStack++ = *OldStack++;
210 IN VOID *PlatformData
258 FspData->UpdDataPtr = UpdDataPtr;
275 return FspData->UpdDataPtr;
286 IN VOID *MemoryInitUpdPtr
299 FspData->MemoryInitUpdPtr = MemoryInitUpdPtr;
316 return FspData->MemoryInitUpdPtr;
327 IN VOID *SiliconInitUpdPtr
340 FspData->SiliconInitUpdPtr = SiliconInitUpdPtr;
357 return FspData->SiliconInitUpdPtr;
368 IN VOID *SmmInitUpdPtr
381 FspData->SmmInitUpdPtr = SmmInitUpdPtr;
398 return FspData->SmmInitUpdPtr;
422 if (FspData->PerfIdx < sizeof (FspData->PerfData) / sizeof (FspData->PerfData[0])) {
423 FspData->PerfData[FspData->PerfIdx] =
AsmReadTsc ();
424 ((UINT8 *)(&FspData->PerfData[FspData->PerfIdx]))[7] = Id;
425 return FspData->PerfData[(FspData->PerfIdx)++];
521 FspData->ApiIdx = Index;
UINT64 EFIAPI AsmReadTsc(VOID)
VOID EFIAPI SetFspApiReturnStatus(IN UINTN ReturnStatus)
FSP_GLOBAL_DATA *EFIAPI GetFspGlobalDataPointer(VOID)
UINT8 EFIAPI GetFspApiCallingIndex(VOID)
VOID EFIAPI SetFspMemoryInitUpdDataPointer(IN VOID *MemoryInitUpdPtr)
UINTN EFIAPI GetFspApiParameter2(VOID)
VOID EFIAPI SetFspUpdDataPointer(IN VOID *UpdDataPtr)
UINTN EFIAPI GetFspApiParameter(VOID)
VOID EFIAPI SetFspGlobalDataPointer(IN FSP_GLOBAL_DATA *FspData)
FSP_INFO_HEADER *EFIAPI GetFspInfoHeaderFromApiContext(VOID)
VOID *EFIAPI GetFspCfgRegionDataPointer(VOID)
VOID *EFIAPI GetFspSiliconInitUpdDataPointer(VOID)
UINT64 EFIAPI SetFspMeasurePoint(IN UINT8 Id)
UINT32 EFIAPI GetPhaseStatusCode(VOID)
VOID EFIAPI SetPhaseStatusCode(UINT32 StatusCode)
VOID EFIAPI SetFspSmmInitUpdDataPointer(IN VOID *SmmInitUpdPtr)
VOID EFIAPI SetFspApiCallingIndex(UINT8 Index)
VOID *EFIAPI GetFspEntryStack(VOID)
FSP_INFO_HEADER *EFIAPI GetFspInfoHeader(VOID)
VOID *EFIAPI GetFspUpdDataPointer(VOID)
VOID EFIAPI SetFspApiParameter(IN UINT32 Value)
VOID EFIAPI SetFspInfoHeader(FSP_INFO_HEADER *FspInfoHeader)
VOID *EFIAPI GetFspMemoryInitUpdDataPointer(VOID)
VOID *EFIAPI GetFspSmmInitUpdDataPointer(VOID)
VOID EFIAPI SetFspSiliconInitUpdDataPointer(IN VOID *SiliconInitUpdPtr)
VOID EFIAPI SetFspCoreStackPointer(IN VOID *NewStackTop)
VOID EFIAPI SetFspPlatformDataPointer(IN VOID *PlatformData)
VOID *EFIAPI GetFspPlatformDataPointer(VOID)
#define PcdGet32(TokenName)
FSP_PLAT_DATA PlatformData