Reviewed-by: Olivier Martin <olivier.mar...@arm.com>

-----Original Message-----
From: Heyi Guo [mailto:heyi....@linaro.org]
Sent: 13 May 2015 05:32
To: Olivier Martin
Cc: edk2-devel@lists.sourceforge.net; leif.lindh...@linaro.org; 
ilias.bi...@linaro.org; Heyi Guo
Subject: [edk2] [PATCH] ArmPkg: fix ArmWriteCntkCtl simple code bug

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....@linaro.org>
---
 ArmPkg/Library/ArmLib/AArch64/AArch64ArchTimerSupport.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


--
2.1.4


-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium.  Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered 
in England & Wales, Company No:  2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
Registered in England & Wales, Company No:  2548782


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to