/** @file
Main SEC phase code. Transitions to PEI.
- Copyright (c) 2008 - 2009, Intel Corporation
+ Copyright (c) 2008 - 2009, Intel Corporation. All rights reserved.<BR>
- All rights reserved. This program and the accompanying materials
+ 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
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
+#include <Library/PeimEntryPoint.h>
#include <Library/PeiServicesLib.h>
#include <Ppi/TemporaryRamSupport.h>
#include <Library/PcdLib.h>
VOID
EFIAPI
SecCoreStartupWithStack (
- IN EFI_FIRMWARE_VOLUME_HEADER *BootFirmwareVolumePtr,
+ IN EFI_FIRMWARE_VOLUME_HEADER *BootFv,
IN VOID *TopOfCurrentStack
)
{
VOID *IdtPtr;
VOID *PeiCoreEntryPoint;
+ DEBUG ((EFI_D_INFO,
+ "SecCoreStartupWithStack(0x%x, 0x%x)\n",
+ (UINT32)(UINTN)BootFv,
+ (UINT32)(UINTN)TopOfCurrentStack
+ ));
+
+ ProcessLibraryConstructorList (NULL, NULL);
+
//
// Initialize floating point operating environment
// to be compliant with UEFI spec.
//
InitializeFloatingPointUnits ();
- DEBUG ((EFI_D_INFO,
- "SecCoreStartupWithStack(0x%x, 0x%x)\n",
- (UINT32)(UINTN)BootFirmwareVolumePtr,
- (UINT32)(UINTN)TopOfCurrentStack
- ));
-
BottomOfTempRam = (UINT8*)(UINTN) INITIAL_TOP_OF_STACK;
SizeOfTempRam = (UINTN) SIZE_64KB;
TopOfTempRam = BottomOfTempRam + SizeOfTempRam;
SecCoreData = (EFI_SEC_PEI_HAND_OFF*)((UINTN) TopOfTempRam - SIZE_4KB);
SecCoreData->DataSize = sizeof(EFI_SEC_PEI_HAND_OFF);
- SecCoreData->BootFirmwareVolumeBase = (VOID*)(UINTN) PcdGet32 (PcdOvmfFlashFvRecoveryBase);
- SecCoreData->BootFirmwareVolumeSize = PcdGet32 (PcdOvmfFlashFvRecoverySize);
-
SecCoreData->TemporaryRamBase = (VOID*) BottomOfTempRam;
SecCoreData->TemporaryRamSize = SizeOfTempRam;
IdtPtr = ALIGN_POINTER(IdtPtr, 16);
InitializeIdtPtr (IdtPtr);
- FindPeiCoreEntryPoint (BootFirmwareVolumePtr, &PeiCoreEntryPoint);
+ FindPeiCoreEntryPoint (&BootFv, &PeiCoreEntryPoint);
+
+ SecCoreData->BootFirmwareVolumeBase = BootFv;
+ SecCoreData->BootFirmwareVolumeSize = (UINTN) BootFv->FvLength;
if (PeiCoreEntryPoint != NULL) {
DEBUG ((EFI_D_INFO,