mirror of https://github.com/acidanthera/audk.git
MdePkg/BaseLib: RISC-V: Support getting satp register value
Add an API to retrieve satp register value. 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:
parent
e674096acc
commit
7178047402
|
@ -181,6 +181,11 @@ RiscVSetSupervisorAddressTranslationRegister (
|
|||
IN UINT64
|
||||
);
|
||||
|
||||
UINT64
|
||||
RiscVGetSupervisorAddressTranslationRegister (
|
||||
VOID
|
||||
);
|
||||
|
||||
UINT64
|
||||
RiscVReadTimer (
|
||||
VOID
|
||||
|
|
|
@ -21,3 +21,11 @@
|
|||
ASM_FUNC (RiscVSetSupervisorAddressTranslationRegister)
|
||||
csrw CSR_SATP, a0
|
||||
ret
|
||||
|
||||
//
|
||||
// Get the value of Supervisor Address Translation and
|
||||
// Protection Register.
|
||||
//
|
||||
ASM_FUNC (RiscVGetSupervisorAddressTranslationRegister)
|
||||
csrr a0, CSR_SATP
|
||||
ret
|
||||
|
|
Loading…
Reference in New Issue