Changeset a9ac978 in mainline for kernel/arch/sparc64/src/start.S


Ignore:
Timestamp:
2006-09-27T20:11:34Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
00b38a3
Parents:
86b31ba9
Message:

SMP stuff for sparc64.
Almost complete except for IPIs.
The absence of IPI support deadlocks
the kernel when more CPUs are configured.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/start.S

    r86b31ba9 ra9ac978  
    2727#
    2828
     29#include <arch/arch.h>
    2930#include <arch/regdef.h>
    3031#include <arch/boot/boot.h>
     
    3334#include <arch/mm/tlb.h>
    3435#include <arch/mm/tte.h>
     36
     37#ifdef CONFIG_SMP
     38#include <arch/context_offset.h>
     39#endif
    3540
    3641.register %g2, #scratch
     
    227232        wrpr %g0, 0, %tl
    228233
    229         brz %l7, 2f                             ! skip if you are not the bootstrap CPU
     234        brz %l7, 1f                             ! skip if you are not the bootstrap CPU
     235        nop
    230236
    231237        call arch_pre_main
     
    237243        /* Not reached. */
    238244
     2450:
     246        ba 0b
     247        nop
     248
     249
     250        /*
     251         * Read MID from the processor.
     252         */
     2531:
     254        ldxa [%g0] ASI_UPA_CONFIG, %g1
     255        srlx %g1, UPA_CONFIG_MID_SHIFT, %g1
     256        and %g1, UPA_CONFIG_MID_MASK, %g1
     257
     258        /*
     259         * Active loop for APs until the BSP picks them up.
     260         * A processor cannot leave the loop until the
     261         * global variable 'waking_up_mid' equals its
     262         * MID.
     263         */
     264        set waking_up_mid, %g2
    2392652:
    240         b 2b
    241         nop
     266        ldx [%g2], %g3
     267        cmp %g3, %g1
     268        bne 2b
     269        nop
     270
     271#ifdef CONFIG_SMP
     272        /*
     273         * Configure stack for the AP.
     274         * The AP is expected to use the stack saved
     275         * in the ctx global variable.
     276         */
     277        set ctx, %g1
     278        add %g1, OFFSET_SP, %g1
     279        ldx [%g1], %o6
     280
     281        call main_ap
     282        nop
     283#endif
     284
     285        /* Not reached. */
     286       
     2870:
     288        ba 0b
     289        nop
Note: See TracChangeset for help on using the changeset viewer.