[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>
> + }
> + }
> +}
- [RFC PATCH 0/6] Basic skeleton of RP2040 Raspbery Pi Pico, Alex Bennée, 2022/01/10
- [RFC PATCH 2/6] hw/arm: add boilerplate for machines based on the RP2040, Alex Bennée, 2022/01/10
- [RFC PATCH 5/6] hw/arm: add mask boot ROM logic, Alex Bennée, 2022/01/10
- [RFC PATCH 1/6] hw/arm: arm initial boilerplate for RP2040 SoC, Alex Bennée, 2022/01/10
- Re: [RFC PATCH 1/6] hw/arm: arm initial boilerplate for RP2040 SoC,
Philippe Mathieu-Daudé <=
- [RFC PATCH 3/6] hw/arm: wire-up memory from the Pico board and the SoC, Alex Bennée, 2022/01/10
- [RFC PATCH 4/6] pc-bios: add pipico mask rom (!upstream), Alex Bennée, 2022/01/10
- [RFC PATCH 6/6] docs/devel: add some clarifying text for aliases, Alex Bennée, 2022/01/10