[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/41] hw/arm/armv7m: alias the NVIC "num-prio-bits" property
From: |
Peter Maydell |
Subject: |
[PULL 05/41] hw/arm/armv7m: alias the NVIC "num-prio-bits" property |
Date: |
Thu, 11 Jan 2024 11:04:29 +0000 |
From: Samuel Tardieu <sam@rfc1149.net>
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>
---
include/hw/arm/armv7m.h | 1 +
hw/arm/armv7m.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h
index e2cebbd15c0..5c057ab2ec9 100644
--- a/include/hw/arm/armv7m.h
+++ b/include/hw/arm/armv7m.h
@@ -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.)
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c
index e39b61bc1af..1f218277734 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);
--
2.34.1
- [PULL 00/41] target-arm queue, Peter Maydell, 2024/01/11
- [PULL 01/41] hw/arm: add cache controller for Freescale i.MX6, Peter Maydell, 2024/01/11
- [PULL 04/41] hw/intc/armv7m_nvic: add "num-prio-bits" property, Peter Maydell, 2024/01/11
- [PULL 07/41] hw/arm: Add missing QOM parent for v7-M SoCs, Peter Maydell, 2024/01/11
- [PULL 03/41] hw/arm: Add minimal support for the B-L475E-IOT01A board, Peter Maydell, 2024/01/11
- [PULL 05/41] hw/arm/armv7m: alias the NVIC "num-prio-bits" property,
Peter Maydell <=
- [PULL 14/41] target/arm: Allow use of upper 32 bits of TBFLAG_A64, Peter Maydell, 2024/01/11
- [PULL 41/41] target/arm: Add FEAT_NV2 to max, neoverse-n2, neoverse-v1 CPUs, Peter Maydell, 2024/01/11
- [PULL 38/41] hw/intc/arm_gicv3_cpuif: Mark up VNCR offsets for GIC CPU registers, Peter Maydell, 2024/01/11
- [PULL 02/41] hw/arm: Add minimal support for the STM32L4x5 SoC, Peter Maydell, 2024/01/11
- [PULL 06/41] hw/arm/socs: configure priority bits for existing SOCs, Peter Maydell, 2024/01/11
- [PULL 09/41] hw/intc/arm_gicv3_cpuif: handle LPIs in in the list registers, Peter Maydell, 2024/01/11
- [PULL 08/41] target/arm: Set CTR_EL0.{IDC,DIC} for the 'max' CPU, Peter Maydell, 2024/01/11