Ignore:
Timestamp:
Jul 27, 2017, 12:23:29 AM (7 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/kernel/devices/dev_nic.c

    r259 r279  
    110110
    111111    // initialize command in thread descriptor
    112     thread_ptr->command.nic.dev_xp = dev_xp;
     112    thread_ptr->nic_cmd.dev_xp = dev_xp;
    113113
    114114    // call driver to test readable
    115     thread_ptr->command.nic.cmd = NIC_CMD_READABLE;
    116     dev_ptr->cmd( thread_xp );
    117 
    118     // check error
    119     error = thread_ptr->command.nic.error;
     115    thread_ptr->nic_cmd.cmd = NIC_CMD_READABLE;
     116    dev_ptr->cmd( thread_xp );
     117
     118    // check error
     119    error = thread_ptr->nic_cmd.error;
    120120    if( error ) return error;
    121121
    122122    // block and deschedule if queue non readable
    123     if( thread_ptr->command.nic.status == false ) 
     123    if( thread_ptr->nic_cmd.status == false ) 
    124124    {
    125125        // enable NIC-RX IRQ
     
    135135
    136136    // call driver for actual read
    137     thread_ptr->command.nic.cmd     = NIC_CMD_READ;
    138     thread_ptr->command.nic.buffer  = pkd->buffer;
    139     dev_ptr->cmd( thread_xp );
    140 
    141     // check error
    142     error = thread_ptr->command.nic.error;
     137    thread_ptr->nic_cmd.cmd     = NIC_CMD_READ;
     138    thread_ptr->nic_cmd.buffer  = pkd->buffer;
     139    dev_ptr->cmd( thread_xp );
     140
     141    // check error
     142    error = thread_ptr->nic_cmd.error;
    143143    if( error ) return error;
    144144
    145145    // returns packet length   
    146     pkd->length = thread_ptr->command.nic.length;
     146    pkd->length = thread_ptr->nic_cmd.length;
    147147
    148148    nic_dmsg("\n[INFO] %s exit for NIC-RX thread on core %d in cluster %x\n",
     
    180180
    181181    // initialize command in thread descriptor
    182     thread_ptr->command.nic.dev_xp = dev_xp;
     182    thread_ptr->nic_cmd.dev_xp = dev_xp;
    183183
    184184    // call driver to test writable
    185     thread_ptr->command.nic.cmd = NIC_CMD_WRITABLE;
    186     dev_ptr->cmd( thread_xp );
    187 
    188     // check error
    189     error = thread_ptr->command.nic.error;
     185    thread_ptr->nic_cmd.cmd = NIC_CMD_WRITABLE;
     186    dev_ptr->cmd( thread_xp );
     187
     188    // check error
     189    error = thread_ptr->nic_cmd.error;
    190190    if( error ) return error;
    191191
    192192    // block and deschedule if queue non writable
    193     if( thread_ptr->command.nic.status == false ) 
     193    if( thread_ptr->nic_cmd.status == false ) 
    194194    {
    195195        // enable NIC-TX IRQ
     
    205205
    206206    // call driver for actual write
    207     thread_ptr->command.nic.cmd    = NIC_CMD_WRITE;
    208     thread_ptr->command.nic.buffer = pkd->buffer;
    209     thread_ptr->command.nic.length = pkd->length;
    210     dev_ptr->cmd( thread_xp );
    211 
    212     // check error
    213     error = thread_ptr->command.nic.error;
     207    thread_ptr->nic_cmd.cmd    = NIC_CMD_WRITE;
     208    thread_ptr->nic_cmd.buffer = pkd->buffer;
     209    thread_ptr->nic_cmd.length = pkd->length;
     210    dev_ptr->cmd( thread_xp );
     211
     212    // check error
     213    error = thread_ptr->nic_cmd.error;
    214214    if( error ) return error;
    215215
Note: See TracChangeset for help on using the changeset viewer.