From nobody Thu Dec 26 00:25:31 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 1508246985444375.55202354225014; Tue, 17 Oct 2017 06:29:45 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DA7612095E51F; Tue, 17 Oct 2017 06:26:05 -0700 (PDT) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 561352095E51F for ; Tue, 17 Oct 2017 06:26:03 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 17 Oct 2017 06:29:39 -0700 Received: from jwang36-mobl2.ccr.corp.intel.com ([10.254.211.53]) by fmsmga002.fm.intel.com with ESMTP; 17 Oct 2017 06:29:37 -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=134.134.136.100; helo=mga07.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,391,1503385200"; d="scan'208";a="1231731248" From: Jian J Wang To: edk2-devel@lists.01.org Date: Tue, 17 Oct 2017 21:29:21 +0800 Message-Id: <20171017132924.19732-4-jian.j.wang@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20171017132924.19732-1-jian.j.wang@intel.com> References: <20171017132924.19732-1-jian.j.wang@intel.com> Subject: [edk2] [PATCH v2 3/6] MdeModulePkg/MdeModulePkg.dec, .uni: Add heap guard related PCDs and string tokens 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: , Cc: Jiewen Yao , Eric Dong , Star Zeng 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" Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Suggested-by: Ayellet Wolman Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 57 +++++++++++++++++++++++++++++++++++++++= +++ MdeModulePkg/MdeModulePkg.uni | 58 +++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 115 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index a3c0633ee1..99f5d88627 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -867,6 +867,63 @@ # @ValidList 0x80000006 | 0x03058002 gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable|0x03058002|UINT32= |0x30001040 =20 + ## Indicates which type allocation need guard page. + # Below is bit mask for this PCD: (Order is same as UEFI spec)
+ # EfiReservedMemoryType 0x0000000000000001
+ # EfiLoaderCode 0x0000000000000002
+ # EfiLoaderData 0x0000000000000004
+ # EfiBootServicesCode 0x0000000000000008
+ # EfiBootServicesData 0x0000000000000010
+ # EfiRuntimeServicesCode 0x0000000000000020
+ # EfiRuntimeServicesData 0x0000000000000040
+ # EfiConventionalMemory 0x0000000000000080
+ # EfiUnusableMemory 0x0000000000000100
+ # EfiACPIReclaimMemory 0x0000000000000200
+ # EfiACPIMemoryNVS 0x0000000000000400
+ # EfiMemoryMappedIO 0x0000000000000800
+ # EfiMemoryMappedIOPortSpace 0x0000000000001000
+ # EfiPalCode 0x0000000000002000
+ # EfiPersistentMemory 0x0000000000004000
+ # OEM Reserved 0x4000000000000000
+ # OS Reserved 0x8000000000000000
+ # e.g. LoaderCode+LoaderData+BootServicesCode+BootServicesData are neede= d, 0x1E should be used.
+ # @Prompt The memory type mask for Page Guard. + gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPageType|0x0|UINT64|0x30001051 + + ## Indicates which type allocation need guard page. + # Below is bit mask for this PCD: (Order is same as UEFI spec)
+ # EfiReservedMemoryType 0x0000000000000001
+ # EfiLoaderCode 0x0000000000000002
+ # EfiLoaderData 0x0000000000000004
+ # EfiBootServicesCode 0x0000000000000008
+ # EfiBootServicesData 0x0000000000000010
+ # EfiRuntimeServicesCode 0x0000000000000020
+ # EfiRuntimeServicesData 0x0000000000000040
+ # EfiConventionalMemory 0x0000000000000080
+ # EfiUnusableMemory 0x0000000000000100
+ # EfiACPIReclaimMemory 0x0000000000000200
+ # EfiACPIMemoryNVS 0x0000000000000400
+ # EfiMemoryMappedIO 0x0000000000000800
+ # EfiMemoryMappedIOPortSpace 0x0000000000001000
+ # EfiPalCode 0x0000000000002000
+ # EfiPersistentMemory 0x0000000000004000
+ # OEM Reserved 0x4000000000000000
+ # OS Reserved 0x8000000000000000
+ # e.g. LoaderCode+LoaderData+BootServicesCode+BootServicesData are neede= d, 0x1E should be used.
+ # @Prompt The memory type mask for Pool Guard. + gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPoolType|0x0|UINT64|0x30001052 + + ## This mask is to control Heap Guard behavior. + # BIT0 - Enable UEFI page guard.
+ # BIT1 - Enable UEFI pool guard.
+ # BIT2 - Enable SMM page guard.
+ # BIT3 - Enable SMM pool guard.
+ # BIT7 - The direction of Guard Page for Pool Guard. + # 0 - The returned pool is adjacent to the bottom guard page. + # 1 - The returned pool is adjacent to the top guard page.
+ # @Prompt The Heap Guard feature mask + gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask|0x0|UINT8|0x3000= 1053 + [PcdsFixedAtBuild, PcdsPatchableInModule] ## Dynamic type PCD can be registered callback function for Pcd setting = action. # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum number of= callback function diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni index d6015de75f..74c27039bf 100644 --- a/MdeModulePkg/MdeModulePkg.uni +++ b/MdeModulePkg/MdeModulePkg.uni @@ -1127,3 +1127,61 @@ = "enabled on AMD processors supporting the Secure= Encrypted Virtualization (SEV) feature.\n" = "This mask should be applied when creating 1:1 v= irtual to physical mapping tables." =20 +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPageType_PROMPT #l= anguage en-US "The memory type mask for Page Guard" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPageType_HELP #l= anguage en-US "Indicates which type allocation need guard page.\n" + = " Below is bit mask for this PCD: (Order is same as UEFI spec= )
\n" + = " EfiReservedMemoryType 0x0000000000000001\n" + = " EfiLoaderCode 0x0000000000000002\n" + = " EfiLoaderData 0x0000000000000004\n" + = " EfiBootServicesCode 0x0000000000000008\n" + = " EfiBootServicesData 0x0000000000000010\n" + = " EfiRuntimeServicesCode 0x0000000000000020\n" + = " EfiRuntimeServicesData 0x0000000000000040\n" + = " EfiConventionalMemory 0x0000000000000080\n" + = " EfiUnusableMemory 0x0000000000000100\n" + = " EfiACPIReclaimMemory 0x0000000000000200\n" + = " EfiACPIMemoryNVS 0x0000000000000400\n" + = " EfiMemoryMappedIO 0x0000000000000800\n" + = " EfiMemoryMappedIOPortSpace 0x0000000000001000\n" + = " EfiPalCode 0x0000000000002000\n" + = " EfiPersistentMemory 0x0000000000004000\n" + = " OEM Reserved 0x4000000000000000\n" + = " OS Reserved 0x8000000000000000\n" + = " e.g. LoaderCode+LoaderData+BootServicesCode+BootServicesDat= a are needed, 0x1E should be used.
" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPoolType_PROMPT #l= anguage en-US "The memory type mask for Pool Guard" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPoolType_HELP #l= anguage en-US "Indicates which type allocation need guard page.\n" + = " Below is bit mask for this PCD: (Order is same as UEFI spec= )
\n" + = " EfiReservedMemoryType 0x0000000000000001\n" + = " EfiLoaderCode 0x0000000000000002\n" + = " EfiLoaderData 0x0000000000000004\n" + = " EfiBootServicesCode 0x0000000000000008\n" + = " EfiBootServicesData 0x0000000000000010\n" + = " EfiRuntimeServicesCode 0x0000000000000020\n" + = " EfiRuntimeServicesData 0x0000000000000040\n" + = " EfiConventionalMemory 0x0000000000000080\n" + = " EfiUnusableMemory 0x0000000000000100\n" + = " EfiACPIReclaimMemory 0x0000000000000200\n" + = " EfiACPIMemoryNVS 0x0000000000000400\n" + = " EfiMemoryMappedIO 0x0000000000000800\n" + = " EfiMemoryMappedIOPortSpace 0x0000000000001000\n" + = " EfiPalCode 0x0000000000002000\n" + = " EfiPersistentMemory 0x0000000000004000\n" + = " OEM Reserved 0x4000000000000000\n" + = " OS Reserved 0x8000000000000000\n" + = " e.g. LoaderCode+LoaderData+BootServicesCode+BootServicesDat= a are needed, 0x1E should be used.
" + + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPropertyMask_PROMPT= #language en-US "The Heap Guard feature mask" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPropertyMask_HELP = #language en-US "This mask is to control Heap Guard behavior.\n" + = " BIT0 - Enable UEFI page guard.
\n" + = " BIT1 - Enable UEFI pool guard.
\n" + = " BIT2 - Enable SMM page guard.
\n" + = " BIT3 - Enable SMM pool guard.
\n" + = " BIT7 - The direction of Guard Page for Pool Guard.\n" + = " 0 - The returned pool is adjacent to the botto= m guard page.
\n" + = " 1 - The returned pool is adjacent to the top g= uard page.
" + --=20 2.14.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel