[PATCH v3 0/4] hppa: Add simple C3600 machine with PA-8600 CPU

Anton Johansson via qemu development posted 4 patches 1 month, 3 weeks ago
Failed in applying to current master (apply log)
target/hppa/cpu-qom.h                 |  8 ++++-
target/hppa/cpu.h                     | 35 +++++++++++++++----
hw/hppa/machine.c                     | 64 +++++++++++++++++++++++++++--------
hw/pci-host/astro.c                   |  2 +-
linux-user/hppa/elfload.c             |  2 +-
target/hppa/cpu.c                     | 50 ++++++++++++++++++++-------
target/hppa/mem_helper.c              | 40 +++++++---------------
tests/qtest/machine-none-test.c       |  2 +-
tests/functional/hppa/test_seabios.py |  3 ++
9 files changed, 141 insertions(+), 65 deletions(-)
[PATCH v3 0/4] hppa: Add simple C3600 machine with PA-8600 CPU
Posted by Anton Johansson via qemu development 1 month, 3 weeks ago
This patchset tries to address a discrepancy between the C3700 machine
in QEMU/SeaBIOS and the documentation (chapter 5)

  http://ftp.parisc-linux.org/docs/whitepapers/PA-8700wp.pdf

where 40 bits of physical address space are used in SeaBIOS compared
to the 44 bits specified in the documentation.

A PA-8600 CPU with 40 bits of physical address space is added along with
a C3600 machine using it by default.  AFAICT there are no major
differences from QEMUs side between the PA-8600 and 8700 aside from the
physical address space size.  The PA-8700 machine can then be
moved to using 44 bits.  To account for the discrepancy with SeaBIOS, the
functional tests now run a C3700 but with a PA-8600 CPU.

CPU model definitions now inherit from a TYPE_HPPA_CPU base class and
use a HPPACPUDef struct to provide model specifics, similar to the SPARC
and RISCV targets.  This hopefully makes it easier to add other models,
such as the 8800/8900.

Based on:
  [PATCH v6 0/8] single-binary: Drop TARGET_PHYS_ADDR_SPACE_BITS
  (20260218-phys_addr-v6-0-a603bf363218@rev.ng)

Signed-off-by: Anton Johansson <anjo@rev.ng>
---
Changes in v3:
- Fixed spelling in commit message/comment
- Rebased
- Dropped if statement in hppa_cpu_class_base_init() (patch
  "hppa: Introduce HPPACPUDef").  Not needed as it will simply
  be set to NULL for the abstract base class anyway.
- Link to v2: https://lore.kernel.org/qemu-devel/20260210-hppa-c3600-v2-0-9ca09c677012@rev.ng

Changes in v2:
- Missed a reference to the old "hppa" CPU model, updated to
  "pa-7300lc".
- Link to v1: https://lore.kernel.org/qemu-devel/20260210-hppa-c3600-v1-0-a17ec58f053f@rev.ng

---
Anton Johansson (4):
      hppa: Prepare for additional CPU models
      hppa: Introduce HPPACPUDef
      hppa: Get physical address space bits from HPPACPUDef
      hppa: Add C3600 machine with PA-8600 CPU

 target/hppa/cpu-qom.h                 |  8 ++++-
 target/hppa/cpu.h                     | 35 +++++++++++++++----
 hw/hppa/machine.c                     | 64 +++++++++++++++++++++++++++--------
 hw/pci-host/astro.c                   |  2 +-
 linux-user/hppa/elfload.c             |  2 +-
 target/hppa/cpu.c                     | 50 ++++++++++++++++++++-------
 target/hppa/mem_helper.c              | 40 +++++++---------------
 tests/qtest/machine-none-test.c       |  2 +-
 tests/functional/hppa/test_seabios.py |  3 ++
 9 files changed, 141 insertions(+), 65 deletions(-)
Re: [PATCH v3 0/4] hppa: Add simple C3600 machine with PA-8600 CPU
Posted by Helge Deller 1 month, 3 weeks ago
On 2/18/26 20:48, Anton Johansson via qemu development wrote:
> This patchset tries to address a discrepancy between the C3700 machine
> in QEMU/SeaBIOS and the documentation (chapter 5)
> 
>    http://ftp.parisc-linux.org/docs/whitepapers/PA-8700wp.pdf
> 
> where 40 bits of physical address space are used in SeaBIOS compared
> to the 44 bits specified in the documentation.
> 
> A PA-8600 CPU with 40 bits of physical address space is added along with
> a C3600 machine using it by default.

As I mentioned earlier, I've now the patches ready for submission
to add a A400 machine. The A400 uses a PA8500 CPU, which has 40bits too.
So, instead of adding the C3600, can we please rebase your patch on my
series instead?  I send my series in the the next few minutes...

Thanks!
Helge

>  AFAICT there are no major
> differences from QEMUs side between the PA-8600 and 8700 aside from the
> physical address space size.  The PA-8700 machine can then be
> moved to using 44 bits.  To account for the discrepancy with SeaBIOS, the
> functional tests now run a C3700 but with a PA-8600 CPU.
> 
> CPU model definitions now inherit from a TYPE_HPPA_CPU base class and
> use a HPPACPUDef struct to provide model specifics, similar to the SPARC
> and RISCV targets.  This hopefully makes it easier to add other models,
> such as the 8800/8900.
> 
> Based on:
>    [PATCH v6 0/8] single-binary: Drop TARGET_PHYS_ADDR_SPACE_BITS
>    (20260218-phys_addr-v6-0-a603bf363218@rev.ng)
> 
> Signed-off-by: Anton Johansson <anjo@rev.ng>
> ---
> Changes in v3:
> - Fixed spelling in commit message/comment
> - Rebased
> - Dropped if statement in hppa_cpu_class_base_init() (patch
>    "hppa: Introduce HPPACPUDef").  Not needed as it will simply
>    be set to NULL for the abstract base class anyway.
> - Link to v2: https://lore.kernel.org/qemu-devel/20260210-hppa-c3600-v2-0-9ca09c677012@rev.ng
> 
> Changes in v2:
> - Missed a reference to the old "hppa" CPU model, updated to
>    "pa-7300lc".
> - Link to v1: https://lore.kernel.org/qemu-devel/20260210-hppa-c3600-v1-0-a17ec58f053f@rev.ng
> 
> ---
> Anton Johansson (4):
>        hppa: Prepare for additional CPU models
>        hppa: Introduce HPPACPUDef
>        hppa: Get physical address space bits from HPPACPUDef
>        hppa: Add C3600 machine with PA-8600 CPU
> 
>   target/hppa/cpu-qom.h                 |  8 ++++-
>   target/hppa/cpu.h                     | 35 +++++++++++++++----
>   hw/hppa/machine.c                     | 64 +++++++++++++++++++++++++++--------
>   hw/pci-host/astro.c                   |  2 +-
>   linux-user/hppa/elfload.c             |  2 +-
>   target/hppa/cpu.c                     | 50 ++++++++++++++++++++-------
>   target/hppa/mem_helper.c              | 40 +++++++---------------
>   tests/qtest/machine-none-test.c       |  2 +-
>   tests/functional/hppa/test_seabios.py |  3 ++
>   9 files changed, 141 insertions(+), 65 deletions(-)
> 
>