qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: Michael Clark <mjc@sifive.com>
Cc: qemu-devel@nongnu.org,
	Sagar Karandikar <sagark@eecs.berkeley.edu>,
	Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Subject: Re: [Qemu-devel] [PATCH v1 21/21] RISC-V Build Infrastructure
Date: Thu, 4 Jan 2018 20:09:07 +0300	[thread overview]
Message-ID: <20180104200907.7232a1e131af98e25931faa5@gmail.com> (raw)
In-Reply-To: <1514940265-18093-22-git-send-email-mjc@sifive.com>

On Wed,  3 Jan 2018 13:44:25 +1300
Michael Clark <mjc@sifive.com> wrote:

> This adds RISC-V into the build system enabling the following targets:
> 
> - riscv32-softmmu
> - riscv64-softmmu
> - riscv32-linux-user
> - riscv64-linux-user
> 

...

> diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
> new file mode 100644
> index 0000000..f9e7421
> --- /dev/null
> +++ b/default-configs/riscv32-softmmu.mak
> @@ -0,0 +1,4 @@
> +# Default configuration for riscv-softmmu
> +
> +CONFIG_SERIAL=y
> +CONFIG_VIRTIO=y
> diff --git a/default-configs/riscv64-linux-user.mak b/default-configs/riscv64-linux-user.mak
> new file mode 100644
> index 0000000..865b362
> --- /dev/null
> +++ b/default-configs/riscv64-linux-user.mak
> @@ -0,0 +1 @@
> +# Default configuration for riscv-linux-user
> diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
> new file mode 100644
> index 0000000..f9e7421
> --- /dev/null
> +++ b/default-configs/riscv64-softmmu.mak
> @@ -0,0 +1,4 @@
> +# Default configuration for riscv-softmmu
> +
> +CONFIG_SERIAL=y
> +CONFIG_VIRTIO=y
> diff --git a/hw/riscv/Makefile.objs b/hw/riscv/Makefile.objs
> new file mode 100644
> index 0000000..a0c31ae
> --- /dev/null
> +++ b/hw/riscv/Makefile.objs
> @@ -0,0 +1,12 @@
> +obj-y += riscv_elf.o
> +obj-y += riscv_htif.o
> +obj-y += riscv_hart.o
> +obj-y += sifive_e300.o
> +obj-y += sifive_clint.o
> +obj-y += sifive_prci.o
> +obj-y += sifive_plic.o
> +obj-y += sifive_u500.o
> +obj-y += sifive_uart.o
> +obj-y += spike_v1_09.o
> +obj-y += spike_v1_10.o
> +obj-y += virt.o

According to https://www.sifive.com/products/freedom/
Freedom E300 Platform uses RV32IMAC Architecture
and Freedom U500 Platform uses RV64GC Architecture.

Which means that qemu-system-riscv32 has to have E300 support but not U500 support.
qemu-system-riscv64 has to have U500 support but not E300 support.

However please see this log:

riscv-qemu$ ./riscv32-softmmu/qemu-system-riscv32 -M ?
Supported machines are:
none                 empty machine
sifive_e300          RISC-V Board compatible with SiFive E300 SDK
sifive_u500          RISC-V Board compatible with SiFive U500 SDK <<<<<< U500 in 32-bit mode
spike_v1.10          RISC-V Spike Board (Privileged ISA v1.10)
spike_v1.9           RISC-V Spike Board (Privileged ISA v1.9.1) (default)
virt                 RISC-V VirtIO Board (Privileged spec v1.10)
riscv-qemu$ ./riscv64-softmmu/qemu-system-riscv64 -M ?
Supported machines are:
none                 empty machine
sifive_e300          RISC-V Board compatible with SiFive E300 SDK <<<<<< E300 in 64-bit mode
sifive_u500          RISC-V Board compatible with SiFive U500 SDK
spike_v1.10          RISC-V Spike Board (Privileged ISA v1.10)
spike_v1.9           RISC-V Spike Board (Privileged ISA v1.9.1) (default)
virt                 RISC-V VirtIO Board (Privileged spec v1.10)

