]> git.sur5r.net Git - u-boot/blobdiff - arch/x86/lib/physmem.c
x86: Correct a few progress message nits
[u-boot] / arch / x86 / lib / physmem.c
index b57b2c30fe333ba6ac1cfc44a6689ff440b94294..c3c709ec072aa2fe2e9963040fb3dd8fefd948be 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <common.h>
 #include <physmem.h>
+#include <asm/cpu.h>
 #include <linux/compiler.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -112,41 +113,13 @@ static void x86_phys_enter_paging(void)
                x86_phys_map_page(page_addr, page_addr, 0);
        }
 
-       /* Turn on paging */
-       __asm__ __volatile__(
-               /* Load the page table address */
-               "movl   %0, %%cr3\n\t"
-               /* Enable pae */
-               "movl   %%cr4, %%eax\n\t"
-               "orl    $0x00000020, %%eax\n\t"
-               "movl   %%eax, %%cr4\n\t"
-               /* Enable paging */
-               "movl   %%cr0, %%eax\n\t"
-               "orl    $0x80000000, %%eax\n\t"
-               "movl   %%eax, %%cr0\n\t"
-               :
-               : "r" (pdpt)
-               : "eax"
-       );
+       cpu_enable_paging_pae((ulong)pdpt);
 }
 
 /* Disable paging and PAE mode. */
 static void x86_phys_exit_paging(void)
 {
-       /* Turn off paging */
-       __asm__ __volatile__ (
-               /* Disable paging */
-               "movl   %%cr0, %%eax\n\t"
-               "andl   $0x7fffffff, %%eax\n\t"
-               "movl   %%eax, %%cr0\n\t"
-               /* Disable pae */
-               "movl   %%cr4, %%eax\n\t"
-               "andl   $0xffffffdf, %%eax\n\t"
-               "movl   %%eax, %%cr4\n\t"
-               :
-               :
-               : "eax"
-       );
+       cpu_disable_paging_pae();
 }
 
 /*