[PATCH v5 00/15] hw/riscv: trivial code dup work (riscv-server-ref prep)

Daniel Henrique Barboza posted 15 patches 4 weeks, 1 day ago
Failed in applying to current master (apply log)
hw/riscv/device-common.c         | 168 ++++++
hw/riscv/fdt-common.c            | 613 +++++++++++++++++++++-
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           |  22 +-
hw/riscv/virt.c                  | 861 +++++--------------------------
include/hw/riscv/device-common.h |  32 ++
include/hw/riscv/fdt-common.h    | 146 +++++-
include/hw/riscv/virt.h          |  15 -
12 files changed, 1112 insertions(+), 838 deletions(-)
create mode 100644 hw/riscv/device-common.c
create mode 100644 include/hw/riscv/device-common.h
[PATCH v5 00/15] hw/riscv: trivial code dup work (riscv-server-ref prep)
Posted by Daniel Henrique Barboza 4 weeks, 1 day ago
Hi,

In this new version a new patch was added.  It is a fix for the aclint
FDT, suggested by Chao in the v4 review.  We're fixing the FDT before
moving the aclint FDT to the helper in the patch that follows.

No other changes made.  Patches based on alistair/riscv-to-apply.next.

Changes from v4:
- patch 8 (new): fix aclint soc/mtimer node
- patch 9:
  - move the aclint FDT to the helper without any changes, as stated in
    the commit msg.
- v4 link: https://lore.kernel.org/qemu-devel/20260827222608.329788-1-daniel.barboza@oss.qualcomm.com/


Daniel Henrique Barboza (15):
  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/virt.c: fix aclint soc/mtimer nodename
  hw/riscv/fdt-common, virt.c: add riscv_create_fdt_socket_aclint()
  hw/riscv/fdt-common, virt.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            | 613 +++++++++++++++++++++-
 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           |  22 +-
 hw/riscv/virt.c                  | 861 +++++--------------------------
 include/hw/riscv/device-common.h |  32 ++
 include/hw/riscv/fdt-common.h    | 146 +++++-
 include/hw/riscv/virt.h          |  15 -
 12 files changed, 1112 insertions(+), 838 deletions(-)
 create mode 100644 hw/riscv/device-common.c
 create mode 100644 include/hw/riscv/device-common.h

-- 
2.43.0
Re: [PATCH v5 00/15] hw/riscv: trivial code dup work (riscv-server-ref prep)
Posted by Alistair Francis 3 weeks, 4 days ago
On Fri, 2026-08-28 at 17:39 -0300, Daniel Henrique Barboza wrote:
> Hi,
> 
> In this new version a new patch was added.  It is a fix for the
> aclint
> FDT, suggested by Chao in the v4 review.  We're fixing the FDT before
> moving the aclint FDT to the helper in the patch that follows.
> 
> No other changes made.  Patches based on alistair/riscv-to-
> apply.next.
> 
> Changes from v4:
> - patch 8 (new): fix aclint soc/mtimer node
> - patch 9:
>   - move the aclint FDT to the helper without any changes, as stated
> in
>     the commit msg.
> - v4 link:
> https://lore.kernel.org/qemu-devel/20260827222608.329788-1-daniel.barboza@oss.qualcomm.com/
> 
> 
> Daniel Henrique Barboza (15):
>   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/virt.c: fix aclint soc/mtimer nodename
>   hw/riscv/fdt-common, virt.c: add riscv_create_fdt_socket_aclint()
>   hw/riscv/fdt-common, virt.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()

Thanks!

Applied to riscv-to-apply.next

Alistair

> 
>  hw/riscv/device-common.c         | 168 ++++++
>  hw/riscv/fdt-common.c            | 613 +++++++++++++++++++++-
>  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           |  22 +-
>  hw/riscv/virt.c                  | 861 +++++------------------------
> --
>  include/hw/riscv/device-common.h |  32 ++
>  include/hw/riscv/fdt-common.h    | 146 +++++-
>  include/hw/riscv/virt.h          |  15 -
>  12 files changed, 1112 insertions(+), 838 deletions(-)
>  create mode 100644 hw/riscv/device-common.c
>  create mode 100644 include/hw/riscv/device-common.h