On Fri, 5 Feb 2021 at 17:00, Peter Maydell <peter.mayd...@linaro.org> wrote: > > Add support for the mps3-an524 board; this is an SSE-200 based FPGA > image, like the existing mps2-an521. It has a usefully larger amount > of RAM, and a PL031 RTC, as well as some more minor differences. > > In real hardware this image runs on a newer generation of the FPGA > board, the MPS3 rather than the older MPS2. Architecturally the two > boards are similar, so we implement the MPS3 boards in the mps2-tz.c > file as variations of the existing MPS2 boards. > > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
> +static void mps3tz_an524_class_init(ObjectClass *oc, void *data) > +{ > + MachineClass *mc = MACHINE_CLASS(oc); > + MPS2TZMachineClass *mmc = MPS2TZ_MACHINE_CLASS(oc); > + > + mc->desc = "ARM MPS3 with AN524 FPGA image for dual Cortex-M33"; > + mc->default_cpus = 2; > + mc->min_cpus = mc->default_cpus; > + mc->max_cpus = mc->default_cpus; > + mmc->fpga_type = FPGA_AN524; > + mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m33"); > + mmc->scc_id = 0x41045240; > + mmc->sysclk_frq = 32 * 1000 * 1000; /* 32MHz */ > + mmc->oscclk = an524_oscclk; > + mmc->len_oscclk = ARRAY_SIZE(an524_oscclk); > + mmc->numirq = 95; > + mmc->raminfo = an524_raminfo; > + mmc->armsse_type = TYPE_SSE200; > + mps2tz_set_default_ram_info(mmc); > +} Oops, this is missing a couple of initialisations for the FPGAIO config: --- a/hw/arm/mps2-tz.c +++ b/hw/arm/mps2-tz.c @@ -1016,6 +1016,8 @@ static void mps3tz_an524_class_init(ObjectClass *oc, void *data) mmc->sysclk_frq = 32 * 1000 * 1000; /* 32MHz */ mmc->oscclk = an524_oscclk; mmc->len_oscclk = ARRAY_SIZE(an524_oscclk); + mmc->fpgaio_num_leds = 10; + mmc->fpgaio_has_switches = true; mmc->numirq = 95; mmc->raminfo = an524_raminfo; mmc->armsse_type = TYPE_SSE200; thanks -- PMM