[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] arm-virt: add secure pl061 for reset/power down
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] arm-virt: add secure pl061 for reset/power down |
Date: |
Tue, 5 Jan 2021 11:20:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 12/17/20 2:57 PM, Maxim Uvarov wrote:
> Add secure pl061 for reset/power down machine from
> the secure world (Arm Trusted Firmware).
> Use the same gpio 3 and gpio 4 which were used by
> non acpi variant of linux power control gpios.
>
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> ---
> This patch works together with ATF patch:
>
> https://github.com/muvarov/arm-trusted-firmware/commit/dd4401d8eb8e0f3018b335b81ce7a96d6cb16d0f
>
>
> Previus discussion for reboot issue was here:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg757705.html
>
> Regards,
> Maxim.
>
>
> hw/arm/Kconfig | 1 +
> hw/arm/virt.c | 24 +++++++++++++
> hw/gpio/Kconfig | 3 ++
> hw/gpio/gpio_pwr.c | 83 +++++++++++++++++++++++++++++++++++++++++++
> hw/gpio/meson.build | 1 +
> include/hw/arm/virt.h | 1 +
> 6 files changed, 113 insertions(+)
> create mode 100644 hw/gpio/gpio_pwr.c
...
> +static void gpio_pwr_set_irq(void *opaque, int irq, int level)
> +{
> + GPIO_PWR_State *s = (GPIO_PWR_State *)opaque;
> +
> + qemu_set_irq(s->irq, 1);
> +
> + if (level) {
> + return;
> + }
> +
> + switch (irq) {
> + case 3:
> + qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);
> + break;
> + case 4:
> + qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
> + break;
> + default:
> + printf("qemu; gpio_pwr: unknown interrupt %d lvl %d\n",
> + irq, level);
Please use qemu_log_mask(LOG_GUEST_ERROR) (or UNIMP?).
Otherwise patch is good, thanks!
Phil.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] arm-virt: add secure pl061 for reset/power down,
Philippe Mathieu-Daudé <=