lib: sbi: Fix bug in sbi_ecall_rfence that misses checking
authorDong Du <Dd_nirvana@sjtu.edu.cn>
Fri, 13 Aug 2021 12:33:00 +0000 (20:33 +0800)
committerAnup Patel <anup@brainfault.org>
Fri, 20 Aug 2021 04:12:39 +0000 (09:42 +0530)
commit33eac764f22ba4d0a22980ff4f130eadb9502a2f
tree1ea265a36f825a99fba884add09f572efd8afae7
parent7aa6c9aa96049b741b754b7340ea96a37719de27
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>
lib/sbi/sbi_ecall_replace.c