root / targphys.h @ 543fc7b2
History | View | Annotate | Download (720 Bytes)
1 | c227f099 | Anthony Liguori | /* 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 | c227f099 | Anthony Liguori | /* 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 | c227f099 | Anthony Liguori | typedef uint32_t target_phys_addr_t;
|
15 | 9fa06385 | Jan Kiszka | #define TARGET_PHYS_ADDR_MAX UINT32_MAX
|
16 | 1ad2134f | Paul Brook | #define TARGET_FMT_plx "%08x" |
17 | 1ad2134f | Paul Brook | #elif TARGET_PHYS_ADDR_BITS == 64 |
18 | c227f099 | Anthony Liguori | typedef uint64_t target_phys_addr_t;
|
19 | 9fa06385 | Jan Kiszka | #define TARGET_PHYS_ADDR_MAX UINT64_MAX
|
20 | 1ad2134f | Paul Brook | #define TARGET_FMT_plx "%016" PRIx64 |
21 | 1ad2134f | Paul Brook | #endif
|
22 | 1ad2134f | Paul Brook | #endif
|
23 | 1ad2134f | Paul Brook | |
24 | 1ad2134f | Paul Brook | #endif |