Hello Nick,
diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c
index 5869aac89a..eb9dbc62dd 100644
--- a/hw/ppc/pnv.c
+++ b/hw/ppc/pnv.c
@@ -1642,6 +1642,8 @@ static void pnv_chip_power9_realize(DeviceState *dev,
Error **errp)
}
/* ADU */
+ object_property_set_link(OBJECT(&chip9->adu), "lpc", OBJECT(&chip9->lpc),
+ &error_abort);
I would add an assert on the lpc pointer in the ADU realize routine.
A assert != NULL, in case this failed to link correctly? (Maybe if it
was called before lpc object was realized). I will do.
It is to make sure that an ADU object is not "realized" without
the pointer '->lpc' being set before, since it is a must-have for
the implementation to operate (and do LPC transactions).
There are several :
assert(s->chip);
in the pnv models for the same kind of purpose.
Thanks,
C.