Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

riscv: Add SBI debug trigger extension and function ids

Debug trigger extension is an SBI extension to support native debugging
in S-mode and VS-mode. This patch adds the extension and the function
IDs defined by the extension.

Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
Link: https://patch.msgid.link/20250710125231.653967-2-hchauhan@ventanamicro.com
[pjw@kernel.org: updated to apply]
Signed-off-by: Paul Walmsley <pjw@kernel.org>

authored by

Himanshu Chauhan and committed by
Paul Walmsley
5efaf92d f02dd254

+29
+29
arch/riscv/include/asm/sbi.h
··· 37 37 SBI_EXT_NACL = 0x4E41434C, 38 38 SBI_EXT_FWFT = 0x46574654, 39 39 SBI_EXT_MPXY = 0x4D505859, 40 + SBI_EXT_DBTR = 0x44425452, 40 41 41 42 /* Experimentals extensions must lie within this range */ 42 43 SBI_EXT_EXPERIMENTAL_START = 0x08000000, ··· 505 504 #define SBI_MPXY_CHAN_CAP_SEND_WITH_RESP BIT(3) 506 505 #define SBI_MPXY_CHAN_CAP_SEND_WITHOUT_RESP BIT(4) 507 506 #define SBI_MPXY_CHAN_CAP_GET_NOTIFICATIONS BIT(5) 507 + 508 + /* SBI debug triggers function IDs */ 509 + enum sbi_ext_dbtr_fid { 510 + SBI_EXT_DBTR_NUM_TRIGGERS = 0, 511 + SBI_EXT_DBTR_SETUP_SHMEM, 512 + SBI_EXT_DBTR_TRIG_READ, 513 + SBI_EXT_DBTR_TRIG_INSTALL, 514 + SBI_EXT_DBTR_TRIG_UPDATE, 515 + SBI_EXT_DBTR_TRIG_UNINSTALL, 516 + SBI_EXT_DBTR_TRIG_ENABLE, 517 + SBI_EXT_DBTR_TRIG_DISABLE, 518 + }; 519 + 520 + struct sbi_dbtr_data_msg { 521 + unsigned long tstate; 522 + unsigned long tdata1; 523 + unsigned long tdata2; 524 + unsigned long tdata3; 525 + }; 526 + 527 + struct sbi_dbtr_id_msg { 528 + unsigned long idx; 529 + }; 530 + 531 + union sbi_dbtr_shmem_entry { 532 + struct sbi_dbtr_data_msg data; 533 + struct sbi_dbtr_id_msg id; 534 + }; 508 535 509 536 /* SBI spec version fields */ 510 537 #define SBI_SPEC_VERSION_DEFAULT 0x1