Ignore:
Timestamp:
Nov 3, 2014, 10:53:00 AM (10 years ago)
Author:
alain
Message:

Introducing dynamic allocation of peripheral channel(TTY, NIC, TIM, CMA)
Removint the ICU driver : ICU component not supported anymore.
Removing the FBF driver.

File:
1 edited

Legend:

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

    r426 r437  
    66// Copyright (c) UPMC-LIP6
    77///////////////////////////////////////////////////////////////////////////////////
    8 // Implementation note:
    9 //
     8// Implementation notes:
    109// 1) In order to share the code, the two _ioc_read() and _ioc_write() functions
    11 // call the same _ioc_access() function.
    12 //
     10// call the same _ioc_access() function, and this function call the selected
     11// physical driver (BDV / HBA / SPI / RDK).
    1312// 2) The IOMMU is not supported yet, but the method is the following:
    1413// A fixed size 2 Mbytes vseg is allocated to the IOC peripheral, in the I/O
     
    9796unsigned int y       = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1);
    9897unsigned int p       = procid & ((1<<P_WIDTH)-1);
    99 _printf("\n[IOC DEBUG] _ioc_access() : P[%d,%d,%d] enters at cycle %d\n"
    100         " - channel  = %d\n"
    101         " - mode     = %d\n"
    102         " - vaddr    = %x\n"
    103         " - sectors  = %d\n"
    104         " - lba      = %x\n",
    105         x, y, p, _get_proctime(), channel, mode, buf_vaddr, count, lba );
     98_puts("\n[IOC DEBUG] _ioc_access() : P[");
     99_putd( x );
     100_puts(",");
     101_putd( y );
     102_puts(",");
     103_putd( p );
     104_puts("] enters at cycle ");
     105_putd( _get_proctime() );
     106_puts("\n - channel  = ");
     107_putd( channel );
     108_puts("\n - mode     = ");
     109_putd( mode );
     110_puts("\n - vaddr    = ");
     111_putx( buf_vaddr );
     112_puts("\n - sectors  = ");
     113_putd( count );
     114_puts("\n - lba      = ");
     115_putx( lba );
     116_puts("\n");
    106117#endif
    107118
     
    115126    if ((unsigned int) buf_vaddr & 0x3)
    116127    {
    117         _printf("\n[IOC ERROR] in _ioc_access() : buffer not word aligned\n");
     128        _puts("\n[IOC ERROR] in _ioc_access() : buffer not word aligned\n");
    118129        _exit();
    119130    }
     
    122133    if ( (USE_IOC_HBA == 0) && (channel > 0) )
    123134    {
    124         _printf("\n[IOC ERROR] in _ioc_access() : channel must be 0 when HBA not used\n");
     135        _puts("\n[IOC ERROR] in _ioc_access() : channel must be 0 when HBA not used\n");
    125136        _exit();
    126137    }
     
    146157        if ( ko )
    147158        {
    148             _printf("\n[IOC ERROR] in _ioc_access() : buffer unmapped\n");
     159            _puts("\n[IOC ERROR] in _ioc_access() : buffer unmapped\n");
    149160            _exit();
    150161        }
     
    152163        if ( (mode == IOC_USER_MODE) && ((flags & PTE_U) == 0) )
    153164        {
    154             _printf("\n[IOC ERROR] in _ioc_access() : buffer not user accessible\n");
     165            _puts("\n[IOC ERROR] in _ioc_access() : buffer not user accessible\n");
    155166            _exit();
    156167        }
     
    158169        if ( ((flags & PTE_W) == 0 ) && to_mem )
    159170        {
    160             _printf("\n[IOC ERROR] in _ioc_access() : buffer not writable\n");
     171            _puts("\n[IOC ERROR] in _ioc_access() : buffer not writable\n");
    161172            _exit();
    162173        }
     
    274285#elif ( USE_IOC_RDK )
    275286
    276     _printf("[GIET ERROR] _ioc_get_status() should not be called");
    277     _printf(" when RAMDISK  is used...\n");
    278     _exit();
    279 
    280     return 0;
     287    return rdk_get_status();
    281288
    282289#endif
Note: See TracChangeset for help on using the changeset viewer.