From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 21FF72034A87E for ; Wed, 1 Nov 2017 19:55:52 -0700 (PDT) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Nov 2017 19:59:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,331,1505804400"; d="scan'208";a="170798383" Received: from lgao4-mobl1.ccr.corp.intel.com ([10.254.211.212]) by fmsmga006.fm.intel.com with ESMTP; 01 Nov 2017 19:59:44 -0700 From: Liming Gao To: edk2-devel@lists.01.org Date: Thu, 2 Nov 2017 10:59:14 +0800 Message-Id: <20171102025915.23160-3-liming.gao@intel.com> X-Mailer: git-send-email 2.11.0.windows.1 In-Reply-To: <20171102025915.23160-1-liming.gao@intel.com> References: <20171102025915.23160-1-liming.gao@intel.com> Subject: [Patch 2/3] MdeModulePkg: Update PeiCore consumes PCD to get the init value in temp stack X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Nov 2017 02:55:52 -0000 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao --- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 7 +------ MdeModulePkg/Core/Pei/PeiMain.inf | 1 + 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 -- 2.11.0.windows.1