diff options
author | Nathan Ringo <nathan@remexre.com> | 2024-02-24 22:03:49 -0600 |
---|---|---|
committer | Nathan Ringo <nathan@remexre.com> | 2024-02-24 22:03:49 -0600 |
commit | c8de43bf43242c4ebac3d0ecb8e7951fe2371506 (patch) | |
tree | b438bb1b47b41241702f5783fb7ec3326a4e8ab7 /boards/qemu-virt/qemu-virt.s |
Initial commit
Diffstat (limited to 'boards/qemu-virt/qemu-virt.s')
-rw-r--r-- | boards/qemu-virt/qemu-virt.s | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/boards/qemu-virt/qemu-virt.s b/boards/qemu-virt/qemu-virt.s new file mode 100644 index 0000000..4813b57 --- /dev/null +++ b/boards/qemu-virt/qemu-virt.s @@ -0,0 +1,23 @@ +.section .text.start + +.extern main + +.global _start +_start: + # Have harts other than 0 spin until hart0 wakes them up. + csrr a0, mhartid + c.bnez a0, wait_for_hart0 + + # Set up hart0's stack. + la sp, hart0_initial_stack_top + call hart0_boot + + # Fall through to a spin loop. +halt: + j halt + +.section .text + +wait_for_hart0: + # TODO + j halt |