qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/15] Add support for the T-Head vendor extensions
@ 2022-12-23 18:00 Christoph Muellner
  2022-12-23 18:00 ` [PATCH v2 01/15] RISC-V: Adding XTheadCmo ISA extension Christoph Muellner
                   ` (14 more replies)
  0 siblings, 15 replies; 36+ messages in thread
From: Christoph Muellner @ 2022-12-23 18:00 UTC (permalink / raw)
  To: qemu-riscv, qemu-devel, Alistair Francis, Bin Meng,
	Philipp Tomsich, Heiko Stübner, Palmer Dabbelt,
	Richard Henderson, Nelson Chu, Kito Cheng, Cooper Qu, Lifang Xia,
	Yunhai Shang, Zhiwei Liu
  Cc: Christoph Müllner

From: Christoph Müllner <christoph.muellner@vrull.eu>

This series introduces support for the T-Head vendor extensions,
which are implemented e.g. in the XuanTie C906 and XuanTie C910:
* XTheadBa
* XTheadBb
* XTheadBs
* XTheadCmo
* XTheadCondMov
* XTheadFMemIdx
* XTheadFmv
* XTheadMac
* XTheadMemIdx
* XTheadMemPair
* XTheadSync

The xthead* extensions are documented here:
  https://github.com/T-head-Semi/thead-extension-spec/releases/latest

The "th." instruction prefix prevents future conflicts with standard
extensions and has been documentented in the RISC-V toolchain conventions:
  https://github.com/riscv-non-isa/riscv-toolchain-conventions

Note, that the T-Head vendor extensions do not contain all
vendor-specific functionality of the T-Head SoCs
(e.g. no vendor-specific CSRs are included).
Instead the extensions cover coherent functionality,
that is exposed to S and U mode.

To enable the extensions above, the following two methods are possible:
* add the extension to the arch string
  E.g. QEMU_CPU="any,xtheadcmo=true,xtheadsync=true"
* implicitly select the extensions via CPU selection
  E.g. QEMU_CPU="thead-c906"

Major changes in v2:
- Add ISA_EXT_DATA_ENTRY()s
- Use single decoder for XThead extensions
- Simplify a lot of translation functions
- Fix RV32 behaviour
- Added XTheadFmv
- Addressed all comments of v1

Christoph Müllner (15):
  RISC-V: Adding XTheadCmo ISA extension
  RISC-V: Adding XTheadSync ISA extension
  RISC-V: Adding XTheadBa ISA extension
  RISC-V: Adding XTheadBb ISA extension
  RISC-V: Adding XTheadBs ISA extension
  RISC-V: Adding XTheadCondMov ISA extension
  RISC-V: Adding T-Head multiply-accumulate instructions
  RISC-V: Adding T-Head MemPair extension
  RISC-V: Adding T-Head MemIdx extension
  RISC-V: Adding T-Head FMemIdx extension
  RISC-V: Adding T-Head XMAE support
  RISC-V: Set minimum priv version for Zfh to 1.11
  RISC-V: Add initial support for T-Head C906
  RISC-V: Adding XTheadFmv ISA extension
  target/riscv: add a MAINTAINERS entry for XThead* extension support

 MAINTAINERS                                |    8 +
 target/riscv/cpu.c                         |   57 +-
 target/riscv/cpu.h                         |   14 +
 target/riscv/cpu_helper.c                  |    6 +-
 target/riscv/cpu_vendorid.h                |    6 +
 target/riscv/helper.h                      |    1 +
 target/riscv/insn_trans/trans_xthead.c.inc | 1089 ++++++++++++++++++++
 target/riscv/meson.build                   |    1 +
 target/riscv/op_helper.c                   |    6 +
 target/riscv/translate.c                   |   38 +-
 target/riscv/xthead.decode                 |  185 ++++
 11 files changed, 1405 insertions(+), 6 deletions(-)
 create mode 100644 target/riscv/cpu_vendorid.h
 create mode 100644 target/riscv/insn_trans/trans_xthead.c.inc
 create mode 100644 target/riscv/xthead.decode

-- 
2.38.1



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

end of thread, other threads:[~2023-01-30 14:05 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-23 18:00 [PATCH v2 00/15] Add support for the T-Head vendor extensions Christoph Muellner
2022-12-23 18:00 ` [PATCH v2 01/15] RISC-V: Adding XTheadCmo ISA extension Christoph Muellner
2023-01-23 22:49   ` Alistair Francis
2023-01-24 17:31     ` Christoph Müllner
2023-01-24 19:51       ` Christoph Müllner
2023-01-29 22:40         ` Alistair Francis
2023-01-30 14:04           ` Christoph Müllner
2022-12-23 18:00 ` [PATCH v2 02/15] RISC-V: Adding XTheadSync " Christoph Muellner
2023-01-23 22:54   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 03/15] RISC-V: Adding XTheadBa " Christoph Muellner
2023-01-23 22:55   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 04/15] RISC-V: Adding XTheadBb " Christoph Muellner
2023-01-23 22:57   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 05/15] RISC-V: Adding XTheadBs " Christoph Muellner
2023-01-23 22:58   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 06/15] RISC-V: Adding XTheadCondMov " Christoph Muellner
2023-01-23 22:59   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 07/15] RISC-V: Adding T-Head multiply-accumulate instructions Christoph Muellner
2023-01-23 23:00   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 08/15] RISC-V: Adding T-Head MemPair extension Christoph Muellner
2023-01-23 23:03   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 09/15] RISC-V: Adding T-Head MemIdx extension Christoph Muellner
2023-01-23 23:04   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 10/15] RISC-V: Adding T-Head FMemIdx extension Christoph Muellner
2023-01-23 23:38   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 11/15] RISC-V: Adding T-Head XMAE support Christoph Muellner
2023-01-23 23:49   ` Alistair Francis
2023-01-24 17:31     ` Christoph Müllner
2022-12-23 18:00 ` [PATCH v2 12/15] RISC-V: Set minimum priv version for Zfh to 1.11 Christoph Muellner
2023-01-23 23:39   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 13/15] RISC-V: Add initial support for T-Head C906 Christoph Muellner
2023-01-23 23:43   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 14/15] RISC-V: Adding XTheadFmv ISA extension Christoph Muellner
2023-01-23 23:44   ` Alistair Francis
2022-12-23 18:00 ` [PATCH v2 15/15] target/riscv: add a MAINTAINERS entry for XThead* extension support Christoph Muellner
2023-01-23 23:40   ` Alistair Francis

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