* [PATCH 00/11] HPPA Patches for qemu-v11
@ 2026-03-30 21:18 Helge Deller
2026-03-30 21:18 ` [PATCH 01/11] hw/pci-host/astro: Update copyright and documentation link Helge Deller
` (10 more replies)
0 siblings, 11 replies; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
A few late fixes for the HPPA architecture:
- graphics support was broken for 64-bit machines. This series adds
support for VGA graphics for Linux guests
- the various memory ranges were not correctly implemented
- TOC/NMI was not working on 64-bit machines
- minor 64-bit HP-UX boot fixes (but it still crashes)
- minor fixes regarding weblinks and various Astro registers
Please review and consider to pull for qemu-v11.
Thanks!
Helge
Helge Deller (11):
hw/pci-host/astro: Update copyright and documentation link
hw/hppa: Disable Artist graphics card on 64-bit machines
hw/pci-host/astro: Make astro address arrays accessible for other
users
hw/pci-host/astro: Fix initial addresses in IOC
hw/pci-host/astro: Implement LMMIO registers
hw/pci-host/astro: Fix LMMIO DIRECT mappings
hw/pci-host/astro: Add GMMIO mapping
hw/pci-host/astro: Add comment about Astro version numbers
target/hppa: Fix TOC handler for 64-bit CPUs
hw/hppa: Implement memory ranges
target/hppa: Update SeaBIOS-hppa to version 24
hw/hppa/hppa_hardware.h | 3 +-
hw/hppa/machine.c | 61 +++++++---
hw/pci-host/astro.c | 215 ++++++++++++++++++++++++++++++------
include/hw/pci-host/astro.h | 12 +-
pc-bios/hppa-firmware.img | Bin 631968 -> 632416 bytes
pc-bios/hppa-firmware64.img | Bin 714440 -> 664768 bytes
roms/seabios-hppa | 2 +-
target/hppa/int_helper.c | 3 +-
8 files changed, 239 insertions(+), 57 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH 01/11] hw/pci-host/astro: Update copyright and documentation link
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-31 9:35 ` Philippe Mathieu-Daudé
2026-03-30 21:18 ` [PATCH 02/11] hw/hppa: Disable Artist graphics card on 64-bit machines Helge Deller
` (9 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
Update the link to the documentation, which was still pointing to the
Wiki page. In the meantime the PA-RISC wiki was converted to a
read-the-docs website.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/pci-host/astro.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 6cc0b35070..59d8007a1a 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -3,12 +3,12 @@
* with Elroy PCI bus (LBA) adapter emulation
* Found in C3000 and similar machines
*
- * (C) 2023 by Helge Deller <deller@gmx.de>
+ * (C) 2023-2026 by Helge Deller <deller@gmx.de>
*
* This work is licensed under the GNU GPL license version 2 or later.
*
* Chip documentation is available at:
- * https://parisc.wiki.kernel.org/index.php/Technical_Documentation
+ * https://parisc.docs.kernel.org/en/latest/technical_documentation.html
*
* TODO:
* - All user-added devices are currently attached to the first
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 02/11] hw/hppa: Disable Artist graphics card on 64-bit machines
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
2026-03-30 21:18 ` [PATCH 01/11] hw/pci-host/astro: Update copyright and documentation link Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-30 21:42 ` Philippe Mathieu-Daudé
2026-03-30 21:18 ` [PATCH 03/11] hw/pci-host/astro: Make astro address arrays accessible for other users Helge Deller
` (8 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
The original Artist graphics used the GSC bus, was often installed in old
32-bit machines (e.g. 715) and can not be used on 64-bit machines.
This is why this patch makes the artist driver dependend on the Lasi chip,
which was never used in a 64-bit machine.
Note that there exists a variant of Artist for the PCI-bus (Visualize-EG PCI).
It has quite some differences in the registers, and would require that we write
a PCI ROM for it, so that Linux and HP-UX would be able to use it.
Instead, for now, users can simply use a standard VGA or ATI PCI graphics card
on Linux. This can be enabled on the command line with "-device ati-vga" or
"-device VGA". If the "-nographic" option is omitted, a PCI OCHI controller
with USB keyboard and USB mouse will be added automatically.
This fixes graphics support on 64-bit hppa machines and allows us to boot up a
64-bit Linux installation with VGA graphics.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/hppa/machine.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 3663bac53b..58e76bee2e 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -384,7 +384,8 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
SysBusDevice *s;
/* Graphics setup. */
- if (machine->enable_graphics && vga_interface_type != VGA_NONE) {
+ if (lasi_dev && machine->enable_graphics &&
+ vga_interface_type != VGA_NONE) {
dev = qdev_new("artist");
s = SYS_BUS_DEVICE(dev);
bool disabled = object_property_get_bool(OBJECT(dev), "disable", NULL);
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 03/11] hw/pci-host/astro: Make astro address arrays accessible for other users
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
2026-03-30 21:18 ` [PATCH 01/11] hw/pci-host/astro: Update copyright and documentation link Helge Deller
2026-03-30 21:18 ` [PATCH 02/11] hw/hppa: Disable Artist graphics card on 64-bit machines Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-30 21:18 ` [PATCH 04/11] hw/pci-host/astro: Fix initial addresses in IOC Helge Deller
` (7 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
Move the tables out of astro_realize(). This is needed because follow-up
patches will need those tables.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/pci-host/astro.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 59d8007a1a..6a09dc15e7 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -37,6 +37,11 @@
#include "qom/object.h"
#include "exec/target_page.h"
+static const int elroy_hpa_offsets[ELROY_NUM] = {
+ 0x30000, 0x32000, 0x38000, 0x3c000 };
+static const char elroy_rope_nr[ELROY_NUM] = {
+ 0, 1, 4, 6 }; /* busnum path, e.g. [10:6] */
+
/*
* Helper functions
*/
@@ -843,10 +848,6 @@ static void astro_realize(DeviceState *obj, Error **errp)
/* Create Elroys (PCI host bus chips). */
for (i = 0; i < ELROY_NUM; i++) {
- static const int elroy_hpa_offsets[ELROY_NUM] = {
- 0x30000, 0x32000, 0x38000, 0x3c000 };
- static const char elroy_rope_nr[ELROY_NUM] = {
- 0, 1, 4, 6 }; /* busnum path, e.g. [10:6] */
int addr_offset;
ElroyState *elroy;
hwaddr map_addr;
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 04/11] hw/pci-host/astro: Fix initial addresses in IOC
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
` (2 preceding siblings ...)
2026-03-30 21:18 ` [PATCH 03/11] hw/pci-host/astro: Make astro address arrays accessible for other users Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-30 21:18 ` [PATCH 05/11] hw/pci-host/astro: Implement LMMIO registers Helge Deller
` (6 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
F-Extend the LMMIO and IOS distributed addresses.
Use the 44-bit address for the IOS distributed address.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/pci-host/astro.c | 6 +++---
include/hw/pci-host/astro.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 6a09dc15e7..87bc98f553 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -804,13 +804,13 @@ static void astro_reset(DeviceState *dev)
* The LBA BASE/MASK registers control IO -> System routing (in Elroy)
*/
memset(&s->ioc_ranges, 0, sizeof(s->ioc_ranges));
- s->ioc_ranges[(0x360 - 0x300) / 8] = LMMIO_DIST_BASE_ADDR | 0x01; /* LMMIO_DIST_BASE (SBA) */
+ s->ioc_ranges[(0x360 - 0x300) / 8] = F_EXTEND(LMMIO_DIST_BASE_ADDR) | 0x01;
s->ioc_ranges[(0x368 - 0x300) / 8] = 0xfc000000; /* LMMIO_DIST_MASK */
s->ioc_ranges[(0x370 - 0x300) / 8] = 0; /* LMMIO_DIST_ROUTE */
- s->ioc_ranges[(0x390 - 0x300) / 8] = IOS_DIST_BASE_ADDR | 0x01; /* IOS_DIST_BASE */
+ s->ioc_ranges[(0x390 - 0x300) / 8] = F_EXTEND(IOS_DIST_BASE_ADDR) | 0x01;
s->ioc_ranges[(0x398 - 0x300) / 8] = 0xffffff0000; /* IOS_DIST_MASK */
s->ioc_ranges[(0x3a0 - 0x300) / 8] = 0x3400000000000000ULL; /* IOS_DIST_ROUTE */
- s->ioc_ranges[(0x3c0 - 0x300) / 8] = 0xfffee00000; /* IOS_DIRECT_BASE */
+ s->ioc_ranges[(0x3c0 - 0x300) / 8] = IOS_DIST_BASE_ADDR; /* IOS_DIRECT_BASE */
s->ioc_ranges[(0x3c8 - 0x300) / 8] = 0xffffff0000; /* IOS_DIRECT_MASK */
s->ioc_ranges[(0x3d0 - 0x300) / 8] = 0x0; /* IOS_DIRECT_ROUTE */
diff --git a/include/hw/pci-host/astro.h b/include/hw/pci-host/astro.h
index fce052c9f8..5eb1fa57c1 100644
--- a/include/hw/pci-host/astro.h
+++ b/include/hw/pci-host/astro.h
@@ -26,8 +26,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(ElroyState, ELROY_PCI_HOST_BRIDGE)
#define LMMIO_DIRECT_RANGES 4
-#define IOS_DIST_BASE_ADDR 0xfffee00000ULL
-#define IOS_DIST_BASE_SIZE 0x10000ULL
+#define IOS_DIST_BASE_ADDR 0xffffee00000ULL
+#define IOS_DIST_BASE_SIZE 0x10000ULL
#define HF_ENABLE 0x40 /* enable HF mode (default is -1 mode) */
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 05/11] hw/pci-host/astro: Implement LMMIO registers
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
` (3 preceding siblings ...)
2026-03-30 21:18 ` [PATCH 04/11] hw/pci-host/astro: Fix initial addresses in IOC Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-30 21:18 ` [PATCH 06/11] hw/pci-host/astro: Fix LMMIO DIRECT mappings Helge Deller
` (5 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
Add code to adjust the memory mapping windows according to the LMMIO registers
in Astro. This allows SeaBIOS-hppa to configure Astro depending on existing
PCI cards, and especially makes it possible to enable a VGA PCI card.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/pci-host/astro.c | 84 +++++++++++++++++++++++++++++++++----
include/hw/pci-host/astro.h | 8 +++-
2 files changed, 81 insertions(+), 11 deletions(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 87bc98f553..4af35ea92f 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -530,6 +530,78 @@ static ElroyState *elroy_init(int num)
* Astro Runway chip.
*/
+static void adjust_LMMIO_mapping(AstroState *s)
+{
+ MemoryRegion *lmmio;
+ uint64_t map_addr, map_size, align_mask;
+ uint32_t map_route, map_enabled, i;
+
+ lmmio = &s->lmmio;
+
+ /* read LMMIO distributed route and calculate size */
+ map_route = s->ioc_ranges[(0x370 - 0x300) / 8] >> 58;
+ map_route = MIN(MAX(map_route, 20), 23);
+
+ /* calculate size of each mapping, sum of all is 8-64 MB */
+ map_size = 1ULL << map_route;
+ align_mask = ~(map_size - 1);
+
+ /* read LMMIO_DIST_BASE for mapping address */
+ map_addr = s->ioc_ranges[(0x360 - 0x300) / 8];
+ map_enabled = map_addr & 1;
+ map_addr &= MAKE_64BIT_MASK(24, 5);
+ map_addr |= MAKE_64BIT_MASK(29, 36);
+ map_addr &= align_mask;
+ s->ioc_ranges[(0x360 - 0x300) / 8] = map_addr | map_enabled;
+
+ /* make sure the lmmio region is initially turned off */
+ if (lmmio->enabled) {
+ memory_region_set_enabled(lmmio, false);
+ }
+
+ /* exit if range is not enabled */
+ if (!map_enabled) {
+ return;
+ }
+
+ if (!lmmio->name) {
+ memory_region_init_io(lmmio, OBJECT(s), &unassigned_io_ops, s,
+ "LMMIO", ROPES_PER_IOC * map_size);
+ memory_region_add_subregion_overlap(get_system_memory(),
+ map_addr, lmmio, 1);
+ }
+
+ memory_region_set_address(lmmio, map_addr);
+ memory_region_set_size(lmmio, ROPES_PER_IOC * map_size);
+ memory_region_set_enabled(lmmio, true);
+
+ for (i = 0; i < ELROY_NUM; i++) {
+ MemoryRegion *alias;
+ ElroyState *elroy;
+ int rope;
+
+ elroy = s->elroy[i];
+ alias = &elroy->lmmio_alias;
+ rope = elroy_rope_nr[i];
+ if (alias->enabled) {
+ memory_region_set_enabled(alias, false);
+ }
+
+ if (!alias->name) {
+ memory_region_init_alias(alias, OBJECT(elroy),
+ "lmmio-alias", &elroy->pci_mmio, 0, map_size);
+ memory_region_add_subregion_overlap(lmmio, rope * map_size,
+ alias, 2);
+ }
+
+ memory_region_set_address(alias, rope * map_size);
+ memory_region_set_alias_offset(alias,
+ (uint32_t) (map_addr + rope * map_size));
+ memory_region_set_size(alias, map_size);
+ memory_region_set_enabled(alias, true);
+ }
+}
+
static void adjust_LMMIO_DIRECT_mapping(AstroState *s, unsigned int reg_index)
{
MemoryRegion *lmmio_alias;
@@ -689,6 +761,9 @@ static MemTxResult astro_chip_write_with_attrs(void *opaque, hwaddr addr,
if (index < LMMIO_DIRECT_RANGES * 3) {
adjust_LMMIO_DIRECT_mapping(s, index);
}
+ if (addr >= 0x360 && addr <= 0x370 + 7) {
+ adjust_LMMIO_mapping(s);
+ }
break;
case 0x10200:
case 0x10220:
@@ -892,15 +967,6 @@ static void astro_realize(DeviceState *obj, Error **errp)
elroy->mmio_base[(0x0240 - 0x200) / 8] = rope * map_size | 0x01;
elroy->mmio_base[(0x0248 - 0x200) / 8] = 0x0000e000;
- /* map elroys mmio */
- map_size = LMMIO_DIST_BASE_SIZE / ROPES_PER_IOC;
- map_addr = F_EXTEND(LMMIO_DIST_BASE_ADDR + rope * map_size);
- memory_region_init_alias(&elroy->pci_mmio_alias, OBJECT(elroy),
- "pci-mmio-alias",
- &elroy->pci_mmio, (uint32_t) map_addr, map_size);
- memory_region_add_subregion(get_system_memory(), map_addr,
- &elroy->pci_mmio_alias);
-
/* map elroys io */
map_size = IOS_DIST_BASE_SIZE / ROPES_PER_IOC;
map_addr = F_EXTEND(IOS_DIST_BASE_ADDR + rope * map_size);
diff --git a/include/hw/pci-host/astro.h b/include/hw/pci-host/astro.h
index 5eb1fa57c1..0cd384bceb 100644
--- a/include/hw/pci-host/astro.h
+++ b/include/hw/pci-host/astro.h
@@ -61,9 +61,10 @@ struct ElroyState {
MemoryRegion this_mem;
MemoryRegion pci_mmio;
- MemoryRegion pci_mmio_alias;
- MemoryRegion pci_hole;
MemoryRegion pci_io;
+
+ MemoryRegion gmmio_alias;
+ MemoryRegion lmmio_alias;
};
struct AstroState {
@@ -89,6 +90,9 @@ struct AstroState {
MemoryRegion this_mem;
MemoryRegion lmmio_direct[LMMIO_DIRECT_RANGES];
+ MemoryRegion lmmio;
+ MemoryRegion gmmio;
+
IOMMUMemoryRegion iommu;
AddressSpace iommu_as;
};
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 06/11] hw/pci-host/astro: Fix LMMIO DIRECT mappings
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
` (4 preceding siblings ...)
2026-03-30 21:18 ` [PATCH 05/11] hw/pci-host/astro: Implement LMMIO registers Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-30 21:18 ` [PATCH 07/11] hw/pci-host/astro: Add GMMIO mapping Helge Deller
` (4 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
Fix the existing code which has the mask wrong.
Implement the direct mapping via overlapping subregion with priority 3
to make sure the direct mapping gets precedence over the LMMIO region.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/pci-host/astro.c | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 4af35ea92f..e1d73258c4 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -607,9 +607,13 @@ static void adjust_LMMIO_DIRECT_mapping(AstroState *s, unsigned int reg_index)
MemoryRegion *lmmio_alias;
unsigned int lmmio_index, map_route;
hwaddr map_addr;
- uint32_t map_size;
+ uint32_t map_size, map_enabled;
struct ElroyState *elroy;
+ /* each LMMIO may access from 1 MB up to 64 MB */
+ const unsigned int lmmio_mask = ~(1 * MiB - 1);
+ const unsigned int lmmio_max_size = 64 * MiB;
+
/* pointer to LMMIO_DIRECT entry */
lmmio_index = reg_index / 3;
lmmio_alias = &s->lmmio_direct[lmmio_index];
@@ -622,31 +626,38 @@ static void adjust_LMMIO_DIRECT_mapping(AstroState *s, unsigned int reg_index)
map_route &= (ELROY_NUM - 1);
elroy = s->elroy[map_route];
+ /* make sure the lmmio region is initially turned off */
if (lmmio_alias->enabled) {
memory_region_set_enabled(lmmio_alias, false);
}
+ /* do sanity checks and calculate mmio size */
+ map_enabled = map_addr & 1;
+ map_addr &= lmmio_mask;
+ map_size &= lmmio_mask;
+ map_size = MIN(map_size, lmmio_max_size);
map_addr = F_EXTEND(map_addr);
- map_addr &= TARGET_PAGE_MASK;
- map_size = (~map_size) + 1;
- map_size &= TARGET_PAGE_MASK;
- /* exit if disabled or zero map size */
- if (!(map_addr & 1) || !map_size) {
+ /* exit if disabled or has zero size. */
+ if (!map_enabled || !map_size) {
return;
}
- if (!memory_region_size(lmmio_alias)) {
+ if (!lmmio_alias->name) {
+ char lmmio_name[32];
+ snprintf(lmmio_name, sizeof(lmmio_name),
+ "LMMIO-DIRECT-%u", lmmio_index);
memory_region_init_alias(lmmio_alias, OBJECT(elroy),
- "pci-lmmmio-alias", &elroy->pci_mmio,
+ lmmio_name, &elroy->pci_mmio,
(uint32_t) map_addr, map_size);
- memory_region_add_subregion(get_system_memory(), map_addr,
- lmmio_alias);
- } else {
- memory_region_set_alias_offset(lmmio_alias, map_addr);
- memory_region_set_size(lmmio_alias, map_size);
- memory_region_set_enabled(lmmio_alias, true);
+ memory_region_add_subregion_overlap(get_system_memory(),
+ map_addr, lmmio_alias, 3);
}
+
+ memory_region_set_address(lmmio_alias, map_addr);
+ memory_region_set_alias_offset(lmmio_alias, (uint32_t) map_addr);
+ memory_region_set_size(lmmio_alias, map_size);
+ memory_region_set_enabled(lmmio_alias, true);
}
static MemTxResult astro_chip_read_with_attrs(void *opaque, hwaddr addr,
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 07/11] hw/pci-host/astro: Add GMMIO mapping
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
` (5 preceding siblings ...)
2026-03-30 21:18 ` [PATCH 06/11] hw/pci-host/astro: Fix LMMIO DIRECT mappings Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-30 21:56 ` Philippe Mathieu-Daudé
2026-03-30 21:18 ` [PATCH 08/11] hw/pci-host/astro: Add comment about Astro version numbers Helge Deller
` (3 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
Implement the GMMIO mapping.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/pci-host/astro.c | 71 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 70 insertions(+), 1 deletion(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index e1d73258c4..8c61c696bd 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -14,7 +14,6 @@
* - All user-added devices are currently attached to the first
* Elroy (PCI bus) only for now. To fix this additional work in
* SeaBIOS and this driver is needed. See "user_creatable" flag below.
- * - GMMIO (Greater than 4 GB MMIO) register
*/
#define TYPE_ASTRO_IOMMU_MEMORY_REGION "astro-iommu-memory-region"
@@ -660,6 +659,73 @@ static void adjust_LMMIO_DIRECT_mapping(AstroState *s, unsigned int reg_index)
memory_region_set_enabled(lmmio_alias, true);
}
+static void adjust_GMMIO_mapping(AstroState *s)
+{
+ MemoryRegion *gmmio;
+ uint64_t map_addr, map_size, align_mask;
+ uint32_t map_route, map_enabled, i;
+
+ gmmio = &s->gmmio;
+ map_addr = s->ioc_ranges[(0x378 - 0x300) / 8]; /* GMMIO_DIST_BASE */
+ map_enabled = map_addr & 1;
+ map_addr &= MAKE_64BIT_MASK(32, 8);
+ s->ioc_ranges[(0x378 - 0x300) / 8] = map_addr | map_enabled;
+
+ map_route = s->ioc_ranges[(0x388 - 0x300) / 8] >> 58; /* GMMIO_DIST_ROUTE */
+ map_route = MIN(MAX(map_route, 29), 33); /* between 4-16 GB total */
+ map_size = 1ULL << map_route; /* size of each mapping */
+ align_mask = ~(map_size - 1);
+
+ /* make sure the lmmio region is initially turned off */
+ if (gmmio->enabled) {
+ memory_region_set_enabled(gmmio, false);
+ }
+
+ /* do sanity checks and calculate mmio size */
+ map_addr &= align_mask;
+
+ /* exit if disabled */
+ if (!map_enabled) {
+ return;
+ }
+
+ if (!gmmio->name) {
+ memory_region_init_io(gmmio, OBJECT(s), &unassigned_io_ops, s,
+ "GMMIO", ROPES_PER_IOC * map_size);
+ memory_region_add_subregion_overlap(get_system_memory(),
+ map_addr, gmmio, 1);
+ }
+
+ memory_region_set_address(gmmio, map_addr);
+ memory_region_set_size(gmmio, ROPES_PER_IOC * map_size);
+ memory_region_set_enabled(gmmio, true);
+
+ for (i = 0; i < ELROY_NUM; i++) {
+ MemoryRegion *alias;
+ ElroyState *elroy;
+ int rope;
+
+ elroy = s->elroy[i];
+ alias = &elroy->gmmio_alias;
+ rope = elroy_rope_nr[i];
+ if (alias->enabled) {
+ memory_region_set_enabled(alias, false);
+ }
+
+ if (!alias->name) {
+ memory_region_init_alias(alias, OBJECT(elroy),
+ "gmmio-alias", &elroy->pci_mmio, 0, map_size);
+ memory_region_add_subregion_overlap(gmmio, rope * map_size,
+ alias, 2);
+ }
+
+ memory_region_set_address(alias, rope * map_size);
+ memory_region_set_alias_offset(alias, map_addr + rope * map_size);
+ memory_region_set_size(alias, map_size);
+ memory_region_set_enabled(alias, true);
+ }
+}
+
static MemTxResult astro_chip_read_with_attrs(void *opaque, hwaddr addr,
uint64_t *data, unsigned size,
MemTxAttrs attrs)
@@ -775,6 +841,9 @@ static MemTxResult astro_chip_write_with_attrs(void *opaque, hwaddr addr,
if (addr >= 0x360 && addr <= 0x370 + 7) {
adjust_LMMIO_mapping(s);
}
+ if (addr >= 0x378 && addr <= 0x388 + 7) {
+ adjust_GMMIO_mapping(s);
+ }
break;
case 0x10200:
case 0x10220:
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 08/11] hw/pci-host/astro: Add comment about Astro version numbers
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
` (6 preceding siblings ...)
2026-03-30 21:18 ` [PATCH 07/11] hw/pci-host/astro: Add GMMIO mapping Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-30 21:54 ` Philippe Mathieu-Daudé
2026-03-30 21:18 ` [PATCH 09/11] target/hppa: Fix TOC handler for 64-bit CPUs Helge Deller
` (2 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/pci-host/astro.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 8c61c696bd..776267e150 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -738,7 +738,7 @@ static MemTxResult astro_chip_read_with_attrs(void *opaque, hwaddr addr,
switch ((addr >> 3) << 3) {
/* R2I registers */
case 0x0000: /* ID */
- val = (0x01 << 3) | 0x01ULL;
+ val = (0x01 << 3) | 0x01ULL; /* 0=Astro 1.0, 9=Astro 2.1, 2=Astro 3.0 */
break;
case 0x0008: /* IOC_CTRL */
val = s->ioc_ctrl;
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 09/11] target/hppa: Fix TOC handler for 64-bit CPUs
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
` (7 preceding siblings ...)
2026-03-30 21:18 ` [PATCH 08/11] hw/pci-host/astro: Add comment about Astro version numbers Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-30 21:52 ` Philippe Mathieu-Daudé
2026-03-30 21:18 ` [PATCH 10/11] hw/hppa: Implement memory ranges Helge Deller
2026-03-31 13:09 ` [PATCH 00/11] HPPA Patches for qemu-v11 Philippe Mathieu-Daudé
10 siblings, 1 reply; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
When the TOC handler is triggered, e.g. by using the "NMI" command
in the QEMU monitor, make sure to call the full 64-bit TOC handler
address in SeaBIOS-hppa firmware.
This fixes the TOC handler on 64-bit CPUs (and 64-bit SeaBIOS).
Signed-off-by: Helge Deller <deller@gmx.de>
---
target/hppa/int_helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c
index d5a20cd549..fd4b99069e 100644
--- a/target/hppa/int_helper.c
+++ b/target/hppa/int_helper.c
@@ -203,7 +203,8 @@ void hppa_cpu_do_interrupt(CPUState *cs)
/* step 7 */
if (i == EXCP_TOC) {
- env->iaoq_f = hppa_form_gva(env, 0, FIRMWARE_START);
+ env->iaoq_f = hppa_form_gva(env, 0,
+ ((uint64_t) FIRMWARE_HIGH) << 32 | FIRMWARE_START);
/* help SeaBIOS and provide iaoq_b and iasq_back in shadow regs */
env->gr[24] = env->cr_back[0];
env->gr[25] = env->cr_back[1];
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH 10/11] hw/hppa: Implement memory ranges
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
` (8 preceding siblings ...)
2026-03-30 21:18 ` [PATCH 09/11] target/hppa: Fix TOC handler for 64-bit CPUs Helge Deller
@ 2026-03-30 21:18 ` Helge Deller
2026-03-31 13:09 ` [PATCH 00/11] HPPA Patches for qemu-v11 Philippe Mathieu-Daudé
10 siblings, 0 replies; 22+ messages in thread
From: Helge Deller @ 2026-03-30 21:18 UTC (permalink / raw)
To: qemu-devel; +Cc: deller, Richard Henderson
From: Helge Deller <deller@gmx.de>
All 64-bit PA-RISC machines split the memory into (up to 3) different
memory ranges, which are mapped at specific addresses. This patch
mimics the mapping as it's done on physical machines, which includes the
3.75 GB split for C3700, and 1 GB split for newer 64-bit PAT machines
like the A400.
SeaBIOS-hppa needs to know how the memory split is done, so add a new
memsplit_addr variable which stores the specific split address and hand
this over to SeaBIOS-hppa via fwcfg.
Signed-off-by: Helge Deller <deller@gmx.de>
---
hw/hppa/hppa_hardware.h | 3 ++-
hw/hppa/machine.c | 58 ++++++++++++++++++++++++++++++-----------
2 files changed, 45 insertions(+), 16 deletions(-)
diff --git a/hw/hppa/hppa_hardware.h b/hw/hppa/hppa_hardware.h
index 006aae63b9..e2b2faa4a3 100644
--- a/hw/hppa/hppa_hardware.h
+++ b/hw/hppa/hppa_hardware.h
@@ -8,7 +8,8 @@
#define FIRMWARE_END 0xf0100000
#define FIRMWARE_HIGH 0xfffffff0 /* upper 32-bits of 64-bit firmware address */
-#define RAM_MAP_HIGH 0x0100000000 /* memory above 3.75 GB is mapped here */
+#define RAM_MAP_HIGH1 0x0100000000 /* memory above 4 GB */
+#define RAM_MAP_HIGH2 0x4040000000 /* memory between 1 G and 3.75 GB */
#define MEM_PDC_ENTRY 0x4800 /* PDC entry address */
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 58e76bee2e..eece05ab65 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -43,6 +43,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(HppaMachineState, HPPA_COMMON_MACHINE)
struct HppaMachineState {
MachineState parent_obj;
+
+ uint64_t memsplit_addr;
};
#define MIN_SEABIOS_HPPA_VERSION 22 /* require at least this fw version */
@@ -208,6 +210,7 @@ static FWCfgState *create_fw_cfg(MachineState *ms, PCIBus *pci_bus,
const char qemu_version[] = QEMU_VERSION;
MachineClass *mc = MACHINE_GET_CLASS(ms);
int btlb_entries = HPPA_BTLB_ENTRIES(&cpu[0]->env);
+ struct HppaMachineState *hpm = HPPA_COMMON_MACHINE(ms);
int len;
fw_cfg = fw_cfg_init_mem_nodma(addr, addr + 4, 1);
@@ -231,6 +234,10 @@ static FWCfgState *create_fw_cfg(MachineState *ms, PCIBus *pci_bus,
fw_cfg_add_file(fw_cfg, "/etc/hppa/machine",
g_memdup2(mc->name, len), len);
+ val = cpu_to_le64(hpm->memsplit_addr);
+ fw_cfg_add_file(fw_cfg, "/etc/hppa/memsplit-addr",
+ g_memdup2(&val, sizeof(val)), sizeof(val));
+
val = cpu_to_le64(soft_power_reg);
fw_cfg_add_file(fw_cfg, "/etc/hppa/power-button-addr",
g_memdup2(&val, sizeof(val)), sizeof(val));
@@ -287,6 +294,8 @@ static TranslateFn *machine_HP_common_init_cpus(MachineState *machine)
TranslateFn *translate;
MemoryRegion *cpu_region;
uint64_t ram_max;
+ struct HppaMachineState *hpm;
+ hwaddr splitaddr;
/* Create CPUs. */
for (unsigned int i = 0; i < smp_cpus; i++) {
@@ -347,21 +356,36 @@ static TranslateFn *machine_HP_common_init_cpus(MachineState *machine)
info_report("Max RAM size limited to %" PRIu64 " MB", ram_max / MiB);
machine->ram_size = ram_max;
}
- if (machine->ram_size <= FIRMWARE_START) {
- /* contiguous memory up to 3.75 GB RAM */
- memory_region_add_subregion_overlap(addr_space, 0, machine->ram, -1);
- } else {
+
+ hpm = HPPA_COMMON_MACHINE(machine);
+ if (!hpm->memsplit_addr) {
/* non-contiguous: Memory above 3.75 GB is mapped at RAM_MAP_HIGH */
- MemoryRegion *mem_region;
- mem_region = g_new(MemoryRegion, 2);
- memory_region_init_alias(&mem_region[0], &addr_space->parent_obj,
- "LowMem", machine->ram, 0, FIRMWARE_START);
- memory_region_init_alias(&mem_region[1], &addr_space->parent_obj,
- "HighMem", machine->ram, FIRMWARE_START,
- machine->ram_size - FIRMWARE_START);
- memory_region_add_subregion_overlap(addr_space, 0, &mem_region[0], -1);
- memory_region_add_subregion_overlap(addr_space, RAM_MAP_HIGH,
- &mem_region[1], -1);
+ hpm->memsplit_addr = FIRMWARE_START;
+ }
+ splitaddr = hpm->memsplit_addr;
+
+ MemoryRegion *mem_region;
+ mem_region = g_new(MemoryRegion, 1);
+ memory_region_init_alias(&mem_region[0], &addr_space->parent_obj,
+ "Range0_Mem", machine->ram, 0, splitaddr);
+ memory_region_add_subregion_overlap(addr_space, 0, &mem_region[0], -1);
+ if (hppa_is_pa20(&cpu[0]->env)) {
+ if (machine->ram_size > 4 * GiB) {
+ mem_region = g_new(MemoryRegion, 1);
+ memory_region_init_alias(&mem_region[0], &addr_space->parent_obj,
+ "Range1_Mem", machine->ram, 4 * GiB,
+ machine->ram_size - 4 * GiB);
+ memory_region_add_subregion_overlap(addr_space, RAM_MAP_HIGH1,
+ &mem_region[0], -1);
+ }
+ if (machine->ram_size > splitaddr) {
+ mem_region = g_new(MemoryRegion, 1);
+ memory_region_init_alias(&mem_region[0], &addr_space->parent_obj,
+ "Range2_Mem", machine->ram, splitaddr,
+ 4 * GiB - splitaddr);
+ memory_region_add_subregion_overlap(addr_space, RAM_MAP_HIGH2,
+ &mem_region[0], -1);
+ }
}
return translate;
@@ -757,6 +781,10 @@ static void machine_HP_C3700_init(MachineState *machine)
*/
static void machine_HP_A400_init(MachineState *machine)
{
+ struct HppaMachineState *hpm;
+
+ hpm = HPPA_COMMON_MACHINE(machine);
+ hpm->memsplit_addr = 1 * GiB;
machine_HP_C3700_init(machine);
}
@@ -815,7 +843,7 @@ static void hppa_machine_common_class_init(ObjectClass *oc, const void *data)
mc->default_cpus = 1;
mc->max_cpus = HPPA_MAX_CPUS;
mc->default_boot_order = "cd";
- mc->default_ram_id = "ram";
+ mc->default_ram_id = "hppa.ram";
mc->default_nic = "tulip";
nc->nmi_monitor_handler = hppa_nmi;
--
2.53.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [PATCH 02/11] hw/hppa: Disable Artist graphics card on 64-bit machines
2026-03-30 21:18 ` [PATCH 02/11] hw/hppa: Disable Artist graphics card on 64-bit machines Helge Deller
@ 2026-03-30 21:42 ` Philippe Mathieu-Daudé
2026-03-31 8:58 ` Helge Deller
0 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-30 21:42 UTC (permalink / raw)
To: Helge Deller, qemu-devel; +Cc: deller, Richard Henderson
On 30/3/26 23:18, Helge Deller wrote:
> From: Helge Deller <deller@gmx.de>
>
> The original Artist graphics used the GSC bus, was often installed in old
> 32-bit machines (e.g. 715) and can not be used on 64-bit machines.
> This is why this patch makes the artist driver dependend on the Lasi chip,
> which was never used in a 64-bit machine.
>
> Note that there exists a variant of Artist for the PCI-bus (Visualize-EG PCI).
> It has quite some differences in the registers, and would require that we write
> a PCI ROM for it, so that Linux and HP-UX would be able to use it.
>
> Instead, for now, users can simply use a standard VGA or ATI PCI graphics card
> on Linux. This can be enabled on the command line with "-device ati-vga" or
> "-device VGA". If the "-nographic" option is omitted, a PCI OCHI controller
> with USB keyboard and USB mouse will be added automatically.
>
> This fixes graphics support on 64-bit hppa machines and allows us to boot up a
> 64-bit Linux installation with VGA graphics.
>
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
> hw/hppa/machine.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
> index 3663bac53b..58e76bee2e 100644
> --- a/hw/hppa/machine.c
> +++ b/hw/hppa/machine.c
> @@ -384,7 +384,8 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
> SysBusDevice *s;
>
> /* Graphics setup. */
> - if (machine->enable_graphics && vga_interface_type != VGA_NONE) {
> + if (lasi_dev && machine->enable_graphics &&
> + vga_interface_type != VGA_NONE) {
Pre-existing, 'lasi_dev' being a static variable isn't really helpful.
Back to this patch:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Although a distinct descriptive boolean variable could be used
instead for clarity, rather than testing LASI presence.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 09/11] target/hppa: Fix TOC handler for 64-bit CPUs
2026-03-30 21:18 ` [PATCH 09/11] target/hppa: Fix TOC handler for 64-bit CPUs Helge Deller
@ 2026-03-30 21:52 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-30 21:52 UTC (permalink / raw)
To: Helge Deller, qemu-devel; +Cc: deller, Richard Henderson
On 30/3/26 23:18, Helge Deller wrote:
> From: Helge Deller <deller@gmx.de>
>
> When the TOC handler is triggered, e.g. by using the "NMI" command
> in the QEMU monitor, make sure to call the full 64-bit TOC handler
> address in SeaBIOS-hppa firmware.
> This fixes the TOC handler on 64-bit CPUs (and 64-bit SeaBIOS).
>
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
> target/hppa/int_helper.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c
> index d5a20cd549..fd4b99069e 100644
> --- a/target/hppa/int_helper.c
> +++ b/target/hppa/int_helper.c
> @@ -203,7 +203,8 @@ void hppa_cpu_do_interrupt(CPUState *cs)
>
> /* step 7 */
> if (i == EXCP_TOC) {
> - env->iaoq_f = hppa_form_gva(env, 0, FIRMWARE_START);
> + env->iaoq_f = hppa_form_gva(env, 0,
> + ((uint64_t) FIRMWARE_HIGH) << 32 | FIRMWARE_START);
Maybe we can define that directly and use? Such PDC_FIRMWARE_START?
Or have some hppa_pdc_addr() helper?
> /* help SeaBIOS and provide iaoq_b and iasq_back in shadow regs */
> env->gr[24] = env->cr_back[0];
> env->gr[25] = env->cr_back[1];
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 08/11] hw/pci-host/astro: Add comment about Astro version numbers
2026-03-30 21:18 ` [PATCH 08/11] hw/pci-host/astro: Add comment about Astro version numbers Helge Deller
@ 2026-03-30 21:54 ` Philippe Mathieu-Daudé
2026-03-31 16:57 ` Helge Deller
0 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-30 21:54 UTC (permalink / raw)
To: Helge Deller, qemu-devel; +Cc: deller, Richard Henderson
On 30/3/26 23:18, Helge Deller wrote:
> From: Helge Deller <deller@gmx.de>
>
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
> hw/pci-host/astro.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
> index 8c61c696bd..776267e150 100644
> --- a/hw/pci-host/astro.c
> +++ b/hw/pci-host/astro.c
> @@ -738,7 +738,7 @@ static MemTxResult astro_chip_read_with_attrs(void *opaque, hwaddr addr,
> switch ((addr >> 3) << 3) {
> /* R2I registers */
> case 0x0000: /* ID */
> - val = (0x01 << 3) | 0x01ULL;
> + val = (0x01 << 3) | 0x01ULL; /* 0=Astro 1.0, 9=Astro 2.1, 2=Astro 3.0 */
Using enum:
enum { ID_ASTRO_1_0 = 0, ID_ASTRO_2_1 = 9, ID_ASTRO_3_0 = 2 };
val = ID_ASTRO_2_1;
> break;
> case 0x0008: /* IOC_CTRL */
> val = s->ioc_ctrl;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 07/11] hw/pci-host/astro: Add GMMIO mapping
2026-03-30 21:18 ` [PATCH 07/11] hw/pci-host/astro: Add GMMIO mapping Helge Deller
@ 2026-03-30 21:56 ` Philippe Mathieu-Daudé
2026-03-30 22:29 ` Helge Deller
0 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-30 21:56 UTC (permalink / raw)
To: Helge Deller, qemu-devel; +Cc: deller, Richard Henderson
On 30/3/26 23:18, Helge Deller wrote:
> From: Helge Deller <deller@gmx.de>
>
> Implement the GMMIO mapping.
As this point in the release process, this is a bit out of scope IMHO.
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
> hw/pci-host/astro.c | 71 ++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 70 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 07/11] hw/pci-host/astro: Add GMMIO mapping
2026-03-30 21:56 ` Philippe Mathieu-Daudé
@ 2026-03-30 22:29 ` Helge Deller
2026-03-31 9:14 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 22+ messages in thread
From: Helge Deller @ 2026-03-30 22:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Helge Deller, qemu-devel; +Cc: Richard Henderson
On 3/30/26 23:56, Philippe Mathieu-Daudé wrote:
> On 30/3/26 23:18, Helge Deller wrote:
>> From: Helge Deller <deller@gmx.de>
>>
>> Implement the GMMIO mapping.
>
> As this point in the release process, this is a bit out of scope IMHO.
Well, no...
SeaBIOS has to initialize GMMIO at the same time and report
it along with LMMIO and IOS to the operating system.
Helge
>
>> Signed-off-by: Helge Deller <deller@gmx.de>
>> ---
>> hw/pci-host/astro.c | 71 ++++++++++++++++++++++++++++++++++++++++++++-
>> 1 file changed, 70 insertions(+), 1 deletion(-)
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 02/11] hw/hppa: Disable Artist graphics card on 64-bit machines
2026-03-30 21:42 ` Philippe Mathieu-Daudé
@ 2026-03-31 8:58 ` Helge Deller
2026-03-31 9:34 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 22+ messages in thread
From: Helge Deller @ 2026-03-31 8:58 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Helge Deller, qemu-devel; +Cc: Richard Henderson
On 3/30/26 23:42, Philippe Mathieu-Daudé wrote:
> On 30/3/26 23:18, Helge Deller wrote:
>> From: Helge Deller <deller@gmx.de>
>>
>> The original Artist graphics used the GSC bus, was often installed in old
>> 32-bit machines (e.g. 715) and can not be used on 64-bit machines.
>> This is why this patch makes the artist driver dependend on the Lasi chip,
>> which was never used in a 64-bit machine.
>>
>> Note that there exists a variant of Artist for the PCI-bus (Visualize-EG PCI).
>> It has quite some differences in the registers, and would require that we write
>> a PCI ROM for it, so that Linux and HP-UX would be able to use it.
>>
>> Instead, for now, users can simply use a standard VGA or ATI PCI graphics card
>> on Linux. This can be enabled on the command line with "-device ati-vga" or
>> "-device VGA". If the "-nographic" option is omitted, a PCI OCHI controller
>> with USB keyboard and USB mouse will be added automatically.
>>
>> This fixes graphics support on 64-bit hppa machines and allows us to boot up a
>> 64-bit Linux installation with VGA graphics.
>>
>> Signed-off-by: Helge Deller <deller@gmx.de>
>> ---
>> hw/hppa/machine.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
>> index 3663bac53b..58e76bee2e 100644
>> --- a/hw/hppa/machine.c
>> +++ b/hw/hppa/machine.c
>> @@ -384,7 +384,8 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
>> SysBusDevice *s;
>> /* Graphics setup. */
>> - if (machine->enable_graphics && vga_interface_type != VGA_NONE) {
>> + if (lasi_dev && machine->enable_graphics &&
>> + vga_interface_type != VGA_NONE) {
>
> Pre-existing, 'lasi_dev' being a static variable isn't really helpful.
Yes, can be done post-v11.
Where would it belong? Into MachineState?
> Back to this patch:
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Thanks!
> Although a distinct descriptive boolean variable could be used
> instead for clarity, rather than testing LASI presence.
Helge
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 07/11] hw/pci-host/astro: Add GMMIO mapping
2026-03-30 22:29 ` Helge Deller
@ 2026-03-31 9:14 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-31 9:14 UTC (permalink / raw)
To: Helge Deller, Helge Deller, qemu-devel; +Cc: Richard Henderson
On 31/3/26 00:29, Helge Deller wrote:
> On 3/30/26 23:56, Philippe Mathieu-Daudé wrote:
>> On 30/3/26 23:18, Helge Deller wrote:
>>> From: Helge Deller <deller@gmx.de>
>>>
>>> Implement the GMMIO mapping.
>>
>> As this point in the release process, this is a bit out of scope IMHO.
>
> Well, no...
> SeaBIOS has to initialize GMMIO at the same time and report
> it along with LMMIO and IOS to the operating system.
Then it is an incomplete/broken feature, not something buggy
that can be fixed in time. Anyway, not my judgement call, so
feel free to ignore me, just I don't feel confidement enough
to review and test that implementation for the release.
>
> Helge
>
>>
>>> Signed-off-by: Helge Deller <deller@gmx.de>
>>> ---
>>> hw/pci-host/astro.c | 71 ++++++++++++++++++++++++++++++++++++++++++++-
>>> 1 file changed, 70 insertions(+), 1 deletion(-)
>>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 02/11] hw/hppa: Disable Artist graphics card on 64-bit machines
2026-03-31 8:58 ` Helge Deller
@ 2026-03-31 9:34 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-31 9:34 UTC (permalink / raw)
To: Helge Deller, Helge Deller, qemu-devel; +Cc: Richard Henderson
On 31/3/26 10:58, Helge Deller wrote:
> On 3/30/26 23:42, Philippe Mathieu-Daudé wrote:
>> On 30/3/26 23:18, Helge Deller wrote:
>>> From: Helge Deller <deller@gmx.de>
>>>
>>> The original Artist graphics used the GSC bus, was often installed in
>>> old
>>> 32-bit machines (e.g. 715) and can not be used on 64-bit machines.
>>> This is why this patch makes the artist driver dependend on the Lasi
>>> chip,
>>> which was never used in a 64-bit machine.
>>>
>>> Note that there exists a variant of Artist for the PCI-bus
>>> (Visualize-EG PCI).
>>> It has quite some differences in the registers, and would require
>>> that we write
>>> a PCI ROM for it, so that Linux and HP-UX would be able to use it.
>>>
>>> Instead, for now, users can simply use a standard VGA or ATI PCI
>>> graphics card
>>> on Linux. This can be enabled on the command line with "-device ati-
>>> vga" or
>>> "-device VGA". If the "-nographic" option is omitted, a PCI OCHI
>>> controller
>>> with USB keyboard and USB mouse will be added automatically.
>>>
>>> This fixes graphics support on 64-bit hppa machines and allows us to
>>> boot up a
>>> 64-bit Linux installation with VGA graphics.
>>>
>>> Signed-off-by: Helge Deller <deller@gmx.de>
>>> ---
>>> hw/hppa/machine.c | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
>>> index 3663bac53b..58e76bee2e 100644
>>> --- a/hw/hppa/machine.c
>>> +++ b/hw/hppa/machine.c
>>> @@ -384,7 +384,8 @@ static void
>>> machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
>>> SysBusDevice *s;
>>> /* Graphics setup. */
>>> - if (machine->enable_graphics && vga_interface_type != VGA_NONE) {
>>> + if (lasi_dev && machine->enable_graphics &&
>>> + vga_interface_type != VGA_NONE) {
>>
>> Pre-existing, 'lasi_dev' being a static variable isn't really helpful.
>
> Yes, can be done post-v11.
> Where would it belong? Into MachineState?
HppaMachineState that would encapsulate MachineState.
(hint: git grep ' MachineState parent_obj')
>
>> Back to this patch:
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
> Thanks!
>
>> Although a distinct descriptive boolean variable could be used
>> instead for clarity, rather than testing LASI presence.
>
> Helge
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 01/11] hw/pci-host/astro: Update copyright and documentation link
2026-03-30 21:18 ` [PATCH 01/11] hw/pci-host/astro: Update copyright and documentation link Helge Deller
@ 2026-03-31 9:35 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-31 9:35 UTC (permalink / raw)
To: Helge Deller, qemu-devel; +Cc: deller, Richard Henderson
On 30/3/26 23:18, Helge Deller wrote:
> From: Helge Deller <deller@gmx.de>
>
> Update the link to the documentation, which was still pointing to the
> Wiki page. In the meantime the PA-RISC wiki was converted to a
> read-the-docs website.
>
> Signed-off-by: Helge Deller <deller@gmx.de>
> ---
> hw/pci-host/astro.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 00/11] HPPA Patches for qemu-v11
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
` (9 preceding siblings ...)
2026-03-30 21:18 ` [PATCH 10/11] hw/hppa: Implement memory ranges Helge Deller
@ 2026-03-31 13:09 ` Philippe Mathieu-Daudé
10 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-31 13:09 UTC (permalink / raw)
To: Helge Deller, qemu-devel; +Cc: deller, Richard Henderson
On 30/3/26 23:18, Helge Deller wrote:
> Helge Deller (11):
> hw/pci-host/astro: Update copyright and documentation link
> hw/hppa: Disable Artist graphics card on 64-bit machines
Queuing the first 2 patches via hw-misc tree, thanks.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH 08/11] hw/pci-host/astro: Add comment about Astro version numbers
2026-03-30 21:54 ` Philippe Mathieu-Daudé
@ 2026-03-31 16:57 ` Helge Deller
0 siblings, 0 replies; 22+ messages in thread
From: Helge Deller @ 2026-03-31 16:57 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Richard Henderson
On 3/30/26 23:54, Philippe Mathieu-Daudé wrote:
> On 30/3/26 23:18, Helge Deller wrote:
>> From: Helge Deller <deller@gmx.de>
>>
>> Signed-off-by: Helge Deller <deller@gmx.de>
>> ---
>> hw/pci-host/astro.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
>> index 8c61c696bd..776267e150 100644
>> --- a/hw/pci-host/astro.c
>> +++ b/hw/pci-host/astro.c
>> @@ -738,7 +738,7 @@ static MemTxResult astro_chip_read_with_attrs(void *opaque, hwaddr addr,
>> switch ((addr >> 3) << 3) {
>> /* R2I registers */
>> case 0x0000: /* ID */
>> - val = (0x01 << 3) | 0x01ULL;
>> + val = (0x01 << 3) | 0x01ULL; /* 0=Astro 1.0, 9=Astro 2.1, 2=Astro 3.0 */
>
> Using enum:
>
> enum { ID_ASTRO_1_0 = 0, ID_ASTRO_2_1 = 9, ID_ASTRO_3_0 = 2 };
>
> val = ID_ASTRO_2_1;
Good idea.
I've fixed it up and queued this patch for post qemu-v11.
Thanks!
Helge
>> break;
>> case 0x0008: /* IOC_CTRL */
>> val = s->ioc_ctrl;
>
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2026-03-31 16:57 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-30 21:18 [PATCH 00/11] HPPA Patches for qemu-v11 Helge Deller
2026-03-30 21:18 ` [PATCH 01/11] hw/pci-host/astro: Update copyright and documentation link Helge Deller
2026-03-31 9:35 ` Philippe Mathieu-Daudé
2026-03-30 21:18 ` [PATCH 02/11] hw/hppa: Disable Artist graphics card on 64-bit machines Helge Deller
2026-03-30 21:42 ` Philippe Mathieu-Daudé
2026-03-31 8:58 ` Helge Deller
2026-03-31 9:34 ` Philippe Mathieu-Daudé
2026-03-30 21:18 ` [PATCH 03/11] hw/pci-host/astro: Make astro address arrays accessible for other users Helge Deller
2026-03-30 21:18 ` [PATCH 04/11] hw/pci-host/astro: Fix initial addresses in IOC Helge Deller
2026-03-30 21:18 ` [PATCH 05/11] hw/pci-host/astro: Implement LMMIO registers Helge Deller
2026-03-30 21:18 ` [PATCH 06/11] hw/pci-host/astro: Fix LMMIO DIRECT mappings Helge Deller
2026-03-30 21:18 ` [PATCH 07/11] hw/pci-host/astro: Add GMMIO mapping Helge Deller
2026-03-30 21:56 ` Philippe Mathieu-Daudé
2026-03-30 22:29 ` Helge Deller
2026-03-31 9:14 ` Philippe Mathieu-Daudé
2026-03-30 21:18 ` [PATCH 08/11] hw/pci-host/astro: Add comment about Astro version numbers Helge Deller
2026-03-30 21:54 ` Philippe Mathieu-Daudé
2026-03-31 16:57 ` Helge Deller
2026-03-30 21:18 ` [PATCH 09/11] target/hppa: Fix TOC handler for 64-bit CPUs Helge Deller
2026-03-30 21:52 ` Philippe Mathieu-Daudé
2026-03-30 21:18 ` [PATCH 10/11] hw/hppa: Implement memory ranges Helge Deller
2026-03-31 13:09 ` [PATCH 00/11] HPPA Patches for qemu-v11 Philippe Mathieu-Daudé
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.