mirror of
https://github.com/acidanthera/audk.git
synced 2025-08-16 15:18:10 +02:00
Add LoongArch gets stable counter ASM function. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Signed-off-by: Chao Li <lichao@loongson.cn> Acked-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
25 lines
585 B
ArmAsm
25 lines
585 B
ArmAsm
#------------------------------------------------------------------------------
|
|
#
|
|
# LoongArch Read Stable Counter
|
|
#
|
|
# Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved.<BR>
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
#------------------------------------------------------------------------------
|
|
|
|
ASM_GLOBAL ASM_PFX(AsmReadStableCounter)
|
|
|
|
#/**
|
|
# Gets the timer count value.
|
|
#
|
|
# @param[] VOID
|
|
# @retval timer count value.
|
|
#
|
|
#**/
|
|
|
|
ASM_PFX(AsmReadStableCounter):
|
|
rdtime.d $a0, $zero
|
|
jirl $zero, $ra, 0
|
|
.end
|