qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] '-M virt -cpu cortex-a7'


From: Peter Maydell
Subject: Re: [Qemu-arm] '-M virt -cpu cortex-a7'
Date: Sun, 31 Mar 2019 11:32:17 +0000

On Sun, 31 Mar 2019 at 18:17, ratna manoj <address@hidden> wrote:
>
>
> Hi,
>
> $> qemu-3.1.0/build/arm-softmmu/qemu-system-arm -M virt -cpu help|grep 
> cortex-a7
>   cortex-a7
> $>
>
> As shown above 'virt' machine type lists 'cortex-a7' as supported processor, 
> but when I try to load a  kernel with -cpu cortext-a7 option it says:
>
> qemu-system-arm: mach-virt: CPU type cortex-a7-arm-cpu not supported

Yes. The '-cpu help' list lists all the CPUs qemu-system-arm
supports -- it is not cross-referenced against a supplied machine
to eliminate CPUs that will not work with that machine.
(It's a very long standing bug that '-cpu help' on its own will
not print the list: this is because the "must specify a machine"
check kicks in before we handle printing various -foo help texts.)

> This is because of the check for valid_cpus in hw/arm/virt.c, where cortex-a7 
> is not listed.
>
> From hw/arm/virt.c:
> static const char *valid_cpus[] = {
>     ARM_CPU_TYPE_NAME("cortex-a15"),
>     ARM_CPU_TYPE_NAME("cortex-a53"),
>     ARM_CPU_TYPE_NAME("cortex-a57"),
>     ARM_CPU_TYPE_NAME("cortex-a72"),
>     ARM_CPU_TYPE_NAME("host"),
>     ARM_CPU_TYPE_NAME("max"),
> };
>
> If I add   "ARM_CPU_TYPE_NAME("cortex-a7")," to the above array, it works and 
> I get correct CPU type as I see it in /proc/cpuinfo.
>
> Is my change make sense ?  Thanks.

Yes, it would be reasonable for us to allow Cortex-A7 on the virt board.
It will behave almost identically to cortex-a15, though, so you
could probably just use that.

thanks
-- PMM



reply via email to

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