UefiCpuPkg: RISC-V: Support MMU with SV39/48/57 mode
During CpuDxe initialization, MMU will be setup with the highest mode that HW supports. Signed-off-by: Tuan Phan <tphan@ventanamicro.com> Reviewed-by: Andrei Warkentin <andrei.warkentin@intel.com> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
31
UefiCpuPkg/Library/BaseRiscVMmuLib/RiscVMmuCore.S
Normal file
31
UefiCpuPkg/Library/BaseRiscVMmuLib/RiscVMmuCore.S
Normal file
@@ -0,0 +1,31 @@
|
||||
/** @file
|
||||
*
|
||||
* Copyright (c) 2023, Ventana Micro Systems Inc. All Rights Reserved.<BR>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
*
|
||||
**/
|
||||
|
||||
#include <Base.h>
|
||||
#include <Register/RiscV64/RiscVImpl.h>
|
||||
|
||||
.text
|
||||
.align 3
|
||||
|
||||
//
|
||||
// Local tlb flush all.
|
||||
//
|
||||
//
|
||||
ASM_FUNC (RiscVLocalTlbFlushAll)
|
||||
sfence.vma
|
||||
ret
|
||||
|
||||
//
|
||||
// Local tlb flush at a virtual address
|
||||
// @retval a0 : virtual address.
|
||||
//
|
||||
ASM_FUNC (
|
||||
RiscVLocalTlbFlush
|
||||
)
|
||||
sfence.vma a0
|
||||
ret
|
Reference in New Issue
Block a user