1cdaa633fSAndre Przywara /* 2cdaa633fSAndre Przywara * Configuration settings for the Allwinner A64 (sun50i) CPU 3cdaa633fSAndre Przywara * 4cdaa633fSAndre Przywara * SPDX-License-Identifier: GPL-2.0+ 5cdaa633fSAndre Przywara */ 6cdaa633fSAndre Przywara 7*83843c9bSAndre Przywara #if defined(CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER) && !defined(CONFIG_SPL_BUILD) 8cdaa633fSAndre Przywara /* reserve space for BOOT0 header information */ 9ce62e57fSAndre Przywara b reset 10cdaa633fSAndre Przywara .space 1532 11*83843c9bSAndre Przywara #elif defined(CONFIG_ARM_BOOT_HOOK_RMR) 12*83843c9bSAndre Przywara /* 13*83843c9bSAndre Przywara * Switch into AArch64 if needed. 14*83843c9bSAndre Przywara * Refer to arch/arm/mach-sunxi/rmr_switch.S for the original source. 15*83843c9bSAndre Przywara */ 16*83843c9bSAndre Przywara tst x0, x0 // this is "b #0x84" in ARM 17*83843c9bSAndre Przywara b reset 18*83843c9bSAndre Przywara .space 0x7c 19*83843c9bSAndre Przywara .word 0xe59f1024 // ldr r1, [pc, #36] ; 0x170000a0 20*83843c9bSAndre Przywara .word 0xe59f0024 // ldr r0, [pc, #36] ; CONFIG_*_TEXT_BASE 21*83843c9bSAndre Przywara .word 0xe5810000 // str r0, [r1] 22*83843c9bSAndre Przywara .word 0xf57ff04f // dsb sy 23*83843c9bSAndre Przywara .word 0xf57ff06f // isb sy 24*83843c9bSAndre Przywara .word 0xee1c0f50 // mrc 15, 0, r0, cr12, cr0, {2} ; RMR 25*83843c9bSAndre Przywara .word 0xe3800003 // orr r0, r0, #3 26*83843c9bSAndre Przywara .word 0xee0c0f50 // mcr 15, 0, r0, cr12, cr0, {2} ; RMR 27*83843c9bSAndre Przywara .word 0xf57ff06f // isb sy 28*83843c9bSAndre Przywara .word 0xe320f003 // wfi 29*83843c9bSAndre Przywara .word 0xeafffffd // b @wfi 30*83843c9bSAndre Przywara .word 0x017000a0 // writeable RVBAR mapping address 31*83843c9bSAndre Przywara #ifdef CONFIG_SPL_BUILD 32*83843c9bSAndre Przywara .word CONFIG_SPL_TEXT_BASE 33*83843c9bSAndre Przywara #else 34*83843c9bSAndre Przywara .word CONFIG_SYS_TEXT_BASE 35*83843c9bSAndre Przywara #endif 36*83843c9bSAndre Przywara #else 37*83843c9bSAndre Przywara /* normal execution */ 38*83843c9bSAndre Przywara b reset 39*83843c9bSAndre Przywara #endif 40