> 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 <jiewen....@intel.com>
Cc: Star Zeng <star.z...@intel.com>
Cc: Eric Dong <eric.d...@intel.com>
Cc: Ruiyu Ni <ruiyu...@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.w...@intel.com>
---
 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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to