summaryrefslogtreecommitdiffstats
path: root/rsnix/src/vt.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-08-03 02:23:35 +0200
committersalmonik <salmonik@tuta.io>2026-08-03 02:23:35 +0200
commit9fde94d068f87b34e0bc6bfa48388d89bb54f1e4 (patch)
treea5a4ce95363e7a316a23371489f2b0b85c1a8735 /rsnix/src/vt.rs
parentv0.5.7: fix vt verify content check — expect BLANK (0x70020), not zero (diff)
downloadrs-dos-9fde94d068f87b34e0bc6bfa48388d89bb54f1e4.tar.gz
rs-dos-9fde94d068f87b34e0bc6bfa48388d89bb54f1e4.zip
v0.5.8: heap-free QR encoder + crash-dump QR on framebuffer
Real hardware has no serial console, so a kernel crash only leaves a frozen screen. Every dump_lines() report now also renders the crash text as a scannable QR below the white-on-red band (photograph the screen instead of relaying text). - rsnix/src/qr.rs: from-scratch no_std/no_alloc byte-mode QR encoder (EC-L, v1..v40, .bss statics only — safe on the fault path): RS over GF(256), codeword interleave, zigzag placement, 8 masks with N1-N4 penalty auto-selection, format/version info. - gop.rs: dump_qr() joins dump lines into a static buffer, truncates with '...' at the v40-L capacity, encodes, and renders centered black-on-white with a 4-module quiet zone. - tools/qrcheck: host harness (embedds qr.rs) + qrcheck.py cross-check against segno's placement primitives. Verified bit-exact: 12 versions x 8 masks forced, plus auto-mask choice matches segno's penalty evaluation. Caught 3 encoder bugs (multi-block interleave offsets, transposed version info, mask eval ordering). - QEMU e2e: page-fault dump screendump decodes via zbarimg, content matches the serial log line-for-line. - test-msg.sh and test-fault.sh both PASS; debug+release 0 warnings.
Diffstat (limited to '')
-rw-r--r--rsnix/src/vt.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/rsnix/src/vt.rs b/rsnix/src/vt.rs
index 6e1f12f..88f8d43 100644
--- a/rsnix/src/vt.rs
+++ b/rsnix/src/vt.rs
@@ -250,7 +250,11 @@ pub fn debug_verify() {
250 } 250 }
251 msg(&alloc::format!( 251 msg(&alloc::format!(
252 "verify: grids c nz={} blank={} r nz={} blank={} (of {})", 252 "verify: grids c nz={} blank={} r nz={} blank={} (of {})",
253 c_nz, c_blank, r_nz, r_blank, total 253 c_nz,
254 c_blank,
255 r_nz,
256 r_blank,
257 total
254 )); 258 ));
255 if c.len() != total || r.len() != total || !heap_ok || !content_ok || !rcontent_ok { 259 if c.len() != total || r.len() != total || !heap_ok || !content_ok || !rcontent_ok {
256 msg("verify: FAILED — cells/rendered not sane at shell entry"); 260 msg("verify: FAILED — cells/rendered not sane at shell entry");