summaryrefslogtreecommitdiff
path: root/services/std_svc
diff options
context:
space:
mode:
authorAndrew Thoelke <andrew.thoelke@arm.com>2014-04-28 12:32:02 +0100
committerAndrew Thoelke <andrew.thoelke@arm.com>2014-05-07 11:29:50 +0100
commit7935d0a59d439c993b79814ab414d37e4a90d9a6 (patch)
treeb441893641316f785bf782b24ac8877252eb8afb /services/std_svc
parent2f5dcfef1db42f3b073ae657f8a94925abecd768 (diff)
Access system registers directly in assembler
Instead of using the system register helper functions to read or write system registers, assembler coded functions should use MRS/MSR instructions. This results in faster and more compact code. This change replaces all usage of the helper functions with direct register accesses. Change-Id: I791d5f11f257010bb3e6a72c6c5ab8779f1982b3
Diffstat (limited to 'services/std_svc')
-rw-r--r--services/std_svc/psci/psci_entry.S13
1 files changed, 6 insertions, 7 deletions
diff --git a/services/std_svc/psci/psci_entry.S b/services/std_svc/psci/psci_entry.S
index ec55a81..25adaa1 100644
--- a/services/std_svc/psci/psci_entry.S
+++ b/services/std_svc/psci/psci_entry.S
@@ -76,8 +76,7 @@ psci_aff_common_finish_entry:
*/
msr spsel, #0
- bl read_mpidr
- mov x19, x0
+ mrs x0, mpidr_el1
bl platform_set_coherent_stack
/* ---------------------------------------------
@@ -85,14 +84,14 @@ psci_aff_common_finish_entry:
* level 0.
* ---------------------------------------------
*/
- mov x0, x19
+ mrs x0, mpidr_el1
bl get_power_on_target_afflvl
cmp x0, xzr
b.lt _panic
mov x3, x23
mov x2, x0
- mov x0, x19
mov x1, #MPIDR_AFFLVL0
+ mrs x0, mpidr_el1
blr x22
/* --------------------------------------------
@@ -100,7 +99,7 @@ psci_aff_common_finish_entry:
* -IS-WBWA memory
* --------------------------------------------
*/
- mov x0, x19
+ mrs x0, mpidr_el1
bl platform_set_stack
zero_callee_saved_regs
@@ -119,7 +118,7 @@ func __psci_cpu_off
sub sp, sp, #0x10
stp x19, x20, [sp, #0]
mov x19, sp
- bl read_mpidr
+ mrs x0, mpidr_el1
bl platform_set_coherent_stack
bl psci_cpu_off
mov x1, #PSCI_E_SUCCESS
@@ -140,7 +139,7 @@ func __psci_cpu_suspend
mov x20, x0
mov x21, x1
mov x22, x2
- bl read_mpidr
+ mrs x0, mpidr_el1
bl platform_set_coherent_stack
mov x0, x20
mov x1, x21