opensbi.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Himanshu Chauhan <hchauhan@ventanamicro.com>
To: opensbi@lists.infradead.org
Subject: [PATCH v2 0/7] Introduce support for SBI Debug Trigger Extension
Date: Mon,  8 Jan 2024 12:25:18 +0530	[thread overview]
Message-ID: <20240108065525.208172-1-hchauhan@ventanamicro.com> (raw)

RISC-V Debug specification includes Sdtrig ISA extension
which describes Trigger Module. Triggers can cause
a breakpoint exception or trace action without execution
of a special instruction. They can be used to implement
hardware breakpoints and watchpoints for native debugging.

The SBI Debug Trigger extension v6 can be found at:
https://lists.riscv.org/g/tech-debug/topic/99825362#1302

This patch is an initial implementation of SBI Debug Trigger
Extension(v6) in OpenSBI. It is based on similar patchset
from Sergey Matyukevich.
(http://lists.infradead.org/pipermail/opensbi/2022-October/003531.html)

The following features are supported:
* mcontrol, mcontrol6 triggers
* Breakpoint and trace actions

Linux Kernel Branch (Breakpoint driver support):
https://github.com/hschauhan/riscv-linux/tree/sdtrig-v6

NOTE: Chained triggers are not supported

Changes from v1:
  - Rebased to latest OpenSBI master
  - Other cosmetic changes as per the comments

Himanshu Chauhan (7):
  include: sbi: Introduce common endianess conversion macro
  include: sbi: Add TINFO debug trigger CSR
  include: sbi: Introduce debug trigger register encodings
  lib: sbi: Introduce the SBI debug triggers extension support
  include: sbi: Add SBI debug trigger extension related defines
  lib: sbi: Implement SBI debug trigger extension
  lib: sbi: Print number of debug triggers found

 include/sbi/riscv_dbtr.h          | 249 ++++++++++
 include/sbi/riscv_encoding.h      |   1 +
 include/sbi/sbi_byteorder.h       |  10 +
 include/sbi/sbi_dbtr.h            | 127 +++++
 include/sbi/sbi_ecall_interface.h |  11 +
 lib/sbi/Kconfig                   |   4 +
 lib/sbi/objects.mk                |   4 +
 lib/sbi/sbi_dbtr.c                | 742 ++++++++++++++++++++++++++++++
 lib/sbi/sbi_ecall_dbtr.c          |  73 +++
 lib/sbi/sbi_init.c                |  11 +
 10 files changed, 1232 insertions(+)
 create mode 100644 include/sbi/riscv_dbtr.h
 create mode 100644 include/sbi/sbi_dbtr.h
 create mode 100644 lib/sbi/sbi_dbtr.c
 create mode 100644 lib/sbi/sbi_ecall_dbtr.c

-- 
2.34.1



             reply	other threads:[~2024-01-08  6:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08  6:55 Himanshu Chauhan [this message]
2024-01-08  6:55 ` [PATCH v2 1/7] include: sbi: Introduce common endianess conversion macro Himanshu Chauhan
2024-01-09 10:22   ` Anup Patel
2024-01-08  6:55 ` [PATCH v2 2/7] include: sbi: Add TINFO debug trigger CSR Himanshu Chauhan
2024-01-09 10:23   ` Anup Patel
2024-01-08  6:55 ` [PATCH v2 3/7] include: sbi: Introduce debug trigger register encodings Himanshu Chauhan
2024-01-09 10:23   ` Anup Patel
2024-01-08  6:55 ` [PATCH v2 4/7] lib: sbi: Introduce the SBI debug triggers extension support Himanshu Chauhan
2024-01-09 10:32   ` Anup Patel
2024-01-09 15:31     ` Himanshu Chauhan
2024-01-09 15:44       ` Anup Patel
2024-01-08  6:55 ` [PATCH v2 5/7] include: sbi: Add SBI debug trigger extension related defines Himanshu Chauhan
2024-01-09 10:33   ` Anup Patel
2024-01-08  6:55 ` [PATCH v2 6/7] lib: sbi: Implement SBI debug trigger extension Himanshu Chauhan
2024-01-09 10:33   ` Anup Patel
2024-01-08  6:55 ` [PATCH v2 7/7] lib: sbi: Print number of debug triggers found Himanshu Chauhan
2024-01-09 10:33   ` Anup Patel

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=20240108065525.208172-1-hchauhan@ventanamicro.com \
    --to=hchauhan@ventanamicro.com \
    --cc=opensbi@lists.infradead.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).