Yao, Jiewen 95c95ac0ef Fsp1.1 update.
Update ApiEntry.asm to use MACRO instead of direct XMM access.
Add sanity parameter check for FSP API.
Add sanity return code check for internal API.
Call LoadUcode before CarInit to meet silicon requirement.
Remove unnecessary VpdBase for PatchTable.
Add ASSERT for NULL check FSP1.1 entrypoint.

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>
Reviewed-by: "Ma, Maurice" <maurice.ma@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16834 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-12 07:02:43 +00:00

67 lines
2.0 KiB
C

/** @file
This PEIM initialize FSP.
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
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.
**/
#include "FspInitPei.h"
/**
This is the entrypoint of PEIM
@param[in] FileHandle Handle of the file being invoked.
@param[in] PeiServices Describes the list of possible PEI Services.
@retval EFI_SUCCESS if it completed successfully.
**/
EFI_STATUS
EFIAPI
FspPeiEntryPoint (
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
)
{
FSP_INFO_HEADER *FspHeader;
UINT8 PcdFspApiVersion;
DEBUG ((DEBUG_INFO, "FspPeiEntryPoint\n"));
PcdFspApiVersion = 1;
FspHeader = FspFindFspHeader (PcdGet32 (PcdFlashFvFspBase));
DEBUG ((DEBUG_INFO, "FspHeader - 0x%x\n", FspHeader));
if (FspHeader == NULL) {
return EFI_DEVICE_ERROR;
}
ASSERT (FspHeader->TempRamInitEntryOffset != 0);
ASSERT (FspHeader->FspInitEntryOffset != 0);
ASSERT (FspHeader->NotifyPhaseEntryOffset != 0);
if ((PcdGet8 (PcdFspApiVersion) >= 2) &&
(FspHeader->HeaderRevision >= FSP_HEADER_REVISION_2) &&
(FspHeader->ApiEntryNum >= 6) ) {
ASSERT (FspHeader->FspMemoryInitEntryOffset != 0);
ASSERT (FspHeader->TempRamExitEntryOffset != 0);
ASSERT (FspHeader->FspSiliconInitEntryOffset != 0);
PcdFspApiVersion = PcdGet8 (PcdFspApiVersion);
}
DEBUG ((DEBUG_INFO, "PcdFspApiVersion - 0x%x\n", PcdFspApiVersion));
if (PcdFspApiVersion == 1) {
PeiFspInitV1 (FspHeader);
} else {
PeiFspInitV2 (FspHeader);
}
return EFI_SUCCESS;
}