summaryrefslogtreecommitdiff
path: root/src/mainboard/arm/rdn2/bootblock_custom.S
blob: f8cca02d9fc1ee96fcc358683385cc69a6e9bf76 (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
31
/* SPDX-License-Identifier: GPL-2.0-or-later */

#include <arch/asm.h>

/*
 * Note: This board uses boot flow: TFA -> coreboot.
 */
ENTRY(_start)

	/* TF-A arg which contains a pointer to fdt */
	ldr	x1, =_fdt_pointer
	str	x0, [x1]

	msr SPSel, #0 /* use SP_EL0 */

	/* ==== stack init from arm64_init_cpu ==== */
	ldr	x2, =0xdeadbeefdeadbeef
	ldr	x0, =_stack
	ldr	x1, =_estack
1:
	stp	x2, x2, [x0], #16
	cmp	x0, x1
	bne	1b

	sub	sp, x0, #16

	/* ==== END ==== */

	/* Jump to main() in DRAM. */
	bl	main
ENDPROC(_start)