X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-kexec/blobdiff_plain/4e93cb000786b18ffd9929f33055cad2a7cebbcf..HEAD:/relocate_kernel.S diff --git a/relocate_kernel.S b/relocate_kernel.S index 61930eb..f2b7868 100644 --- a/relocate_kernel.S +++ b/relocate_kernel.S @@ -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