Files
edk2-platforms/Silicon/RISC-V/ProcessorPkg/Library/RiscVReadMachineModeTimer/MachineModeTimerLib/MachineModeTimerLib.S
Abner Chang 40f4c70280 RiscV/ProcessorPkg: Create read mtime CSR library instances
Create library instances of reading Machine mode timer.
- MacineModeTimerLib is used to read mtime CSR through
  platfrom library.
- EmulatedMacineModeTimerLib is used to read mtime CSR
  through shadow CSR.

Cc: Sunil V L <sunilvl@ventanamicro.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Signed-off-by: Abner Chang <abner.chang@hpe.com>
Reviewed-by: Daniel Schaefer <daniel.schaefer@hpe.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
2021-11-10 14:57:43 +08:00

26 lines
632 B
ArmAsm

//------------------------------------------------------------------------------
//
// Read mtimer through platform library.
//
// Copyright (c) 2021, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
//
// SPDX-License-Identifier: BSD-2-Clause-Patent
//
//------------------------------------------------------------------------------
#include <RiscVImpl.h>
.data
.text
.align 3
.global ASM_PFX(RiscVReadMachineTimerInterface)
//
// Read machine mode timer CSR.
// @retval a0 : 64-bit machine timer.
//
ASM_PFX (RiscVReadMachineTimerInterface):
call RiscVReadMachineTimer
ret