]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Move arch/x86/hvm_pagetables.S into arch/x86/hvm/ directory
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Apr 2016 18:40:02 +0000 (19:40 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Apr 2016 18:40:02 +0000 (19:40 +0100)
This is a more appropriate place for it to live.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
arch/x86/hvm/pagetables.S [new file with mode: 0644]
arch/x86/hvm_pagetables.S [deleted file]
build/files.mk

diff --git a/arch/x86/hvm/pagetables.S b/arch/x86/hvm/pagetables.S
new file mode 100644 (file)
index 0000000..bb74233
--- /dev/null
@@ -0,0 +1,77 @@
+#include <xtf/asm_macros.h>
+
+#include <arch/x86/page.h>
+
+#define PAGE_COMMON _PAGE_DIRTY + _PAGE_ACCESSED + _PAGE_USER + _PAGE_RW + _PAGE_PRESENT
+
+#define PAE_IDX(sym) ((. - (sym)) / PAE_PTE_SZ)
+#define PSE_IDX(sym) ((. - (sym)) / PSE_PTE_SZ)
+
+        .data
+        .p2align PAGE_SHIFT
+
+/* PAE mappings of first 2M of memory in 4k pages. Uses 1x 4k page. */
+GLOBAL(pae_l1_identmap)
+        .long 0, 0 /* Unmap page at 0 to catch errors with NULL pointers. */
+        .rept PAE_L1_PT_ENTRIES - 1
+        .long (PAE_IDX(pae_l1_identmap) << PAE_L1_PT_SHIFT) + PAGE_COMMON
+        .long 0
+        .endr
+SIZE(pae_l1_identmap)
+
+/* PAE mappings up to 4G, mostly in 2M superpages. Uses 4x 4k pages. */
+GLOBAL(pae_l2_identmap)
+        .long pae_l1_identmap + PAGE_COMMON
+        .long 0
+        .rept (4 * PAE_L2_PT_ENTRIES) - 1
+        .long (PAE_IDX(pae_l2_identmap) << PAE_L2_PT_SHIFT) + _PAGE_PSE + PAGE_COMMON
+        .long 0
+        .endr
+SIZE(pae_l2_identmap)
+
+/* PAE l3 pagetable.  Maps 4x l2 tables. */
+GLOBAL(pae_l3_identmap)
+        .rept 4
+        .long pae_l2_identmap + (PAE_IDX(pae_l3_identmap) << PAGE_SHIFT) + PAGE_COMMON
+        .long 0
+        .endr
+        .fill PAE_L3_PT_ENTRIES - 4, 8, 0
+SIZE(pae_l3_identmap)
+
+/* PAE l4 pagetable.  Maps 1x l3 table. */
+GLOBAL(pae_l4_identmap)
+        .long pae_l3_identmap + PAGE_COMMON
+        .long 0
+        .fill PAE_L4_PT_ENTRIES - 1, 8, 0
+SIZE(pae_l4_identmap)
+
+/* PSE mappings of the first 4M of memory in 4k pages.  Uses 1x 4k page. */
+GLOBAL(pse_l1_identmap)
+        .long 0 /* Unmap page at 0 to catch errors with NULL pointers. */
+        .rept PSE_L1_PT_ENTRIES - 1
+        .long (PSE_IDX(pse_l1_identmap) << PSE_L1_PT_SHIFT) + PAGE_COMMON
+        .endr
+SIZE(pse_l1_identmap)
+
+/* PSE mappings up to 4G, mostly in 4M superpages.  Uses 1x 4k page. */
+GLOBAL(pse_l2_identmap)
+        .long pse_l1_identmap + PAGE_COMMON
+        .rept PSE_L2_PT_ENTRIES - 1
+        .long (PSE_IDX(pse_l2_identmap) << PSE_L2_PT_SHIFT) + _PAGE_PSE + PAGE_COMMON
+        .endr
+SIZE(pse_l1_identmap)
+
+/* PAE l3 32bit quad.  Contains 4 64bit entries. */
+GLOBAL(pae32_l3_identmap)
+        .rept PAE32_L3_ENTRIES
+        .long pae_l2_identmap + (PAE_IDX(pae32_l3_identmap) << PAGE_SHIFT) + _PAGE_PRESENT
+        .long 0
+        .endr
+SIZE(pae32_l3_identmap)
+
+/*
+ * Local variables:
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/arch/x86/hvm_pagetables.S b/arch/x86/hvm_pagetables.S
deleted file mode 100644 (file)
index bb74233..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <xtf/asm_macros.h>
-
-#include <arch/x86/page.h>
-
-#define PAGE_COMMON _PAGE_DIRTY + _PAGE_ACCESSED + _PAGE_USER + _PAGE_RW + _PAGE_PRESENT
-
-#define PAE_IDX(sym) ((. - (sym)) / PAE_PTE_SZ)
-#define PSE_IDX(sym) ((. - (sym)) / PSE_PTE_SZ)
-
-        .data
-        .p2align PAGE_SHIFT
-
-/* PAE mappings of first 2M of memory in 4k pages. Uses 1x 4k page. */
-GLOBAL(pae_l1_identmap)
-        .long 0, 0 /* Unmap page at 0 to catch errors with NULL pointers. */
-        .rept PAE_L1_PT_ENTRIES - 1
-        .long (PAE_IDX(pae_l1_identmap) << PAE_L1_PT_SHIFT) + PAGE_COMMON
-        .long 0
-        .endr
-SIZE(pae_l1_identmap)
-
-/* PAE mappings up to 4G, mostly in 2M superpages. Uses 4x 4k pages. */
-GLOBAL(pae_l2_identmap)
-        .long pae_l1_identmap + PAGE_COMMON
-        .long 0
-        .rept (4 * PAE_L2_PT_ENTRIES) - 1
-        .long (PAE_IDX(pae_l2_identmap) << PAE_L2_PT_SHIFT) + _PAGE_PSE + PAGE_COMMON
-        .long 0
-        .endr
-SIZE(pae_l2_identmap)
-
-/* PAE l3 pagetable.  Maps 4x l2 tables. */
-GLOBAL(pae_l3_identmap)
-        .rept 4
-        .long pae_l2_identmap + (PAE_IDX(pae_l3_identmap) << PAGE_SHIFT) + PAGE_COMMON
-        .long 0
-        .endr
-        .fill PAE_L3_PT_ENTRIES - 4, 8, 0
-SIZE(pae_l3_identmap)
-
-/* PAE l4 pagetable.  Maps 1x l3 table. */
-GLOBAL(pae_l4_identmap)
-        .long pae_l3_identmap + PAGE_COMMON
-        .long 0
-        .fill PAE_L4_PT_ENTRIES - 1, 8, 0
-SIZE(pae_l4_identmap)
-
-/* PSE mappings of the first 4M of memory in 4k pages.  Uses 1x 4k page. */
-GLOBAL(pse_l1_identmap)
-        .long 0 /* Unmap page at 0 to catch errors with NULL pointers. */
-        .rept PSE_L1_PT_ENTRIES - 1
-        .long (PSE_IDX(pse_l1_identmap) << PSE_L1_PT_SHIFT) + PAGE_COMMON
-        .endr
-SIZE(pse_l1_identmap)
-
-/* PSE mappings up to 4G, mostly in 4M superpages.  Uses 1x 4k page. */
-GLOBAL(pse_l2_identmap)
-        .long pse_l1_identmap + PAGE_COMMON
-        .rept PSE_L2_PT_ENTRIES - 1
-        .long (PSE_IDX(pse_l2_identmap) << PSE_L2_PT_SHIFT) + _PAGE_PSE + PAGE_COMMON
-        .endr
-SIZE(pse_l1_identmap)
-
-/* PAE l3 32bit quad.  Contains 4 64bit entries. */
-GLOBAL(pae32_l3_identmap)
-        .rept PAE32_L3_ENTRIES
-        .long pae_l2_identmap + (PAE_IDX(pae32_l3_identmap) << PAGE_SHIFT) + _PAGE_PRESENT
-        .long 0
-        .endr
-SIZE(pae32_l3_identmap)
-
-/*
- * Local variables:
- * tab-width: 8
- * indent-tabs-mode: nil
- * End:
- */
index 65b32b81614b94f246bd5c8a90f78af182808563..f411c8a1660baa6994848aa64d9dbe95a00c22fa 100644 (file)
@@ -23,7 +23,7 @@ obj-perenv += $(ROOT)/arch/x86/hypercall_page.o
 
 
 # HVM specific objects
-obj-hvm += $(ROOT)/arch/x86/hvm_pagetables.o
+obj-hvm += $(ROOT)/arch/x86/hvm/pagetables.o
 obj-hvm += $(ROOT)/arch/x86/hvm/traps.o
 $(foreach env,$(HVM_ENVIRONMENTS),$(eval obj-$(env) += $(obj-hvm)))