From bf31c56f096ae11367c6ba19a47387d008791996 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Wed, 29 Aug 2018 17:59:06 +0100 Subject: macio: add macio bus to help with fw path generation As the in-built IDE controller is attached to the macio bus then we should also model this the same in QEMU to aid fw path generation. Note that all existing macio devices are moved onto the new macio bus so that the qdev tree accurately reflects the real hardware. Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- include/hw/misc/macio/macio.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/hw') diff --git a/include/hw/misc/macio/macio.h b/include/hw/misc/macio/macio.h index 0c3964ec12..3189973ee6 100644 --- a/include/hw/misc/macio/macio.h +++ b/include/hw/misc/macio/macio.h @@ -34,6 +34,15 @@ #include "hw/ppc/mac_dbdma.h" #include "hw/ppc/openpic.h" +/* MacIO virtual bus */ +#define TYPE_MACIO_BUS "macio-bus" +#define MACIO_BUS(obj) OBJECT_CHECK(MacIOBusState, (obj), TYPE_MACIO_BUS) + +typedef struct MacIOBusState { + /*< private >*/ + BusState parent_obj; +} MacIOBusState; + /* MacIO IDE */ #define TYPE_MACIO_IDE "macio-ide" #define MACIO_IDE(obj) OBJECT_CHECK(MACIOIDEState, (obj), TYPE_MACIO_IDE) @@ -68,6 +77,7 @@ typedef struct MacIOState { PCIDevice parent; /*< public >*/ + MacIOBusState macio_bus; MemoryRegion bar; CUDAState cuda; PMUState pmu; -- cgit v1.2.3