You've already forked edk2-platforms
mirror of
https://github.com/Dasharo/edk2-platforms.git
synced 2026-03-06 14:51:43 -08:00
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>
26 lines
632 B
ArmAsm
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
|
|
|