qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 1/6] hw/arm: arm initial boilerplate for RP2040 SoC


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 1/6] hw/arm: arm initial boilerplate for RP2040 SoC
Date: Mon, 17 Jan 2022 13:21:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0

On 1/10/22 18:50, Alex Bennée wrote:
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  configs/devices/arm-softmmu/default.mak |  1 +
>  include/hw/arm/rp2040.h                 | 32 ++++++++++
>  hw/arm/rp2040.c                         | 79 +++++++++++++++++++++++++
>  hw/arm/Kconfig                          |  3 +
>  hw/arm/meson.build                      |  1 +
>  5 files changed, 116 insertions(+)
>  create mode 100644 include/hw/arm/rp2040.h
>  create mode 100644 hw/arm/rp2040.c

> +static void rp2040_realize(DeviceState *dev, Error **errp)
> +{
> +    RP2040State *s = RP2040(dev);
> +    Object *obj = OBJECT(dev);
> +    int n;
> +
> +    for (n = 0; n < RP2040_NCPUS; n++) {
> +        Object *cpuobj = OBJECT(&s->armv7m[n]);
> +        if (!sysbus_realize(SYS_BUS_DEVICE(cpuobj), errp)) {
> +            return;

Could we ever have the first CPU initialized and the 2nd failing?
Because the error path wouldn't be clean (leaking CPU#0). Maybe
ignore errp and use error_fatal?

Otherwise,
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> +        }
> +    }
> +}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]