From nobody Wed Dec 25 01:33:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1509591588720453.8269834153483; Wed, 1 Nov 2017 19:59:48 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EE0C92035D116; Wed, 1 Nov 2017 19:55:52 -0700 (PDT) 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 DDBD52034A7D2 for ; Wed, 1 Nov 2017 19:55:50 -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:44 -0700 Received: from lgao4-mobl1.ccr.corp.intel.com ([10.254.211.212]) by fmsmga006.fm.intel.com with ESMTP; 01 Nov 2017 19:59:43 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; 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 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,331,1505804400"; d="scan'208";a="170798380" From: Liming Gao To: edk2-devel@lists.01.org Date: Thu, 2 Nov 2017 10:59:13 +0800 Message-Id: <20171102025915.23160-2-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: [edk2] [Patch 1/3] MdeModulePkg: Add new PCD PcdInitValueInTempStack 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D740 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao Reviewed-by: Ard Biesheuvel --- MdeModulePkg/MdeModulePkg.dec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 20a07be96e..b69dd24ce5 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -883,6 +883,12 @@ # @Prompt Enable NULL address detection. gEfiMdeModulePkgTokenSpaceGuid.PcdNullPointerDetectionPropertyMask|0x0|U= INT8|0x30001050 =20 + ## Init Value in Temp Stack to be shared between SEC and PEI_CORE
+ # SEC fills the full temp stack with this values. When switch stack, Pei= Core can check + # this value in the temp stack to know how many stack has been used.=20 + # @Prompt Init Value in Temp Stack + gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack|0x5AA55AA5|UINT32= |0x30001051 + [PcdsFixedAtBuild, PcdsPatchableInModule] ## Dynamic type PCD can be registered callback function for Pcd setting = action. # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum number of= callback function --=20 2.11.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Wed Dec 25 01:33:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1509591591592437.64748471660243; Wed, 1 Nov 2017 19:59:51 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 388872035D119; Wed, 1 Nov 2017 19:55:55 -0700 (PDT) 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 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 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; 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 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,331,1505804400"; d="scan'208";a="170798383" 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: [edk2] [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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao Reviewed-by: Ard Biesheuvel --- 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/C= ore/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, EITHE= R EXPRESS OR IMPLIED. =20 #include "PeiMain.h" =20 -/// -/// temporary memory is filled with this initial value during SEC phase -/// -#define INIT_CAR_VALUE 0x5AA55AA5 - /** =20 Discover all Peims and optional Apriori file in one FV. There is at most= one @@ -680,7 +675,7 @@ PeiCheckAndSwitchStack ( =20 for (StackPointer =3D (UINT32*)SecCoreData->StackBase; (StackPointer < (UINT32*)((UINTN)SecCoreData->StackBase + SecCo= reData->StackSize)) \ - && (*StackPointer =3D=3D INIT_CAR_VALUE); + && (*StackPointer =3D=3D PcdGet32 (PcdInitValueInTempStack)); StackPointer ++); =20 DEBUG ((DEBUG_INFO, "Temp Stack : BaseAddress=3D0x%p Length=3D0x%X\n= ", SecCoreData->StackBase, (UINT32)SecCoreData->StackSize)); diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf b/MdeModulePkg/Core/Pei/PeiM= ain.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=20 gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnBoot = ## CONSUMES=20 + gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack = ## CONSUMES =20 # [BootMode] # S3_RESUME ## SOMETIMES_CONSUMES --=20 2.11.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Wed Dec 25 01:33:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1509591593776110.51447689874374; Wed, 1 Nov 2017 19:59:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 74B232035D11B; Wed, 1 Nov 2017 19:55:55 -0700 (PDT) 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 A81A921C913A8 for ; Wed, 1 Nov 2017 19:55:53 -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:47 -0700 Received: from lgao4-mobl1.ccr.corp.intel.com ([10.254.211.212]) by fmsmga006.fm.intel.com with ESMTP; 01 Nov 2017 19:59:45 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; 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 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,331,1505804400"; d="scan'208";a="170798386" From: Liming Gao To: edk2-devel@lists.01.org Date: Thu, 2 Nov 2017 10:59:15 +0800 Message-Id: <20171102025915.23160-4-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: [edk2] [Patch 3/3] Nt32Pkg: Update SecMain 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao Reviewed-by: Ard Biesheuvel --- Nt32Pkg/Sec/SecMain.c | 2 +- Nt32Pkg/Sec/SecMain.inf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 =3D (UINTN*) (UINTN) InitialStackMemory; StackPointer < (UINTN*) ((UINTN)InitialStackMemory + (SIZE_T) Initi= alStackMemorySize); StackPointer ++) { - *StackPointer =3D 0x5AA55AA5; + *StackPointer =3D PcdGet32 (PcdInitValueInTempStack); } =20 SecPrint (" SEC passing in %d bytes of temp RAM to PEI\n", InitialStack= MemorySize); 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 =20 [BuildOptions] MSFT:*_*_IA32_DLINK_FLAGS =3D=3D /out:"$(BIN_DIR)\SecMain.exe" /base:0x1= 0000000 /pdb:"$(BIN_DIR)\SecMain.pdb" /LIBPATH:"$(VCINSTALLDIR)\Lib" /LIBPA= TH:"$(VCINSTALLDIR)\PlatformSdk\Lib" /LIBPATH:"%UniversalCRTSdkDir%lib\%UCR= TVersion%\ucrt\x86" /LIBPATH:"%WindowsSdkDir%lib\%WindowsSDKLibVersion%\um\= x86" /NOLOGO /SUBSYSTEM:CONSOLE /NODEFAULTLIB /IGNORE:4086 /MAP /OPT:REF /D= EBUG /MACHINE:I386 /LTCG Kernel32.lib MSVCRTD.lib Gdi32.lib User32.lib Winm= m.lib Advapi32.lib --=20 2.11.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel