targphys.h 538 B

123456789101112131415161718192021
  1. /* Define target_phys_addr_t if it exists. */
  2. #ifndef TARGPHYS_H
  3. #define TARGPHYS_H
  4. #ifdef TARGET_PHYS_ADDR_BITS
  5. /* target_phys_addr_t is the type of a physical address (its size can
  6. be different from 'target_ulong'). */
  7. #if TARGET_PHYS_ADDR_BITS == 32
  8. typedef uint32_t target_phys_addr_t;
  9. #define TARGET_PHYS_ADDR_MAX UINT32_MAX
  10. #define TARGET_FMT_plx "%08x"
  11. #elif TARGET_PHYS_ADDR_BITS == 64
  12. typedef uint64_t target_phys_addr_t;
  13. #define TARGET_PHYS_ADDR_MAX UINT64_MAX
  14. #define TARGET_FMT_plx "%016" PRIx64
  15. #endif
  16. #endif
  17. #endif