]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/arm/armv7m: alias the NVIC "num-prio-bits" property
authorSamuel Tardieu <sam@rfc1149.net>
Sat, 6 Jan 2024 18:15:02 +0000 (19:15 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 9 Jan 2024 14:42:40 +0000 (14:42 +0000)
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 <sam@rfc1149.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240106181503.1746200-3-sam@rfc1149.net
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/armv7m.c
include/hw/arm/armv7m.h

index e39b61bc1af3865b1ff53b4efca9f9ec10a8cce4..1f218277734b5bc71ca074c98f3634901faa85a4 100644 (file)
@@ -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);
index e2cebbd15c024fa08127dc7af7a2073a41e6c6c3..5c057ab2ec9e2ddbeacdf8b993bbf4f4c65354b4 100644 (file)
@@ -43,6 +43,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(ARMv7MState, ARMV7M)
  *   a qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET).
  * + Property "cpu-type": CPU type to instantiate
  * + Property "num-irq": number of external IRQ lines
+ * + Property "num-prio-bits": number of priority bits in the NVIC
  * + Property "memory": MemoryRegion defining the physical address space
  *   that CPU accesses see. (The NVIC, bitbanding and other CPU-internal
  *   devices will be automatically layered on top of this view.)