From d9c47d52039be7a61d3e9d3652f73322fb6f47ba Mon Sep 17 00:00:00 2001 From: salmonik Date: Sat, 1 Aug 2026 21:30:48 +0200 Subject: rsnix v0.5.1: force the GUI canvas to 800x600 via GOP SetMode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The kernel used to inherit whatever GOP mode the firmware picked (QEMU/OVMF gave 1280x800). Now every surface derives from a fixed 800x600 canvas: - uefi: typed EfiGopQueryMode/SetMode/GetMode fn pointers in GraphicsOutputProtocol (were raw *mut c_void, never called). - gop::select_gop_mode: scan the mode list for an exact 800x600 (32-bit BGR/RGB only, the driver assumes 4 Bpp), SetMode it; fall back to the smallest mode that fits the canvas, then to the firmware's choice. SetMode may move both the mode info pointer and the framebuffer base, so both are re-read after the switch. Boot log: 'gop: mode 3 selected — 800x600 (was 1280x800)'. - tests: relative assertions are resolution-agnostic; test-gfx and test-mouse had a boot-log race (shell line prints before the cursor task line) — now wait for the cursor line instead of grepping once. All four suites pass at 800x600. 0 build warnings. --- scripts/test-gfx.sh | 2 +- scripts/test-mouse.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/test-gfx.sh b/scripts/test-gfx.sh index a6e4016..7bee4ee 100755 --- a/scripts/test-gfx.sh +++ b/scripts/test-gfx.sh @@ -85,7 +85,7 @@ rm -f "$SOCK" "$LOG" echo $! >"$QPID" wait_log "$LOG" "boot: entering shell" 90 || fail "kernel never reached the shell" -grep -aq "cursor: task " "$LOG" || fail "cursor task did not spawn" +wait_log "$LOG" "cursor: task " 10 || fail "cursor task did not spawn" echo "==> 4/5 in-kernel pixel self-test (gfx check)" python3 "$SCRIPT_DIR/sendkeys.py" --sock "$SOCK" \ diff --git a/scripts/test-mouse.sh b/scripts/test-mouse.sh index e58d474..ea58f91 100755 --- a/scripts/test-mouse.sh +++ b/scripts/test-mouse.sh @@ -95,7 +95,7 @@ echo $! >"$QPID" wait_log "$LOG" "boot: entering shell" 90 || fail "kernel never reached the shell" grep -aq "ps2: mouse ready" "$LOG" || fail "mouse driver did not come up at boot" -grep -aq "cursor: task " "$LOG" || fail "cursor task did not spawn" +wait_log "$LOG" "cursor: task " 10 || fail "cursor task did not spawn" echo "==> 4/6 cursor position tracks injected movement" INIT=$(cursor_state) @@ -153,7 +153,7 @@ qemu_hmp "sendkey ctrl-c" grep -aq "mouse: routing events to task 3" "$LOG" || fail "mouse 3 did not arm routing" grep -aq "msgrecv\[3\]: Mouse(+" "$LOG" || fail "task 3 queue did not receive the routed Mouse event" # Watch line: x/y/buttons format (any occurrence after watching started). -grep -aq "mouse: x=$((X3 + 3)) y=$((Y3 + 2)) buttons=---" "$LOG" || fail "watch did not print the moved cursor (x=$((X3+3)) y=$((Y3+2)))" +grep -aq "mouse: x=$((X3 + 3)) y=$((Y3 + 2)) buttons=---" "$LOG" || fail "watch did not print the moved cursor (x=$((X3 + 3)) y=$((Y3 + 2)))" grep -aq "mouse: stopped" "$LOG" || fail "^C did not stop the mouse watch" python3 "$SCRIPT_DIR/sendkeys.py" --sock "$SOCK" "poweroff" -- cgit v1.2.3