Statistics
| Branch: | Revision:

root / targphys.h @ 1ad2134f

History | View | Annotate | Download (640 Bytes)

1 1ad2134f Paul Brook
/* Define target_phys_addr_t if it exists.  */
2 1ad2134f Paul Brook
3 1ad2134f Paul Brook
#ifndef TARGPHYS_H
4 1ad2134f Paul Brook
#define TARGPHYS_H
5 1ad2134f Paul Brook
6 1ad2134f Paul Brook
#ifdef TARGET_PHYS_ADDR_BITS
7 1ad2134f Paul Brook
/* target_phys_addr_t is the type of a physical address (its size can
8 1ad2134f Paul Brook
   be different from 'target_ulong'). We have sizeof(target_phys_addr)
9 1ad2134f Paul Brook
   = max(sizeof(unsigned long),
10 1ad2134f Paul Brook
   sizeof(size_of_target_physical_address)) because we must pass a
11 1ad2134f Paul Brook
   host pointer to memory operations in some cases */
12 1ad2134f Paul Brook
13 1ad2134f Paul Brook
#if TARGET_PHYS_ADDR_BITS == 32
14 1ad2134f Paul Brook
typedef uint32_t target_phys_addr_t;
15 1ad2134f Paul Brook
#define TARGET_FMT_plx "%08x"
16 1ad2134f Paul Brook
#elif TARGET_PHYS_ADDR_BITS == 64
17 1ad2134f Paul Brook
typedef uint64_t target_phys_addr_t;
18 1ad2134f Paul Brook
#define TARGET_FMT_plx "%016" PRIx64
19 1ad2134f Paul Brook
#endif
20 1ad2134f Paul Brook
#endif
21 1ad2134f Paul Brook
22 1ad2134f Paul Brook
#endif