Ignore:
Timestamp:
Feb 14, 2018, 3:39:35 PM (7 years ago)
Author:
alain
Message:

bloup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_pic.c

    r424 r432  
    9696
    9797    // read PRIO register
    98         uint32_t prio = base[(XCU_PRIO << 5) | lid];
     98    // in TSAR : XCU output [4*lid] is connected to core [lid]
     99        uint32_t prio = base[ (XCU_PRIO << 5) | (lid<<2) ];
    99100
    100101    *wti_status = (prio & 0x4) ? (((prio >> 24) & 0x1F) + 1) : 0;
     
    129130                           &pti_status );
    130131
    131     irq_dmsg("\n[DBG] %s : core[%x,%d] enter / WTI = %x / HWI = %x / WTI = %x\n",
     132    irq_dmsg("\n[DBG] %s : core[%x,%d] enter / WTI = %x / HWI = %x / PTI = %x\n",
    132133             __FUNCTION__ , local_cxy , core->lid , wti_status , hwi_status , pti_status );
    133134
     
    447448    {
    448449        // enable this HWI in remote XCU controller
     450        // in TSAR : XCU output [4*lid] is connected to core [lid]
    449451        hal_remote_sw( XPTR( src_chdev_cxy ,
    450                        &seg_xcu_ptr[(XCU_MSK_HWI_ENABLE << 5) | lid] ) , (1 << irq_id) );
     452                       &seg_xcu_ptr[ (XCU_MSK_HWI_ENABLE << 5) | (lid<<4) ] ) , (1 << irq_id) );
    451453    }
    452454    else if( irq_type == SOCLIB_TYPE_WTI )
    453455    {
    454456        // enable this WTI in remote XCU controller
     457        // in TSAR : XCU output [4*lid] is connected to core [lid]
    455458        hal_remote_sw( XPTR( src_chdev_cxy ,
    456                        &seg_xcu_ptr[(XCU_MSK_WTI_ENABLE << 5) | lid] ) , (1 << irq_id) );
     459                       &seg_xcu_ptr[ (XCU_MSK_WTI_ENABLE << 5) | (lid<<4) ] ) , (1 << irq_id) );
    457460    }
    458461    else
     
    479482    if( irq_type == SOCLIB_TYPE_HWI )
    480483    {
    481         // enable this HWI in remote XCU controller
     484        // enable this HWI in remote XCU controller
     485        // in TSAR : XCU output [4*lid] is connected to core [lid]
    482486        hal_remote_sw( XPTR( src_chdev_cxy ,
    483                        &seg_xcu_ptr[(XCU_MSK_HWI_DISABLE << 5) | lid] ) , (1 << irq_id) );
     487                       &seg_xcu_ptr[(XCU_MSK_HWI_DISABLE << 5) | (lid<<2) ] ) , (1 << irq_id) );
    484488    }
    485489    else if( irq_type == SOCLIB_TYPE_WTI )
    486490    {
    487491        // enable this WTI in remote XCU controller
     492        // in TSAR : XCU output [4*lid] is connected to core [lid]
    488493        hal_remote_sw( XPTR( src_chdev_cxy ,
    489                        &seg_xcu_ptr[(XCU_MSK_WTI_DISABLE << 5) | lid] ) , (1 << irq_id) );
     494                       &seg_xcu_ptr[(XCU_MSK_WTI_DISABLE << 5) | (lid<<4) ] ) , (1 << irq_id) );
    490495    }
    491496    else
     
    509514
    510515    // enable PTI in local XCU controller
    511     base[(XCU_MSK_PTI_ENABLE << 5) | lid] = 1 << lid;
     516    // In TSAR : XCU output [4*lid] is connected to core [lid]
     517    base[ (XCU_MSK_PTI_ENABLE << 5) | (lid<<2) ] = 1 << lid;
    512518}
    513519
     
    522528
    523529    // enable WTI in local XCU controller
    524     base[(XCU_MSK_WTI_ENABLE << 5) | lid] = 1 << lid;
     530    // In TSAR : XCU output [4*lid] is connected to core [lid]
     531    base[ (XCU_MSK_WTI_ENABLE << 5) | (lid<<2) ] = 1 << lid;
    525532}
    526533
     
    533540
    534541    // write to WTI mailbox[cxy][lid]
    535     hal_remote_sw( XPTR( cxy , &base[(XCU_WTI_REG << 5) | lid] ) , 0 );
     542    hal_remote_sw( XPTR( cxy , &base[(XCU_WTI_REG << 5) | lid ] ) , 0 );
    536543}
    537544
     
    546553
    547554    // acknowlege IPI
    548     uint32_t   ack  = base[(XCU_WTI_REG << 5) | lid];
     555    uint32_t   ack  = base[ (XCU_WTI_REG << 5) | lid ];
    549556
    550557    // we must make a fake use for ack value to avoid a warning
Note: See TracChangeset for help on using the changeset viewer.