summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-layerscape/ppa-entry.S
blob: 18cfa6c37ecff72fbc3a019eeadf3489b517dd4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <linux/linkage.h>

.section .text.ppa_entry
ENTRY(ppa_entry)
	/*
	 * x0: Secure Firmware entry point
	 * x1: Exception return address Low
	 * x2: Exception return address High
	 */

	/* Save stack pointer for EL2 */
	mov	x3, sp
	msr	sp_el2, x3

	/* Set exception return address hold pointer */
	adr	x4, 1f
	mov	x3, x4
	rev	w3, w3
	str	w3, [x1]
	lsr	x3, x4, #32
	rev	w3, w3
	str	w3, [x2]

	/* Call SEC monitor */
	br	x0

1:
	mov	x0, #0
	ret
ENDPROC(ppa_entry)