QEMU-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Liu <chao.liu.zevorn@gmail.com>
To: Chao Liu <chao.liu.zevorn@gmail.com>,
	Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	Weiwei Li <liwei1518@gmail.com>,
	Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,
	Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Christoph Muellner <christoph.muellner@vrull.eu>,
	Fabiano Rosas <farosas@suse.de>,
	Laurent Vivier <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Subject: [PATCH v7 0/5] Add support for K230 board
Date: Tue, 12 May 2026 00:29:44 +0800	[thread overview]
Message-ID: <cover.1778516731.git.chao.liu.zevorn@gmail.com> (raw)

This patch series adds support for U-Boot + OpenSBI + standard Linux kernel on
K230 board. Thanks to Peng Jiang, Mig Yang, Renzao Ren, Yao Zi for their help.

The current patchset fixes some bug and tag errors, Thanks to Alistair and
Conor for the review.

Test command with the direct Linux boot:

```
$QEMU -M k230 \
      -kernel [Image] \
      -dtb [k230-qemu.dtb] \
      -initrd [rootfs.cpio.gz] \
      -nographic
```

The k230-boot-assets repo [1] provides K230 Linux kernel images built with
k230-sdk and Yocto.

For more information, see docs/system/riscv/k230.rst.

The GitLab CI result [2] passed all cases.

PATCH v7 changelog:
- Patchset: Removed invalid tags for patchset.
- Patchset: Updated the K230 datasheet link in the patchset comment header.
- Patch 2: Removed the unnecessary changes to MAINTAINERS.
- Patch 2: Fixed an Oops caused by accesses to an unimpl UART MMIO address.
- Patch 2: Adjusted the K230 machine hart count to 1.
- Patch 2: Supported direct boot linux with `-kernel`.
- Patch 3: Aligned the WDT interrupt number with the K230 datasheet.
- Patch 5: Updated k230.rst Linux boot docs.

PATCH v6 changelog:
- Patchset: Rebased on the latest Alistair's riscv-to-apply.next branch [3].
- Patch 4: Picked up Fabiano's Acked-by.

PATCH v5 changelog:
- Patchset: Rebased on Alistair's riscv-to-apply.next branch.
- Patch 2: Fixed reset vector ROM jump to trap-handler bug.

PATCH v4 changelog:
- Patchset: Rebased on the latest master branch.
- Patchset: No functional changes from v3.

PATCH v3 changelog:
- Patch 1: Align T-Head C908 CPU's RISC-V extension with XUANTIE-QEMU.
- Patch 2: Adjust PLIC and CLINT addresses to match K230 datasheet.

PATCH v2 changelog:
- Patch 1: Add Svpbmt extension support for the T-Head C908 CPU.
- Patch 2: Move the k230.rst definition from MAINTAINERS to Patch 5.
- Patch 5: Apply Daniel's bugfix to build the k230 documentation successfully.

PATCH v1 changelog:
- Patch 1: Add T-Head C908 and C908v CPU support.
- Patch 2: Add K230 board initial support(big core is not supported yet).
- Patch 3: Add Programmable Watchdog Timer (WDT) peripheral support.
- Patch 4: Add QEMU test for K230 watchdog.
- Patch 5: Add documentation for K230 machine.

---

Link:
[1] https://github.com/zevorn/k230-boot-assets
[2] https://gitlab.com/chao23.liu/qemu/-/pipelines/2515556858
[3] https://github.com/alistair23/qemu/tree/riscv-to-apply.next

Thanks,
Chao

Chao Liu (5):
  target/riscv: add thead-c908 cpu support
  hw/riscv: add k230 board initial support
  hw/watchdog: add k230 watchdog initial support
  tests/qtest: add test for K230 watchdog
  docs/system/riscv: add documentation for k230 machine

 MAINTAINERS                    |  11 +
 docs/system/riscv/k230.rst     | 113 +++++++
 docs/system/target-riscv.rst   |   1 +
 hw/riscv/Kconfig               |  11 +
 hw/riscv/k230.c                | 524 +++++++++++++++++++++++++++++++++
 hw/riscv/meson.build           |   2 +-
 hw/watchdog/Kconfig            |   4 +
 hw/watchdog/k230_wdt.c         | 296 +++++++++++++++++++
 hw/watchdog/meson.build        |   1 +
 hw/watchdog/trace-events       |   9 +
 include/hw/riscv/k230.h        | 149 ++++++++++
 include/hw/watchdog/k230_wdt.h | 121 ++++++++
 target/riscv/cpu-qom.h         |   2 +
 target/riscv/cpu.c             |  51 ++++
 target/riscv/th_csr.c          | 380 +++++++++++++++++++++++-
 tests/qtest/k230-wdt-test.c    | 189 ++++++++++++
 tests/qtest/meson.build        |   3 +-
 17 files changed, 1864 insertions(+), 3 deletions(-)
 create mode 100644 docs/system/riscv/k230.rst
 create mode 100644 hw/riscv/k230.c
 create mode 100644 hw/watchdog/k230_wdt.c
 create mode 100644 include/hw/riscv/k230.h
 create mode 100644 include/hw/watchdog/k230_wdt.h
 create mode 100644 tests/qtest/k230-wdt-test.c



             reply	other threads:[~2026-05-11 16:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 16:29 Chao Liu [this message]
2026-05-11 16:29 ` [PATCH v7 1/5] target/riscv: add thead-c908 cpu support Chao Liu
2026-05-11 16:29 ` [PATCH v7 2/5] hw/riscv: add k230 board initial support Chao Liu
2026-05-11 16:29 ` [PATCH v7 3/5] hw/watchdog: add k230 watchdog " Chao Liu
2026-05-11 16:29 ` [PATCH v7 4/5] tests/qtest: add test for K230 watchdog Chao Liu
2026-05-11 16:29 ` [PATCH v7 5/5] docs/system/riscv: add documentation for k230 machine Chao Liu

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=cover.1778516731.git.chao.liu.zevorn@gmail.com \
    --to=chao.liu.zevorn@gmail.com \
    --cc=alistair.francis@wdc.com \
    --cc=christoph.muellner@vrull.eu \
    --cc=daniel.barboza@oss.qualcomm.com \
    --cc=farosas@suse.de \
    --cc=liwei1518@gmail.com \
    --cc=lvivier@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=pbonzini@redhat.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=zhiwei_liu@linux.alibaba.com \
    /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