qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/18] target-riscv: Add full-system emulation support for the RISC-V Instruction Set Architecture (RV64G, RV32G)
@ 2016-09-26 10:56 Sagar Karandikar
  2016-09-26 10:56 ` [Qemu-devel] [PATCH 01/18] target-riscv: Add RISC-V target stubs and Maintainer Sagar Karandikar
                   ` (18 more replies)
  0 siblings, 19 replies; 45+ messages in thread
From: Sagar Karandikar @ 2016-09-26 10:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, rth, kbastian, Sagar Karandikar

This patch set adds support for the RISC-V ISA [1] as a system-mode
target. It has been tested booting Linux and FreeBSD, passes the RISC-V 
assembly test suite, and has had the riscv-torture [2] tester running on it for 
a while now without any issues arising. This patch set supports RV64G and 
RV32G.

Potentially useful references:
-RISC-V User Spec: See [3]. This spec is frozen.
-RISC-V Privileged Spec: See [4]. This spec is a draft, we implement v1.9.
-Spike, the reference simulator for the ISA: See [5].

The comments from an earlier RFC were addressed:
-We use QEMU's built-in softfloat
-cpu-qom.h merged into cpu.h
-remove active_tc/riscv-defs.h that were mirrored from MIPS
-Use DEF_HELPER_FLAGS_* where necessary
-DIV/REM now use movcond instead of branches
-handlers for arithmetic instructions and their "W" counterparts were merged to 
reduce code duplication
-Updated to use tcg_gen_qemu_ld_tl(..., MO_SB) etc.

[1] https://riscv.org
[2] https://github.com/ucb-bar/riscv-torture
[3] https://content.riscv.org/wp-content/uploads/2016/06/riscv-spec-v2.1.pdf
[4] https://content.riscv.org/wp-content/uploads/2016/07/riscv-privileged-v1.9-1.pdf
[5] https://github.com/riscv/riscv-isa-sim

Sagar Karandikar (18):
  target-riscv: Add RISC-V target stubs and Maintainer
  target-riscv: Add RISC-V Target stubs inside target-riscv/
  target-riscv: Add initialization for translation
  target-riscv: Add framework for instruction decode
  target-riscv: Add Arithmetic instructions
  target-riscv: Add JALR, Branch Instructions
  target-riscv: Add Loads/Stores, FP Loads/Stores
  target-riscv: Add Atomic Instructions
  target-riscv: Add FMADD, FMSUB, FNMADD, FNMSUB Instructions,
  target-riscv: Add Single Precision Floating-Point Instructions
  target-riscv: Add Double Precision Floating-Point Instructions
  target-riscv: Add system instructions
  target-riscv: Add CSR read/write helpers
  target-riscv: softmmu/address translation support
  target-riscv: Interrupt Handling
  target-riscv: Timer Support
  target-riscv: Add support for Host-Target Interface (HTIF) Devices
  target-riscv: Add generic test board, activate target

 MAINTAINERS                           |    7 +
 arch_init.c                           |    2 +
 configure                             |    6 +
 cpus.c                                |    6 +
 default-configs/riscv32-softmmu.mak   |   38 +
 default-configs/riscv64-softmmu.mak   |   38 +
 fpu/softfloat-specialize.h            |    7 +-
 hw/riscv/Makefile.objs                |    5 +
 hw/riscv/cpudevs.h                    |   17 +
 hw/riscv/htif/elf_symb.c              |  286 ++++++
 hw/riscv/htif/elf_symb.h              |   80 ++
 hw/riscv/htif/htif.c                  |  423 +++++++++
 hw/riscv/riscv_board.c                |  264 ++++++
 hw/riscv/riscv_int.c                  |   67 ++
 hw/riscv/riscv_rtc.c                  |  230 +++++
 include/elf.h                         |    2 +
 include/hw/riscv/htif/htif.h          |   61 ++
 include/hw/riscv/riscv_rtc.h          |   25 +
 include/hw/riscv/riscv_rtc_internal.h |    3 +
 include/sysemu/arch_init.h            |    1 +
 qapi-schema.json                      |   14 +-
 target-riscv/Makefile.objs            |    1 +
 target-riscv/cpu.c                    |  154 +++
 target-riscv/cpu.h                    |  497 ++++++++++
 target-riscv/fpu_helper.c             |  582 ++++++++++++
 target-riscv/helper.c                 |  420 +++++++++
 target-riscv/helper.h                 |   87 ++
 target-riscv/instmap.h                |  328 +++++++
 target-riscv/op_helper.c              |  577 ++++++++++++
 target-riscv/translate.c              | 1658 +++++++++++++++++++++++++++++++++
 30 files changed, 5882 insertions(+), 4 deletions(-)
 create mode 100644 default-configs/riscv32-softmmu.mak
 create mode 100644 default-configs/riscv64-softmmu.mak
 create mode 100644 hw/riscv/Makefile.objs
 create mode 100644 hw/riscv/cpudevs.h
 create mode 100644 hw/riscv/htif/elf_symb.c
 create mode 100644 hw/riscv/htif/elf_symb.h
 create mode 100644 hw/riscv/htif/htif.c
 create mode 100644 hw/riscv/riscv_board.c
 create mode 100644 hw/riscv/riscv_int.c
 create mode 100644 hw/riscv/riscv_rtc.c
 create mode 100644 include/hw/riscv/htif/htif.h
 create mode 100644 include/hw/riscv/riscv_rtc.h
 create mode 100644 include/hw/riscv/riscv_rtc_internal.h
 create mode 100644 target-riscv/Makefile.objs
 create mode 100644 target-riscv/cpu.c
 create mode 100644 target-riscv/cpu.h
 create mode 100644 target-riscv/fpu_helper.c
 create mode 100644 target-riscv/helper.c
 create mode 100644 target-riscv/helper.h
 create mode 100644 target-riscv/instmap.h
 create mode 100644 target-riscv/op_helper.c
 create mode 100644 target-riscv/translate.c

