Ignore:
Timestamp:
Jul 27, 2017, 12:23:29 AM (4 years ago)
Author:
alain
Message:

1) Introduce independant command fields for the various devices in the thread descriptor.
2) Introduce a new dev_pic_enable_ipi() function in the generic PIC device
3) Fix two bugs identified by Maxime in the scheduler initialisation, and in the sched_select().
4) fix several bugs in the TSAR hal_kentry.S.
5) Introduce a third kgiet segment (besides kdata and kcode) in the TSAR bootloader.

File:
1 edited

Legend:

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

    r265 r279  
    5858void __attribute__ ((noinline)) soclib_bdv_cmd( xptr_t th_xp )
    5959{
    60     uint32_t   cmd_type;     // IOC_READ / IOC_WRITE / IOC_SYNC_READ
    61     uint32_t   lba;          // command argument
    62     uint32_t   count;        // command argument
    63     xptr_t     buf_xp;       // command argument
    64     xptr_t     dev_xp;       // command argument
     60    uint32_t   cmd_type;    // IOC_READ / IOC_WRITE / IOC_SYNC_READ
     61    uint32_t   lba;
     62    uint32_t   count;
     63    xptr_t     buf_xp;
     64    xptr_t     ioc_xp;
    6565
    6666    // get client thread cluster and local pointer
     
    6969
    7070    // get command arguments and extended pointer on IOC device
    71     cmd_type =         hal_remote_lw ( XPTR( th_cxy , &th_ptr->command.ioc.type   ) );
    72     lba      =         hal_remote_lw ( XPTR( th_cxy , &th_ptr->command.ioc.lba    ) );
    73     count    =         hal_remote_lw ( XPTR( th_cxy , &th_ptr->command.ioc.count  ) );
    74     buf_xp   = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->command.ioc.buf_xp ) );
    75     dev_xp   = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->command.ioc.dev_xp ) );
     71    cmd_type =         hal_remote_lw ( XPTR( th_cxy , &th_ptr->ioc_cmd.type   ) );
     72    lba      =         hal_remote_lw ( XPTR( th_cxy , &th_ptr->ioc_cmd.lba    ) );
     73    count    =         hal_remote_lw ( XPTR( th_cxy , &th_ptr->ioc_cmd.count  ) );
     74    buf_xp   = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->ioc_cmd.buf_xp ) );
     75    ioc_xp   = (xptr_t)hal_remote_lwd( XPTR( th_cxy , &th_ptr->ioc_cmd.dev_xp ) );
    7676
    7777    // get IOC device cluster and local pointer
    78     cxy_t      dev_cxy = GET_CXY( dev_xp );
    79     chdev_t  * dev_ptr = (chdev_t *)GET_PTR( dev_xp );
     78    cxy_t      ioc_cxy = GET_CXY( ioc_xp );
     79    chdev_t  * ioc_ptr = (chdev_t *)GET_PTR( ioc_xp );
    8080
    8181    // get extended pointer on SOCLIB-BDV peripheral
    82     xptr_t     bdv_xp = hal_remote_lw( XPTR( dev_cxy , &dev_ptr->base ) );
     82    xptr_t     bdv_xp = hal_remote_lw( XPTR( ioc_cxy , &ioc_ptr->base ) );
    8383
    8484    // get SOCLIB_BDV device cluster and local pointer
     
    114114            if( status == BDV_READ_SUCCESS ) // successfully completed
    115115            {
    116                 hal_remote_sw( XPTR( th_cxy , &th_ptr->command.ioc.error ) , 0 );
     116                hal_remote_sw( XPTR( th_cxy , &th_ptr->ioc_cmd.error ) , 0 );
    117117                break;
    118118            }
     
    123123            else                            // error reported
    124124            {
    125                 hal_remote_sw( XPTR( th_cxy , &th_ptr->command.ioc.error ) , 1 );
     125                hal_remote_sw( XPTR( th_cxy , &th_ptr->ioc_cmd.error ) , 1 );
    126126                break;
    127127            }
     
    161161        if((status != BDV_READ_SUCCESS) && (status != BDV_WRITE_SUCCESS))
    162162    {
    163         hal_remote_sw( XPTR( client_cxy , &client_ptr->command.ioc.error ) , 1 );
     163        hal_remote_sw( XPTR( client_cxy , &client_ptr->ioc_cmd.error ) , 1 );
    164164    }
    165165        else
    166166    {
    167         hal_remote_sw( XPTR( client_cxy , &client_ptr->command.ioc.error ) , 0 );
     167        hal_remote_sw( XPTR( client_cxy , &client_ptr->ioc_cmd.error ) , 0 );
    168168    }
    169169
Note: See TracChangeset for help on using the changeset viewer.