forked from Mirrors/opensbi
lib: Implement sfence.vma correctly.
Currently, OpenSBI doesn't distinguish between sfence.vma and sfence.vm asid calls. Moreover, it ignores the page ranges and just flush entire TLB everytime. Fix the sfence implementation by keeping all the tlb flush info in scratch area. The relevant Linux kernel code was added by https://patchwork.kernel.org/project/linux-riscv/list/?series=89695 However, this patch is backward compatible with older version kernel that doesn't have the above patches as well. Fixes #87 Signed-off-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
@@ -41,7 +41,7 @@ void __attribute__((noreturn)) sbi_system_shutdown(struct sbi_scratch *scratch,
|
||||
|
||||
/* If that fails (or is not implemented) send an IPI on every
|
||||
* hart to hang and then hang the current hart */
|
||||
sbi_ipi_send_many(scratch, NULL, SBI_IPI_EVENT_HALT);
|
||||
sbi_ipi_send_many(scratch, NULL, SBI_IPI_EVENT_HALT, NULL);
|
||||
|
||||
sbi_hart_hang();
|
||||
}
|
||||
|
Reference in New Issue
Block a user