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
diff --git a/bl2/aarch64/bl2_entrypoint.S b/bl2/aarch64/bl2_entrypoint.S
index cd07aa9..4f7565f 100644
--- a/bl2/aarch64/bl2_entrypoint.S
+++ b/bl2/aarch64/bl2_entrypoint.S
@@ -54,8 +54,7 @@
* So, make sure no secondary has lost its way.
* ---------------------------------------------
*/
- bl read_mpidr
- mov x19, x0
+ mrs x0, mpidr_el1
bl platform_is_primary_cpu
cbz x0, _panic
@@ -102,7 +101,7 @@
* ease the pain of initializing the MMU
* --------------------------------------------
*/
- mov x0, x19
+ mrs x0, mpidr_el1
bl platform_set_coherent_stack
/* ---------------------------------------------
@@ -120,7 +119,7 @@
* -IS-WBWA memory
* ---------------------------------------------
*/
- mov x0, x19
+ mrs x0, mpidr_el1
bl platform_set_stack
/* ---------------------------------------------