[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 5/5] hw/arm: Add the Netduino Plus 2
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v1 5/5] hw/arm: Add the Netduino Plus 2 |
Date: |
Fri, 3 May 2019 14:53:05 +0100 |
On Thu, 2 May 2019 at 06:41, Alistair Francis <address@hidden> wrote:
>
> Signed-off-by: Alistair Francis <address@hidden>
> ---
> MAINTAINERS | 6 +++
> default-configs/arm-softmmu.mak | 1 +
> hw/arm/Kconfig | 3 ++
> hw/arm/Makefile.objs | 1 +
> hw/arm/netduinoplus2.c | 77 +++++++++++++++++++++++++++++++++
> 5 files changed, 88 insertions(+)
> create mode 100644 hw/arm/netduinoplus2.c
> +static void netduinoplus2_init(MachineState *machine)
> +{
> + DeviceState *dev;
> + ARMV7MResetArgs reset_args;
> + uint64_t entry;
> +
> + dev = qdev_create(NULL, TYPE_STM32F405_SOC);
> + qdev_prop_set_string(dev, "cpu-type", ARM_CPU_TYPE_NAME("cortex-m4"));
> + object_property_set_bool(OBJECT(dev), true, "realized", &error_fatal);
> +
> + entry = armv7m_load_kernel(ARM_CPU(first_cpu), machine->kernel_filename,
> + FLASH_SIZE);
> +
> + reset_args = (ARMV7MResetArgs) {
> + .cpu = ARM_CPU(first_cpu),
> + .reset_pc = entry,
> + .reset_sp = (SRAM_BASE_ADDRESS + (SRAM_SIZE * 2) / 3),
> + };
> + qemu_register_reset(armv7m_reset,
> + g_memdup(&reset_args, sizeof(reset_args)));
> +}
I still don't really like having this board interpret -kernel
in a different way to all the other M-profile boards. I'd be
much happier if it just behaved the same way the others do.
thanks
-- PMM