compiler/
kernel/
lib/
scripts/
seed/
sublime/
test/
acceptance/
boot/
bootstrap/
cycles/
dispatch/
loader/
kernel/
loaded.rad
513 B
machine.ras
711 B
run
1.7 KiB
mmio/
native/
packages/
pages/
runtime/
scheduling/
shared/
slots/
smp/
support/
sync/
termination/
tests/
trap/
package-golden
1.6 KiB
run
3.1 KiB
runner.rad
10.5 KiB
vim/
.gitignore
336 B
.gitsigners
112 B
CONTRIBUTING
2.1 KiB
LICENSE
1.1 KiB
Makefile
9.2 KiB
README
2.5 KiB
STYLE
2.5 KiB
std.lib
1.5 KiB
std.lib.test
662 B
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::loadcheck::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::loadcheck::memory; |
| 14 | .export @kernel::loadcheck::invoke; |
| 15 | |
| 16 | // The caller supplies an address within its validated source Page. |
| 17 | @kernel::loadcheck::memory |
| 18 | ret; |
| 19 | |
| 20 | // Preserve kernel state while calling one private instance of shared code. |
| 21 | @kernel::loadcheck::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; |