Changeset 5f5c450 in rtems


Ignore:
Timestamp:
Jun 22, 2018, 11:58:11 AM (10 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
c558cc4
Parents:
fe2cd01
git-author:
Sebastian Huber <sebastian.huber@…> (06/22/18 11:58:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/28/18 13:02:13)
Message:

bsp/riscv: Add SMP startup synchronization

Update #3433.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/riscv/riscv/start/start.S

    rfe2cd01 r5f5c450  
    4343PUBLIC(_start)
    4444
    45         .section        .bsp_start_text, "ax", @progbits
     45        .section        .bsp_start_text, "wax", @progbits
    4646        .align  2
    4747
     
    5656#ifdef RTEMS_SMP
    5757        csrr    s0, mhartid
    58         bnez    s0, .Lloop_forever
     58        bnez    s0, .Lwait_for_go
    5959#endif
    6060
     
    7676        call    memset
    7777
     78#ifdef RTEMS_SMP
     79        /* Give go to secondary processors */
     80        la      t0, .Lsecondary_processor_go
     81        fence   iorw,ow
     82        amoswap.w       zero, zero, 0(t0)
     83#endif
     84
    7885        /* Init FPU unit if it's there */
    7986        li      t0, MSTATUS_FS
     
    8390
    8491#ifdef RTEMS_SMP
     92        /* Wait for go issued by the boot processor (mhartid == 0) */
     93.Lwait_for_go:
     94        la      t0, .Lsecondary_processor_go
     95.Lwait_for_go_again:
     96        lw      t1, 0(t0)
     97        fence   iorw, iorw
     98        sext.w  t1, t1
     99        bnez    t1, .Lwait_for_go_again
    85100.Lloop_forever:
    86101        j       .Lloop_forever
     102
     103.Lsecondary_processor_go:
     104        .word   0xdeadbeef
    87105#endif
    88106
Note: See TracChangeset for help on using the changeset viewer.