aboutsummaryrefslogtreecommitdiff
path: root/cpu-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpu-common.h')
-rw-r--r--cpu-common.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpu-common.h b/cpu-common.h
index 44b04b3839..070010130c 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -27,7 +27,15 @@ enum device_endian {
};
/* address in the RAM (different from a physical address) */
+#if defined(CONFIG_XEN_BACKEND) && TARGET_PHYS_ADDR_BITS == 64
+typedef uint64_t ram_addr_t;
+# define RAM_ADDR_MAX UINT64_MAX
+# define RAM_ADDR_FMT "%" PRIx64
+#else
typedef unsigned long ram_addr_t;
+# define RAM_ADDR_MAX ULONG_MAX
+# define RAM_ADDR_FMT "%lx"
+#endif
/* memory API */