loongarch64: move memory map to boot.c
PATCH 1/1 loongarch64: 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 <[email protected]>
--- include/hw/loongarch/boot.h | 10 ++++++++++ include/hw/loongarch/virt.h | 10 ---------- hw/loongarch/boot.c | 3 +++ hw/loongarch/virt.c | 3 --- .gitlab-ci.d/buildtest.yml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-)
include/hw/loongarch/boot.h +10 -0
@@ -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 */
include/hw/loongarch/virt.h +0 -10
@@ -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;
hw/loongarch/boot.c +3 -0
@@ -15,6 +15,9 @@#include "sysemu/reset.h" #include "sysemu/qtest.h" +struct memmap_entry *memmap_table; +unsigned memmap_entries; +ram_addr_t initrd_offset;uint64_t initrd_size;
hw/loongarch/virt.c +0 -3
@@ -516,9 +516,6 @@ static void virt_powerdown_req(Notifier *notifier, void *opaque)acpi_send_event (s->acpi_ged,ACPI_POWER_DOWN_STATUS ); } -struct memmap_entry *memmap_table; -unsigned memmap_entries; -static void memmap_add_entry (uint64_t address,uint64_t length,uint32_t type) {/* Ensure there are no duplicate entries. */
.gitlab-ci.d/buildtest.yml +1 -1
@@ -650,7 +650,7 @@ build-tci: # Check our reduced build configurations # requires libfdt: aarch64, arm, i386, loongarch64, microblaze, microblazeel, # mips64el, or1k, ppc, ppc64, riscv32, riscv64, rx, x86_64 -# does not build without boards: i386, loongarch64, s390x, sh4, sh4eb, x86_64 +# does not build without boards: i386, s390x, sh4, sh4eb, x86_64 build-without-defaults: extends: .native_build_job_template needs:
Signature · 1 line
2.45.0
Quoted 11 lines · Paolo Bonzini
Ensure that it can be used even if
virt.cis not included in the build, as is the case for --without-default-devices.Signed-off-by Paolo Bonzini<[email protected]>--- include/hw/loongarch/boot.h | 10 ++++++++++ include/hw/loongarch/virt.h | 10 ---------- hw/loongarch/boot.c | 3 +++ hw/loongarch/virt.c | 3 --- .gitlab-ci.d/buildtest.yml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-)
r~
Quoted 11 lines · Paolo Bonzini
Ensure that it can be used even if
virt.cis not included in the build, as is the case for --without-default-devices.Signed-off-by Paolo Bonzini <[email protected]>--- include/hw/loongarch/boot.h | 10 ++++++++++ include/hw/loongarch/virt.h | 10 ---------- hw/loongarch/boot.c | 3 +++ hw/loongarch/virt.c | 3 --- .gitlab-ci.d/buildtest.yml | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-)
Thanks, patch queued to hw-misc tree.