mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: Allow overriding SBI implementation ID
Ideally, the SBI implementation ID for OpenSBI should always be 0x1 (as mentioned in SBI v0.2 spec) but external firmware (such as EDK2) which use OpenSBI as library might want to override the SBI implementation ID with their custom implementation ID. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
@@ -22,6 +22,18 @@ u16 sbi_ecall_version_minor(void)
|
||||
return SBI_ECALL_VERSION_MINOR;
|
||||
}
|
||||
|
||||
static unsigned long ecall_impid = SBI_OPENSBI_IMPID;
|
||||
|
||||
unsigned long sbi_ecall_get_impid(void)
|
||||
{
|
||||
return ecall_impid;
|
||||
}
|
||||
|
||||
void sbi_ecall_set_impid(unsigned long impid)
|
||||
{
|
||||
ecall_impid = impid;
|
||||
}
|
||||
|
||||
static SBI_LIST_HEAD(ecall_exts_list);
|
||||
|
||||
struct sbi_ecall_extension *sbi_ecall_find_extension(unsigned long extid)
|
||||
|
Reference in New Issue
Block a user