[PATCH v3 00/14] hw/riscv: trivial code dup work (riscv-server-ref prep)
Daniel Henrique Barboza <[email protected]>
| Newsgroups | org.nongnu.qemu-riscv,org.nongnu.qemu-devel,org.nongnu.qemu-trivial |
|---|---|
| Message-ID | <[email protected]> |
Hi, In this version the most noticeable change is the rename of all helpers that are public APIs, adding a "riscv_" prefix, as suggested by Phil. Patches based on master. Original cover: -------- Here is a bunch of trivial and mostly boring stuff we want to do before pushing the RISC-V Server Plat Reference board upstream (currently on v9 [1], not yet sent for review). Although these changes aim to ease the pain for the riscv-server-ref review, in the end virt.c was reduced from ~1800 to ~1200 lines, which is a nice benefit we can have right now. For riscv-server-ref we went from ~1450 (v8) to ~770 lines (current v9). We were able to also reduce tt-atlantis code in one of the patches too. In fact I think there are opportunities to shrink tt-atlantis board size, but that will need refactoring logic here and there and this would fall out of scope for this work. [1] https://gitlab.com/danielhb/qemu/-/tree/riscv-server-ref_v9 -------- * Changes from v2: - all patches: - added "riscv_" prefix in all public APIs - patch 1 (new): - add a "riscv_" prefix in all existing FDT public APIs - patch 6: - added a break line between .soc and .socket_count - patch 10: - fixed indentation of "google,goldfish-rtc" string - v2 link: https://lore.kernel.org/qemu-devel/[email protected]/ * Changes from v1: - patch 8: - renamed 'additional_reg_props' to 'uses_32_bit_spacing', as suggested by Anirudh - v1 link: https://lore.kernel.org/qemu-devel/[email protected]/ Daniel Henrique Barboza (14): hw/riscv/fdt-common: prepend helpers with "riscv_" hw/riscv/fdt-common, virt.c: add riscv_create_fdt_flash() hw/riscv/fdt-common, virt.c: add riscv_create_fdt_syscon() hw/riscv/fdt-common, virt.c: add riscv_create_fdt_riscv_iommu_sys() hw/riscv/fdt_common, virt.c: add riscv_create_fdt_pcie() hw/riscv/fdt_common, virt.c: add riscv_create_fdt_imsic() hw/riscv/fdt_common, virt.c: add riscv_create_fdt_socket_aplic() hw/riscv/fdt-common, virt.c: add riscv_create_fdt_socket_aclint() hw/riscv/fdt-common, virt.c, tt_atlantis.c: add riscv_create_fdt_uart() hw/riscv/fdt-common, virt.c: add riscv_create_fdt_rtc() hw/riscv/device-common, virt.c: add riscv_create_platform_bus() hw/riscv/device-common, virt.c: add flash helpers hw/riscv/device-common, virt.c: add riscv_gpex_pcie_init() hw/riscv/riscv-iommu-sys.c, virt.c: add riscv_create_iommu_sys() hw/riscv/device-common.c | 168 ++++++ hw/riscv/fdt-common.c | 620 +++++++++++++++++++++- hw/riscv/meson.build | 1 + hw/riscv/riscv-iommu-sys.c | 25 + hw/riscv/riscv-iommu.h | 3 + hw/riscv/sifive_u.c | 34 +- hw/riscv/spike.c | 30 +- hw/riscv/tt_atlantis.c | 45 +- hw/riscv/virt.c | 868 +++++-------------------------- include/hw/riscv/device-common.h | 32 ++ include/hw/riscv/fdt-common.h | 145 +++++- include/hw/riscv/virt.h | 15 - 12 files changed, 1117 insertions(+), 869 deletions(-) create mode 100644 hw/riscv/device-common.c create mode 100644 include/hw/riscv/device-common.h -- 2.43.0