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.24; helo=mga09.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 60CE1220EE07C for ; Mon, 4 Dec 2017 00:31:32 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Dec 2017 00:36:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,358,1508828400"; d="scan'208";a="10201539" Received: from jwang36-mobl2.ccr.corp.intel.com ([10.239.192.42]) by fmsmga001.fm.intel.com with ESMTP; 04 Dec 2017 00:36:00 -0800 From: Jian J Wang To: edk2-devel@lists.01.org Cc: Jiewen Yao , Star Zeng , Eric Dong , Ruiyu Ni Date: Mon, 4 Dec 2017 16:35:53 +0800 Message-Id: <20171204083556.19416-2-jian.j.wang@intel.com> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20171204083556.19416-1-jian.j.wang@intel.com> References: <20171204083556.19416-1-jian.j.wang@intel.com> Subject: [PATCH v2 1/4] MdeModulePkg/MdeModulePkg.dec: Add new PCDs and Guid 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, 04 Dec 2017 08:31:32 -0000 > v2: > newly added PcdPageTablePoolUnitSize is used to specify the smallest size of memory pool reserved for page table. PcdPageTablePoolAlignment is used to specify the alignment of the memory pool reserved for page table. gPageTablePoolGuid is used to identify the memory pool used for page table. These definitions are used to simplify the page table creation and protection. They are also used to make sure that DxeIpl and CpuDxe driver are using the same way to allocate page table memory. Cc: Jiewen Yao Cc: Star Zeng Cc: Eric Dong Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang --- MdeModulePkg/MdeModulePkg.dec | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 856d67aceb..075d51f807 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -392,6 +392,9 @@ ## Include/Guid/PlatformHasAcpi.h gEdkiiPlatformHasAcpiGuid = { 0xf0966b41, 0xc23f, 0x41b9, { 0x96, 0x04, 0x0f, 0xf7, 0xe1, 0x11, 0x96, 0x5a } } + ## Include/Guid/PageTablePool.h + gPageTablePoolGuid = { 0x18347A49, 0xF48B, 0x4012, {0x67, 0x1D, 0x70, 0x23, 0x76, 0x5C, 0x92, 0xAD} } + [Ppis] ## Include/Ppi/AtaController.h gPeiAtaControllerPpiGuid = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a, 0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }} @@ -949,6 +952,31 @@ # @Prompt The Heap Guard feature mask gEfiMdeModulePkgTokenSpaceGuid.PcdHeapGuardPropertyMask|0x0|UINT8|0x30001054 + ## Specifiy the size in byte of memory unit allocated for page table. + # + # This PCD is used for reserving certain amount of pages for page table + # initialization. If pages reserved at last time are used up, another amount + # of memory specified by this PCD will be allocated again, until all page + # tables are initialized. + # + # It's designed to reduce the recursive "split" action from larger + # granularity to smaller one, and simplify the page table protection. Its + # value must be the same as one of page sizes supported by the processor and + # should be larger than the size of one page table. + # + # @Prompt Size of memory unit allocated for page table. + gEfiMdeModulePkgTokenSpaceGuid.PcdPageTablePoolUnitSize|0x200000|UINT32|0x30001060 + + ## Specifiy the alignment of page table pool. + # + # This PCD is used for reserving page table pool at desired alignment boundary. + # It's designed to reduce the recursive "split" action from larger granularity + # to smaller one, and simplify the page table protection. Its value should + # not be less than PcdPageTablePoolUnitSize for IA32 processor. + # + # @Prompt Alignment of page pool memory unit. + gEfiMdeModulePkgTokenSpaceGuid.PcdPageTablePoolAlignment|0x200000|UINT32|0x30001061 + [PcdsFixedAtBuild, PcdsPatchableInModule] ## Dynamic type PCD can be registered callback function for Pcd setting action. # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum number of callback function -- 2.14.1.windows.1