diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-01 07:10:43 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-11-01 07:10:43 +0000 |
commit | 85e43be15eeca5087dab277ee4f3ecb4685a07b0 (patch) | |
tree | 4018bbc9d887278c821c98c3831eea8de43d7cca /Nt32Pkg/Sec/SecMain.c | |
parent | 61f21f400d4664ff5e8008a06447227fb738cc04 (diff) | |
download | edk2-85e43be15eeca5087dab277ee4f3ecb4685a07b0.zip edk2-85e43be15eeca5087dab277ee4f3ecb4685a07b0.tar.gz edk2-85e43be15eeca5087dab277ee4f3ecb4685a07b0.tar.bz2 |
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/Sec/SecMain.c')
-rw-r--r-- | Nt32Pkg/Sec/SecMain.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Nt32Pkg/Sec/SecMain.c b/Nt32Pkg/Sec/SecMain.c index 5b36dc6..3058269 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);
//
|