Ignore:
Timestamp:
Jul 6, 2012, 10:13:16 AM (12 years ago)
Author:
alain
Message:

Introducing support for IOMMU

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/sys/common.c

    r165 r166  
    112112    unsigned int line_size;
    113113
    114     /*
    115      * compute data cache line size based on config register (bits 12:10)
    116      */
     114    // compute data cache line size based on config register (bits 12:10)
    117115    asm volatile("mfc0 %0, $16, 1" : "=r"(tmp));
    118116    tmp = ((tmp>>10) & 0x7);
    119117    line_size = 2 << tmp;
    120118
    121     /* iterate on cache lines to invalidate each one of them */
     119    // iterate on cache lines
    122120    for (i = 0; i < size; i += line_size)
    123121    {
     
    160158        val /= 16;
    161159    }
     160}
     161///////////////////////////////////////////////////////////////////////////////////
     162//      _get_ptpr()
     163// Access CP2 and returns PTPR register.
     164///////////////////////////////////////////////////////////////////////////////////
     165inline unsigned int _get_ptpr()
     166{
     167    unsigned int ret;
     168    asm volatile("mfc2 %0, $0" : "=r"(ret));
     169    return ret;
    162170}
    163171///////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.