From fffec0f04dfcc63bef39eb0441cfad7b584da484 Mon Sep 17 00:00:00 2001 From: salmonik Date: Sat, 1 Aug 2026 23:44:41 +0200 Subject: rsnix v0.5.3: fix real-hardware scroll wedge — per-word display push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The real-hardware crash (2 lines of white + freeze, no CPU exception even with the 0.5.2 fault dumps) pointed away from a fault and at a stall: the scroll's full-frame push used one 1.92 MB rep-movsb to the framebuffer. On QEMU the framebuffer is RAM, so it flies; on a real GPU the framebuffer is uncached MMIO and the CPU's fast-string burst path can stall forever — the shell wedges mid-instruction, the cursor task's own writes wedge too, no exception fires (MMIO writes don't fault), and the screen shows the torn partial push (the white bands). The boot-time clear() always worked on the same hardware and uses per-word volatile stores, so the scroll push now uses the identical pattern: shadow reads (cached RAM, cheap) + individually-posted display stores. Interruptible between stores, never a bulk burst, and functionally identical on QEMU (all 5 suites re-pass). Also converts the no-shadow fallback shift to the same per-word pattern. CONTEXT.md updated (scroll-cost note + versioning). --- CONTEXT.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index f068035..bf1e01f 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -113,13 +113,17 @@ 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.2` — the GUI era landed with 0.5.0 (graphics layer + cursor +`0.5.3` — the GUI era landed with 0.5.0 (graphics layer + cursor compositor); 0.5.1 fixed the canvas at 800×600; 0.5.2 added fault diagnostics (screen + serial dumps for every CPU exception) and real-hardware hardening (framebuffer-size clamping, fb-region exclusion -from the allocators, authoritative fb geometry logging). A future -major GUI overhaul (graphics windows beyond the text surface) would be -the `a` bump (1.0.0). +from the allocators, authoritative fb geometry logging); 0.5.3 fixed +the real-hardware scroll wedge — the scroll's full-frame push is now +per-word volatile stores like the boot-time `clear()` instead of one +1.92 MB rep-movsb, which can stall forever on an uncached real-GPU +framebuffer (a stall, not an exception — hence no crash dump). A +future major GUI overhaul (graphics windows beyond the text surface) +would be the `a` bump (1.0.0). ## Project layout @@ -553,7 +557,12 @@ Workspace of four crates, all built for the `x86_64-unknown-uefi` target: shadow too; scrolling is a cached shadow memcpy + one write-only push to the display — the display is never *read* (uncached reads were the killer, since real-hardware GOP framebuffers are - uncacheable/write-combining). + uncacheable/write-combining). **The push is per-word volatile + stores (0.5.3), not one bulk rep-movsb**: a 1.92 MB REP MOVS to an + uncached real-GPU framebuffer wedged the CPU on some hardware (a + stall, not an exception — no dump fired), while the boot-time + `clear()` — the same per-word pattern — always worked. QEMU's + RAM-backed framebuffer never showed it. 2. deferred scroll batching (`vt::PENDING_SCROLLS`): the logical grid scrolls instantly in RAM while the framebuffer shift+push is deferred; N pending scrolls cost one push. Bursts of streaming -- cgit v1.2.3