mirror of
https://github.com/riscv-software-src/opensbi
synced 2025-10-16 05:38:17 +01:00
The trigger allocation function uses bit shift instead of mask to check the mapped status of the triggers. This causes index 0 to be return always. As a result, the older triggers are overwritten. Use the mask for MAPPED field in state word to check if the trigger is mapped. Fixes: 97f234f15 ("lib: sbi: Introduce the SBI debug triggers extension support") Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org>