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/mmc_driver.c

    r456 r481  
    66///////////////////////////////////////////////////////////////////////////////////
    77
    8 #include <giet_config.h>
     8#include <hard_config.h>
    99#include <mmc_driver.h>
    1010#include <tty0.h>
     11#include <locks.h>
    1112#include <utils.h>
     13
    1214#include <io.h>
    1315
     
    8991    }
    9092
    91     // get the hard lock protecting exclusive access to MEMC
    92     while ( _mmc_get_register(cluster_xy, 0, MEMC_LOCK) );
     93    // get the hard queuing lock protecting exclusive access to MEMC
     94    _spin_lock_acquire( &_mmc_lock[x][y] );
    9395
    9496    // write inval arguments
    95     _mmc_set_register(cluster_xy, 0, MEMC_ADDR_LO   , (unsigned int)buf_paddr);
    96     _mmc_set_register(cluster_xy, 0, MEMC_ADDR_HI   , (unsigned int)(buf_paddr>>32));
    97     _mmc_set_register(cluster_xy, 0, MEMC_BUF_LENGTH, buf_length);
    98     _mmc_set_register(cluster_xy, 0, MEMC_CMD_TYPE  , MEMC_CMD_INVAL);
     97    _mmc_set_register( cluster_xy , 0 , MEMC_ADDR_LO   , (unsigned int)buf_paddr );
     98    _mmc_set_register( cluster_xy , 0 , MEMC_ADDR_HI   , (unsigned int)(buf_paddr>>32) );
     99    _mmc_set_register( cluster_xy , 0 , MEMC_BUF_LENGTH, buf_length );
     100    _mmc_set_register( cluster_xy , 0 , MEMC_CMD_TYPE  , MEMC_CMD_INVAL );
    99101
    100102    // release the lock
    101     _mmc_set_register(cluster_xy, 0, MEMC_LOCK, 0);
     103    _spin_lock_release( &_mmc_lock[x][y] );
    102104}
    103105
     
    118120    }
    119121
    120     // get the hard lock protecting exclusive access to MEMC
    121     while ( _mmc_get_register(cluster_xy, 0, MEMC_LOCK) );
     122    // get the hard queuing lock protecting exclusive access to MEMC
     123    _spin_lock_acquire( &_mmc_lock[x][y] );
    122124
    123125    // write inval arguments
     
    128130
    129131    // release the lock
    130     _mmc_set_register(cluster_xy, 0, MEMC_LOCK, 0);
     132    _spin_lock_release( &_mmc_lock[x][y] );
    131133}
    132134
Note: See TracChangeset for help on using the changeset viewer.