]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv/debug.c: use wp size = 4 for 32-bit CPUs
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Tue, 21 Jan 2025 17:06:25 +0000 (14:06 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 18 Mar 2025 06:02:47 +0000 (09:02 +0300)
commit1408266d1c6aa0e197fede7781c090db0502f5ca
treebbb0adae88dab79dd9767bad34047acf41c5d35e
parent1fc0a58a982c821100a353edf2e5fca76effb1a2
target/riscv/debug.c: use wp size = 4 for 32-bit CPUs

The mcontrol select bit (19) is always zero, meaning our triggers will
always match virtual addresses. In this condition, if the user does not
specify a size for the trigger, the access size defaults to XLEN.

At this moment we're using def_size = 8 regardless of CPU XLEN. Use
def_size = 4 in case we're running 32 bits.

Fixes: 95799e36c1 ("target/riscv: Add initial support for the Sdtrig extension")
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20250121170626.1992570-2-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit 3fba76e61caa46329afc399b3ecaaba70c8b0a4e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/debug.c