summary refs log tree commit diff stats
path: root/contrib/elf2dmp/addrspace.h
diff options
context:
space:
mode:
authorViktor Prutyanov <viktor@daynix.com>2023-09-15 20:01:50 +0300
committerPeter Maydell <peter.maydell@linaro.org>2023-09-21 16:07:15 +0100
commitd5c27a53d51175a2b89208b050488aaba74de131 (patch)
tree3c11f1e6db8f595d7cc12259691f7a92fb43ab93 /contrib/elf2dmp/addrspace.h
parent3c407ec67f94f8dc189f3e47a6419431d15ff084 (diff)
downloadfocaccia-qemu-d5c27a53d51175a2b89208b050488aaba74de131.tar.gz
focaccia-qemu-d5c27a53d51175a2b89208b050488aaba74de131.zip
elf2dmp: introduce physical block alignment
Physical memory ranges may not be aligned to page size in QEMU ELF, but
DMP can only contain page-aligned runs. So, align them.

Signed-off-by: Viktor Prutyanov <viktor@daynix.com>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-id: 20230915170153.10959-3-viktor@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'contrib/elf2dmp/addrspace.h')
-rw-r--r--contrib/elf2dmp/addrspace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/elf2dmp/addrspace.h b/contrib/elf2dmp/addrspace.h
index 00b44c1218..039c70c5b0 100644
--- a/contrib/elf2dmp/addrspace.h
+++ b/contrib/elf2dmp/addrspace.h
@@ -12,6 +12,7 @@
 
 #define ELF2DMP_PAGE_BITS 12
 #define ELF2DMP_PAGE_SIZE (1ULL << ELF2DMP_PAGE_BITS)
+#define ELF2DMP_PAGE_MASK (ELF2DMP_PAGE_SIZE - 1)
 #define ELF2DMP_PFN_MASK (~(ELF2DMP_PAGE_SIZE - 1))
 
 #define INVALID_PA  UINT64_MAX