From 70b7e9ca2d04effda5fe964c968fbbabf72e54d9 Mon Sep 17 00:00:00 2001 From: Chih-Min Chao <48193236+chihminchao@users.noreply.github.com> Date: Thu, 7 Apr 2022 14:03:50 +0800 Subject: mmu: support asid/vmid (#928) The change makes [v]satp.asid and hgatp.vmid writtable and supports maximum length for rv32 and rv64. Software could write and read the satp.asid to get the valid length or check if the core supports asid/vmid or not. However, there is no official way to describe this hardware capability (device tree or something else). Two implementation flags are also added for future use and enabled by default. Signed-off-by: Chih-Min Chao --- riscv/processor.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'riscv/processor.cc') diff --git a/riscv/processor.cc b/riscv/processor.cc index e6783bf..3313dfc 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -57,6 +57,9 @@ processor_t::processor_t(isa_parser_t isa, const char* varch, else if (isa.get_max_xlen() == 64) set_mmu_capability(IMPL_MMU_SV48); + set_impl(IMPL_MMU_ASID, true); + set_impl(IMPL_MMU_VMID, true); + reset(); } -- cgit v1.1