From a9b891eb31b874c14fce79f7e3e9da8fab475224 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Fri, 28 Jun 2024 15:38:05 +0200 Subject: IMP: 64X000 newosldr support. Signed-off-by: Amlal EL Mahrouss --- Boot/Sources/HEL/64X000/.gitkeep | 0 Boot/Sources/HEL/64X000/Boot64x0.S | 35 ++++++++++++++++++++++++++++++++ Boot/Sources/HEL/POWER/CoreBootStartup.S | 8 ++++---- Boot/Sources/HEL/RISCV/.gitkeep | 0 Boot/Sources/HEL/RISCV/BootRISCV.S | 22 -------------------- 5 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 Boot/Sources/HEL/64X000/.gitkeep create mode 100644 Boot/Sources/HEL/64X000/Boot64x0.S delete mode 100644 Boot/Sources/HEL/RISCV/.gitkeep delete mode 100644 Boot/Sources/HEL/RISCV/BootRISCV.S (limited to 'Boot/Sources') diff --git a/Boot/Sources/HEL/64X000/.gitkeep b/Boot/Sources/HEL/64X000/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/Boot/Sources/HEL/64X000/Boot64x0.S b/Boot/Sources/HEL/64X000/Boot64x0.S new file mode 100644 index 00000000..9b2fb569 --- /dev/null +++ b/Boot/Sources/HEL/64X000/Boot64x0.S @@ -0,0 +1,35 @@ +/* ------------------------------------------- + + Copyright Zeta Electronics Corporation + +------------------------------------------- */ + +.section .boot_hdr +.align 4 + +/* NewBoot boot header begin for a 64x000 kernel. */ + +boot_hdr_mag: + .ascii "CB" +boot_hdr_name: + // it has to match ten bytes. + .asciz "newosldr\0\0" +boot_hdr_ver: + .word 0x104 +boot_hdr_proc: + .long bootloader_start + +/* NewBoot boot header end */ + +.extern bootloader_main +.extern bootloader_stack + +.globl bootloader_start +bootloader_start: + psh 4 /* real address of .Laddr */ + ldi 0,(bootloader_stack-bootloader_start)(4) /* stack address location */ + mv 19,0 /* use user defined stack */ + jrl + + bl bootloader_main + blr diff --git a/Boot/Sources/HEL/POWER/CoreBootStartup.S b/Boot/Sources/HEL/POWER/CoreBootStartup.S index e1a186ae..cff1add7 100644 --- a/Boot/Sources/HEL/POWER/CoreBootStartup.S +++ b/Boot/Sources/HEL/POWER/CoreBootStartup.S @@ -19,16 +19,16 @@ boot_hdr_ver: boot_hdr_proc: .long bootloader_start -/* NewOS boot header end */ +/* NewBoot 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 */ + 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 diff --git a/Boot/Sources/HEL/RISCV/.gitkeep b/Boot/Sources/HEL/RISCV/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/Boot/Sources/HEL/RISCV/BootRISCV.S b/Boot/Sources/HEL/RISCV/BootRISCV.S deleted file mode 100644 index 2f1e9eb9..00000000 --- a/Boot/Sources/HEL/RISCV/BootRISCV.S +++ /dev/null @@ -1,22 +0,0 @@ -/* ------------------------------------------- - - Copyright Zeta Electronics Corporation - -------------------------------------------- */ - -.section .init -.align 4 - -/* NewOS kernel header begin */ - -k_hdr_mag: - .ascii "LX" -k_hdr_name: - // it has to match ten bytes. - .asciz "newosldr\0\0" -k_hdr_ver: - .word 0x104 -k_hdr_proc: - .long bootloader_start - -/* end */ \ No newline at end of file -- cgit v1.2.3