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:
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
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
|
||||
@@ -13,8 +13,6 @@
|
||||
|
||||
#include "SecFsp.h"
|
||||
|
||||
UINT32 FspImageSizeOffset = FSP_INFO_HEADER_OFF + OFFSET_IN_FSP_INFO_HEADER(ImageSize);
|
||||
|
||||
/**
|
||||
|
||||
Calculate the FSP IDT gate descriptor.
|
||||
@@ -140,13 +138,15 @@ SecGetPlatformData (
|
||||
It needs to be done as soon as possible after the stack is setup.
|
||||
|
||||
@param[in,out] PeiFspData Pointer of the FSP global data.
|
||||
@param[in] BootFirmwareVolume Point to the address of BootFirmwareVolume in stack.
|
||||
@param[in] BootloaderStack Bootloader stack.
|
||||
@param[in] ApiIdx The index of the FSP API.
|
||||
|
||||
**/
|
||||
VOID
|
||||
FspGlobalDataInit (
|
||||
IN OUT FSP_GLOBAL_DATA *PeiFspData,
|
||||
IN VOID **BootFirmwareVolume
|
||||
IN UINT32 BootloaderStack,
|
||||
IN UINT8 ApiIdx
|
||||
)
|
||||
{
|
||||
VOID *UpdDataRgnPtr;
|
||||
@@ -162,7 +162,7 @@ FspGlobalDataInit (
|
||||
ZeroMem ((VOID *)PeiFspData, sizeof(FSP_GLOBAL_DATA));
|
||||
|
||||
PeiFspData->Signature = FSP_GLOBAL_DATA_SIGNATURE;
|
||||
PeiFspData->CoreStack = *(UINTN *)(BootFirmwareVolume + 2);
|
||||
PeiFspData->CoreStack = BootloaderStack;
|
||||
PeiFspData->PerfIdx = 2;
|
||||
|
||||
SetFspMeasurePoint (FSP_PERF_ID_API_FSPINIT_ENTRY);
|
||||
@@ -174,6 +174,11 @@ FspGlobalDataInit (
|
||||
PeiFspData->FspInfoHeader = (FSP_INFO_HEADER *)(GetFspBaseAddress() + FSP_INFO_HEADER_OFF);
|
||||
SecGetPlatformData (PeiFspData);
|
||||
|
||||
//
|
||||
// Set API calling mode
|
||||
//
|
||||
SetFspApiCallingMode (ApiIdx == 1 ? 0 : 1);
|
||||
|
||||
//
|
||||
// Initialize UPD pointer.
|
||||
//
|
||||
@@ -202,8 +207,13 @@ FspGlobalDataInit (
|
||||
}
|
||||
ImageId[Idx] = 0;
|
||||
|
||||
DEBUG ((DEBUG_INFO | DEBUG_INIT, "\n============= PEIM FSP (%a 0x%08X) =============\n", \
|
||||
ImageId, PeiFspData->FspInfoHeader->ImageRevision));
|
||||
DEBUG ((DEBUG_INFO | DEBUG_INIT, "\n============= PEIM FSP v1.%x (%a v%x.%x.%x.%x) =============\n", \
|
||||
PeiFspData->FspInfoHeader->HeaderRevision - 1, \
|
||||
ImageId, \
|
||||
(PeiFspData->FspInfoHeader->ImageRevision >> 24) & 0xff, \
|
||||
(PeiFspData->FspInfoHeader->ImageRevision >> 16) & 0xff, \
|
||||
(PeiFspData->FspInfoHeader->ImageRevision >> 8) & 0xff, \
|
||||
(PeiFspData->FspInfoHeader->ImageRevision >> 0) & 0xff));
|
||||
|
||||
}
|
||||
|
||||
@@ -260,6 +270,35 @@ FspApiCallingCheck (
|
||||
Status = EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else if (ApiIdx == 3) {
|
||||
//
|
||||
// FspMemoryInit check
|
||||
//
|
||||
if ((UINT32)FspData != 0xFFFFFFFF) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
}
|
||||
} else if (ApiIdx == 4) {
|
||||
//
|
||||
// TempRamExit check
|
||||
//
|
||||
if ((FspData == NULL) || ((UINT32)FspData == 0xFFFFFFFF)) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
} else {
|
||||
if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else if (ApiIdx == 5) {
|
||||
//
|
||||
// FspSiliconInit check
|
||||
//
|
||||
if ((FspData == NULL) || ((UINT32)FspData == 0xFFFFFFFF)) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
} else {
|
||||
if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Status = EFI_UNSUPPORTED;
|
||||
}
|
||||
|
Reference in New Issue
Block a user