summaryrefslogtreecommitdiff
path: root/include/sysemu/dump.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sysemu/dump.h')
-rw-r--r--include/sysemu/dump.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sysemu/dump.h b/include/sysemu/dump.h
index b32b390805..995bf47003 100644
--- a/include/sysemu/dump.h
+++ b/include/sysemu/dump.h
@@ -20,6 +20,13 @@
#define VERSION_FLAT_HEADER (1) /* version of flattened format */
#define END_FLAG_FLAT_HEADER (-1)
+#define ARCH_PFN_OFFSET (0)
+
+#define paddr_to_pfn(X, page_shift) \
+ (((unsigned long long)(X) >> (page_shift)) - ARCH_PFN_OFFSET)
+#define pfn_to_paddr(X, page_shift) \
+ (((unsigned long long)(X) + ARCH_PFN_OFFSET) << (page_shift))
+
typedef struct ArchDumpInfo {
int d_machine; /* Architecture */
int d_endian; /* ELFDATA2LSB or ELFDATA2MSB */