MdePkg: Add LoongArch Cpucfg function
Add LoongArch AsmCpucfg function and Cpucfg definitions. Also added Include/Register/LoongArch64/Cpucfg.h to IgnoreFiles of EccCheck. 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>
This commit is contained in:
@@ -421,6 +421,7 @@
|
||||
LoongArch64/SetJumpLongJump.S | GCC
|
||||
LoongArch64/SwitchStack.S | GCC
|
||||
LoongArch64/ExceptionBase.S | GCC
|
||||
LoongArch64/Cpucfg.S | GCC
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
|
26
MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S
Normal file
26
MdePkg/Library/BaseLib/LoongArch64/Cpucfg.S
Normal file
@@ -0,0 +1,26 @@
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# AsmCpucfg for LoongArch
|
||||
#
|
||||
# Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved.<BR>
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
ASM_GLOBAL ASM_PFX(AsmCpucfg)
|
||||
|
||||
#/**
|
||||
# Read CPUCFG register.
|
||||
#
|
||||
# @param a0 Specifies the register number of the CPUCFG to read the data.
|
||||
# @param a1 Pointer to the variable used to store the CPUCFG register value.
|
||||
#
|
||||
#**/
|
||||
|
||||
ASM_PFX(AsmCpucfg):
|
||||
cpucfg $t0, $a0
|
||||
stptr.d $t0, $a1, 0
|
||||
|
||||
jirl $zero, $ra, 0
|
||||
.end
|
Reference in New Issue
Block a user