summaryrefslogtreecommitdiffstats
path: root/Nt32Pkg
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2017-11-02 10:59:15 +0800
committerLiming Gao <liming.gao@intel.com>2017-11-03 17:45:51 +0800
commit5cf459731f5b93dc0fd1a8a8194cff7f6d95ad78 (patch)
tree11abb958d46aa9293cf3608d4b50faae6b4c25ce /Nt32Pkg
parent981270718656912c0d13fe02f562fe562206be31 (diff)
downloadedk2-5cf459731f5b93dc0fd1a8a8194cff7f6d95ad78.tar.gz
edk2-5cf459731f5b93dc0fd1a8a8194cff7f6d95ad78.tar.bz2
edk2-5cf459731f5b93dc0fd1a8a8194cff7f6d95ad78.zip
Nt32Pkg: Update SecMain consumes PCD to get the init value in temp stack
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'Nt32Pkg')
-rw-r--r--Nt32Pkg/Sec/SecMain.c2
-rw-r--r--Nt32Pkg/Sec/SecMain.inf1
2 files changed, 2 insertions, 1 deletions
diff --git a/Nt32Pkg/Sec/SecMain.c b/Nt32Pkg/Sec/SecMain.c
index 80539faa33..74871a67c8 100644
--- a/Nt32Pkg/Sec/SecMain.c
+++ b/Nt32Pkg/Sec/SecMain.c
@@ -263,7 +263,7 @@ Returns:
for (StackPointer = (UINTN*) (UINTN) InitialStackMemory;
StackPointer < (UINTN*) ((UINTN)InitialStackMemory + (SIZE_T) InitialStackMemorySize);
StackPointer ++) {
- *StackPointer = 0x5AA55AA5;
+ *StackPointer = PcdGet32 (PcdInitValueInTempStack);
}
SecPrint (" SEC passing in %d bytes of temp RAM to PEI\n", InitialStackMemorySize);
diff --git a/Nt32Pkg/Sec/SecMain.inf b/Nt32Pkg/Sec/SecMain.inf
index 423a3c7c48..f2e1520b6d 100644
--- a/Nt32Pkg/Sec/SecMain.inf
+++ b/Nt32Pkg/Sec/SecMain.inf
@@ -65,6 +65,7 @@
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareFdSize
gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySizeForSecMain
gEfiNt32PkgTokenSpaceGuid.PcdWinNtFirmwareVolume
+ gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack
[BuildOptions]
MSFT:*_*_IA32_DLINK_FLAGS == /out:"$(BIN_DIR)\SecMain.exe" /base:0x10000000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPATH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\x86" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /DEBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winmm.lib Advapi32.lib