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

1) Introduce access functions to MMC intrumentation registers.
2) Use _printf for error or debug messages.

File:
1 edited

Legend:

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

    r481 r496  
    6767///////////////////////////////////////////////////////////////////////////////
    6868
    69 #define in_unckdata __attribute__((section (".unckdata")))
    70 
    71 in_unckdata volatile unsigned int _ioc_iommu_ix1 = 0;
    72 in_unckdata volatile unsigned int _ioc_iommu_npages;
     69__attribute__((section (".kdata")))
     70volatile unsigned int _ioc_iommu_ix1 = 0;
     71
     72__attribute__((section (".kdata")))
     73volatile unsigned int _ioc_iommu_npages;
    7374
    7475///////////////////////////////////////////////////////////////////////////////
     
    9697unsigned int y       = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1);
    9798unsigned int p       = procid & ((1<<P_WIDTH)-1);
    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");
     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 );
    117106#endif
    118107
     
    140129
    141130    // computing memory buffer physical address
    142     if ( (mode == IOC_BOOT_MODE) && ((_get_mmu_mode() & 0x4) == 0) ) // identity mapping
     131    if ( (mode == IOC_BOOT_MODE) && ((_get_mmu_mode() & 0x4) == 0) ) // identity
    143132    {
    144133        buf_paddr = (paddr_t)buf_vaddr;
    145134    }
    146     else                                                    // V2P translation required
     135    else                                                 // V2P translation required
    147136    {
    148137        // get page table virtual address
     
    280269#elif ( USE_IOC_RDK )
    281270
    282     return rdk_get_status();
     271    return _rdk_get_status();
    283272
    284273#endif
Note: See TracChangeset for help on using the changeset viewer.