mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: sbi: Align SBI vendor extension id with mvendorid CSR
As-per the SBI specification, the lower 24bits of the SBI vendor extension id is same as lower 24bits of the mvendorid CSR. We update the SBI vendor extension id checking based on above. Signed-off-by: Anup Patel <apatel@ventanamicro.com>
This commit is contained in:
@@ -180,13 +180,10 @@ static int generic_final_init(bool cold_boot)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int generic_vendor_ext_check(long extid)
|
||||
static bool generic_vendor_ext_check(void)
|
||||
{
|
||||
if (generic_plat && generic_plat->vendor_ext_check)
|
||||
return generic_plat->vendor_ext_check(extid,
|
||||
generic_plat_match);
|
||||
|
||||
return 0;
|
||||
return (generic_plat && generic_plat->vendor_ext_provider) ?
|
||||
true : false;
|
||||
}
|
||||
|
||||
static int generic_vendor_ext_provider(long extid, long funcid,
|
||||
@@ -194,13 +191,9 @@ static int generic_vendor_ext_provider(long extid, long funcid,
|
||||
unsigned long *out_value,
|
||||
struct sbi_trap_info *out_trap)
|
||||
{
|
||||
if (generic_plat && generic_plat->vendor_ext_provider) {
|
||||
return generic_plat->vendor_ext_provider(extid, funcid, regs,
|
||||
out_value, out_trap,
|
||||
generic_plat_match);
|
||||
}
|
||||
|
||||
return SBI_ENOTSUPP;
|
||||
return generic_plat->vendor_ext_provider(extid, funcid, regs,
|
||||
out_value, out_trap,
|
||||
generic_plat_match);
|
||||
}
|
||||
|
||||
static void generic_early_exit(void)
|
||||
|
Reference in New Issue
Block a user