qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Alistair Francis <alistair.francis@xilinx.com>
Cc: qemu-devel@nongnu.org, ehabkost@redhat.com, f4bug@amsat.org,
	marcel@redhat.com, alistair23@gmail.com
Subject: Re: [Qemu-devel] [PATCH v1 2/5] netduino2: Specify the valid CPUs
Date: Wed, 4 Oct 2017 13:02:58 +0200	[thread overview]
Message-ID: <20171004130258.0a977151@nial.brq.redhat.com> (raw)
In-Reply-To: <ce8c6fc807907f6e7cce7bfefd8326de64635af6.1507059418.git.alistair.francis@xilinx.com>

On Tue, 3 Oct 2017 13:05:11 -0700
Alistair Francis <alistair.francis@xilinx.com> wrote:

> List all possible valid CPU options.
> 
> Although the board only ever has a Cortex-M3 we mark the Cortex-M4 as
> supported because the Netduino2 Plus supports the Cortex-M4 and the
> Netduino2 Plus is similar to the Netduino2.
> 
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> ---
> 
> RFC v2:
>  - Use a NULL terminated list
>  - Add the Cortex-M4 for testing
> 
> 
>  hw/arm/netduino2.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/arm/netduino2.c b/hw/arm/netduino2.c
> index f936017d4a..b68ecf2c08 100644
> --- a/hw/arm/netduino2.c
> +++ b/hw/arm/netduino2.c
> @@ -34,18 +34,25 @@ static void netduino2_init(MachineState *machine)
>      DeviceState *dev;
>  
>      dev = qdev_create(NULL, TYPE_STM32F205_SOC);
> -    qdev_prop_set_string(dev, "cpu-type", ARM_CPU_TYPE_NAME("cortex-m3"));
> +    qdev_prop_set_string(dev, "cpu-type", machine->cpu_type);
>      object_property_set_bool(OBJECT(dev), true, "realized", &error_fatal);
>  
>      armv7m_load_kernel(ARM_CPU(first_cpu), machine->kernel_filename,
>                         FLASH_SIZE);
>  }
>  
> +const char *netduino_valid_cpus[] = { ARM_CPU_TYPE_NAME("cortex-m3"),
style nit,                               ^^^ put entries on new line with typical 4 space alignment
> +                                      ARM_CPU_TYPE_NAME("cortex-m4"),
> +                                      NULL
> +                                    };

> +
>  static void netduino2_machine_init(MachineClass *mc)
>  {
>      mc->desc = "Netduino 2 Machine";
>      mc->init = netduino2_init;
>      mc->ignore_memory_transaction_failures = true;
> +    mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
> +    mc->valid_cpu_types = netduino_valid_cpus;
>  }
>  
>  DEFINE_MACHINE("netduino2", netduino2_machine_init)

  parent reply	other threads:[~2017-10-04 11:03 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 20:05 [Qemu-devel] [PATCH v1 0/5] Add a valid_cpu_types property Alistair Francis
2017-10-03 20:05 ` [Qemu-devel] [PATCH v1 1/5] machine: " Alistair Francis
2017-10-03 20:23   ` Eduardo Habkost
2017-10-03 20:26     ` Alistair Francis
2017-10-03 20:33       ` Eduardo Habkost
2017-10-03 21:37         ` Alistair Francis
2017-10-03 20:05 ` [Qemu-devel] [PATCH v1 2/5] netduino2: Specify the valid CPUs Alistair Francis
2017-10-03 20:28   ` Eduardo Habkost
2017-10-03 22:05   ` Philippe Mathieu-Daudé
2017-10-04 11:02   ` Igor Mammedov [this message]
2017-10-04 21:43     ` Alistair Francis
2017-10-04 22:21       ` Philippe Mathieu-Daudé
2017-10-05  8:38         ` Igor Mammedov
2017-10-03 20:05 ` [Qemu-devel] [PATCH v1 4/5] xilinx_zynq: : " Alistair Francis
2017-10-03 22:07   ` Philippe Mathieu-Daudé
2017-10-03 20:05 ` [Qemu-devel] [PATCH v1 5/5] raspi: " Alistair Francis
2017-10-03 20:39   ` Eduardo Habkost
2017-10-03 21:36     ` Alistair Francis
2017-10-03 22:18       ` Philippe Mathieu-Daudé
2017-10-04  3:46         ` Eduardo Habkost
     [not found] ` <2a93b997d0acd369f35d68981a23ba491443daf6.1507059418.git.alistair.francis@xilinx.com>
2017-10-03 20:36   ` [Qemu-devel] [PATCH v1 3/5] xlnx-zcu102: " Eduardo Habkost
2017-10-03 21:41     ` Alistair Francis
2017-10-04  3:33       ` Eduardo Habkost
2017-10-04 11:12       ` Igor Mammedov
2017-10-04 12:28         ` Eduardo Habkost
2017-10-04 13:08           ` Igor Mammedov
2017-10-04 16:34             ` Eduardo Habkost
2017-10-04 21:39               ` Alistair Francis
2017-10-05  9:04                 ` Igor Mammedov
2017-10-05 17:09                   ` Eduardo Habkost
2017-10-06  8:23                     ` Igor Mammedov
2017-10-06 11:45                       ` Eduardo Habkost
2017-10-06 22:06                         ` Alistair Francis
2017-10-09  7:12                           ` Igor Mammedov
2017-10-10 15:25                             ` Eduardo Habkost
2017-10-12 23:59                               ` Alistair Francis
2017-10-13  3:16                                 ` Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171004130258.0a977151@nial.brq.redhat.com \
    --to=imammedo@redhat.com \
    --cc=alistair.francis@xilinx.com \
    --cc=alistair23@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=marcel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).