summaryrefslogtreecommitdiff
path: root/arch/arc
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2017-03-30 17:50:45 +0300
committerAlexey Brodkin <abrodkin@synopsys.com>2017-03-31 22:09:36 +0300
commit6cba327bd96f90818a8beede51405228c54a5251 (patch)
tree550e7fa730c46d52adec07e0b5945e7eadb5b01f /arch/arc
parent2a5062ca9ecc22b88af2babf812b05dd97ecde46 (diff)
arcv2: Halt non-master cores
Even though we expect only master core to execute U-Boot code let's make sure even if for some reason slave cores attempt to execute U-Boot in parallel with master they get halted very early. If platform wants it may kick-start slave cores before passing control to say Linux kernel or any other application that want to see all cores of SMP SoC up and running. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/lib/start.S16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arc/lib/start.S b/arch/arc/lib/start.S
index 90ee7e0fe4..b2ba768309 100644
--- a/arch/arc/lib/start.S
+++ b/arch/arc/lib/start.S
@@ -10,6 +10,22 @@
#include <asm/arcregs.h>
ENTRY(_start)
+ ; Non-masters will be halted immediately, they might be kicked later
+ ; by platform code right before passing control to the Linux kernel
+ ; in bootm.c:boot_jump_linux().
+ lr r5, [identity]
+ lsr r5, r5, 8
+ bmsk r5, r5, 7
+ cmp r5, 0
+ mov.nz r0, r5
+ bz .Lmaster_proceed
+ flag 1
+ nop
+ nop
+ nop
+
+.Lmaster_proceed:
+
/* Setup interrupt vector base that matches "__text_start" */
sr __ivt_start, [ARC_AUX_INTR_VEC_BASE]