firmware: Add a barrier instruction for wait for boot hart
authorXiang Wang <wxjstz@126.com>
Mon, 4 Mar 2019 09:22:37 +0000 (17:22 +0800)
committerAnup Patel <anup@brainfault.org>
Tue, 5 Mar 2019 03:39:40 +0000 (09:09 +0530)
Multi-core communication via memory requires the addition of a barrier
instructions to ensure cache coherency.

Signed-off-by: Xiang Wang <wxjstz@126.com>
firmware/fw_base.S

index b28cfb5..ae14cc7 100644 (file)
@@ -114,6 +114,7 @@ _fdt_reloc_done:
 
        /* Wait for boot hart */
 _wait_for_boot_hart:
+       fence   rw, rw
        la      a4, _boot_hart_done
        REG_L   a5, (a4)
        beqz    a5, _wait_for_boot_hart