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 <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Mark Cave-Ayland 2018-08-29 17:59:06 +01:00 committed by David Gibson
parent 9b164a4667
commit bf31c56f09
2 changed files with 38 additions and 9 deletions

View file

@ -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;