On Wed, 3 Jan 2024 at 15:53, Samuel Tardieu <s...@rfc1149.net> wrote: > > A SoC will not have a direct access to the NVIC embedded in its ARM > core. By aliasing the "num-prio-bits" property similarly to what is > done for the "num-irq" one, a SoC can easily configure it on its > armv7m instance. > > Signed-off-by: Samuel Tardieu <s...@rfc1149.net> > --- > hw/arm/armv7m.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c > index d10abb36a8..4fda2d1d47 100644 > --- a/hw/arm/armv7m.c > +++ b/hw/arm/armv7m.c > @@ -256,6 +256,8 @@ static void armv7m_instance_init(Object *obj) > object_initialize_child(obj, "nvic", &s->nvic, TYPE_NVIC); > object_property_add_alias(obj, "num-irq", > OBJECT(&s->nvic), "num-irq"); > + object_property_add_alias(obj, "num-prio-bits", > + OBJECT(&s->nvic), "num-prio-bits"); > > object_initialize_child(obj, "systick-reg-ns", &s->systick[M_REG_NS], > TYPE_SYSTICK);
There's a comment in include/hw/arm/armv7m.h which documents all the GPIO inputs, QOM properties, etc, that this device has -- that also needs a line adding to it for this property. Otherwise Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM