rumpk/apps/subject_entry.S

23 lines
390 B
ArmAsm
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.section .text._start, "ax"
.global _start
_start:
# 🕵 BSS Clearing
la t0, __bss_start
la t1, __bss_end
1: bge t0, t1, 2f
sd zero, 0(t0)
addi t0, t0, 8
j 1b
2:
fence rw, rw
# Arguments (argc, argv) are already in a0, a1 from Kernel
# sp is already pointing to argc from Kernel
call main
# Call exit(result)
call exit
1: j 1b