• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Define hwaddr if it exists.  */
2 
3 #ifndef TARGPHYS_H
4 #define TARGPHYS_H
5 
6 #include <stdint.h>
7 
8 #ifndef TARGET_PHYS_ADDR_BITS
9 #define TARGET_PHYS_ADDR_BITS 32
10 #endif
11 
12 #ifdef TARGET_PHYS_ADDR_BITS
13 /* hwaddr is the type of a physical address (its size can
14    be different from 'target_ulong').  */
15 
16 #if TARGET_PHYS_ADDR_BITS == 32
17 typedef uint32_t hwaddr;
18 #define TARGET_PHYS_ADDR_MAX UINT32_MAX
19 #define TARGET_FMT_plx "%08x"
20 #elif TARGET_PHYS_ADDR_BITS == 64
21 typedef uint64_t hwaddr;
22 #define TARGET_PHYS_ADDR_MAX UINT64_MAX
23 #define TARGET_FMT_plx "%016" PRIx64
24 #endif
25 #endif
26 
27 #endif
28