]> xenbits.xensource.com Git - people/liuw/xtf.git/commitdiff
More pagetable order and entries information
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sun, 5 Jun 2016 11:22:57 +0000 (12:22 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 12 Jul 2016 09:51:17 +0000 (10:51 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
include/arch/x86/page-pae.h
include/arch/x86/page-pse.h
include/arch/x86/page.h

index 76543d4293034a1a115c8883bc08a64a52a43dfa..a0751ed125dceea7b847672ef535945796ca22b5 100644 (file)
@@ -9,6 +9,9 @@
 /** PAE pagetable entries are 64 bits wide. */
 #define PAE_PTE_SZ 8
 
+/** PAE pagetables encode 9 bits of index. */
+#define PAE_PT_ORDER     9
+
 /** @{ */
 /** All PAE pagetables contain 512 entries. */
 #define PAE_L1_PT_ENTRIES (PAGE_SIZE / PAE_PTE_SZ)
index a661ebbef46e072ee6a64696d989f6ad721d4cc2..c21fe96df55048d054e8e4cae3547aa977af2948 100644 (file)
@@ -9,6 +9,9 @@
 /** PSE pagetable entries are 32 bits wide. */
 #define PSE_PTE_SZ 4
 
+/** PAE pagetables encode 10 bits of index. */
+#define PSE_PT_ORDER 10
+
 /** @{ */
 /** All PSE pagetables contain 1024 entries. */
 #define PSE_L1_PT_ENTRIES (PAGE_SIZE / PSE_PTE_SZ)
index d688b8d04007ba85b619d94f7e2c4522a9b8a510..e47dc7efbf69bc6bbce90113e358d925f77a3b90 100644 (file)
@@ -16,6 +16,7 @@
 
 #define PAGE_ORDER_4K           0
 #define PAGE_ORDER_2M           9
+#define PAGE_ORDER_4M           10
 #define PAGE_ORDER_1G           18
 
 #define _PAGE_PRESENT           0x0001
 
 #if CONFIG_PAGING_LEVELS == 2 /* PSE Paging */
 
+#define PT_ORDER PSE_PT_ORDER
+
 #define L1_PT_SHIFT PSE_L1_PT_SHIFT
 #define L2_PT_SHIFT PSE_L2_PT_SHIFT
 
+#define L1_PT_ENTRIES PSE_L1_PT_ENTRIES
+#define L2_PT_ENTRIES PSE_L2_PT_ENTRIES
+
 #else /* CONFIG_PAGING_LEVELS == 2 */ /* PAE Paging */
 
+#define PT_ORDER PAE_PT_ORDER
+
 #define L1_PT_SHIFT PAE_L1_PT_SHIFT
 #define L2_PT_SHIFT PAE_L2_PT_SHIFT
 
+#define L1_PT_ENTRIES PAE_L1_PT_ENTRIES
+#define L2_PT_ENTRIES PAE_L2_PT_ENTRIES
+
 #endif /* !CONFIG_PAGING_LEVELS == 2 */
 
 #if CONFIG_PAGING_LEVELS >= 3 /* PAE Paging */
 
 #define L3_PT_SHIFT PAE_L3_PT_SHIFT
 
+#define L3_PT_ENTRIES PAE_L3_PT_ENTRIES
+
 #endif /* CONFIG_PAGING_LEVELS >= 3 */
 
 #if CONFIG_PAGING_LEVELS >= 4 /* PAE Paging */
 
 #define L4_PT_SHIFT PAE_L4_PT_SHIFT
 
+#define L4_PT_ENTRIES PAE_L4_PT_ENTRIES
+
 #endif /* CONFIG_PAGING_LEVELS >= 4 */