Ignore:
Timestamp:
Feb 4, 2014, 2:16:37 AM (10 years ago)
Author:
cfuguet
Message:

Modifications on GIET-VM IOC driver:

  • Introducing new layer on the IOC driver. Every call to ioc_read, ioc_write, ioc_get_block_size or ioc_init

functions will call the specific driver of the used IOC
controller. Supported IOC controllers are (for now) :

  1. BDV (Soclib Block Device)
  2. HBA
  3. SPI (SDCARD - SPI controller)
  • All functions of IOC controllers drivers respect the same interface.
  • To specify the used IOC controller of the platform, a subtype field has been introduced on the map.xml file. This subtype field must be declared on the IOC periph instantiation. Available subtypes (for now) : BDV, HBA or SPI.
File:
1 copied

Legend:

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

    r288 r289  
    6464// Arguments are:
    6565// - to_mem     : from external storage to memory when non 0.
    66 // - kernel     : kernel buffer with identity mapping when non 0.
     66// - mode       : BOOT / KERNEL / USER
    6767// - lba        : first block index on the external storage.
    68 // - buf_vaddr  : virtual base address of the memory buffer.
     68// - buf_paddr  : physical base address of the memory buffer.
    6969// - count      : number of blocks to be transfered.
    7070// Returns 0 if success, > 0 if error.
     
    109109    ioc_address[BLOCK_DEVICE_LBA]        = lba;
    110110
    111     // There is two policies for transfer completion
     111    // There are two policies for transfer completion
    112112        // detection, depending on the mode argument:
    113113
     
    120120
    121121        unsigned int status;
    122         if ( _bdv_get_status(0, &status) ) return 1;
    123 
    124         while( (status != BLOCK_DEVICE_READ_SUCCESS)  &&
    125                (status != BLOCK_DEVICE_READ_ERROR)    &&
    126                (status != BLOCK_DEVICE_WRITE_SUCCESS) &&
    127                (status != BLOCK_DEVICE_WRITE_ERROR) )
     122        do
    128123        {
    129             if ( _bdv_get_status(0, &status) ) return 1;
     124            if ( _bdv_get_status( 0, &status ) ) return 1;
    130125
    131126#if GIET_DEBUG_IOC_DRIVER
     
    134129_tty_release_lock( 0 );
    135130#endif
    136 
    137131        }
     132        while( (status != BLOCK_DEVICE_READ_SUCCESS)  &&
     133               (status != BLOCK_DEVICE_READ_ERROR)    &&
     134               (status != BLOCK_DEVICE_WRITE_SUCCESS) &&
     135               (status != BLOCK_DEVICE_WRITE_ERROR)   );
     136
    138137        // analyse status
    139138        error = ( (status == BLOCK_DEVICE_READ_ERROR) ||
Note: See TracChangeset for help on using the changeset viewer.