summaryrefslogtreecommitdiff
path: root/Nt32Pkg
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-01 07:10:43 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2007-11-01 07:10:43 +0000
commit85e43be15eeca5087dab277ee4f3ecb4685a07b0 (patch)
tree4018bbc9d887278c821c98c3831eea8de43d7cca /Nt32Pkg
parent61f21f400d4664ff5e8008a06447227fb738cc04 (diff)
downloadedk2-platforms-85e43be15eeca5087dab277ee4f3ecb4685a07b0.tar.xz
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
Diffstat (limited to 'Nt32Pkg')
-rw-r--r--Nt32Pkg/Sec/SecMain.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Nt32Pkg/Sec/SecMain.c b/Nt32Pkg/Sec/SecMain.c
index 5b36dc6a3b..3058269d38 100644
--- a/Nt32Pkg/Sec/SecMain.c
+++ b/Nt32Pkg/Sec/SecMain.c
@@ -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);
//