summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2017-11-02 10:59:14 +0800
committerLiming Gao <liming.gao@intel.com>2017-11-03 17:45:47 +0800
commit981270718656912c0d13fe02f562fe562206be31 (patch)
tree5a86230670123a582791f6d5172690f54dae431d /MdeModulePkg/Core
parenteb3abca30855c5ec0698585e2c1f64f7853fc36e (diff)
downloadedk2-981270718656912c0d13fe02f562fe562206be31.tar.gz
edk2-981270718656912c0d13fe02f562fe562206be31.tar.bz2
edk2-981270718656912c0d13fe02f562fe562206be31.zip
MdeModulePkg: Update PeiCore 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 'MdeModulePkg/Core')
-rw-r--r--MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c7
-rw-r--r--MdeModulePkg/Core/Pei/PeiMain.inf1
2 files changed, 2 insertions, 6 deletions
diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
index 38299c5d98..467066a0bf 100644
--- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
@@ -15,11 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "PeiMain.h"
-///
-/// temporary memory is filled with this initial value during SEC phase
-///
-#define INIT_CAR_VALUE 0x5AA55AA5
-
/**
Discover all Peims and optional Apriori file in one FV. There is at most one
@@ -680,7 +675,7 @@ PeiCheckAndSwitchStack (
for (StackPointer = (UINT32*)SecCoreData->StackBase;
(StackPointer < (UINT32*)((UINTN)SecCoreData->StackBase + SecCoreData->StackSize)) \
- && (*StackPointer == INIT_CAR_VALUE);
+ && (*StackPointer == PcdGet32 (PcdInitValueInTempStack));
StackPointer ++);
DEBUG ((DEBUG_INFO, "Temp Stack : BaseAddress=0x%p Length=0x%X\n", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize));
diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf b/MdeModulePkg/Core/Pei/PeiMain.inf
index 21ce2be778..7d9cdaa2f0 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.inf
+++ b/MdeModulePkg/Core/Pei/PeiMain.inf
@@ -116,6 +116,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnS3Boot ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnBoot ## CONSUMES
+ gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack ## CONSUMES
# [BootMode]
# S3_RESUME ## SOMETIMES_CONSUMES