I propose at least this fixup:

diff --git a/default-configs/riscv32-softmmu.mak b/default-configs/riscv32-softmmu.mak
index f9e742120c..6a807f5f96 100644
--- a/default-configs/riscv32-softmmu.mak
+++ b/default-configs/riscv32-softmmu.mak
@@ -1,4 +1,5 @@
-# Default configuration for riscv-softmmu
+# Default configuration for riscv32-softmmu
 
 CONFIG_SERIAL=y
 CONFIG_VIRTIO=y
+CONFIG_SIFIVE_E300=y
diff --git a/default-configs/riscv64-softmmu.mak b/default-configs/riscv64-softmmu.mak
index f9e742120c..1a0349fe27 100644
--- a/default-configs/riscv64-softmmu.mak
+++ b/default-configs/riscv64-softmmu.mak
@@ -1,4 +1,5 @@
-# Default configuration for riscv-softmmu
+# Default configuration for riscv64-softmmu
 
 CONFIG_SERIAL=y
 CONFIG_VIRTIO=y
+CONFIG_SIFIVE_U500=y
diff --git a/hw/riscv/Makefile.objs b/hw/riscv/Makefile.objs
index a0c31ae25e..bac5faa603 100644
--- a/hw/riscv/Makefile.objs
+++ b/hw/riscv/Makefile.objs
@@ -1,11 +1,11 @@
 obj-y += riscv_elf.o
 obj-y += riscv_htif.o
 obj-y += riscv_hart.o
-obj-y += sifive_e300.o
+obj-$(CONFIG_SIFIVE_E300) += sifive_e300.o
 obj-y += sifive_clint.o
 obj-y += sifive_prci.o
 obj-y += sifive_plic.o
-obj-y += sifive_u500.o
+obj-$(CONFIG_SIFIVE_U500) += sifive_u500.o
 obj-y += sifive_uart.o
 obj-y += spike_v1_09.o
 obj-y += spike_v1_10.o

-- 
Best regards,
  Antony Pavlov

  parent reply	other threads:[~2018-01-04 16:55 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03  0:44 [Qemu-devel] [PATCH v1 00/21] RISC-V QEMU Port Submission v1 Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 01/21] RISC-V Maintainers Michael Clark
