mirror of
https://github.com/Fishwaldo/opensbi.git
synced 2025-07-24 05:49:21 +00:00
lib: sbi: Fix bug in sbi_ecall_rfence that misses checking
In sbi_ecall_rfence_handler, it will compare the funcid with REMOTE_HFENCE_GVMA and REMOTE_HFENCE_VVMA_ASID. Later it check whether the misa includes H-extension. This checking is incomplete which misses REMOTE_HFENCE_GVMA_VMID and REMOTE_HFENCE_VVMA. Fix the issue by updating the checking range. Signed-off-by: Dong Du <Dd_nirvana@sjtu.edu.cn> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
parent
7aa6c9aa96
commit
33eac764f2
1 changed files with 2 additions and 2 deletions
|
@ -54,8 +54,8 @@ static int sbi_ecall_rfence_handler(unsigned long extid, unsigned long funcid,
|
|||
struct sbi_tlb_info tlb_info;
|
||||
u32 source_hart = current_hartid();
|
||||
|
||||
if (funcid >= SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA &&
|
||||
funcid <= SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID)
|
||||
if (funcid >= SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID &&
|
||||
funcid <= SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA)
|
||||
if (!misa_extension('H'))
|
||||
return SBI_ENOTSUPP;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue