From: Liming Gao Date: Thu, 2 Nov 2017 02:59:14 +0000 (+0800) Subject: MdeModulePkg: Update PeiCore consumes PCD to get the init value in temp stack X-Git-Tag: edk2-stable201903~3144 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=981270718656912c0d13fe02f562fe562206be31 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 Reviewed-by: Ard Biesheuvel Reviewed-by: Star Zeng --- 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