2020-04-22 17:44:46 +00:00
|
|
|
.include "macro.inc"
|
|
|
|
|
|
|
|
# assembler directives
|
|
|
|
.set noat # allow manual use of $at
|
|
|
|
.set noreorder # don't insert nops after branches
|
2020-05-26 22:09:00 +00:00
|
|
|
.set gp=64 # allow use of 64-bit general purpose registers
|
2020-04-22 17:44:46 +00:00
|
|
|
|
|
|
|
.section .text
|
|
|
|
|
2021-11-28 12:50:35 +00:00
|
|
|
.set BOOT_STACK_SIZE, 0x400
|
|
|
|
|
2020-04-22 17:44:46 +00:00
|
|
|
glabel entrypoint # 0x80000400
|
2021-11-28 12:50:35 +00:00
|
|
|
lui $t0, %hi(_bootSegmentBssStart)
|
|
|
|
addiu $t0, %lo(_bootSegmentBssStart)
|
|
|
|
li $t1, %lo(_bootSegmentBssSize)
|
2020-04-22 17:44:46 +00:00
|
|
|
.L8000040C:
|
|
|
|
addi $t1, $t1, -8
|
|
|
|
sw $zero, ($t0)
|
|
|
|
sw $zero, 4($t0)
|
|
|
|
bnez $t1, .L8000040C
|
|
|
|
addi $t0, $t0, 8
|
2021-11-28 12:50:35 +00:00
|
|
|
lui $t2, %hi(bootproc)
|
|
|
|
lui $sp, %hi(sBootThreadStack + BOOT_STACK_SIZE)
|
|
|
|
addiu $t2, %lo(bootproc)
|
2020-04-22 17:44:46 +00:00
|
|
|
jr $t2
|
2021-11-28 12:50:35 +00:00
|
|
|
addiu $sp, %lo(sBootThreadStack + BOOT_STACK_SIZE)
|
2020-04-22 17:44:46 +00:00
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|
|
|
|
nop
|