]> git.zerfleddert.de Git - ms2-kexec/blobdiff - relocate_kernel.S
update offsets to new european GB kernel, set software booting from USB
[ms2-kexec] / relocate_kernel.S
index 61930eb0902941030e3e180aca40f6f82697e39e..f2b786811fb3893cbd9540b035424d35147bfdcc 100644 (file)
@@ -6,10 +6,25 @@
 
        .globl relocate_new_kernel
 relocate_new_kernel:
+       /* Disable MMU */
+       mov     ip, #0
+#ifdef CONFIG_MMU
+       mcr     p15, 0, ip, c8, c7, 0           @ invalidate I & D TLBs
+#endif
+       mrc     p15, 0, ip, c1, c0, 0           @ ctrl register
+       bic     ip, ip, #0x000f                 @ ............wcam
+       bic     ip, ip, #0x1100                 @ ...i...s........
+       mcr     p15, 0, ip, c1, c0, 0           @ ctrl register
 
        ldr     r0,kexec_indirection_page
        ldr     r1,kexec_start_address
 
+       /*
+        * If there is no indirection page (we are doing crashdumps)
+        * skip any relocation.
+        */
+       cmp     r0, #0
+       beq     2f
 
 0:     /* top, read another word for the indirection page */
        ldr     r3, [r0],#4
@@ -53,6 +68,8 @@ relocate_new_kernel:
        ldr r2,kexec_boot_atags
        mov pc,lr
 
+       .align
+
        .globl kexec_start_address
 kexec_start_address:
        .long   0x0
Impressum, Datenschutz