@samitouri / QOSamiQemu / commits / a3210e056d

hw/pci-host/astro: Make astro address arrays accessible for other users

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>

Helge Deller committed Mar 29, 2026 at 00:12 UTC a3210e056d42491c96dbe58d7ffe357d8c9cb51f
1 file changed +5 -4
hw/pci-host/astro.c
+5 -4
@@ -37,6 +37,11 @@
37 #include "qom/object.h"
38 #include "exec/target_page.h"
39
40 +static const int elroy_hpa_offsets[ELROY_NUM] = {
41 + 0x30000, 0x32000, 0x38000, 0x3c000 };
42 +static const char elroy_rope_nr[ELROY_NUM] = {
43 + 0, 1, 4, 6 }; /* busnum path, e.g. [10:6] */
44 +
45 /*
46 * Helper functions
47 */
@@ -843,10 +848,6 @@ static void astro_realize(DeviceState *obj, Error **errp)
848
849 /* Create Elroys (PCI host bus chips). */
850 for (i = 0; i < ELROY_NUM; i++) {
846 - static const int elroy_hpa_offsets[ELROY_NUM] = {
847 - 0x30000, 0x32000, 0x38000, 0x3c000 };
848 - static const char elroy_rope_nr[ELROY_NUM] = {
849 - 0, 1, 4, 6 }; /* busnum path, e.g. [10:6] */
851 int addr_offset;
852 ElroyState *elroy;
853 hwaddr map_addr;