PI Enable:

1) The entry point of PeiCore has been changed to EFI_PEI_CORE_ENTRY_POINT defined in PI. 
2) Nt32, Tiger and lakeport platform's SecCore has been updated.
3) Autogen tools also has been updated.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3804 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2
2007-09-12 09:52:37 +00:00
parent 2303536ca1
commit 5aae0aa7d8
12 changed files with 296 additions and 46 deletions

View File

@@ -47,9 +47,33 @@ PeiSwitchStacks (
IN SWITCH_STACK_ENTRY_POINT EntryPoint,
IN VOID *Context1, OPTIONAL
IN VOID *Context2, OPTIONAL
IN VOID *Context3, OPTIONAL
IN VOID *NewStack,
IN VOID *NewBsp
)
{
SwitchStack (EntryPoint, Context1, Context2, NewStack);
BASE_LIBRARY_JUMP_BUFFER JumpBuffer;
ASSERT (EntryPoint != NULL);
ASSERT (NewStack != NULL);
//
// Stack should be aligned with CPU_STACK_ALIGNMENT
//
ASSERT (((UINTN)NewStack & (CPU_STACK_ALIGNMENT - 1)) == 0);
JumpBuffer.Eip = (UINTN)EntryPoint;
JumpBuffer.Esp = (UINTN)NewStack - sizeof (VOID*);
JumpBuffer.Esp -= sizeof (Context1) + sizeof (Context2) + sizeof(Context3);
((VOID**)JumpBuffer.Esp)[1] = Context1;
((VOID**)JumpBuffer.Esp)[2] = Context2;
((VOID**)JumpBuffer.Esp)[3] = Context3;
LongJump (&JumpBuffer, (UINTN)-1);
//
// InternalSwitchStack () will never return
//
ASSERT (FALSE);
}