[PATCH v2 0/3] single-binary: Prepare hw/riscv for single compilation

Anton Johansson via posted 3 patches 2 weeks, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20251027-feature-single-binary-hw-v1-v2-0-44478d589ae9@rev.ng
Maintainers: Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
include/hw/riscv/boot.h         | 20 +++++++++----------
include/hw/riscv/boot_opensbi.h | 14 ++++++-------
hw/riscv/boot.c                 | 44 +++++++++++++++++++++--------------------
hw/riscv/microchip_pfsoc.c      |  2 +-
hw/riscv/riscv-iommu.c          |  6 ++++--
hw/riscv/riscv_hart.c           |  2 +-
hw/riscv/sifive_u.c             |  2 +-
hw/riscv/spike.c                |  4 ++--
hw/riscv/virt.c                 |  2 +-
9 files changed, 50 insertions(+), 46 deletions(-)
[PATCH v2 0/3] single-binary: Prepare hw/riscv for single compilation
Posted by Anton Johansson via 2 weeks, 4 days ago
Hello,

this is a small prerequisite patchset that removes target_[u]?long and
replaces a few target specific macros with target-info variants.

Next up is using the target-info style QOM filtering of boards and then
moving translation units to common code.  My current patches for this
are based on Philippes single-binary-hw-arm-rfc-v5 branch, is there some
other branch I should target here?

Changes in v2:
- Use MAKE_64BIT_MASK() in patch 2 (Richard);
- Dropped runtime TARGET_PHYS_ADDR_SPACE_BITS as it shouldn't be exposed
  to common code and is better dealt with in other ways
  (Richard, Philippe);
- Added reviewed-bys.

---
Anton Johansson (3):
      hw/riscv: Use generic hwaddr for firmware addressses
      hw/riscv: Replace target_ulong uses
      hw/riscv: Widen OpenSBI dynamic info struct

 include/hw/riscv/boot.h         | 20 +++++++++----------
 include/hw/riscv/boot_opensbi.h | 14 ++++++-------
 hw/riscv/boot.c                 | 44 +++++++++++++++++++++--------------------
 hw/riscv/microchip_pfsoc.c      |  2 +-
 hw/riscv/riscv-iommu.c          |  6 ++++--
 hw/riscv/riscv_hart.c           |  2 +-
 hw/riscv/sifive_u.c             |  2 +-
 hw/riscv/spike.c                |  4 ++--
 hw/riscv/virt.c                 |  2 +-
 9 files changed, 50 insertions(+), 46 deletions(-)
Re: [PATCH v2 0/3] single-binary: Prepare hw/riscv for single compilation
Posted by Philippe Mathieu-Daudé 2 weeks, 3 days ago
On 27/10/25 13:35, Anton Johansson wrote:

> Anton Johansson (3):
>        hw/riscv: Use generic hwaddr for firmware addressses

>        hw/riscv: Widen OpenSBI dynamic info struct

Queuing patches #1 (without kernel hwaddr change) and #3, thanks!
Re: [PATCH v2 0/3] single-binary: Prepare hw/riscv for single compilation
Posted by Philippe Mathieu-Daudé 2 weeks, 1 day ago
On 28/10/25 08:25, Philippe Mathieu-Daudé wrote:
> On 27/10/25 13:35, Anton Johansson wrote:
> 
>> Anton Johansson (3):
>>        hw/riscv: Use generic hwaddr for firmware addressses
> 
>>        hw/riscv: Widen OpenSBI dynamic info struct
> 
> Queuing patches #1 (without kernel hwaddr change) and #3, thanks!

And now #2 also queued.