OSDN Git Service

target/riscv: Add initial support for the Sdtrig extension
authorBin Meng <bin.meng@windriver.com>
Tue, 15 Mar 2022 06:55:23 +0000 (14:55 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 22 Apr 2022 00:35:16 +0000 (10:35 +1000)
commit95799e36c15a9ab602a388491c40f6860f6ae8bf
tree9f91e8ed27cb9fe2b9cf437341af53daf2c33647
parent33fe584f7026bfaa13bb8a943f85c879e06bbdc6
target/riscv: Add initial support for the Sdtrig extension

This adds initial support for the Sdtrig extension via the Trigger
Module, as defined in the RISC-V Debug Specification [1].

Only "Address / Data Match" trigger (type 2) is implemented as of now,
which is mainly used for hardware breakpoint and watchpoint. The number
of type 2 triggers implemented is 2, which is the number that we can
find in the SiFive U54/U74 cores.

[1] https://github.com/riscv/riscv-debug-spec/raw/master/riscv-debug-stable.pdf

Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220315065529.62198-2-bmeng.cn@gmail.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.h
target/riscv/debug.c [new file with mode: 0644]
target/riscv/debug.h [new file with mode: 0644]
target/riscv/meson.build