Skip to content

services: mirror TCP logs to MicroFont on isolated LastAP - #51

Merged
t4ce merged 8 commits into
truefrom
exp/tgl-lastap-screenlog
Sep 18, 2026
Merged

t4ce merged 8 commits into
truefrom
exp/tgl-lastap-screenlog

Conversation

@t4ce

@t4ce t4ce commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Laptop screen log, implemented as one kernel service

New runtime file: src/r/services/microfont_log_service.rs. This replaces the earlier unlanded synchronous console design, not another UI4/Spirit bring-up gate.

Placement

Restore the former RDP/H.264 encoder's last_ap_service_slot() / last_ap_service_worker() policy from dc9edd7: choose topology_core_slot_count() - 1, exclude BSP/AP1, and exclude the reserved slot from general background/compute, blocking-lane and VM-lane selection. The reservation is enabled only when the TGL native-panel path installs the retained screen surface, before AP registration. Other machines keep their current placement. Media encoding stays on its current BSP path.

The existing spawn service starts exactly one task on that LastAP executor. No network, filesystem, GuC or UI4-ready gate is added to the log task. It verifies its assigned CPU slot. No fallback to a random worker/BSP.

Same network-log stream, asynchronous pixels

Extend the existing 256 KiB TCP ring with an absolute byte count and a non-destructive reader cursor. Acceptance, prefixes, formatting and TCP drain semantics are unchanged. The screen does not remove network bytes and needs no second queue or character-page cache.

The task briefly try_locks the ring, copies at most 4 KiB, unlocks, stamps MicroFont at 1x, and flushes changed glyph spans. It then sleeps 25 ms, including under backlog. No font work runs on log producers, no spinloop, and the consumer does not recursively log or query potentially wedged GPU state. A local banner identifies the assigned AP. Ring overruns are reported on screen.

Reuse the proof pixels; leave the pipe background alone

After the native four-colour proof latches, reuse that permanently retained allocation as the log sheet. Clear its unused pixels to transparent, paint black letters on white cells, and carry the same backing through the normal UI4 bootstrap as Slot4's CPU-only front. The existing white hardware pipe-bottom colour is not reprogrammed.

Slot4's ordinary interaction service/pool cannot overwrite or free this diagnostic front. UI4 application planes 0..3 and Spirit continue unchanged; SPIRIT_RESEALED remains false. The text fills once (640 columns, 195 rows including its banner, plus a status row), then displays SCREEN FULL and the task returns. Pixel/plane ownership remains retained; TCP logging and the kernel continue.

Validation

Nine host Rust tests passed against the actual production ring, actual LastAP selector functions and actual renderer with microfont 3.7.8. Covers independent network/screen cursors, TCP drain preservation, wrap/overrun, nonblocking read, topology/profile isolation, exact-width newline, full-page freeze, glyph raster and surface canaries/bounds. Source-wiring checks, Rust parsing and diff whitespace checks also passed.

This is not a full kernel build, actual executor scheduling test, or laptop hardware test. A task on LastAP cannot paint until that AP and the spawn service execute. Current logging filters remain in force; this mirrors accepted TCP bytes rather than enabling every suppressed diagnostic.

Validation: https://github.com/t4ce/TRUEOS/actions/runs/35294475603/job/105444064319

The temporary source-preparation script is removed, and the final workflow is read-only test CI. No changes to true, repository rules or permissions.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 01aedc3b-5ce2-4616-885f-cc5da263e322


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@t4ce
t4ce merged commit 211f810 into true Sep 18, 2026
3 checks passed
@t4ce
t4ce deleted the exp/tgl-lastap-screenlog branch September 23, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant