summaryrefslogtreecommitdiff
path: root/src/mainboard/arm/rdn2/bootblock_custom.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/arm/rdn2/bootblock_custom.S')
-rw-r--r--src/mainboard/arm/rdn2/bootblock_custom.S31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/mainboard/arm/rdn2/bootblock_custom.S b/src/mainboard/arm/rdn2/bootblock_custom.S
new file mode 100644
index 0000000000..f8cca02d9f
--- /dev/null
+++ b/src/mainboard/arm/rdn2/bootblock_custom.S
@@ -0,0 +1,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)