]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Drop CONFIG_PAGING_PAE
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 23 Feb 2016 11:43:19 +0000 (11:43 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 24 Mar 2016 12:24:55 +0000 (12:24 +0000)
It can uniquely be determined from PAGING_LEVELS == 3 or 4, and doing so
simplifies the early ASM.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
arch/x86/boot/head_hvm.S
include/arch/x86/config.h

index 86909ac447c03796359fe761387996a336c1372c..811c7955331aa0ea35471ae41edf53a20f991ee8 100644 (file)
@@ -8,22 +8,24 @@
         .code32                 /* Always starts in 32bit flat mode. */
 GLOBAL(_start)                  /* HVM common setup. */
 
-#ifdef CONFIG_PAGING_PAE        /* CR4.PAE = 1 */
+#if CONFIG_PAGING_LEVELS > 0    /* Paging setup for CR3 and CR4 */
+
+#if CONFIG_PAGING_LEVELS == 4   /* 64bit PAE, 4 levels */
+
         mov $X86_CR4_PAE, %eax
-        mov %eax, %cr4
-#endif /* CONFIG_PAGING_PAE */
+        mov $l4_identmap, %ebx
 
-#if CONFIG_PAGING_LEVELS > 0    /* CR3 = pagetable */
+#elif CONFIG_PAGING_LEVELS == 3 /* 32bit PAE, 3 levels */
+
+        mov $X86_CR4_PAE, %eax
+        mov $l3_paemap, %ebx
 
-#if CONFIG_PAGING_LEVELS == 4
-        mov $l4_identmap, %eax
-#elif CONFIG_PAGING_LEVELS == 3 && defined CONFIG_PAGING_PAE
-        mov $l3_paemap, %eax
 #else
 # error Bad paging mode
 #endif
 
-        mov %eax, %cr3
+        mov %eax, %cr4
+        mov %ebx, %cr3
 #endif /* CONFIG_PAGING_LEVELS > 0 */
 
 #ifdef __x86_64__               /* EFER.LME = 1 */
index e251944e51375c5b022d9974bc527b736f238894..fa0e9b67c690151a824e13b3c7afd54435f8bdca 100644 (file)
@@ -5,7 +5,6 @@
  * Converts `CONFIG_ENV_$foo` into:
  * - `CONFIG_PV` or `CONFIG_HVM`
  * - `CONFIG_PAGING_LEVELS = $num`
- * - Possibly `CONFIG_PAGING_PAE`
  *
  * The `CONFIG_ENV_$foo` is then undefined, to prevent its use in general code.
  */
@@ -16,7 +15,6 @@
 
 #define CONFIG_PV
 #define CONFIG_PAGING_LEVELS 4
-#define CONFIG_PAGING_PAE
 #define ENVIRONMENT_DESCRIPTION "PV 64bit (Long mode 4 levels)"
 
 #undef CONFIG_ENV_pv64
@@ -25,7 +23,6 @@
 
 #define CONFIG_PV
 #define CONFIG_PAGING_LEVELS 3
-#define CONFIG_PAGING_PAE
 #define ENVIRONMENT_DESCRIPTION "PV 32bit (PAE 3 levels)"
 
 #undef CONFIG_ENV_pv32pae
@@ -34,7 +31,6 @@
 
 #define CONFIG_HVM
 #define CONFIG_PAGING_LEVELS 4
-#define CONFIG_PAGING_PAE
 #define ENVIRONMENT_DESCRIPTION "HVM 64bit (Long mode 4 levels)"
 
 #undef CONFIG_ENV_hvm64
@@ -43,7 +39,6 @@
 
 #define CONFIG_HVM
 #define CONFIG_PAGING_LEVELS 3
-#define CONFIG_PAGING_PAE
 #define ENVIRONMENT_DESCRIPTION "HVM 32bit (PAE 3 levels)"
 
 #undef CONFIG_ENV_hvm32pae