[U-Boot] [PATCH] arm: re-implement proper ISB instruction for ARMv7-A
Ziyuan Xu
xzy.xu at rock-chips.com
Thu Jul 28 12:13:26 CEST 2016
For ARMv7-A architecture, the valid ISB instruction is asm volatile("isb").
This patch fixes the U-Boot was stuck in invalidate_dcache_all() before
booting linux kernel, which occurred on rk3288-base development board
such as evb-rk3288, rock2-rk3288. And something output via console like:
=> bootz 0x2000000
0x02000000
ramdisk start = 0x00000000, ramdisk end = 0x00000000
Continuing to boot without FDT
Initial value for argc=3
Final value for argc=3
using: ATAGS
Starting kernel ...
Linux kernel exactly the same way(see arch/arm/include/asm/barrier.h).
Signed-off-by: Ziyuan Xu <xzy.xu at rock-chips.com>
---
arch/arm/include/asm/system.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 2bdc0be..12d4ba0 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -227,13 +227,15 @@ void __noreturn psci_system_reset(bool smc);
*/
void save_boot_params_ret(void);
-#define isb() __asm__ __volatile__ ("" : : : "memory")
-
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
#ifdef __ARM_ARCH_7A__
+#define isb() __asm__ __volatile__ ("isb" : : : "memory")
+
#define wfi() __asm__ __volatile__ ("wfi" : : : "memory")
#else
+#define isb() __asm__ __volatile__ ("" : : : "memory")
+
#define wfi()
#endif
--
1.9.1
More information about the U-Boot
mailing list