fix: VirtIO GPU driver and snake rendering through display server

- Fix swapped command IDs: attach_backing was 0x0104 (FLUSH),
  resource_flush was 0x0106 (ATTACH_BACKING). Now correct.
- Increase process stack from 4 pages (16 KB) to 16 pages (64 KB)
  to prevent stack overflow in display process.
- Restructure display-qemu to avoid MockFramebuffer's 32 KB array
  inflating the VirtIO path's stack frame.
- Wire snake app to render through display server via IPC instead
  of UART escape codes. Uses existing renderer.rs pixel renderer.
- Init now delegates display endpoint to snake process.
This commit is contained in:
2026-10-19 00:01:29 +02:00
parent 194024bc08
commit f5ac7189a9
7 changed files with 63 additions and 95 deletions

View File

@@ -165,11 +165,10 @@ pub fn run(shared_buf_va: usize) -> ! {
debug_print(b")\n");
}
// Load snake — give it input endpoint (slot 0) for keyboard input
// Snake renders via debug_putchar (UART) — no display endpoint needed
debug_print(b"init: loading snake... ");
if let Some(snake) = load_binary(shared_buf, b"snake.elf") {
syscall::delegate(INPUT_EP, snake.process_cap, ipc_perms);
syscall::delegate(DISPLAY_EP, snake.process_cap, ipc_perms);
syscall::spawn_thread_in(snake.process_cap, snake.entry_point, USER_STACK_TOP);
debug_print(b"ok\n");
} else {