On Tue, Oct 03, 2017 at 07:18:44PM -0300, Philippe Mathieu-Daudé wrote: > On 10/03/2017 06:36 PM, Alistair Francis wrote: > > On Tue, Oct 3, 2017 at 1:39 PM, Eduardo Habkost <[email protected]> wrote: > >> On Tue, Oct 03, 2017 at 01:05:18PM -0700, Alistair Francis wrote: > >>> List all possible valid CPU options. > >>> > >>> Signed-off-by: Alistair Francis <[email protected]> > >>> --- > >>> > >>> hw/arm/raspi.c | 6 ++++++ > >>> 1 file changed, 6 insertions(+) > >>> > >>> diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c > >>> index 5941c9f751..555db0f258 100644 > >>> --- a/hw/arm/raspi.c > >>> +++ b/hw/arm/raspi.c > >>> @@ -158,6 +158,10 @@ static void raspi2_init(MachineState *machine) > >>> setup_boot(machine, 2, machine->ram_size - vcram_size); > >>> } > >>> > >>> +const char *raspi2_valid_cpus[] = { ARM_CPU_TYPE_NAME("cortex-a7"), > >>> + NULL > >>> + }; > >>> + > >>> static void raspi2_machine_init(MachineClass *mc) > >>> { > >>> mc->desc = "Raspberry Pi 2"; > >>> @@ -169,5 +173,7 @@ static void raspi2_machine_init(MachineClass *mc) > >>> mc->max_cpus = BCM2836_NCPUS; > >>> mc->default_ram_size = 1024 * 1024 * 1024; > >>> mc->ignore_memory_transaction_failures = true; > >>> + mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a7"); > >>> + mc->valid_cpu_types = raspi2_valid_cpus; > >> > >> I'm confused: bcm2836_init() is hardcoded to cortex-a15, not > >> cortex-a7. > > > > Odd. I just looked up the Raspberry Pi 2 and it says a Cortex-A7: > > https://www.raspberrypi.org/products/raspberry-pi-2-model-b/ > > The BCM2836 SoC definitively is Cortex-A7. > > git history says the A7 was added after (dcf578ed8cec) the raspi2 board > (bad5623690b1).
Shouldn't we update TYPE_BCM2836 to use cpu_type instead of cortex-a15 before applying this patch, then? > > Reviewed-by: Philippe Mathieu-Daudé <[email protected]> > > > > > Thanks, > > Alistair > > > >> > >>> }; > >>> DEFINE_MACHINE("raspi2", raspi2_machine_init) > >>> -- > >>> 2.11.0 > >>> > >> > >> -- > >> Eduardo -- Eduardo
