\r
EFI_STATUS\r
PeiDispatcher (\r
- IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor,\r
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
IN PEI_CORE_INSTANCE *PrivateData,\r
IN PEI_CORE_DISPATCH_DATA *DispatchData\r
)\r
\r
Arguments:\r
\r
- PeiStartupDescriptor - Pointer to IN EFI_PEI_STARTUP_DESCRIPTOR\r
+ SecCoreData - Points to a data structure containing information about the PEI core's operating\r
+ environment, such as the size and location of temporary RAM, the stack location and\r
+ the BFV location.\r
PrivateData - Pointer to the private data passed in from caller\r
DispatchData - Pointer to PEI_CORE_DISPATCH_DATA data.\r
\r
\r
PeiSwitchStacks (\r
(SWITCH_STACK_ENTRY_POINT)(UINTN)TempPtr.Raw,\r
- PeiStartupDescriptor,\r
+ (VOID*) SecCoreData,\r
+ NULL,\r
(VOID*)PrivateDataInMem,\r
TopOfStack,\r
(VOID*)(UINTN)PrivateData->StackBase\r
InitializeDispatcherData (\r
IN EFI_PEI_SERVICES **PeiServices,\r
IN PEI_CORE_INSTANCE *OldCoreData,\r
- IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor\r
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData\r
)\r
/*++\r
\r
PeiServices - The PEI core services table.\r
OldCoreData - Pointer to old core data (before switching stack).\r
NULL if being run in non-permament memory mode.\r
- PeiStartupDescriptor - Information and services provided by SEC phase.\r
+ SecCoreData - Points to a data structure containing information about the PEI core's operating\r
+ environment, such as the size and location of temporary RAM, the stack location and\r
+ the BFV location.\r
\r
Returns:\r
\r
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
\r
if (OldCoreData == NULL) {\r
- PrivateData->DispatchData.CurrentFvAddress = (EFI_FIRMWARE_VOLUME_HEADER *) PeiStartupDescriptor->BootFirmwareVolume;\r
- PrivateData->DispatchData.BootFvAddress = (EFI_FIRMWARE_VOLUME_HEADER *) PeiStartupDescriptor->BootFirmwareVolume;\r
+ PrivateData->DispatchData.CurrentFvAddress = (EFI_FIRMWARE_VOLUME_HEADER *) SecCoreData->BootFirmwareVolumeBase;\r
+ PrivateData->DispatchData.BootFvAddress = (EFI_FIRMWARE_VOLUME_HEADER *) SecCoreData->BootFirmwareVolumeBase;\r
} else {\r
\r
//\r
IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
IN VOID *Context1, OPTIONAL\r
IN VOID *Context2, OPTIONAL\r
+ IN VOID *Context3, OPTIONAL\r
IN VOID *NewStack,\r
IN VOID *NewBsp\r
)\r
{\r
- SwitchStack (EntryPoint, Context1, Context2, NewStack);\r
+ BASE_LIBRARY_JUMP_BUFFER JumpBuffer;\r
+ \r
+ ASSERT (EntryPoint != NULL);\r
+ ASSERT (NewStack != NULL);\r
+\r
+ //\r
+ // Stack should be aligned with CPU_STACK_ALIGNMENT\r
+ //\r
+ ASSERT (((UINTN)NewStack & (CPU_STACK_ALIGNMENT - 1)) == 0);\r
+\r
+ JumpBuffer.Eip = (UINTN)EntryPoint;\r
+ JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*);\r
+ JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2) + sizeof(Context3);\r
+ ((VOID**)JumpBuffer.Esp)[1] = Context1;\r
+ ((VOID**)JumpBuffer.Esp)[2] = Context2;\r
+ ((VOID**)JumpBuffer.Esp)[3] = Context3;\r
+\r
+ LongJump (&JumpBuffer, (UINTN)-1);\r
+ \r
+\r
+ //\r
+ // InternalSwitchStack () will never return\r
+ //\r
+ ASSERT (FALSE); \r
}\r
--- /dev/null
+/** @file\r
+ SwitchStack() function for IPF.\r
+\r
+ Copyright (c) 2007, Intel Corporation<BR>\r
+ All rights reserved. This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution. The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include <PeiMain.h>\r
+\r
+VOID\r
+EFIAPI\r
+IpfAsmSwitchStack (\r
+ IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+ IN VOID *ConText1, OPTIONAL\r
+ IN VOID *Context2, OPTIONAL\r
+ IN VOID *Context3, OPTIONAL\r
+ IN VOID *NewStack,\r
+ IN VOID *NewBsp\r
+ );\r
+\r
+/**\r
+ Transfers control to a function starting with a new stack.\r
+\r
+ Transfers control to the function specified by EntryPoint using the\r
+ new stack specified by NewStack and passing in the parameters specified\r
+ by Context1 and Context2. Context1 and Context2 are optional and may\r
+ be NULL. The function EntryPoint must never return.\r
+ Marker will be ignored on IA-32, x64, and EBC.\r
+ IPF CPUs expect one additional parameter of type VOID * that specifies\r
+ the new backing store pointer.\r
+\r
+ If EntryPoint is NULL, then ASSERT().\r
+ If NewStack is NULL, then ASSERT().\r
+\r
+ @param EntryPoint A pointer to function to call with the new stack.\r
+ @param Context1 A pointer to the context to pass into the EntryPoint\r
+ function.\r
+ @param Context2 A pointer to the context to pass into the EntryPoint\r
+ function.\r
+ @param NewStack A pointer to the new stack to use for the EntryPoint\r
+ function.\r
+ @param Marker VA_LIST marker for the variable argument list.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+InternalSwitchStack (\r
+ IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+ IN VOID *Context1, OPTIONAL\r
+ IN VOID *Context2, OPTIONAL\r
+ IN VOID *Context3, OPTIONAL\r
+ IN VOID *NewStack,\r
+ IN VA_LIST Marker\r
+ )\r
+\r
+{\r
+ VOID *NewBsp;\r
+\r
+ //\r
+ // Get new backing store pointer from variable list\r
+ //\r
+ NewBsp = VA_ARG (Marker, VOID *);\r
+\r
+ //\r
+ // Stack should be aligned with CPU_STACK_ALIGNMENT\r
+ //\r
+ ASSERT (((UINTN)NewStack & (CPU_STACK_ALIGNMENT - 1)) == 0);\r
+ ASSERT (((UINTN)NewBsp & (CPU_STACK_ALIGNMENT - 1)) == 0);\r
+\r
+ IpfAsmSwitchStack (EntryPoint, Context1, Context2, Context3, NewStack, NewBsp);\r
+}\r
\r
#include <PeiMain.h>\r
\r
+VOID\r
+EFIAPI\r
+InternalSwitchStack (\r
+ IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+ IN VOID *Context1, OPTIONAL\r
+ IN VOID *Context2, OPTIONAL\r
+ IN VOID *Context3, OPTIONAL\r
+ IN VOID *NewStack,\r
+ IN VA_LIST Marker\r
+ );\r
+\r
/**\r
Transfers control to a function starting with a new stack.\r
\r
IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
IN VOID *Context1, OPTIONAL\r
IN VOID *Context2, OPTIONAL\r
+ IN VOID *Context3, OPTIONAL\r
IN VOID *NewStack,\r
IN VOID *NewBsp\r
)\r
{\r
- SwitchStack (\r
+ InternalSwitchStack(\r
EntryPoint,\r
Context1,\r
Context2,\r
+ Context3,\r
NewStack,\r
NewBsp\r
);\r
+\r
}\r
--- /dev/null
+/// @file\r
+/// IPF specific SwitchStack() function\r
+///\r
+/// Copyright (c) 2006, Intel Corporation\r
+/// All rights reserved. This program and the accompanying materials\r
+/// are licensed and made available under the terms and conditions of the BSD License\r
+/// which accompanies this distribution. The full text of the license may be found at\r
+/// http://opensource.org/licenses/bsd-license.php\r
+///\r
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+///\r
+/// Module Name: SwitchStack.s\r
+///\r
+///\r
+\r
+.auto\r
+.text\r
+\r
+.proc IpfAsmSwitchStack\r
+.type IpfAsmSwitchStack, @function\r
+.regstk 6, 0, 0, 0\r
+IpfAsmSwitchStack::\r
+ mov r14 = ar.rsc\r
+ movl r2 = ~((((1 << 14) - 1) << 16) | 3)\r
+\r
+ mov r17 = in1\r
+ mov r18 = in2\r
+ mov r19 = in3\r
+ and r2 = r14, r2\r
+\r
+ mov ar.rsc = r2\r
+ mov sp = in4\r
+ mov r20 = in5\r
+\r
+ ld8.nt1 r16 = [in0], 8\r
+ ld8.nta gp = [in0]\r
+ mov r3 = -1\r
+\r
+ loadrs\r
+ mov ar.bspstore = r20\r
+ mov b7 = r16\r
+\r
+ alloc r2 = ar.pfs, 0, 0, 3, 0\r
+ mov out0 = r17\r
+ mov out1 = r18\r
+ mov out2 = r19\r
+\r
+ mov ar.rnat = r3\r
+ mov ar.rsc = r14\r
+ br.call.sptk.many b0 = b7\r
+.endp IpfAsmSwitchStack\r
VOID\r
InitializeMemoryServices (\r
IN EFI_PEI_SERVICES **PeiServices,\r
- IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor,\r
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
IN PEI_CORE_INSTANCE *OldCoreData\r
)\r
/*++\r
Arguments:\r
\r
PeiServices - The PEI core services table.\r
- PeiStartupDescriptor - Information and services provided by SEC phase.\r
+ SecCoreData - Points to a data structure containing information about the PEI core's operating\r
+ environment, such as the size and location of temporary RAM, the stack location and\r
+ the BFV location.\r
+\r
OldCoreData - Pointer to the PEI Core data.\r
NULL if being run in non-permament memory mode.\r
\r
--*/\r
{\r
PEI_CORE_INSTANCE *PrivateData;\r
- UINT64 SizeOfCarHeap;\r
\r
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
PrivateData->SwitchStackSignal = FALSE;\r
\r
PrivateData->PeiMemoryInstalled = FALSE;\r
\r
- PrivateData->BottomOfCarHeap = (VOID *) (((UINTN)(VOID *)(&PrivateData))\r
- & (~((PeiStartupDescriptor->SizeOfCacheAsRam) - 1))); \r
- PrivateData->TopOfCarHeap = (VOID *)((UINTN)(PrivateData->BottomOfCarHeap) + PeiStartupDescriptor->SizeOfCacheAsRam);\r
- //\r
- // SizeOfCarHeap is 1/2 (arbitrary) of CacheAsRam Size.\r
- //\r
- SizeOfCarHeap = (UINT64) PeiStartupDescriptor->SizeOfCacheAsRam;\r
- SizeOfCarHeap = RShiftU64 (SizeOfCarHeap, 1);\r
+ PrivateData->BottomOfCarHeap = SecCoreData->PeiTemporaryRamBase; \r
+ PrivateData->TopOfCarHeap = (VOID *)((UINTN)(PrivateData->BottomOfCarHeap) + SecCoreData->PeiTemporaryRamSize);\r
\r
DEBUG_CODE_BEGIN ();\r
- PrivateData->SizeOfCacheAsRam = PeiStartupDescriptor->SizeOfCacheAsRam;\r
- PrivateData->MaxTopOfCarHeap = (VOID *) ((UINTN) PrivateData->BottomOfCarHeap + (UINTN) SizeOfCarHeap);\r
+ PrivateData->SizeOfCacheAsRam = SecCoreData->PeiTemporaryRamSize + SecCoreData->StackSize;\r
+ PrivateData->MaxTopOfCarHeap = (VOID *) ((UINTN) PrivateData->BottomOfCarHeap + (UINTN) PrivateData->SizeOfCacheAsRam);\r
DEBUG_CODE_END ();\r
\r
PrivateData->HobList.Raw = PrivateData->BottomOfCarHeap;\r
PeiCoreBuildHobHandoffInfoTable (\r
BOOT_WITH_FULL_CONFIGURATION,\r
(EFI_PHYSICAL_ADDRESS) (UINTN) PrivateData->BottomOfCarHeap,\r
- (UINTN) SizeOfCarHeap\r
+ (UINTN) SecCoreData->PeiTemporaryRamSize\r
);\r
//\r
// Copy PeiServices from ROM to Cache in PrivateData\r
EFI_STATUS\r
EFIAPI\r
PeiCore (\r
- IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor,\r
- IN VOID *Data\r
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *PpList,\r
+ IN VOID *Data\r
)\r
/*++\r
\r
\r
EFI_STATUS\r
PeiDispatcher (\r
- IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor,\r
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
IN PEI_CORE_INSTANCE *PrivateData,\r
IN PEI_CORE_DISPATCH_DATA *DispatchData\r
)\r
InitializeDispatcherData (\r
IN EFI_PEI_SERVICES **PeiServices,\r
IN PEI_CORE_INSTANCE *OldCoreData,\r
- IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor\r
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData\r
)\r
/*++\r
\r
VOID\r
InitializeMemoryServices (\r
IN EFI_PEI_SERVICES **PeiServices,\r
- IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor,\r
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
IN PEI_CORE_INSTANCE *OldCoreData\r
)\r
/*++\r
IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
IN VOID *Context1, OPTIONAL\r
IN VOID *Context2, OPTIONAL\r
+ IN VOID *Context3, OPTIONAL\r
IN VOID *NewStack,\r
IN VOID *NewBsp\r
);\r
Ipf/IpfCpuCore.s\r
Ipf/IpfCpuCore.i\r
Ipf/SwitchToCacheMode.c\r
+ Ipf/InternalSwitchStack.c\r
+ Ipf/SwitchStack.s\r
\r
[Sources.EBC]\r
Dispatcher/Stack.c\r
PerformanceLib\r
HobLib\r
BaseLib\r
- OldPeiCoreEntryPoint\r
+ PeiCoreEntryPoint\r
DebugLib\r
\r
[Guids]\r
EFI_STATUS\r
EFIAPI\r
PeiCore (\r
- IN EFI_PEI_STARTUP_DESCRIPTOR *PeiStartupDescriptor,\r
- IN VOID *Data\r
+ IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,\r
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *PpList,\r
+ IN VOID *Data\r
)\r
/*++\r
\r
\r
Arguments:\r
\r
- PeiStartupDescriptor - Information and services provided by SEC phase.\r
- OldCoreData - Pointer to old core data that is used to initialize the\r
+ SecCoreData - Points to a data structure containing information about the PEI core's operating\r
+ environment, such as the size and location of temporary RAM, the stack location and\r
+ the BFV location.\r
+ PpiList - Points to a list of one or more PPI descriptors to be installed initially by the PEI core.\r
+ An empty PPI list consists of a single descriptor with the end-tag\r
+ EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization\r
+ phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such\r
+ that both the PEI Foundation and any modules can leverage the associated service\r
+ calls and/or code in these early PPIs\r
+ Data - Pointer to old core data that is used to initialize the\r
core's data areas.\r
\r
Returns:\r
//\r
ProcessLibraryConstructorList (NULL, &PrivateData.PS);\r
\r
- InitializeMemoryServices (&PrivateData.PS, PeiStartupDescriptor, OldCoreData);\r
+ InitializeMemoryServices (&PrivateData.PS, SecCoreData, OldCoreData);\r
\r
InitializePpiServices (&PrivateData.PS, OldCoreData);\r
\r
InitializeSecurityServices (&PrivateData.PS, OldCoreData);\r
\r
- InitializeDispatcherData (&PrivateData.PS, OldCoreData, PeiStartupDescriptor);\r
+ InitializeDispatcherData (&PrivateData.PS, OldCoreData, SecCoreData);\r
\r
if (OldCoreData != NULL) {\r
\r
//\r
// If SEC provided any PPI services to PEI, install them.\r
//\r
- if (PeiStartupDescriptor->DispatchTable != NULL) {\r
- Status = PeiServicesInstallPpi (PeiStartupDescriptor->DispatchTable);\r
+ if (PpList != NULL) {\r
+ Status = PeiServicesInstallPpi (PpList);\r
ASSERT_EFI_ERROR (Status);\r
}\r
}\r
//\r
// Call PEIM dispatcher\r
//\r
- PeiDispatcher (PeiStartupDescriptor, &PrivateData, DispatchData);\r
+ PeiDispatcher (SecCoreData, &PrivateData, DispatchData);\r
\r
//\r
// Check if InstallPeiMemory service was called.\r
return EFI_SUCCESS;\r
}\r
\r
+/**\r
+ Transfers control to a function starting with a new stack.\r
+\r
+ Transfers control to the function specified by EntryPoint using the new stack\r
+ specified by NewStack and passing in the parameters specified by Context1 and\r
+ Context2. Context1 and Context2 are optional and may be NULL. The function\r
+ EntryPoint must never return.\r
+\r
+ If EntryPoint is NULL, then ASSERT().\r
+ If NewStack is NULL, then ASSERT().\r
+\r
+ @param EntryPoint A pointer to function to call with the new stack.\r
+ @param Context1 A pointer to the context to pass into the EntryPoint\r
+ function.\r
+ @param Context2 A pointer to the context to pass into the EntryPoint\r
+ function.\r
+ @param NewStack A pointer to the new stack to use for the EntryPoint\r
+ function.\r
+ @param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's\r
+ Reserved on other architectures.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+PeiSwitchStacks (\r
+ IN SWITCH_STACK_ENTRY_POINT EntryPoint,\r
+ IN VOID *Context1, OPTIONAL\r
+ IN VOID *Context2, OPTIONAL\r
+ IN VOID *Context3, OPTIONAL\r
+ IN VOID *NewStack\r
+ )\r
+{\r
+ BASE_LIBRARY_JUMP_BUFFER JumpBuffer;\r
+ \r
+ ASSERT (EntryPoint != NULL);\r
+ ASSERT (NewStack != NULL);\r
+\r
+ //\r
+ // Stack should be aligned with CPU_STACK_ALIGNMENT\r
+ //\r
+ ASSERT (((UINTN)NewStack & (CPU_STACK_ALIGNMENT - 1)) == 0);\r
+\r
+ JumpBuffer.Eip = (UINTN)EntryPoint;\r
+ JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*);\r
+ JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2) + sizeof(Context3);\r
+ ((VOID**)JumpBuffer.Esp)[1] = Context1;\r
+ ((VOID**)JumpBuffer.Esp)[2] = Context2;\r
+ ((VOID**)JumpBuffer.Esp)[3] = Context3;\r
+\r
+ LongJump (&JumpBuffer, (UINTN)-1);\r
+ \r
+\r
+ //\r
+ // InternalSwitchStack () will never return\r
+ //\r
+ ASSERT (FALSE); \r
+}\r
\r
VOID\r
SecLoadFromCore (\r
UINT64 PeiCoreSize;\r
EFI_PHYSICAL_ADDRESS PeiCoreEntryPoint;\r
EFI_PHYSICAL_ADDRESS PeiImageAddress;\r
- EFI_PEI_STARTUP_DESCRIPTOR *PeiStartup;\r
+ EFI_SEC_PEI_HAND_OFF *SecCoreData;\r
\r
//\r
// Compute Top Of Memory for Stack and PEI Core Allocations\r
//\r
// Allocate 128KB for the Stack\r
//\r
- TopOfStack = (VOID *)((UINTN)TopOfMemory - sizeof (EFI_PEI_STARTUP_DESCRIPTOR) - CPU_STACK_ALIGNMENT);\r
+ TopOfStack = (VOID *)((UINTN)TopOfMemory - sizeof (EFI_SEC_PEI_HAND_OFF) - CPU_STACK_ALIGNMENT);\r
TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);\r
TopOfMemory = TopOfMemory - STACK_SIZE;\r
\r
//\r
// Bind this information into the SEC hand-off state\r
//\r
- PeiStartup = (EFI_PEI_STARTUP_DESCRIPTOR *) (UINTN) TopOfStack;\r
- PeiStartup->DispatchTable = (EFI_PEI_PPI_DESCRIPTOR *) &gPrivateDispatchTable;\r
- PeiStartup->SizeOfCacheAsRam = STACK_SIZE;\r
- PeiStartup->BootFirmwareVolume = BootFirmwareVolumeBase;\r
+ SecCoreData = (EFI_SEC_PEI_HAND_OFF*)(UINTN) TopOfStack;\r
+ SecCoreData->DataSize = sizeof(EFI_SEC_PEI_HAND_OFF);\r
+ SecCoreData->BootFirmwareVolumeBase = (VOID*)BootFirmwareVolumeBase;\r
+ SecCoreData->BootFirmwareVolumeSize = FixedPcdGet32(PcdWinNtFirmwareFdSize);\r
+ SecCoreData->TemporaryRamBase = (VOID*)(UINTN)TopOfMemory; \r
+ SecCoreData->TemporaryRamSize = STACK_SIZE;\r
+ SecCoreData->PeiTemporaryRamBase = SecCoreData->TemporaryRamBase;\r
+ SecCoreData->PeiTemporaryRamSize = (UINTN)RShiftU64((UINT64)STACK_SIZE,1);\r
+ SecCoreData->StackBase = (VOID*)((UINTN)SecCoreData->TemporaryRamBase + (UINTN)SecCoreData->TemporaryRamSize);\r
+ SecCoreData->StackSize = (UINTN)RShiftU64((UINT64)STACK_SIZE,1);\r
\r
//\r
// Load the PEI Core from a Firmware Volume\r
if (EFI_ERROR (Status)) {\r
return ;\r
}\r
+ \r
//\r
// Transfer control to the PEI Core\r
//\r
- SwitchStack (\r
+ PeiSwitchStacks (\r
(SWITCH_STACK_ENTRY_POINT) (UINTN) PeiCoreEntryPoint,\r
- PeiStartup,\r
+ SecCoreData,\r
+ (VOID *) (UINTN) ((EFI_PEI_PPI_DESCRIPTOR *) &gPrivateDispatchTable),\r
NULL,\r
TopOfStack\r
);\r
#gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySizeForSecMain\r
#gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareVolume\r
\r
+[FixedPcd.common]\r
+ gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareFdSize \r
+ \r
[BuildOptions.common]\r
MSFT:DEBUG_*_IA32_DLINK_FLAGS = /out:"$(BIN_DIR)\SecMain.exe" /base:0x10000000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib\r
MSFT:DEBUG_*_IA32_CC_FLAGS = /nologo /W4 /WX /Gy /c /D UNICODE /D EFI32 /Od /DSTRING_ARRAY_NAME=SecMainStrings /FI$(DEST_DIR_DEBUG)/AutoGen.h /EHs-c- /GF /Gs8192 /Zi /Gm\r