riscv: sbi: base: Add unavailable ext. probe test
Ensure value is zero when given an extension ID that is unavailable.
0xb000000 should be unavailable since that EID space isn't specified.
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
diff --git a/riscv/sbi.c b/riscv/sbi.c
index 762e971..b5b18c4 100644
--- a/riscv/sbi.c
+++ b/riscv/sbi.c
@@ -83,6 +83,10 @@
expected = getenv("PROBE_EXT") ? strtol(getenv("PROBE_EXT"), NULL, 0) : 1;
ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, SBI_EXT_BASE);
gen_report(&ret, 0, expected);
+ report_prefix_push("unavailable");
+ ret = __base_sbi_ecall(SBI_EXT_BASE_PROBE_EXT, 0xb000000);
+ gen_report(&ret, 0, 0);
+ report_prefix_pop();
report_prefix_pop();
report_prefix_push("mvendorid");