]> git.sur5r.net Git - u-boot/commitdiff
arcv2: Halt non-master cores
authorAlexey Brodkin <abrodkin@synopsys.com>
Thu, 30 Mar 2017 14:50:45 +0000 (17:50 +0300)
committerAlexey Brodkin <abrodkin@synopsys.com>
Fri, 31 Mar 2017 19:09:36 +0000 (22:09 +0300)
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>
arch/arc/lib/start.S

index 90ee7e0fe4064cffbd57f865aec9ceaa268dfb1b..b2ba7683097f9bd460de50a2b232528c00d6f466 100644 (file)
 #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]