mirror of https://github.com/acidanthera/audk.git
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:
parent
61f21f400d
commit
85e43be15e
|
@ -154,6 +154,7 @@ Returns:
|
||||||
VOID *PeiCoreFile;
|
VOID *PeiCoreFile;
|
||||||
CHAR16 *MemorySizeStr;
|
CHAR16 *MemorySizeStr;
|
||||||
CHAR16 *FirmwareVolumesStr;
|
CHAR16 *FirmwareVolumesStr;
|
||||||
|
UINTN *StackPointer;
|
||||||
|
|
||||||
MemorySizeStr = (CHAR16 *) FixedPcdGetPtr (PcdWinNtMemorySizeForSecMain);
|
MemorySizeStr = (CHAR16 *) FixedPcdGetPtr (PcdWinNtMemorySizeForSecMain);
|
||||||
FirmwareVolumesStr = (CHAR16 *) FixedPcdGetPtr (PcdWinNtFirmwareVolume);
|
FirmwareVolumesStr = (CHAR16 *) FixedPcdGetPtr (PcdWinNtFirmwareVolume);
|
||||||
|
@ -202,6 +203,12 @@ Returns:
|
||||||
exit (1);
|
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);
|
printf (" SEC passing in %d bytes of temp RAM to PEI\n", InitialStackMemorySize);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue