summaryrefslogtreecommitdiffhomepage
path: root/dev/Boot/src/HEL/ARM64/BootCB.S
diff options
context:
space:
mode:
Diffstat (limited to 'dev/Boot/src/HEL/ARM64/BootCB.S')
-rw-r--r--dev/Boot/src/HEL/ARM64/BootCB.S40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev/Boot/src/HEL/ARM64/BootCB.S b/dev/Boot/src/HEL/ARM64/BootCB.S
new file mode 100644
index 00000000..2d1ff60c
--- /dev/null
+++ b/dev/Boot/src/HEL/ARM64/BootCB.S
@@ -0,0 +1,40 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
+
+------------------------------------------- */
+
+#ifdef __NE_COREBOOT__
+
+.section .boot_hdr
+.align 4
+
+/* BootZ boot header begin */
+
+boot_hdr_mag:
+ .ascii "CB"
+boot_hdr_name:
+ // it has to match ten bytes.
+ .asciz "bootz\0\0"
+boot_hdr_ver:
+ .word 0x104
+boot_hdr_proc:
+ .long bootloader_start
+
+/* BootZ boot header end */
+
+.extern bootloader_main
+.extern bootloader_stack
+
+.globl bootloader_start
+bootloader_start:
+ adr x0, bootloader_stack
+ ldr x1, =bootloader_start
+ sub x0, x0, x1
+ ldr x0, [x0]
+ mov sp, x0
+
+ bl bootloader_main
+ ret
+
+#endif // __NE_COREBOOT__ \ No newline at end of file