summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-05-07 16:51:35 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-05-09 00:07:21 +0200
commit72674db080bcdf2fd66b2a538379ee6000f5b113 (patch)
tree5a6cf8444523a81b32490e56828507c24641ae7a /include
parented95bdd1e52a0a5f4f8e07468f6c1aa766efc4f2 (diff)
downloadfocaccia-qemu-72674db080bcdf2fd66b2a538379ee6000f5b113.tar.gz
focaccia-qemu-72674db080bcdf2fd66b2a538379ee6000f5b113.zip
hw/loongarch: move memory map to boot.c
Ensure that it can be used even if virt.c is not included in the build, as
is the case for --without-default-devices.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20240507145135.270803-1-pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/hw/loongarch/boot.h10
-rw-r--r--include/hw/loongarch/virt.h10
2 files changed, 10 insertions, 10 deletions
diff --git a/include/hw/loongarch/boot.h b/include/hw/loongarch/boot.h
index 4ebcc89dcf..b3b870df1f 100644
--- a/include/hw/loongarch/boot.h
+++ b/include/hw/loongarch/boot.h
@@ -104,6 +104,16 @@ struct loongarch_boot_info {
     uint64_t a0, a1, a2;
 };
 
+extern struct memmap_entry *memmap_table;
+extern unsigned memmap_entries;
+
+struct memmap_entry {
+    uint64_t address;
+    uint64_t length;
+    uint32_t type;
+    uint32_t reserved;
+};
+
 void loongarch_load_kernel(MachineState *ms, struct loongarch_boot_info *info);
 
 #endif /* HW_LOONGARCH_BOOT_H */
diff --git a/include/hw/loongarch/virt.h b/include/hw/loongarch/virt.h
index 4e14bf6060..fdbd2b146f 100644
--- a/include/hw/loongarch/virt.h
+++ b/include/hw/loongarch/virt.h
@@ -37,16 +37,6 @@
 
 #define FDT_BASE                0x100000
 
-extern struct memmap_entry *memmap_table;
-extern unsigned memmap_entries;
-
-struct memmap_entry {
-    uint64_t address;
-    uint64_t length;
-    uint32_t type;
-    uint32_t reserved;
-};
-
 struct LoongArchMachineState {
     /*< private >*/
     MachineState parent_obj;