2 * Copyright (C) 2013 - ARM Ltd
3 * Author: Marc Zyngier <marc.zyngier@arm.com>
5 * Based on code by Carl van Schaik <carl@ok-labs.com>.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include <linux/linkage.h>
23 #include <asm/arch-armv7/generictimer.h>
25 #include <asm/macro.h>
27 #include <asm/arch/cpu.h>
32 * SECURE_RAM to text_end :
33 * ._secure_text section
34 * text_end to ALIGN_PAGE(text_end):
36 * ALIGN_PAGE(text_end) to ALIGN_PAGE(text_end) + 0x1000)
37 * 1kB of stack per CPU (4 CPUs max).
40 .pushsection ._secure.text, "ax"
44 #define GICD_BASE (SUNXI_GIC400_BASE + 0x1000)
45 #define GICC_BASE (SUNXI_GIC400_BASE + 0x2000)
47 @ {r0, r1, r2, ip} from _do_nonsec_entry(kernel_entry, 0, machid, r2) in
48 @ arch/arm/lib/bootm.c:boot_jump_linux() must remain unchanged across
53 bl psci_get_cpu_id @ CPU ID => r0
54 bl psci_get_cpu_stack_top @ stack top => r0
55 sub r0, r0, #4 @ Save space for target PC
60 push {r0, r1, r2, ip, lr}
62 pop {r0, r1, r2, ip, pc}
63 ENDPROC(psci_arch_init)