diff mbox

[edk2] ArmPkg: fix ArmWriteCntkCtl simple code bug

Message ID 1431491502-15855-1-git-send-email-heyi.guo@linaro.org
State New
Headers show

Commit Message

gary guo May 13, 2015, 4:31 a.m. UTC
We need to use msr instruction to write system register. It seems the
code was simply copied from ArmReadCntkCtl.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
---
 ArmPkg/Library/ArmLib/AArch64/AArch64ArchTimerSupport.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/ArmPkg/Library/ArmLib/AArch64/AArch64ArchTimerSupport.S b/ArmPkg/Library/ArmLib/AArch64/AArch64ArchTimerSupport.S
index 1ac0108..3944d8b 100644
--- a/ArmPkg/Library/ArmLib/AArch64/AArch64ArchTimerSupport.S
+++ b/ArmPkg/Library/ArmLib/AArch64/AArch64ArchTimerSupport.S
@@ -58,7 +58,7 @@  ASM_PFX(ArmReadCntkCtl):
 
 
 ASM_PFX(ArmWriteCntkCtl):
-  mrs   x0, cntkctl_el1          // Write to CNTK_CTL (Timer PL1 Control Register)
+  msr   cntkctl_el1, x0          // Write to CNTK_CTL (Timer PL1 Control Register)
   ret