mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-09-08 18:21:29 +01:00
lib: sbi: dbtr: return SBI_ERR_INVALID_PARAM for invalid trigger configuration
sbi_dbtr_install_trig() returns the generic SBI_ERR_FAILED when
dbtr_trigger_valid() rejects a trigger configuration (dmode or M-mode
bits set), where SBI v3.0 section 19.4 defines SBI_ERR_INVALID_PARAM
for an invalid trigger configuration entry. Return
SBI_ERR_INVALID_PARAM instead.
Fixes: 97f234f15c ("lib: sbi: Introduce the SBI debug triggers extension support")
Signed-off-by: David E. Garcia Porras <david.garcia@aheadcomputing.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260727183041.258377-4-david.garcia@aheadcomputing.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
committed by
Anup Patel
parent
3e21ee3496
commit
548518e675
+1
-1
@@ -648,7 +648,7 @@ int sbi_dbtr_install_trig(unsigned long smode,
|
|||||||
*out = _idx;
|
*out = _idx;
|
||||||
sbi_hart_protection_unmap_range((unsigned long)shmem_base,
|
sbi_hart_protection_unmap_range((unsigned long)shmem_base,
|
||||||
trig_count * sizeof(*entry));
|
trig_count * sizeof(*entry));
|
||||||
return SBI_ERR_FAILED;
|
return SBI_ERR_INVALID_PARAM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((recv->tdata2 && !tdata2_impl) ||
|
if ((recv->tdata2 && !tdata2_impl) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user