summaryrefslogtreecommitdiffhomepage
path: root/dev/Boot/src/HEL/POWER/CoreBootStartup.S
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-26 21:19:14 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-12-26 21:19:14 +0100
commit486425ed00acec134f8799bdde64bfd093c5fb55 (patch)
tree5104af49b56f39d0b14941d76f9d6d746cd1677b /dev/Boot/src/HEL/POWER/CoreBootStartup.S
parentc0f7f3f300d603d355fc7ec5be317afe1f0ee1b6 (diff)
IMPL: A lot of new changes, see details.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/Boot/src/HEL/POWER/CoreBootStartup.S')
-rw-r--r--dev/Boot/src/HEL/POWER/CoreBootStartup.S34
1 files changed, 34 insertions, 0 deletions
diff --git a/dev/Boot/src/HEL/POWER/CoreBootStartup.S b/dev/Boot/src/HEL/POWER/CoreBootStartup.S
new file mode 100644
index 00000000..e4964c59
--- /dev/null
+++ b/dev/Boot/src/HEL/POWER/CoreBootStartup.S
@@ -0,0 +1,34 @@
+/* -------------------------------------------
+
+ Copyright (C) 2024, Theater Quality Inc, all rights reserved.
+
+------------------------------------------- */
+
+.section .boot_hdr
+.align 4
+
+/* BootZ boot header begin */
+
+boot_hdr_mag:
+ .ascii "CB"
+boot_hdr_name:
+ // it has to match ten bytes.
+ .asciz "zbaosldr\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:
+ mflr 4 /* real address of .Laddr */
+ lwz 0,(bootloader_stack-bootloader_start)(4) /* stack address location */
+ mr 1,0 /* use user defined stack */
+
+ bl bootloader_main
+ blr