From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 A1C1C21EA15D5 for ; Tue, 10 Oct 2017 20:15:09 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2017 20:18:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,359,1503385200"; d="scan'208";a="145091229" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.48]) by orsmga002.jf.intel.com with ESMTP; 10 Oct 2017 20:18:36 -0700 From: Jian J Wang To: edk2-devel@lists.01.org Cc: Star Zeng , Eric Dong , Jiewen Yao , Michael Kinney , Ayellet Wolman Date: Wed, 11 Oct 2017 11:18:22 +0800 Message-Id: <20171011031824.17060-4-jian.j.wang@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20171011031824.17060-1-jian.j.wang@intel.com> References: <20171011031824.17060-1-jian.j.wang@intel.com> Subject: [PATCH 3/5] 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: , X-List-Received-Date: Wed, 11 Oct 2017 03:15:09 -0000 Cc: Star Zeng Cc: Eric Dong Cc: Jiewen Yao Cc: Michael Kinney Cc: Ayellet Wolman 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 + ## 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 needed, 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 needed, 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|0x30001053 + [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 virtual to physical mapping tables." +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPageType_PROMPT #language en-US "The memory type mask for Page Guard" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPageType_HELP #language 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+BootServicesData are needed, 0x1E should be used.
" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPoolType_PROMPT #language en-US "The memory type mask for Pool Guard" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdHeapGuardPoolType_HELP #language 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+BootServicesData 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 bottom guard page.
\n" + " 1 - The returned pool is adjacent to the top guard page.
" + -- 2.14.1.windows.1