mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
ppc/pnv: Begin a more complete ADU LPC model for POWER9/10
This implements a framework for an ADU unit model. The ADU unit actually implements XSCOM, which is the bridge between MMIO and PIB. However it also includes control and status registers and other functions that are exposed as PIB (xscom) registers. To keep things simple, pnv_xscom.c remains the XSCOM bridge implementation, and pnv_adu.c implements the ADU registers and other functions. So far, just the ADU no-op registers in the pnv_xscom.c default handler are moved over to the adu model. Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
This commit is contained in:
parent
24c3caff99
commit
53f18b3ef2
8 changed files with 166 additions and 9 deletions
16
hw/ppc/pnv.c
16
hw/ppc/pnv.c
|
@ -1551,6 +1551,7 @@ static void pnv_chip_power9_instance_init(Object *obj)
|
|||
PnvChipClass *pcc = PNV_CHIP_GET_CLASS(obj);
|
||||
int i;
|
||||
|
||||
object_initialize_child(obj, "adu", &chip9->adu, TYPE_PNV_ADU);
|
||||
object_initialize_child(obj, "xive", &chip9->xive, TYPE_PNV_XIVE);
|
||||
object_property_add_alias(obj, "xive-fabric", OBJECT(&chip9->xive),
|
||||
"xive-fabric");
|
||||
|
@ -1661,6 +1662,13 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp)
|
|||
return;
|
||||
}
|
||||
|
||||
/* ADU */
|
||||
if (!qdev_realize(DEVICE(&chip9->adu), NULL, errp)) {
|
||||
return;
|
||||
}
|
||||
pnv_xscom_add_subregion(chip, PNV9_XSCOM_ADU_BASE,
|
||||
&chip9->adu.xscom_regs);
|
||||
|
||||
pnv_chip_quad_realize(chip9, &local_err);
|
||||
if (local_err) {
|
||||
error_propagate(errp, local_err);
|
||||
|
@ -1827,6 +1835,7 @@ static void pnv_chip_power10_instance_init(Object *obj)
|
|||
PnvChipClass *pcc = PNV_CHIP_GET_CLASS(obj);
|
||||
int i;
|
||||
|
||||
object_initialize_child(obj, "adu", &chip10->adu, TYPE_PNV_ADU);
|
||||
object_initialize_child(obj, "xive", &chip10->xive, TYPE_PNV_XIVE2);
|
||||
object_property_add_alias(obj, "xive-fabric", OBJECT(&chip10->xive),
|
||||
"xive-fabric");
|
||||
|
@ -1919,6 +1928,13 @@ static void pnv_chip_power10_realize(DeviceState *dev, Error **errp)
|
|||
return;
|
||||
}
|
||||
|
||||
/* ADU */
|
||||
if (!qdev_realize(DEVICE(&chip10->adu), NULL, errp)) {
|
||||
return;
|
||||
}
|
||||
pnv_xscom_add_subregion(chip, PNV10_XSCOM_ADU_BASE,
|
||||
&chip10->adu.xscom_regs);
|
||||
|
||||
pnv_chip_power10_quad_realize(chip10, &local_err);
|
||||
if (local_err) {
|
||||
error_propagate(errp, local_err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue