OVMF SEC: Modify to match new interface of reset vector module

Previously the interface to the SEC module was:
  ESI/RSI - SEC Core entry point
  EDI/RDI - PEI Core entry point
  EBP/RBP - Start of BFV

Now it is:
  RAX/EAX  Initial value of the EAX register
           (BIST: Built-in Self Test)
  DI       'BP': boot-strap processor, or
           'AP': application processor
  RBP/EBP  Address of Boot Firmware Volume (BFV)

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9572 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten
2009-12-16 23:29:17 +00:00
parent 7a55c43b07
commit 0913fadc1a
8 changed files with 173 additions and 74 deletions

View File

@@ -61,10 +61,8 @@ InitializeIdtPtr (
VOID
EFIAPI
SecCoreStartupWithStack (
IN VOID *BootFirmwareVolumePtr,
IN VOID *SecCoreEntryPoint,
IN VOID *PeiCoreEntryPoint,
IN VOID *TopOfCurrentStack
IN EFI_FIRMWARE_VOLUME_HEADER *BootFirmwareVolumePtr,
IN VOID *TopOfCurrentStack
)
{
EFI_SEC_PEI_HAND_OFF *SecCoreData;
@@ -72,6 +70,7 @@ SecCoreStartupWithStack (
UINT8 *TopOfTempRam;
UINTN SizeOfTempRam;
VOID *IdtPtr;
VOID *PeiCoreEntryPoint;
//
// Initialize floating point operating environment
@@ -79,14 +78,12 @@ SecCoreStartupWithStack (
//
InitializeFloatingPointUnits ();
DEBUG ((EFI_D_ERROR,
"SecCoreStartupWithStack(0x%x, 0x%x, 0x%x, 0x%x)\n",
DEBUG ((EFI_D_INFO,
"SecCoreStartupWithStack(0x%x, 0x%x)\n",
(UINT32)(UINTN)BootFirmwareVolumePtr,
(UINT32)(UINTN)SecCoreEntryPoint,
(UINT32)(UINTN)PeiCoreEntryPoint,
(UINT32)(UINTN)TopOfCurrentStack));
(UINT32)(UINTN)TopOfCurrentStack
));
BottomOfTempRam = (UINT8*)(UINTN) INITIAL_TOP_OF_STACK;
SizeOfTempRam = (UINTN) SIZE_64KB;
TopOfTempRam = BottomOfTempRam + SizeOfTempRam;
@@ -127,20 +124,31 @@ SecCoreStartupWithStack (
IdtPtr = ALIGN_POINTER(IdtPtr, 16);
InitializeIdtPtr (IdtPtr);
//
// Transfer control to the PEI Core
//
PeiSwitchStacks (
(SWITCH_STACK_ENTRY_POINT) (UINTN) PeiCoreEntryPoint,
SecCoreData,
(VOID *) (UINTN) ((EFI_PEI_PPI_DESCRIPTOR *) &mPrivateDispatchTable),
NULL,
TopOfCurrentStack,
(VOID *)((UINTN)SecCoreData->StackBase + SecCoreData->StackSize)
);
FindPeiCoreEntryPoint (BootFirmwareVolumePtr, &PeiCoreEntryPoint);
if (PeiCoreEntryPoint != NULL) {
DEBUG ((EFI_D_INFO,
"Calling PEI Core entry point at 0x%x\n",
PeiCoreEntryPoint
));
//
// Transfer control to the PEI Core
//
PeiSwitchStacks (
(SWITCH_STACK_ENTRY_POINT) (UINTN) PeiCoreEntryPoint,
SecCoreData,
(VOID *) (UINTN) ((EFI_PEI_PPI_DESCRIPTOR *) &mPrivateDispatchTable),
NULL,
TopOfCurrentStack,
(VOID *)((UINTN)SecCoreData->StackBase + SecCoreData->StackSize)
);
}
//
// If we get here, then the PEI Core returned. This is an error
// If we get here, then either we couldn't locate the PEI Core, or
// the PEI Core returned.
//
// Both of these errors are unrecoverable.
//
ASSERT (FALSE);
CpuDeadLoop ();