Changeset 606 for trunk/softs


Ignore:
Timestamp:
Dec 19, 2013, 9:26:03 AM (10 years ago)
Author:
alain
Message:

Supporting fixed format for cluster index in reset.S.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/softs/tsar_boot/src/reset.S

    r587 r606  
    1717 *
    1818 * The replicated XICU is used to awake the sleeping processors:
    19  *      xicu_paddr_base = ICU_PADDR_BASE + (cluster_id << 32)
     19 *      xicu_paddr_base = ICU_PADDR_BASE + (cluster_xy << 32)
    2020 *
    2121 * It is intended to be used with various operating systems or nano kernels,
     
    3535    #include <mips32_registers.h>
    3636
    37     /* These define should be consistent with values defined in ma;xml file  */
     37    /* These define should be consistent with values defined in map.xml file  */
    3838
    3939    .extern seg_reset_stack_base 
     
    8484    mtc0    k0,     CP0_STATUS
    8585
    86     /* All processors compute proc_id, local_id, cluster_id, cluster_increment */
     86    /* All processors compute proc_id, lpid, cluster_xy */
    8787
    8888    mfc0    k0,     CP0_EBASE
     
    9393    la      k0,     NB_PROCS        /* k0 <= number of processors per cluster     */
    9494    divu    t3,     k0
    95     mfhi    t1                      /* t1 <= local_id   = proc_id % NB_PROCS      */
    96     mflo    t2                      /* t2 <= cluster_id = proc_id / NB_PROCS      */
    97 
    98     la      k0,     NB_CLUSTERS
    99     sll     k1,     t2,     8       /* k1 <= 256*cluster_id                       */
    100     div     k1,     k0              /* LO <= cluster_id * 256 / NB_CLUSTERS       */
    101     mflo    t7                      /* t7 <= physical address extension (8 MSB)   */
     95    mfhi    t1                      /* t1 <= lpid       = proc_id % NB_PROCS      */
     96    mflo    t2                      /* t2 <= cluster_xy = proc_id / NB_PROCS      */
    10297
    10398    /* All processors initialise the count register in CP0 */
     
    108103     * All processors enable the WTI for XICU
    109104     * Each processor may have IRQ_PER_PROC irq outputs from the XICU
    110      * In each cluster, the XICU base address depends on the cluster_id
     105     * In each cluster, the XICU base address depends on the cluster_xy
    111106     */
    112107
     
    127122    sllv    t4,     t4,     t1      /* Set XICU[MSK_WTI][INDEX][local_id]         */
    128123
    129     mtc2    t7,     CP2_PADDR_EXT   /* set PADDR extension                        */
     124    mtc2    t2,     CP2_PADDR_EXT   /* set PADDR extension                        */
    130125    sw      t4,     0(t5)           /* XICU[MSK_WTI][INDEX] <= t4                 */
    131126    mtc2    zero,   CP2_PADDR_EXT   /* reset PADDR extension                      */
     
    148143     * t0: global proc_id
    149144     * t1: local proc_id
    150      * t2: cluster id
     145     * t2: cluster_xy
    151146     * t3: xicu physical base address in cluster 0
    152      * t7: paddr extension depending on cluster_id
    153147     */
    154148
     
    205199     * t2: cluster id
    206200     * t3: xicu physical base address in cluster 0
    207      * t7: Paddr extension depending on cluster_id
    208201     */
    209202
     
    222215     */
    223216
    224     mtc2    t7,     CP2_PADDR_EXT   /* set PADDR extension                */
     217    mtc2    t2,     CP2_PADDR_EXT   /* set PADDR extension                */
    225218    lw      k0,     0(t5)           /* k0 <= XICU[WTI_REG][local_id]      */
    226219    mtc2    zero,   CP2_PADDR_EXT   /* reset PADDR extension              */
Note: See TracChangeset for help on using the changeset viewer.