-- 
2.9.3

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2016-09-27 19:30 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-26 10:56 [Qemu-devel] [PATCH 00/18] target-riscv: Add full-system emulation support for the RISC-V Instruction Set Architecture (RV64G, RV32G) Sagar Karandikar
2016-09-26 10:56 ` [Qemu-devel] [PATCH 01/18] target-riscv: Add RISC-V target stubs and Maintainer Sagar Karandikar
2016-09-26 19:06   ` Eric Blake
2016-09-26 10:56 ` [Qemu-devel] [PATCH 02/18] target-riscv: Add RISC-V Target stubs inside target-riscv/ Sagar Karandikar
2016-09-26 16:30   ` Richard Henderson
2016-09-26 21:50   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 03/18] target-riscv: Add initialization for translation Sagar Karandikar
2016-09-26 16:34   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 04/18] target-riscv: Add framework for instruction decode Sagar Karandikar
2016-09-26 16:49   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 05/18] target-riscv: Add Arithmetic instructions Sagar Karandikar
2016-09-26 17:31   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 06/18] target-riscv: Add JALR, Branch Instructions Sagar Karandikar
2016-09-26 18:28   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 07/18] target-riscv: Add Loads/Stores, FP Loads/Stores Sagar Karandikar
2016-09-26 20:44   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 08/18] target-riscv: Add Atomic Instructions Sagar Karandikar
2016-09-27 19:30   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 09/18] target-riscv: Add FMADD, FMSUB, FNMADD, FNMSUB Instructions, Sagar Karandikar
2016-09-26 21:15   ` Richard Henderson
2016-09-27 19:20   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 10/18] target-riscv: Add Single Precision Floating-Point Instructions Sagar Karandikar
2016-09-26 21:35   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 11/18] target-riscv: Add Double " Sagar Karandikar
2016-09-26 21:37   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 12/18] target-riscv: Add system instructions Sagar Karandikar
2016-09-26 12:21   ` Paolo Bonzini
2016-09-26 12:38     ` Bastian Koppelmann
2016-09-26 12:44       ` Paolo Bonzini
2016-09-27 18:12         ` Sagar Karandikar
2016-09-26 21:41   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 13/18] target-riscv: Add CSR read/write helpers Sagar Karandikar
2016-09-26 10:56 ` [Qemu-devel] [PATCH 14/18] target-riscv: softmmu/address translation support Sagar Karandikar
2016-09-26 22:04   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 15/18] target-riscv: Interrupt Handling Sagar Karandikar
2016-09-26 22:07   ` Richard Henderson
2016-09-26 10:56 ` [Qemu-devel] [PATCH 16/18] target-riscv: Timer Support Sagar Karandikar
2016-09-26 10:56 ` [Qemu-devel] [PATCH 17/18] target-riscv: Add support for Host-Target Interface (HTIF) Devices Sagar Karandikar
2016-09-26 10:56 ` [Qemu-devel] [PATCH 18/18] target-riscv: Add generic test board, activate target Sagar Karandikar
2016-09-26 12:20 ` [Qemu-devel] [PATCH 00/18] target-riscv: Add full-system emulation support for the RISC-V Instruction Set Architecture (RV64G, RV32G) Paolo Bonzini
2016-09-26 16:17   ` Richard Henderson
2016-09-26 16:20     ` Andreas Färber
2016-09-26 16:24       ` Paolo Bonzini
2016-09-26 16:35         ` Andreas Färber
2016-09-26 16:37           ` Paolo Bonzini

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).