Commit 6cba327bd96f90818a8beede51405228c54a5251

Authored by Alexey Brodkin
1 parent 2a5062ca9e

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>

Showing 1 changed file with 16 additions and 0 deletions Side-by-side Diff

arch/arc/lib/start.S
... ... @@ -10,6 +10,22 @@
10 10 #include <asm/arcregs.h>
11 11  
12 12 ENTRY(_start)
  13 + ; Non-masters will be halted immediately, they might be kicked later
  14 + ; by platform code right before passing control to the Linux kernel
  15 + ; in bootm.c:boot_jump_linux().
  16 + lr r5, [identity]
  17 + lsr r5, r5, 8
  18 + bmsk r5, r5, 7
  19 + cmp r5, 0
  20 + mov.nz r0, r5
  21 + bz .Lmaster_proceed
  22 + flag 1
  23 + nop
  24 + nop
  25 + nop
  26 +
  27 +.Lmaster_proceed:
  28 +
13 29 /* Setup interrupt vector base that matches "__text_start" */
14 30 sr __ivt_start, [ARC_AUX_INTR_VEC_BASE]
15 31