compiler/
kernel/
lib/
scripts/
seed/
sublime/
test/
acceptance/
boot/
bootstrap/
cycles/
dispatch/
loader/
mmio/
native/
packages/
pages/
machine.ras
698 B
run
463 B
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/pages/machine.ras
raw
| 1 | //! Physical page zeroing with canaries immediately outside the allocation. |
| 2 | .text; |
| 3 | li %s0 0x40010000; |
| 4 | slli %s0 %s0 1; |
| 5 | li %t0 4096; |
| 6 | add %s1 %s0 %t0; |
| 7 | li %t0 91; |
| 8 | sd %t0 -8(%s0); |
| 9 | sd %t0 0(%s1); |
| 10 | mv %t1 %s0; |
| 11 | @fill |
| 12 | sd %t0 0(%t1); |
| 13 | addi %t1 %t1 8; |
| 14 | bne %t1 %s1 @fill; |
| 15 | mv %a0 %s0; |
| 16 | li %a1 1; |
| 17 | call @kernel::pages::zero; |
| 18 | mv %t1 %s0; |
| 19 | @check |
| 20 | ld %t0 0(%t1); |
| 21 | bnez %t0 @fail; |
| 22 | addi %t1 %t1 8; |
| 23 | bne %t1 %s1 @check; |
| 24 | li %t0 91; |
| 25 | ld %t1 -8(%s0); |
| 26 | bne %t0 %t1 @fail; |
| 27 | ld %t1 0(%s1); |
| 28 | bne %t0 %t1 @fail; |
| 29 | li %t0 0x10001000; |
| 30 | li %t1 0x5555; |
| 31 | sw %t1 0(%t0); |
| 32 | @fail |
| 33 | li %t0 0x10001000; |
| 34 | li %t1 0x13333; |
| 35 | sw %t1 0(%t0); |