Ignore:
Timestamp:
Jan 1, 2015, 8:23:48 PM (9 years ago)
Author:
alain
Message:

1) The NIC, IOC, DMA and HBA drivers have been adapted to support the new _v2p_translate() function prototype (returns void).
2) The _mmc_inval() and _mmc_sync() functions does not use anymore the hard lock in the MMC, but use a soft spin_lock.
3) The NIC driver does not use anymore the GIET_NIC_BUFSIZE, GIET_NIC_NBUFS, and GIET_NIC_TIMEOUT parameters (removed from giet_config.h file).
4) The NIC driver registers map has been modified to support 64 bytes buffer descriptors for chained buffers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/hba_driver.c

    r456 r481  
    173173
    174174        // get ppn and flags
    175         ko = _v2p_translate( (page_table_t*)user_pt_vbase,
    176                               vpn,
    177                               &ppn,
    178                               &flags );
     175        _v2p_translate( (page_table_t*)user_pt_vbase,
     176                        vpn,
     177                        &ppn,
     178                        &flags );
    179179
    180180        // check access rights
    181         if ( ko )
    182         {
    183             _puts("[GIET ERROR] in _hba_set_cmd() : user buffer unmapped\n");
    184             return -1;
    185         }
    186181        if ((flags & PTE_U) == 0)
    187182        {
     
    261256    unsigned int ppn;
    262257    unsigned int flags;
    263     unsigned int fail;
    264258    unsigned int vbase;
    265259    unsigned int c;               // c == command index
     
    281275    // Command list physical addresse
    282276    vbase = (unsigned int)(&hba_cmd_list[channel]);
    283     fail = _v2p_translate( (page_table_t*)pt,
    284                            vbase>>12,
    285                            &ppn,
    286                            &flags );
    287     if ( fail )
    288     {
    289         _puts("[GIET ERROR] in _hba_init() : command list unmapped\n");
    290         return -1;
    291     }
     277    _v2p_translate( (page_table_t*)pt,
     278                     vbase>>12,
     279                     &ppn,
     280                     &flags );
    292281    hba_cmd_list_paddr[channel] = ((paddr_t)ppn) | (vbase & 0xFFF);
    293282
     
    296285    {
    297286        vbase = (unsigned int)(&hba_cmd_table[channel][c]);
    298         fail = _v2p_translate( (page_table_t*)pt,
    299                                vbase>>12,
    300                                &ppn,
    301                                &flags );
    302         if ( fail )
    303         {
    304             _puts("[GIET ERROR] in _hba_init() : command table unmapped\n");
    305             return -1;
    306         }
     287        _v2p_translate( (page_table_t*)pt,
     288                         vbase>>12,
     289                         &ppn,
     290                         &flags );
    307291        hba_cmd_table_paddr[channel][c] = ((paddr_t)ppn) | (vbase & 0xFFF);
    308292    }
Note: See TracChangeset for help on using the changeset viewer.