Commit 64f676beea for qemu.org
commit 64f676beead4fb57fc2f5e30f259f8c50dc3248f
Author: Helge Deller <deller@gmx.de>
Date: Sun Mar 29 00:15:12 2026 +0100
hw/pci-host/astro: Fix initial addresses in IOC
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>
diff --git a/hw/pci-host/astro.c b/hw/pci-host/astro.c
index 46d8530538..b3eec4a291 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) */