- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# cpu/uc3/include/cpu/addrspace.h

Go to the documentation of this file.

    00001
    00041 #ifndef CPU_ADDRSPACE_H_INCLUDED
    00042 #define CPU_ADDRSPACE_H_INCLUDED
    00043
    00044 #define CACHEABLE_VMA(phys)     (phys)
    00045 #define UNCACHEABLE_VMA(phys)   (phys)
    00046 #define PHYSICAL_ADDR(virt)     (virt)
    00047
    00048 #ifndef __ASSEMBLY__
    00049
    00050 #include <types.h>
    00051
    00057 static inline void *phys_to_cached(phys_addr_t paddr)
    00058 {
    00059         return (void *)CACHEABLE_VMA(paddr);
    00060 }
    00061
    00068 static inline void *phys_to_uncached(phys_addr_t paddr)
    00069 {
    00070         return (void *)UNCACHEABLE_VMA(paddr);
    00071 }
    00072
    00080 static inline phys_addr_t virt_to_phys(void *vaddr)
    00081 {
    00082         return PHYSICAL_ADDR((unsigned long)vaddr);
    00083 }
    00084
    00085 #endif /* __ASSEMBLY__ */
    00086
    00087 #endif /* CPU_ADDRSPACE_H_INCLUDED */