universalisos/guests/riscv-sampling/README.md

835 B

RISC-V sampling-port demo guests

U-mode guests for the Icicle Kit paravirt demo (kernel/src/arch/riscv/kernel.cpp). p0 = SOURCE role (create SOURCE port, write 12-byte payload). p1 = DESTINATION role (create DESTINATION connected to source id 0, read, print VALID/INVALID).

Regenerate the instruction words embedded in kernel.cpp:

riscv64-linux-gnu-as -march=rv64ima_zicsr -mabi=lp64 -o guest_p0.o guest_p0.s
riscv64-linux-gnu-objcopy -O binary guest_p0.o guest_p0.bin
# then dump as little-endian 32-bit words and locate the placeholder LUI sites
# (0x11111=greeting 0x22222=apex-buf 0x33333=apex-msg 0x44444=payload/rdbuf
#  0x55555=done/status 0x66666=VALID 0x77777=INVALID)

Rules: no compressed instructions (rv64ima only), all addresses are placeholders patched at boot by patch_addr_at() in kernel.cpp.