2018-01-03  5:30   ` Richard Henderson
2018-01-09 21:27   ` Alistair Francis
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 02/21] RISC-V ELF Machine Definition Michael Clark
2018-01-03  5:30   ` Richard Henderson
2018-01-09 21:33   ` Alistair Francis
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 03/21] RISC-V CPU Core Definition Michael Clark
2018-01-03  5:21   ` Richard Henderson
2018-01-03 22:30     ` Michael Clark
2018-01-08  6:55       ` Michael Clark
2018-01-04  6:47   ` Antony Pavlov
2018-01-04  7:33     ` Michael Clark
2018-01-04 17:53       ` Antony Pavlov
2018-01-05  5:59         ` Michael Clark
2018-03-03  1:41         ` Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 04/21] RISC-V Disassembler Michael Clark
2018-01-03  5:30   ` Richard Henderson
2018-01-03 22:12     ` Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 05/21] RISC-V CPU Helpers Michael Clark
2018-01-03  7:12   ` Richard Henderson
2018-01-03 22:59     ` Michael Clark
2018-01-03 23:25       ` Richard Henderson
2018-01-10 10:35     ` Stefan O'Rear
2018-01-10 17:04       ` Richard Henderson
2018-01-08 14:28   ` Christoph Hellwig
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 06/21] RISC-V FPU Support Michael Clark
2018-01-03 20:10   ` Richard Henderson
2018-01-23 21:37     ` Michael Clark
2018-01-24  0:01       ` Richard Henderson
2018-01-24  1:31         ` Michael Clark
2018-01-24 16:16           ` Richard Henderson
2018-01-24 17:35             ` Michael Clark
2018-01-23 23:15     ` Michael Clark
2018-01-23 23:35       ` Michael Clark
2018-01-24  0:03         ` Jim Wilson
2018-01-24  0:15       ` Richard Henderson
2018-01-24 18:58         ` Jim Wilson
2018-01-24 23:47           ` Richard Henderson
2018-01-29 20:33             ` Jim Wilson
2018-02-02  5:26               ` Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 07/21] RISC-V GDB Stub Michael Clark
2018-01-03 20:25   ` Richard Henderson
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 08/21] RISC-V TCG Code Generation Michael Clark
2018-01-03 21:35   ` Richard Henderson
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 09/21] RISC-V Physical Memory Protection Michael Clark
2018-01-03 23:03   ` Richard Henderson
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 10/21] RISC-V Linux User Emulation Michael Clark
2018-01-03 23:47   ` Richard Henderson
2018-01-05  6:51     ` Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 11/21] RISC-V HTIF Console Michael Clark
2018-01-04  0:00   ` Richard Henderson
2018-01-08 14:31   ` Christoph Hellwig
2018-02-04 20:19     ` Michael Clark
2018-02-04 21:29       ` Christoph Hellwig
2018-02-04 23:23         ` Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 12/21] RISC-V HART Array Michael Clark
2018-01-04  0:08   ` Richard Henderson
2018-01-05 21:41   ` Antony Pavlov
2018-01-05 21:44     ` Eric Blake
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 13/21] SiFive RISC-V CLINT Block Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 14/21] SiFive RISC-V PLIC Block Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 15/21] RISC-V Spike Machines Michael Clark
2018-01-04  0:14   ` Richard Henderson
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 16/21] RISC-V VirtIO Machine Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 17/21] SiFive RISC-V UART Device Michael Clark
2018-01-03 14:57   ` KONRAD Frederic
2018-01-05  6:38     ` Michael Clark
2018-01-04 21:07   ` Antony Pavlov
2018-01-05  6:03     ` Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 18/21] SiFive RISC-V PRCI Block Michael Clark
2018-01-03 15:02   ` KONRAD Frederic
2018-01-03 22:07     ` Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 19/21] SiFive Freedom E300 RISC-V Machine Michael Clark
2018-01-05 21:54   ` Antony Pavlov
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 20/21] SiFive Freedom U500 " Michael Clark
2018-01-03  0:44 ` [Qemu-devel] [PATCH v1 21/21] RISC-V Build Infrastructure Michael Clark
2018-01-03 23:23   ` Eric Blake
2018-01-05  6:47     ` Michael Clark
2018-01-05 14:49       ` Eric Blake
2018-01-08  9:29         ` Markus Armbruster
2018-01-04 17:09   ` Antony Pavlov [this message]
2018-01-05  6:22     ` Michael Clark
2018-02-03 22:36       ` Michael Clark
2018-01-03  1:28 ` [Qemu-devel] [PATCH v1 00/21] RISC-V QEMU Port Submission v1 no-reply
2018-01-03  1:46   ` Michael Clark
2018-01-03  2:00     ` Michael Clark
2018-01-03  2:41       ` Fam Zheng
2018-01-03  2:54         ` Michael Clark
2018-01-03  3:05           ` Fam Zheng
2018-01-05 11:49             ` Alex Bennée
2018-01-05 12:25               ` Fam Zheng
2018-01-05 12:39                 ` Alex Bennée
2018-01-05 22:11                 ` Paolo Bonzini
2018-01-03 11:35 ` Richard W.M. Jones
2018-01-03 21:50   ` Michael Clark
2018-01-03 22:06     ` Richard W.M. Jones
2018-01-08 15:45       ` Andrea Bolognani
2018-01-08 14:24 ` Christoph Hellwig

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=20180104200907.7232a1e131af98e25931faa5@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=mjc@sifive.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sagark@eecs.berkeley.edu \
    /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).