Implements the three gaps from §26:
- Phase A: new platform.rs (291 lines) with runtime probes for
MSR, ACPI PSS, /proc/stat, cpufreq sysfs, hwmon — emits one
eprintln! diagnostic per source at startup
- Phase B: msr.rs reads /dev/cpu/{cpu}/msr on Linux via lseek+pread;
acpi.rs read_load falls back to /proc/stat; acpi.rs read_acpi_pss
reads /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies;
cpufreq.rs reads/writes /sys/.../scaling_governor. Removed the
hardcoded P0..P5 fallback table (violates zero-stub policy).
- Phase C: replaced misleading "MSR: not available (QEMU?)" with a
"Sources: MSR=ok PSS=no load=ok gov=ok hwmon=ok" header line
that shows per-source availability at a glance.
Verified on AMD Ryzen 9 7900X (24 threads, AMD-pstate driver):
- /dev/cpu/0/msr detected (probes ok; reads blocked by CAP_SYS_RAWIO
for non-root users — kernel-level permission, not a code issue)
- /proc/stat readable (load populated after second refresh tick)
- /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor readable
(governor shows "powersave")
- hwmon2 (k10temp) detected (not yet wired into per-CPU temp column —
requires per-driver hwmon→tempX_input mapping, deferred to v1.4)
- PSS=no (amd-pstate driver does not expose scaling_available_frequencies)
v1.3 source: 3501 LoC across 12 modules. Cross-compiled Redox binary
3.3 MB stripped, SHA256 cbc0a6d04e9d9252314dd71a1c411d4c488417e25f8d860970f718990864431a.
What is NOT yet wired (deferred to v1.4):
- Hwmon→per-CPU temp mapping (k10temp Tdie is package-level only)
- MSR reads without root (CAP_SYS_RAWIO required)
- zenpower / zen 5+ per-driver logic
- Add x11proto to redbear-full.toml package list
- libxau recipe updated with x11proto dependency and custom build script
- Fixes libxau build failure: 'Package xproto was not found'
Adds comprehensive analysis answering the user's "no per-core info"
question. Documents:
§26.1 Why every per-CPU column is empty on Linux (root cause)
- 6-column trace (Freq, PkgW, Temp, P-state, State, Flags) + Load%
- Maps Redox scheme paths to Linux equivalents (where they exist)
- Identifies that two paths already have Linux fallbacks (detect_cpus,
read_cpu_id) and four do not
§26.2 cpu-x patterns reviewed
- 6-row comparison table: missing-MSR / daemon / per-source UI /
refresh logic / CLI flags / temperature fallback
- Concludes: redbear-power's "n/a" placeholder is already better UX
than cpu-x's empty cells; daemon broker pattern is NOT applicable;
retry-cache and per-source logging ARE worth adopting
§26.3 Recommended Phase A/B/C (v1.3)
- Phase A: new platform.rs with /dev/cpu/*/msr + /proc/stat +
/sys/devices/system/cpu/cpu*/cpufreq/ fallbacks, ~80-120 LoC
- Phase B: replace hardcoded P0..P5 fallback (acpi.rs:101-108) with
real sysfs reads; generalize read_load to /proc/stat
- Phase C: header per-source availability badge
§26.4 AMD-specific concerns (separate from Linux fallback)
- msr.rs reader is Intel-only by design (file comment)
- AMD Zen uses 0xC0010063/0xC0010064 for P-states and k10temp for
temp, not Intel MSR 0x19c
- Recommended: vendor detection branch + Linux hwmon fallback
§26.5 Conclusion
- Screenshot is NOT a bug — TUI is working as designed
- Three substantive gaps: no Linux fallbacks, no per-source
startup logging, no header availability summary
- All three addressable without violating zero-stub policy
Source: cpu-x v4.7 at /tmp/cpu-x-src/ (cloned in earlier session).
Adds P4a (Ctrl-Insert, Shift-Delete, Ctrl-N, Shift-Tab) and P4b (filepos) rows. Updates the binding table to mark them as completed. Bumps total parity estimate from ~90% to ~93%.
- Create local/docs/PACKAGE-BUILD-QUIRKS.md: central reference for all
known cross-compilation build issues (DYNAMIC_INIT behavior, m4
CFLAGS/LDFLAGS ordering, ninja-build BUILD_TESTING, general patterns)
- Update UPSTREAM-SYNC-PROCEDURE.md: add m4 LDFLAGS ordering quirk
(must be set AFTER DYNAMIC_INIT), ninja-build BUILD_TESTING=OFF,
DYNAMIC_INIT overwrite behavior, source reversion root cause summary
- Update AGENTS.md: reference PACKAGE-BUILD-QUIRKS.md in WHERE TO LOOK
table, add DYNAMIC_INIT and cross-compilation test conventions
- Fix ninja-build recipe: add cmakeflags=['-DBUILD_TESTING=OFF']
(tests require host gtest which conflicts with Redox sysroot stdlib.h)
Top-level + local docs audit (2026-06-18). Findings and fixes:
1. AGENTS.md CONVENTIONS section — corrected 'my-' prefix contradiction.
The legacy 'my-*' prefix is deprecated and git-ignored. Use 'redbear-*'
for tracked first-class configs.
2. README.md quick-start — promoted 'local/scripts/build-redbear.sh' to
the recommended entry point. Bare 'scripts/run.sh --build' remains as
a secondary path. Added note about build-redbear.sh's policy gates
(.config checking, REDBEAR_ALLOW_PROTECTED_FETCH=1).
3. docs/06-BUILD-SYSTEM-SETUP.md — restructured Building section to put
'build-redbear.sh' first, then 'make all' as legacy/advanced with
clear notes on what gates it bypasses.
4. docs/05-KDE-PLASMA-ON-REDOX.md — replaced 'Stub-only package for
dependency resolution' wording for kirigami. Per project policy
(local/AGENTS.md STUB AND WORKAROUND POLICY — ZERO TOLERANCE),
stubs are forbidden. The kirigami build is blocked at the QML gate;
the recipe is honest and ships no fake/fallback package.
5. local/docs/BUILD-TOOLS-PORTING-PLAN.md — replaced all 'python312'
references with 'python314' (matches V8.3 P0 bump from earlier).
6. local/AGENTS.md — added 'LOCAL RECIPE SOURCE IMMUTABILITY' section
documenting the cb8b093564 guarantee. Any path matching
/local/recipes/ is unconditionally immutable; no env var or flag
can override. REDBEAR_ALLOW_LOCAL_UNFETCH=1 was removed as a kill
switch and is now dead code. distclean-nuclear is now a no-op for
local recipes.
- git rm 50 stale .bak patch backup files (surviving across 4+ sessions)
- Update WAYLAND-IMPLEMENTATION-PLAN.md: acknowledge kded6 offscreen
workaround is temporary until Qt6 Wayland null+8 crash is fixed.
kded6 is a headless D-Bus daemon — Wayland adds no functionality.
This addresses Oracle verification gaps: stale doc cleanup now committed,
doc/code contradiction resolved by acknowledging the temporary nature
of the kded6 offscreen workaround.
- WAYLAND-IMPLEMENTATION-PLAN.md v2.0: document architecture decision
that Wayland is the only supported display path. Remove all
framebuffer fallback workarounds (offscreen QPA, redox QPA shim).
- qwaylanddisplay.cpp: add fprintf instrumentation for crash diagnosis;
skip xkb_context_new on Redox to eliminate potential xkb crash vector.
- greeter-ui/main.cpp: remove QT_QPA_PLATFORM=redox workaround.
The greeter must use Wayland. Accept the crash until Qt6 is fixed.
- Ruled out: relibc calloc (zeroes correctly), libwayland proxy_create
(correct), compositor protocol (compliant). Root cause is in Qt6
generated Wayland wrappers passing NULL to wl_proxy_add_listener.
Phase S1 (Critical Correctness):
- sem_open/sem_close: global refcounting via BTreeMap + AtomicUsize
- sem_close: decrements refcount, munmaps only at zero
- sem_open: reuses existing mapping, O_EXCL returns EEXIST
- sem_unlink: marks entry for removal before shm_unlink
- va_list parsing: reads mode_t and value from stack after oflag
- All 11 sem_* functions verified in libc.so T
Phase S2-S4 (Designed, documented):
- eventfd() function, signalfd read path, EINTR handling
- name canonicalization, cancellation safety
- Full plan in local/docs/RELIBC-AGAINST-GLIBC-ASSESSMENT.md
Reference: glibc 2.41 cloned to local/reference/glibc/
Boot verified: greeter ready on VT 3 with refcounted semaphores
dma.rs: IommuDmaAllocator (145 lines)
- New struct wires existing IOMMU daemon (1003 lines) to existing DmaBuffer (261)
- allocate(): phys-contiguous alloc via scheme:memory, then MAP through IOMMU domain
- unmap(): sends UNMAP to IOMMU domain, releases IOVA
- Inlined IOMMU protocol constants — no new crate dependency
- encode_iommu_request/decode_iommu_response for scheme write/read cycle
Documentation updates:
- IMPLEMENTATION-MASTER-PLAN.md: K2 DMA/IOMMU section expanded from 3-line gap
list to full audit with component inventory, gap analysis, implementation plan
(D2.1-D2.5), Linux reference table. Added K2b thread/fork audit.
- CPU-DMA-IRQ-MSI-SCHEDULER-FIX-PLAN.md: Phase 1 (MSI) marked complete with
per-task status. Phase 2 (DMA) re-scoped from 'create' to 'wire' based on
audit. Phase 3 (scheduler) marked mostly done.
- IRQ-AND-LOWLEVEL-CONTROLLERS-ENHANCEMENT-PLAN.md: kernel MSI support noted
as materially strong with P8-msi.patch reference.
Audit findings:
- IOMMU daemon is solid: 1003-line lib.rs with full scheme protocol,
427-line amd_vi.rs, host-runnable tests. Needs wiring, not rewriting.
- DmaBuffer exists but is IOMMU-unaware — IommuDmaAllocator bridges this.
- relibc rlct_clone is correct for threads (shares addr space implicitly).
'3 IPC hops' claim is microkernel-architectural, not a real perf issue.
- No stale docs to archive at this time.
- udev-shim: replace .expect() with graceful errors (no more panic on Broken pipe)
- P4-initfs: remove duplicate sessiond (conflicted with config)
- accessibility/ime/keymapd: break instead of exit(1) on EBADF
- P6 driver patches rebased
- Docs: archive old reports, add implementation master plan
Add redbear-usb-storage-check in-guest binary that validates USB mass
storage read and write I/O: discovers /scheme/disk/ devices, writes a
test pattern to sector 2048, reads it back, verifies match, restores
original content. Updates test-usb-storage-qemu.sh with write-proof
verification step.
Includes all accumulated Red Bear OS work: kernel patches, relibc
patches, driver infrastructure, DRM/GPU, KDE recipes, firmware,
validation tooling, build system hardening, and documentation.
5-phase hardening to prevent silent file-layer collisions (the D-Bus
regression class):
Phase 1: lint-config-paths.sh + make lint-config in depends.mk
Phase 2: CollisionTracker in installer (content-hash comparison)
Phase 3: installs manifests in recipe.toml + validate-file-ownership.sh
Phase 4: validate-init-services.sh + make validate in disk.mk
Phase 5: documentation (AGENTS.md, BUILD-SYSTEM-HARDENING-PLAN.md)
Both redbear-mini and redbear-full build and validate clean.
66 declared install paths in base, zero conflicts.
Consolidated from all audits, QEMU testing, and implementation sessions.
P0: KDE build chain broken — libwayland pkgar staging race in cookbook.
Fix requires investigation of src/cook/package.rs pkgar path lookup.
P1: Graphical boot testing — dbus-daemon, sessiond, compositor, greeter.
P2: 7 remaining gaps — ion shell, shadow support, polkit, scrollback.
Includes cookbook tool investigation areas and total effort estimate
(~12 days per developer).
libwayland stage.pkgar missing when kf6-kitemviews builds during
make live CONFIG_NAME=redbear-full. This is a cookbook pkgar
staging race condition, not a code error.
redbear-mini (text-only) boots fully in QEMU with colored init
output, 25+ services, and login prompt on framebuffer console.
1. local/AGENTS.md: KWin/greeter/KF6 status updated to current truth
2. config/redbear-full.toml: konsole + kf6-pty moved under [packages]
3. docs/05 + BLUETOOTH + VFAT: redbear-kde.toml → redbear-full.toml
4. All remaining fixable Oracle issues from round 9 resolved