The default value of SecMain should be set as INIT_CAR_VALUE = 0x5aa55aa5, then PeiMain could computer how many stack ever used.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4261 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2007-11-01 07:10:43 +00:00
parent 61f21f400d
commit 85e43be15e
1 changed files with 7 additions and 0 deletions

View File

@ -154,6 +154,7 @@ Returns:
VOID *PeiCoreFile;
CHAR16 *MemorySizeStr;
CHAR16 *FirmwareVolumesStr;
UINTN *StackPointer;
MemorySizeStr = (CHAR16 *) FixedPcdGetPtr (PcdWinNtMemorySizeForSecMain);
FirmwareVolumesStr = (CHAR16 *) FixedPcdGetPtr (PcdWinNtFirmwareVolume);
@ -202,6 +203,12 @@ Returns:
exit (1);
}
for (StackPointer = (UINTN*) (UINTN) InitialStackMemory;
StackPointer < (UINTN*) ((UINTN)InitialStackMemory + (SIZE_T) InitialStackMemorySize);
StackPointer ++) {
*StackPointer = 0x5AA55AA5;
}
printf (" SEC passing in %d bytes of temp RAM to PEI\n", InitialStackMemorySize);
//