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. --- CONTEXT.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index bfe0170..375bf57 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -113,10 +113,10 @@ Workspace version is `a.b.c` (single version for all crates): Bump the workspace version in the root `Cargo.toml` when a change of that class lands — do not leave the version to drift. Current: -`0.5.0` — the GUI era landed (graphics layer + cursor compositor) as a -`b` bump from the 0.4.0 input foundation; a future major GUI overhaul -(graphics windows beyond the text surface) would be the `a` bump -(1.0.0). +`0.5.1` — the GUI era landed with 0.5.0 (graphics layer + cursor +compositor) and the canvas was fixed at 800×600 as a `c` bump; a +future major GUI overhaul (graphics windows beyond the text surface) +would be the `a` bump (1.0.0). ## Project layout @@ -515,6 +515,14 @@ Workspace of four crates, all built for the `x86_64-unknown-uefi` target: the cursor tip is white on the display but absent from the shadow (overlay purity), and prints PASS/FAIL per stage. +- **Canvas resolution fixed at 800×600** — `gop::init` scans the GOP + mode list and calls `SetMode` for an exact 800×600 (BGR/RGB 32-bit; + QEMU std-vga lists it as mode 3, real GPUs list it as a standard + mode), falling back to the smallest mode that fits, then to the + firmware's choice. Everything derives from it: the vt text grid, + the cursor clamp, the demo strip. `SetMode` may move the info + pointer and framebuffer base, so they are re-read after the switch. + Verified in QEMU (`make test-gfx`): `fill_rect/shadow: OK`, `display push: OK`, `cursor overlay: OK`, `cursor not in shadow: OK`, `gfx check: PASS`; the demo draws; the cursor tracks injected -- cgit v1.2.3