summaryrefslogtreecommitdiffhomepage
path: root/dev/boot/src/HEL/64X000/BootCB.S
blob: 223a697e2c742167fc5f23bf5c17c6ac90bdbc97 (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
32
33
34
35
/* ========================================

    Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.

======================================== */

.section .boot_hdr
.align 4

/* BootZ boot header begin for a 64x000 Kernel. */

boot_hdr_mag:
        .ascii "CB"
boot_hdr_name:
        // it has to match ten bytes.
        .asciz "bootz\0\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:
    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