diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2015-04-21 07:18:29 +0200 |
---|---|---|
committer | Tom Warren <twarren@nvidia.com> | 2015-05-13 09:24:14 -0700 |
commit | 4c681a3d22f0018186d83d753be566965c0cf7a5 (patch) | |
tree | d772ea9cb077179b11860c5da0da4536170ed5e3 /arch/arm/cpu/armv7/sunxi | |
parent | 4ce4de1e6618340177eeb0914fc86054c6cc6dca (diff) | |
download | u-boot-4c681a3d22f0018186d83d753be566965c0cf7a5.tar.gz u-boot-4c681a3d22f0018186d83d753be566965c0cf7a5.tar.xz u-boot-4c681a3d22f0018186d83d753be566965c0cf7a5.zip |
ARM: Factor out reusable psci_get_cpu_stack_top
This algorithm will be useful on Tegra as well, plus we will need it for
making _psci_target_pc per-CPU.
CC: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'arch/arm/cpu/armv7/sunxi')
-rw-r--r-- | arch/arm/cpu/armv7/sunxi/psci.S | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/psci.S b/arch/arm/cpu/armv7/sunxi/psci.S index 90dcff172c..dd583b2a94 100644 --- a/arch/arm/cpu/armv7/sunxi/psci.S +++ b/arch/arm/cpu/armv7/sunxi/psci.S @@ -241,17 +241,12 @@ psci_arch_init: mcr p15, 0, r5, c1, c1, 0 @ Write SCR isb - bl psci_get_cpu_id - mov r5, #0x400 @ 1kB of stack per CPU - mul r0, r0, r5 - - adr r5, text_end @ end of text - add r5, r5, #0x2000 @ Skip two pages - lsr r5, r5, #12 @ Align to start of page - lsl r5, r5, #12 - sub sp, r5, r0 @ here's our stack! + bl psci_get_cpu_id @ CPU ID => r0 + bl psci_get_cpu_stack_top @ stack top => r0 + mov sp, r0 bx r6 -text_end: + .globl psci_text_end +psci_text_end: .popsection |