[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-7.1 06/11] hw/intc: Add a property to allow GIC to reset
From: |
Peter Maydell |
Subject: |
Re: [PATCH for-7.1 06/11] hw/intc: Add a property to allow GIC to reset into non secure mode |
Date: |
Thu, 21 Apr 2022 12:00:36 +0100 |
On Tue, 5 Apr 2022 at 23:38, Hao Wu <wuhaotsh@google.com> wrote:
>
> This property allows certain boards like NPCM8xx to boot the kernel
> directly into non-secure mode. This is necessary since we do not
> support secure boot features for NPCM8xx now.
>
> Signed-off-by: Hao Wu <wuhaotsh@google.com>
> Reviewed-by: Patrick Venture <venture@google.com>
> ---
> hw/intc/arm_gic_common.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c
> index 7b44d5625b..7ddc5cfbd0 100644
> --- a/hw/intc/arm_gic_common.c
> +++ b/hw/intc/arm_gic_common.c
> @@ -358,6 +358,8 @@ static Property arm_gic_common_properties[] = {
> /* True if the GIC should implement the virtualization extensions */
> DEFINE_PROP_BOOL("has-virtualization-extensions", GICState, virt_extn,
> 0),
> DEFINE_PROP_UINT32("num-priority-bits", GICState, n_prio_bits, 8),
> + /* True if we want to directly booting a kernel into NonSecure */
> + DEFINE_PROP_BOOL("irq-reset-nonsecure", GICState, irq_reset_nonsecure,
> 0),
> DEFINE_PROP_END_OF_LIST(),
> };
This isn't how this is supposed to work. Non-firmware (ie Linux
kernel boots) that have to emulate firmware init arrange to get
the irq_reset_nonsecure flag set because the GIC implements the
TYPE_ARM_LINUX_BOOT_IF and the boot.c code calls the callback
for every device that implements that interface. For firmware
boots, the firmware has to set up the GIC the way it wants.
thanks
-- PMM
- [PATCH for-7.1 00/11] hw/arm: Add NPCM8XX support, Hao Wu, 2022/04/05
- [PATCH for-7.1 01/11] docs/system/arm: Add Description for NPCM8XX SoC, Hao Wu, 2022/04/05
- [PATCH for-7.1 06/11] hw/intc: Add a property to allow GIC to reset into non secure mode, Hao Wu, 2022/04/05
- Re: [PATCH for-7.1 06/11] hw/intc: Add a property to allow GIC to reset into non secure mode,
Peter Maydell <=
- [PATCH for-7.1 05/11] hw/misc: Store DRAM size in NPCM8XX GCR Module, Hao Wu, 2022/04/05
- [PATCH for-7.1 02/11] hw/ssi: Make flash size a property in NPCM7XX FIU, Hao Wu, 2022/04/05
- [PATCH for-7.1 08/11] hw/net: Add NPCM8XX PCS Module, Hao Wu, 2022/04/05
- [PATCH for-7.1 11/11] hw/arm: Add NPCM845 Evaluation board, Hao Wu, 2022/04/05
- [PATCH for-7.1 10/11] hw/arm: Add NPCM8XX SoC, Hao Wu, 2022/04/05
- [PATCH for-7.1 03/11] hw/misc: Support NPCM8XX GCR module, Hao Wu, 2022/04/05