* [PULL 1/2] hw/pci-host/astro: Encode Astro version numbers
2026-05-19 15:18 [PULL 0/2] Hppa post v11 patches patches Helge Deller
@ 2026-05-19 15:18 ` Helge Deller
2026-05-19 15:18 ` [PULL 2/2] hw/hppa: Move static variable lasi_dev into MachineState Helge Deller
2026-05-19 20:51 ` [PULL 0/2] Hppa post v11 patches patches Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Helge Deller @ 2026-05-19 15:18 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, deller, Philippe Mathieu-Daudé
From: Helge Deller <deller@gmx.de>
Add enum which encodes the Astro version numbers.
Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/pci-host/astro.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 8c61c696bd..fc07608da7 100644
--- a/hw/pci-host/astro.c
+++ b/hw/pci-host/astro.c
@@ -41,6 +41,9 @@ static const int elroy_hpa_offsets[ELROY_NUM] = {
static const char elroy_rope_nr[ELROY_NUM] = {
0, 1, 4, 6 }; /* busnum path, e.g. [10:6] */
+/* Astro version numbers */
+enum { ID_ASTRO_1_0 = 0, ID_ASTRO_2_1 = 9, ID_ASTRO_3_0 = 2 };
+
/*
* Helper functions
*/
@@ -738,7 +741,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 = ID_ASTRO_2_1;
break;
case 0x0008: /* IOC_CTRL */
val = s->ioc_ctrl;
--
2.54.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PULL 2/2] hw/hppa: Move static variable lasi_dev into MachineState
2026-05-19 15:18 [PULL 0/2] Hppa post v11 patches patches Helge Deller
2026-05-19 15:18 ` [PULL 1/2] hw/pci-host/astro: Encode Astro version numbers Helge Deller
@ 2026-05-19 15:18 ` Helge Deller
2026-05-19 20:51 ` [PULL 0/2] Hppa post v11 patches patches Stefan Hajnoczi
2 siblings, 0 replies; 4+ messages in thread
From: Helge Deller @ 2026-05-19 15:18 UTC (permalink / raw)
To: qemu-devel; +Cc: Richard Henderson, deller, Philippe Mathieu-Daudé
From: Helge Deller <deller@gmx.de>
Avoid static variables, so move lasi_dev into the MachineState struct.
Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/hppa/machine.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 0937d90ed2..d762163ddf 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -44,6 +44,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(HppaMachineState, HPPA_COMMON_MACHINE)
struct HppaMachineState {
MachineState parent_obj;
+ DeviceState *lasi_dev;
uint64_t memsplit_addr;
};
@@ -52,8 +53,6 @@ struct HppaMachineState {
#define HPA_POWER_BUTTON (FIRMWARE_END - 0x10)
static hwaddr soft_power_reg;
-static DeviceState *lasi_dev;
-
static void hppa_powerdown_req(Notifier *n, void *opaque)
{
uint32_t val;
@@ -399,7 +398,8 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
{
const char *kernel_filename = machine->kernel_filename;
MachineClass *mc = MACHINE_GET_CLASS(machine);
- DeviceState *dev;
+ HppaMachineState *hpm = HPPA_COMMON_MACHINE(machine);
+ DeviceState *dev, *lasi_dev;
PCIDevice *pci_dev;
long size;
uint64_t kernel_entry = 0;
@@ -408,6 +408,7 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
SysBusDevice *s;
/* Graphics setup. */
+ lasi_dev = hpm->lasi_dev;
if (lasi_dev && machine->enable_graphics &&
vga_interface_type != VGA_NONE) {
dev = qdev_new("artist");
@@ -576,7 +577,8 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
*/
static void machine_HP_715_init(MachineState *machine)
{
- DeviceState *dev;
+ HppaMachineState *hpm = HPPA_COMMON_MACHINE(machine);
+ DeviceState *dev, *lasi_dev;
MemoryRegion *addr_space = get_system_memory();
TranslateFn *translate;
ISABus *isa_bus;
@@ -596,6 +598,7 @@ static void machine_HP_715_init(MachineState *machine)
/* Init Lasi chip */
lasi_dev = DEVICE(lasi_init());
+ hpm->lasi_dev = lasi_dev;
memory_region_add_subregion(addr_space, translate(NULL, LASI_HPA_715),
sysbus_mmio_get_region(
SYS_BUS_DEVICE(lasi_dev), 0));
@@ -652,7 +655,8 @@ static void machine_HP_715_init(MachineState *machine)
*/
static void machine_HP_B160L_init(MachineState *machine)
{
- DeviceState *dev, *dino_dev;
+ HppaMachineState *hpm = HPPA_COMMON_MACHINE(machine);
+ DeviceState *dev, *dino_dev, *lasi_dev;
MemoryRegion *addr_space = get_system_memory();
TranslateFn *translate;
ISABus *isa_bus;
@@ -669,6 +673,7 @@ static void machine_HP_B160L_init(MachineState *machine)
/* Init Lasi chip */
lasi_dev = DEVICE(lasi_init());
+ hpm->lasi_dev = lasi_dev;
memory_region_add_subregion(addr_space, translate(NULL, LASI_HPA),
sysbus_mmio_get_region(
SYS_BUS_DEVICE(lasi_dev), 0));
--
2.54.0
^ permalink raw reply related [flat|nested] 4+ messages in thread