mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
ppc/pnv: add a OCC model class
To ease the introduction of the OCC model for POWER9, provide a new class attributes to define XSCOM operations per CPU family and a PSI IRQ number. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <20190307223548.20516-9-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
8207b90604
commit
3233838cd1
3 changed files with 54 additions and 18 deletions
|
@ -23,6 +23,8 @@
|
|||
|
||||
#define TYPE_PNV_OCC "pnv-occ"
|
||||
#define PNV_OCC(obj) OBJECT_CHECK(PnvOCC, (obj), TYPE_PNV_OCC)
|
||||
#define TYPE_PNV8_OCC TYPE_PNV_OCC "-POWER8"
|
||||
#define PNV8_OCC(obj) OBJECT_CHECK(PnvOCC, (obj), TYPE_PNV8_OCC)
|
||||
|
||||
typedef struct PnvOCC {
|
||||
DeviceState xd;
|
||||
|
@ -35,4 +37,17 @@ typedef struct PnvOCC {
|
|||
MemoryRegion xscom_regs;
|
||||
} PnvOCC;
|
||||
|
||||
#define PNV_OCC_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(PnvOCCClass, (klass), TYPE_PNV_OCC)
|
||||
#define PNV_OCC_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(PnvOCCClass, (obj), TYPE_PNV_OCC)
|
||||
|
||||
typedef struct PnvOCCClass {
|
||||
DeviceClass parent_class;
|
||||
|
||||
int xscom_size;
|
||||
const MemoryRegionOps *xscom_ops;
|
||||
int psi_irq;
|
||||
} PnvOCCClass;
|
||||
|
||||
#endif /* _PPC_PNV_OCC_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue