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.31; helo=mga06.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 4E1CD2034CF70 for ; Sun, 22 Oct 2017 17:47:22 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP; 22 Oct 2017 17:51:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,420,1503385200"; d="scan'208";a="1208758187" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.55]) by fmsmga001.fm.intel.com with ESMTP; 22 Oct 2017 17:51:03 -0700 From: Jian J Wang To: edk2-devel@lists.01.org Cc: Star Zeng , Eric Dong , Jiewen Yao Date: Mon, 23 Oct 2017 08:50:51 +0800 Message-Id: <20171023005054.7528-4-jian.j.wang@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20171023005054.7528-1-jian.j.wang@intel.com> References: <20171023005054.7528-1-jian.j.wang@intel.com> Subject: [PATCH v3 3/6] MdeModulePkg/MdeModulePkg.dec, .uni: Add Protocol, 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: Mon, 23 Oct 2017 00:47:22 -0000 > v3 > According to Jiewen's feedback, add new protocol definition > gEdkiiSmmMemoryAttributeProtocolGuid 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 | 60 +++++++++++++++++++++++++++++++++++++++++++ MdeModulePkg/MdeModulePkg.uni | 58 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index a3c0633ee1..c0d8e24ce3 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -556,6 +556,9 @@ ## Include/Protocol/IoMmu.h gEdkiiIoMmuProtocolGuid = { 0x4e939de9, 0xd948, 0x4b0f, { 0x88, 0xed, 0xe6, 0xe1, 0xce, 0x51, 0x7c, 0x1e } } + ## Include/Protocol/SmmMemoryAttribute.h + gEdkiiSmmMemoryAttributeProtocolGuid = { 0x69b792ea, 0x39ce, 0x402d, { 0xa2, 0xa6, 0xf7, 0x21, 0xde, 0x35, 0x1d, 0xfe } } + # # [Error.gEfiMdeModulePkgTokenSpaceGuid] # 0x80000001 | Invalid value provided. @@ -867,6 +870,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