.githooks/
compiler/
kernel/
lib/
scripts/
seed/
sublime/
test/
boot/
bootstrap/
compiler/
cycles/
dispatch/
format/
host/
integration/
kernel/
loader/
kernel/
grown.rad
1.2 KiB
hostile.rad
15.0 KiB
loaded.rad
586 B
machine.ras
731 B
manifests/
mmio/
native/
packages/
runtime/
scheduling/
shared/
slots/
smp/
std/
sync/
termination/
tests/
trap/
verify/
Makefile
9.2 KiB
kernel.rad
776 B
runner.rad
11.6 KiB
vim/
.gitignore
333 B
.gitsigners
224 B
AGENTS.md
8.3 KiB
CONTRIBUTING
2.1 KiB
LICENSE
1.1 KiB
Makefile
2.5 KiB
README
3.4 KiB
STYLE
3.2 KiB
std.lib
2.1 KiB
std.lib.test
1.1 KiB
test/loader/machine.ras
raw
| 1 | //! Run the loader fixture after all harts complete production initialization. |
| 2 | .text; |
| 3 | call @kernel::boot::initialize; |
| 4 | beqz %a0 @wait; |
| 5 | call @kernel::dispatchcheck::run; |
| 6 | li %t0 0x10001000; |
| 7 | li %t1 0x5555; |
| 8 | sw %t1 0(%t0); |
| 9 | @wait |
| 10 | wfi; |
| 11 | j @wait; |
| 12 | |
| 13 | .export @kernel::dispatchcheck::memory; |
| 14 | .export @kernel::dispatchcheck::invoke; |
| 15 | |
| 16 | // The caller supplies an address within its validated source Page. |
| 17 | @kernel::dispatchcheck::memory |
| 18 | ret; |
| 19 | |
| 20 | // Preserve kernel state while calling one private instance of shared code. |
| 21 | @kernel::dispatchcheck::invoke |
| 22 | addi %sp %sp -16; |
| 23 | sd %ra 8(%sp); |
| 24 | sd %gp 0(%sp); |
| 25 | mv %gp %a1; |
| 26 | jalr %ra %a0 0; |
| 27 | ld %gp 0(%sp); |
| 28 | ld %ra 8(%sp); |
| 29 | addi %sp %sp 16; |
| 30 | ret; |