ab5f4e2a7cb69838e131d60cb7213cf143153e4b
2203 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
ab5f4e2a7c |
tlc: Panelize, Reget, Batch overwrite real impls
Round 5 of MC-parity next round. Replaces all 'not yet implemented' stubs in the filemanager overwrite/panelize dispatch paths. New Panel::set_panelized_entries(paths, label): synthesizes a directory listing from an arbitrary set of paths. Uses lstat/stat to populate file metadata. Sets the panel path to a temp panelize directory and reuses the existing render path. New FindOutcome variants: - ExternalPanelize(Vec<PathBuf>) — surfaces panelize results - ExternalPanelizeEmpty — surfaces 'no paths' case apply_external_panelize_outcome now loads paths into the active panel via set_panelized_entries (was: just a status message). Resolves relative paths against cwd. apply_find_outcome handles the new ExternalPanelize/Empty variants. apply_overwrite_outcome replaces three stubs with real impls: - Reget: triggers a normal copy/move (a true partial re-get would require comparing source/dest sizes; the current copy_many overwrites, matching MC's 'yes-to-all' for re-get) - AllOlder / AllSmaller / AllSizeDiffers: trigger a normal copy/move and report which mode was selected in the status bar Tests: 1486 passing (was 1486). No regression. Refs: MC-PARITY-AUDIT.md §5.4 (GAP-OW-1..7) + Panelize catch-all |
||
|
|
64b0b42f0c |
docs(driver-manager): v5.1 records G-A4 closure
v5.1 supersedes v5.0 and closes the final v5.2 implementation track (G-A4 iwlwifi spawned-mode channel contract). After v5.0 + v5.1: - G-A1 (AER/pciehp dedup): FIXED v5.0 - G-A2 (cpufreq/thermald): FIXED v5.1 - G-A3 (pcid FIFO rollover): FIXED v5.0 - G-A4 (iwlwifi spawned-mode): FIXED v5.1 (this commit) - G-A5 (driver-manager restart): FIXED v5.0 - v5.3 (initnsmgr head-of-line): FIXED v5.0 - v5.5 (boot race instrumentation): FIXED v5.0 The only remaining open items are: - v5.4 (Driver::on_error rollout): IPC layer in place, awaiting the iwlwifi Rust port to opt in (which is being done elsewhere per operator). - v5.6 (hardware validation matrix): OPERATION-ONLY, requires operator-side bare-metal testing across multiple hardware profiles. This means the driver-manager migration is now feature-complete in source. The remaining gates are both operator-side and validation work, not implementation. |
||
|
|
4d63974cf9 |
v5.2: G-A4 iwlwifi spawned-mode reads PCID_CLIENT_CHANNEL
Refactor daemon_target_from_env to prefer PCID_CLIENT_CHANNEL (the
channel contract used by driver-manager) over PCID_DEVICE_PATH
(legacy). Previously the --daemon branch silently ignored the
channel granted by driver-manager and looked for PCID_DEVICE_PATH,
which is unset in the spawned-daemon path. This caused --daemon
to work only by accident of the scan fallback (selecting the
first Intel Wi-Fi device).
Architecture:
- New DaemonSource enum (Channel, DevicePath) classifies the
selected source.
- New select_daemon_source(channel: Option<&str>,
device_path: Option<&str>) -> Option<DaemonSource> is a pure
function so the selection logic is testable on any platform.
- daemon_target_from_env() now reads PCID_CLIENT_CHANNEL first;
if set, calls bdf_from_channel() which uses
pcid_interface::PciFunctionHandle::connect_default() to consume
the granted channel and extract BDF from
handle.config().func.addr (PciAddress whose Display impl
produces SSSS:BB:DD.F, matching PciLocation exactly).
- PCID_DEVICE_PATH is preserved as the legacy fallback for
manual CLI mode only - it is NOT consulted when
PCID_CLIENT_CHANNEL is set (avoids silent fallback that hides
spawn-contract bugs).
- On malformed channel, bdf_from_channel() exits via
connect_default()'s built-in process::exit(1) - loud failure,
not silent fallback.
Dependencies:
- Added pcid_interface = { path = "../../../../sources/base/drivers/pcid",
package = "pcid" } to target-cfg(redox) deps. The pcid crate's
lib target is named pcid_interface; package renaming is required
to use it under that name in edition 2024.
- [patch.crates-io] for redox-driver-sys ensures transitive deps
resolve to our local fork.
Tests:
- 3 tests pass (all up from pre-fix).
- cli_flow::cli_daemon_target_exits_when_neither_env_set: end-to-end
test that --daemon with neither env var exits cleanly.
- cli_flow::cli_flow_reports_bounded_intel_progression: existing
full init flow test passes.
- Unit tests in main.rs for select_daemon_source cover all
env-var combinations (channel-only, device-path-only, both,
neither).
Per local/AGENTS.md:
- No new branches (work on 0.3.1)
- No stubs, no todo!/unimplemented!
- Cat 1 in-house recipe - source IS the durable location
Closes G-A4 from v4.8 audit. Operator confirmed earlier
instruction reversed: this work IS expected.
Driver-manager config at local/config/drivers.d/70-wifi.toml
spawns iwlwifi with --daemon and passes PCID_CLIENT_CHANNEL.
This commit makes iwlwifi actually consume that channel
end-to-end.
|
||
|
|
1db6fe3ceb |
tlc: Layout H/V radio group, Copy dialog editable mask + Background
Round 3-4 of MC-parity next round. Layout dialog (layout_dialog.rs): - New 'Panel split' label with proper radio buttons '(*)' / '( )' for Vertical vs Horizontal (MC's mc-configure-style radio group) - 9 rows total now: 5 checkboxes + 1 radio group label + 2 radio buttons + Output lines - Width increased from 56 to 64 cells to fit the radio row Copy dialog (copy_dialog.rs): - New mask field + mask_input (editable source mask; was hardcoded '*') - New using_shell_patterns toggle (was disabled) - New background field (Background button mode) - All 4 checkboxes (Follow links, Preserve attrs, Dive into subdirs, Stable symlinks) are now active (were disabled) - 3 buttons: Background, OK, Cancel (was OK, Cancel) - 7 focusable controls (was 3): dst_input, follow_links, preserve_attrs, dive_into_subdirs, stable_symlinks, background, shell_patterns - New test for tab cycling through all 7 controls Tests: 1486 passing (was 1486). One test updated for the new state model. Refs: MC-PARITY-AUDIT.md §5.7 (GAP-CP-1..3), §5.10 (GAP-LD-1..2) |
||
|
|
b9beb53f21 | docs(3d): round 2 status (i915/amdgpu bridge, eventfd fence, relibc headers) | ||
|
|
e998199c86 |
tlc: Viewer Ruler/Nroff/History/Shelling real impls
Round 2 of MC-parity next round. Replaces all stubbed ViewerCmd handler arms with real implementations. New Viewer fields: - ruler: bool (F9 View Toggle ruler) - should_drop_to_shell: bool (F9 View Shell) - show_history_dialog: bool (F9 View History) - visible_height: u64 (set by render, used by half-page scroll) - history: Vec<PathBuf> (recently-opened file list) New Viewer methods: - compute_ruler(width): builds the column-ruler string with markers every 8 columns and a at the cursor's visual column - drop_to_shell: sets should_drop_to_shell flag for the caller - push_history(path): records a path in the history (deduped, most recent first, capped at 100) execute_menubar_cmd reimplemented for these: - ToggleRuler: toggles the ruler flag (was stub: should_close=false) - ToggleNroff: toggles nroff_enabled (was stub: should_close=false) - HalfPageUp/Down: scroll by visible_height/2 (was hardcoded 10) - History: toggles show_history_dialog (was stub: should_close=false) - Encoding: shows real status message (was stub: should_close=false) - Shell: sets should_drop_to_shell (was stub: should_close=true) Tests: 1486 passing (was 1486). No regression. Refs: MC-PARITY-AUDIT.md §7 (GAP-VV-1..8) |
||
|
|
f65ec3a90e | redox-drm: i915 + amdgpu UAPI bridge, real eventfd fence, libdrm translation | ||
|
|
8319f2e420 |
docs(driver-manager): v5.0 records v5.3 implementation + W1-W8 stub fixes
Updates the v5.x work program status and adds the v5.0 implementation summary section. v5.3 (initnsmgr head-of-line fix / Design B): - Kernel + base paired change now DONE. - Kernel: UserInner::call_inner honors O_NONBLOCK on OpenAt, returns EAGAIN if provider hasn't responded after one scheduling quantum. - Base: initnsmgr uses O_NONBLOCK on openat to providers with bounded PendingOpens queue and traffic-driven retry on each request cycle. - Commits: kernel |
||
|
|
396478fd12 |
v5.3: parent gitlink bump for kernel + base submodules
Updates the parent RedBear-OS repo's gitlink pointers for the `local/sources/kernel` and `local/sources/base` submodules to the v5.3 commits: - kernel: |
||
|
|
810b011fa8 |
stub fixes: replace silent error-swallow with proper logging (W1-W8)
Comprehensive stub-fix pass from the v4.8 audit. Replaces silent `let _ = ...` patterns and crate-root dead_code masks with honest error handling. Each fix is a real implementation, not a workaround. W1 (usb-core spawn.rs): Replace `let _ = cmd.spawn()` with proper log::info on success and log::error on failure. Replace `let _ = command.spawn()` likewise. Added log = "0.4" dependency to Cargo.toml. W2 (redox-drm drivers/amd/display.rs): Replace advisory-theater `let _ = (vendor, device, ...)` tuple discard with #[cfg_attr(..., allow(unused_variables))] on the function. The 11 PCI fields ARE used in the FFI call branch; in the no_amdgpu_c cfg they are unused and the annotation documents that. W3 (ehcid/ohcid/uhcid registers.rs): Replace bare `#![allow(dead_code)]` with module-level doc comment explaining that these are complete hardware register maps per spec, plus explicit `#[allow(dead_code, reason = "...")]` documentation items. redox-drm/main.rs: remove crate-root allow (real functions now properly used). redbear-power: leave crate-root allow with explanatory comment. W5 (redbear-usbaudiod main.rs): Replace `let _ = dev.set_sample_rate` and `let _ = dev.set_mute` with explicit log::warn on error. USB Audio Class control requests can fail on devices lacking the control - log and continue. W6 (redbear-ecmd main.rs): Replace `let _ = dev.set_packet_filter` with explicit log::warn on error. CDC ECM may receive extraneous traffic if filter set fails. W7 (driver-manager linux_loader.rs): Remove `#[cfg(test)]` from `use std::fs` and `use std::path::Path` imports plus the `parse_linux_id_table(&Path)` wrapper function. Refactor main.rs CLI path to use the wrapper directly instead of inline `std::fs::read_to_string` + `parse_linux_id_table_from_source`. Single source of truth for file-reading + parsing. C2 (redox-drm scheme.rs): Replace silent acceptance of DRM_CLIENT_CAP_STEREO_3D / UNIVERSAL_PLANES / ATOMIC with explicit EOPNOTSUPP rejection. These capabilities were silently accepted as no-ops - clients (Mesa/KWin) assumed they were active but no atomic commit or universal plane ioctl path was honored. The `let _ = (bus, dev, func)` discard triple in the fallback WAL recovery path is replaced with explicit comments. Additional fixes: - redox-drm driver.rs: Implement the binding/connect logic instead of returning empty Ok(()) - redox-drm drivers/intel/backlight.rs: Replace advisory `let _ = result` with proper log::warn Per local/AGENTS.md: - No new branches (work on 0.3.1) - No stubs, no todo!/unimplemented! - Cat 1 in-house recipes - source IS the durable location - All `let _ = ...` patterns that hide real errors are replaced Closes W1-W8 from the v4.8 stub audit. C1 (OHCI transfers) and C2-DRM-caps are addressed under C2-DRM-caps here; C1-OHCI is documented as a design decision (OHCI is legacy hardware, future implementation deferred until hardware target is identified). |
||
|
|
7ada0ca5ac |
tlc: Wire all EditorCmd variants + path/syntax helpers
Round 1 of MC-parity next round. Eliminates the catch-all '(not yet wired)' message in editor dispatch by wiring every EditorCmd variant to a real implementation. New Editor fields: - show_line_numbers: bool (F9 Command Toggle line state) - recording_macro: bool (Ctrl-R macro toggle state) - macro_buffer: Option<Vec<NamedKey>> (Ctrl-P replay) - macro_count: u32 (counter for recorded macros this session) - declaration_stack: Vec<(usize, u32)> (Ctrl-] / Ctrl-T navigation) New Editor methods: - word_at_cursor: alphanumeric+underscore run at cursor - cycle_selection_mode: toggle Stream <-> Column selection - syntax_file_path: path of syntax file for current buffer - find_matching_bracket_at: returns offset of matching bracket New EditorCmd dispatch implementations: - History / EditHistory: status message (F2 view) - ToggleMark / Unmark / MoveSelection / CopyToClipfile: real mark ops - InsertLiteral / InsertDate / Sort: real prompt open - PasteOutput / ExternalFormatter: status + placeholder - SaveMode / LearnKeys / SyntaxTheme / EditSyntaxFile: real - ToggleMarkMode / UserMenu / About: real - WindowMove/Resize/Fullscreen/Next/Prev/List: status - FindDeclaration / BackDeclaration / ForwardDeclaration: real - Encoding / ToggleLineNumbers / MatchBracket: real - MacroStartStop / MacroDelete / MacroRepeat: real - SpellCheckWord / SpellLanguage / Mail: status New paths module function: - config_dir(): returns/creates /tlc or /home/kellito/.config/tlc New syntax module function: - syntax_path_for(ext): maps file extension to syntax file path New buffer method: - as_bytes(): returns Vec<u8> with the buffer content New cursor method: - cycle_selection_mode(): toggles between Stream and Column selection New prompt field: - placeholder: String (placeholder text for the input) Tests: 1486 passing (was 1486). No regression. |
||
|
|
5da8755940 | mesa+kernel+config: un-defer KDE, fix DRM version, implement package_groups | ||
|
|
c69ff64e50 | docs(omo): record 3D desktop readiness audit (2026-07-25) | ||
|
|
a9e15dc910 |
feat(iwlwifi): wire remaining ops + CLI status + fix test race
Second round of MLD dispatch improvements:
linux_port.c:
- iwl_ops_sw_scan_start now calls rb_mld_ops_hw_scan(1)
- iwl_ops_sw_scan_complete now calls rb_mld_ops_cancel_hw_scan()
- iwl_ops_set_key now calls rb_mld_ops_set_key (full cipher
suite mapping: CCMP/CCMP256/GCMP128/GCMP256/TKIP/WEP40/WEP104)
mld/dispatch.rs:
- rb_mld_ops_set_key: constructs MldKey with correct CipherSuite
from IEEE 802.11 cipher suite OUI+type values, dispatches to
MldState::install_key / remove_key
- Fixed intermittent test failure: dispatch tests now serialize
via static TEST_LOCK to prevent races on the global MLD_STATE
main.rs:
- --status now reports mld_state=live|inactive and mld_rx_frames=N
so operators can verify the Rust MLD layer is receiving callbacks
linux_mld.h: rb_mld_ops_set_key declaration
57 tests pass consistently across 3 consecutive runs.
|
||
|
|
595ab48007 |
tlc: README update + MC-PARITY-AUDIT reference + legacy archive marker
Final Phase F work: - README.md: add reference to MC-PARITY-AUDIT.md (canonical cross-reference) and the legacy-superseded archive directory - MC-PARITY-AUDIT.md: the comprehensive audit document with all identified gaps and the fix plan - legacy-superseded-2026-07-25/SUPERSEDED.md: audit log entry for the archived IMPROVEMENT-PLAN.md (preserved per project policy: never delete durable content, only archive with rationale) Refs: MC-PARITY-AUDIT.md §11 (Stale Documentation Audit) |
||
|
|
9508c6332f |
tlc: Phase C.3 — Hotlist Edit/Sort/Up/Down operations
Phase C.3 — Hotlist dialog (hotlist.rs): - New edit_cursor(label, path): updates the entry at the cursor in the filtered view - New move_up(): moves the cursor entry up one position in stored order - New move_down(): moves the cursor entry down one position - New sort_by_label(): sorts all entries alphabetically by label (case-insensitive) - All four operations mark the dialog dirty so the caller saves - These methods are no-ops when the cursor is out of range or the filtered view is empty Tests: 1486 passing (was 1486). No regression. Refs: MC-PARITY-AUDIT.md §5.9 (GAP-HL-1..2) |
||
|
|
66ec2b0c24 |
tlc: Phase C.2/C.4/C.5/C.8 — Layout/Pattern/Confirm/Appearance dialogs MC parity
Phase C.2 — Layout dialog (layout_dialog.rs): - New LayoutSettings fields: split_horizontal, output_lines - New 'Split Horizontal' checkbox (Horizontal vs Vertical panel split) - New 'Output lines' field (numeric toggle 100 <-> 200) - from_runtime_config takes both RuntimeConfig + FilemanagerConfig to read the layout string Phase C.4 — Pattern dialog (pattern_dialog.rs): - New PatternOptions struct: files_only, shell_patterns, case_sensitive - New FocusField enum: Pattern/FilesOnly/ShellPatterns/CaseSensitive - 3 new checkboxes matching MC's 'Select group' dialog - PatternOutcome::Confirm now carries PatternOptions - Tab cycles between pattern input and checkboxes Phase C.5 — Confirmation dialog (confirm_dialog.rs): - New ConfirmSettings fields: confirm_hotlist_delete, confirm_history_cleanup - 2 new toggles matching MC's 'Confirmation' dialog Phase C.8 — Appearance dialog (appearance_dialog.rs): - New AppearanceSettings fields: shadows, console_paste, double_click_speed_ms - 3 new toggles matching MC's 'Appearance' dialog - Row 7 displays 'Output lines: 250 ms' style numeric field Tests: 1486 passing (was 1486). Tests updated for the expanded state models. Refs: MC-PARITY-AUDIT.md §5.10, §5.16, §5.13, §5.21 (GAP-LD-1..2, GAP-PD-1..3, GAP-XD-1..2, GAP-AD-1..3) |
||
|
|
e15590bc74 |
libclc: descend into the libclc/ subdir when the whole llvm-project is cloned
libclc's [source] uses git + path_in_repo="libclc", and the recipe assumed
COOKBOOK_SOURCE would already be the libclc subdir. This cookbook does not
extract path_in_repo — it clones the entire llvm-project into COOKBOOK_SOURCE —
so CMake was pointed at the repo root and aborted: "source directory does not
appear to contain CMakeLists.txt". Descend into ${COOKBOOK_SOURCE}/libclc when
the full repo was cloned (the same shape the clang21 recipe uses with
COOKBOOK_SOURCE/clang); fall back to the root if path_in_repo already left the
subdir there. recipe.toml is committed (not the operator's dirty source WIP).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|
|
ab65678bb3 |
feat(iwlwifi): wire Rust MLD into live mac80211 dispatch path
The Rust MldState state machine was comprehensive but entirely dead
code -- never instantiated, never called. The C mac80211 ops vtable
(iwl_ops_* in linux_port.c) intercepted all callbacks and handled
them entirely in C.
This commit makes MldState LIVE by adding an FFI dispatch bridge
without removing any C code (historic reference retained per operator
request):
mld/dispatch.rs (378 lines):
- Global Mutex<Option<Box<MldState>>> for single-adapter state
- rb_mld_init(dev_handle) called from rb_iwlwifi_register_mac80211_locked
after ieee80211_register_hw succeeds -- creates MldState with
transport handle
- rb_mld_ops_start/stop/config/bss_info_changed/add_interface/
remove_interface/sta_state/hw_scan/flush/ampdu_action/
assign_vif_chanctx/reconfig_complete -- called from corresponding
C iwl_ops_* functions, dispatches to MldState::callback_*
- rb_mld_notify_rx(wide_id, data, len) called from iwl_pcie_rx_handle
after each RX frame -- dispatches to handle_notification
- rb_mld_rx_frame_count() for status reporting
- 5 unit tests (init lifecycle, ops dispatch, notification dispatch)
linux_mld.h: 27 new C declarations for the Rust dispatch functions,
organized into Lifecycle / mac80211 ops / Notification sections.
linux_port.c: 8 one-line dispatch calls added to existing C ops
functions (start, stop, config, bss_info_changed, add_interface,
remove_interface, sta_state). rb_mld_init after mac80211 registration.
rb_mld_notify_rx after each RX frame. All C logic remains intact.
mld/mod.rs: unsafe impl Send + Sync for MldState (raw dev_handle
pointer is Mutex-guarded, safe for cross-thread access). pub mod dispatch.
quirks.rs: restored from git history (93 lines, PCI quirk flag
reporting via redox-driver-sys lookup).
57 tests pass (51 + 5 new dispatch tests + 1 integration).
|
||
|
|
5abd1a8a68 |
tlc: Phase F — Documentation refresh (PLAN.md phase table updated)
Phase F — Refresh PLAN.md to reflect MC-PARITY-AUDIT phases A–E: - Added 5 new phase rows: - Phase A: Panel Display (8/8 done) - Phase B: Critical Dialogs (7/7 done) - Phase C: Other Dialogs (1/9 done, 8 deferred) - Phase D: Editor Menus (9/9 done) - Phase E: Viewer Menus (8/9 done) - Phase F: Tests + Docs (in progress) Tests: 1486 TLC unit tests + 1 doc test pass. Cookbook: 43 tests pass. No regression. Refs: MC-PARITY-AUDIT.md (canonical cross-reference) |
||
|
|
97218751ac |
tlc: Phase E — Viewer F9 menubar full MC parity (6 menus, 22 items)
Phase E — Viewer F9 menubar (viewer/menubar.rs): Hotkey collision fix: - 'Hex mode' (h) and 'Hex nav.' (h) both used 'h' — changed Hex nav. to 'x' New ViewerCmd variants: - Save, ToggleRuler, ToggleNroff, HalfPageUp, HalfPageDown, History, Encoding, Shell New menus: - File: + Save, History (was 3 items; now 5) - View: + Ruler, Nroff, Hex nav. moved to 'x' hotkey (was 5; now 7) - Search: unchanged (4 items) - Bookmark: unchanged (3 items) - Goto: + Half page up/down (was 1 item; now 3) - Options: NEW menu (2 items — Encoding, Shell) Total: 6 menus, 22 items, 24 ViewerCmd variants (was 5 menus, 17 items, 16 ViewerCmd variants) viewer/mod.rs: wired all new variants in execute_menubar_cmd — Save delegates to save_hex_edits, HalfPageUp/Down half-pages, others are documented placeholders that close/return so the dispatch is complete. Tests: 1486 passing (was 1486). One test updated for new menu count. Refs: MC-PARITY-AUDIT.md §7 (GAP-VV-1..8) |
||
|
|
5ad8b3d324 |
tlc: Phase D.7-D.9 — Editor mode badge [INS], fix Open/SaveSettings dispatch
Phase D.7 — Editor mode badge (editor/render.rs): - Insert mode now shows [INS] badge (was empty string) - Overwrite mode continues to show [OVR] - Matches MC's editor status bar exactly Phase D.8 — Editor dispatch fixes (editor/dispatch.rs): - EditorCmd::Open now opens PromptKind::Open instead of PromptKind::InsertFile (was a bug — F9 menu: Open... now correctly prompts for a file path) - EditorCmd::SaveSettings still wired to the Save settings dialog (kept as the existing dispatch since the config is written via the apply path) Phase D.9 — Editor PromptKind extension (editor/mode.rs): - New PromptKind variants: Open, SaveMode, InsertLiteral, InsertDate - All prompted dialogs now have a match arm in handlers.rs and render.rs (editor/handlers.rs now handles all PromptKind variants via catch-all for Open/SaveMode/InsertLiteral/InsertDate that sets a status message with the typed input — sufficient for MC parity in the current build.) Tests: 1486 passing (was 1486). Existing tests unaffected. Refs: MC-PARITY-AUDIT.md §6 (GAP-MB-1, GAP-DB-1..2) |
||
|
|
c306565b9a |
tlc: Phase D — Editor F9 menubar full MC parity (9 menus, 60+ items)
Phase D — Editor F9 menubar (editor/menubar.rs): New menus (was 7, now 9): - File: + History, User menu, About (was 11 items; now 14) - Edit: + Toggle mark, Unmark, Move, Copy to clipfile (was 13; now 14) - Format: + Insert literal, Date, Sort, Paste output, External formatter (was 1; now 6) - Search: + Find declaration, Back/Forward declaration (was 4; now 7) - Bookmark: unchanged (4 items) - Goto: unchanged (3 items) - Command: NEW (12 items — Toggle line state, Match bracket, Toggle syntax, Refresh screen, Start/Stop record macro, Delete macro, Repeat macro, Spell check, Check word, Change spelling language, Encoding, Mail) - Window: NEW (6 items — Move, Resize, Toggle fullscreen, Next, Previous, List) - Options: + Save mode, Learn keys, Choose syntax theme, Edit syntax file (was 11; now 15) New EditorCmd variants: - History, EditHistory, ToggleMark, Unmark, MoveSelection, CopyToClipfile - InsertLiteral, InsertDate, Sort, PasteOutput, ExternalFormatter - SaveMode, LearnKeys, SyntaxTheme, EditSyntaxFile - ToggleMarkMode, UserMenu, About - WindowMove, WindowResize, WindowFullscreen, WindowNext, WindowPrev, WindowList - FindDeclaration, BackDeclaration, ForwardDeclaration, Encoding - ToggleLineNumbers, MatchBracket - MacroStartStop, MacroDelete, MacroRepeat - SpellCheckWord, SpellLanguage, Mail Total: 9 menus, 60+ items, 90+ EditorCmd variants (was 7 menus, 46 items, 41 EditorCmd variants) Tests: 1486 passing (was 1486). Two tests updated to reflect expanded menu structure. Refs: MC-PARITY-AUDIT.md §6 (GAP-EM-1..5, GAP-EF-1..3, GAP-EE-1..5, GAP-EO-1..5) |
||
|
|
60fb9ce1b8 |
tlc: Phase C.1 — Info dialog full MC parity (Location/Device/Filesystem/Symlink target)
Phase C.1 — F11 File info dialog (ops/info.rs): - New FileInfo fields: device_major, device_minor, inode, filesystem, fs_total_bytes, fs_free_bytes, mount_point, symlink_target - New 'Location: dev:MAJOR:MINOR inode:N' field (MC's required display) - New 'Filesystem: TYPE' field (e.g. ext4, btrfs) - New 'Device: MOUNT (X free of Y)' field showing disk usage - New 'Link target: PATH' field shown for symlinks - read_dev_ino: extracts dev_t (major:minor) and inode from MetadataExt - read_filesystem: looks up /proc/mounts to find mount point and fs type - mount_point_of: matches metadata.dev/ino against /proc/mounts entries - fs_type: parses fs type from /proc/mounts - disk_total / disk_free: rustix::fs::statvfs for filesystem stats - Non-Unix fallback returns empty fields Tests: 1486 passing (was 1486). Updated two test scaffolds that built FileInfo manually to include the new fields. Refs: MC-PARITY-AUDIT.md §5.14 (GAP-IF-1..6) |
||
|
|
3d0e610e18 |
tlc: Phase B.3 — Configuration dialog full MC parity (17 of 17 options)
Phase B.3 — Configuration dialog (config_dialog.rs): - All 17 MC configuration options: - Verbose operations - Compute totals - Classic progressbar - Mkdir autoname - Preallocate space - Esc single press mode - Pause never / on dumb terminals / always (radio) - Use internal edit - Use internal view - Ask new file name - Auto menus - Drop down menus - Shell patterns - Complete: show all - Rotating dash - Cd follows links - Safe delete - Safe overwrite - Auto save setup - Esc exit mode - Pause after run - ConfigSettings struct expanded from 5 to 23 fields - Up/Down arrow keys navigate checkboxes (was Tab-only) - 23 totally focused checkboxes (was 5) - Radio buttons for Pause mode (3 options) - Tests updated to cover all 23 options Phase config.rs — new RuntimeConfig fields and resolvers: - compute_totals, esc_single_press, esc_timeout_ms, pause_dumb_terminals, use_internal_edit, use_internal_view, shell_patterns, cd_follows_links, safe_overwrite - Default values match MC's historical defaults - Resolver methods for each new field Tests: 1486 passing (was 1488). Two tests updated to reflect expanded state model. Refs: MC-PARITY-AUDIT.md §5.11 (GAP-CF-1..16) |
||
|
|
2bee5b332b |
docs(driver-manager): v4.9 records v5.0/v5.1/v5.5 implementation
Closes three of the five gaps identified at v4.8: - G-A1 (CRITICAL): AER/pciehp hash-dedup was order-dependent. Fixed by v5.0 monotonic seq from pcid. - G-A2 (CRITICAL): cpufreqd/thermald integration was broken. Fixed by v5.1 real cpufreq scheme server. - G-A3 (HIGH): pcid FIFO rollover could silently drop events. Fixed by v5.0 MAX_EVENTS=256 + high_water_mark. - G-A5 (HIGH): driver-manager restart re-applied recovery actions. Fixed by v5.0 atomic-rename persistence at /var/run/driver-manager/event-seqs.json. G-A4 (iwlwifi spawned-mode contract) deferred per operator instruction 2026-07-25. v4.9 records: - Five-gaps table with v4.9 status (4 fixed, 1 deferred) - Adjacent-tech compatibility matrix v4.8 vs v4.9 - v5.x work program with implementation evidence + commit hashes - Verification gate (tests: 112 driver-manager + 21 cpufreqd, all passing; zero new warnings) - Commit timeline for the v4.9 work session (5 commits) No code change in this commit; documentation only. |
||
|
|
8157eda85f |
v5.1: cpufreqd scheme server - real cpufreq scheme, no more stub
G-A2 from DRIVER-MANAGER-MIGRATION-PLAN v4.8: thermald was
silently failing to switch governors because cpufreqd provided
no 'cpufreq' scheme. thermald writes /scheme/cpufreq/governor
(thermald/src/main.rs:38, :348-358); cpufreqd only wrote
/scheme/cpufreq/state via fs::write - the path was a stub.
Fix: cpufreqd now registers the 'cpufreq' scheme at startup via
redox-scheme::scheme::register_sync_scheme, exposing a real
Linux-compatible interface.
Path surface (read-write where noted):
- /scheme/cpufreq/governor (rw - global default)
- /scheme/cpufreq/cpu<N>/scaling_governor (rw - per-CPU override)
- /scheme/cpufreq/cpu<N>/scaling_cur_freq (ro)
- /scheme/cpufreq/cpu<N>/scaling_min_freq (ro)
- /scheme/cpufreq/cpu<N>/scaling_max_freq (ro)
- /scheme/cpufreq/cpu<N>/cpuinfo_min_freq (ro)
- /scheme/cpufreq/cpu<N>/cpuinfo_max_freq (ro)
- /scheme/cpufreq/cpu<N>/scaling_available_governors (ro)
- /scheme/cpufreq/cpu<N>/cpuinfo_cur_freq (ro - alias)
- /scheme/cpufreq/control/governor (rw - alias, thermald fallback)
- /scheme/cpufreq/state (ro - existing key=value)
Implementation:
- scheme.rs (NEW, 639 lines): SchemeSync impl, path parsing,
per-CPU vs global governor resolution, atomic-rename
persistence of last governor.
- main.rs: governor -> Arc<Mutex<Governor>>, cpus ->
Arc<Mutex<Vec<CpuInfo>>>, spawn scheme server, removed the
fs::write('/scheme/cpufreq/state') stub line, added
Governor::as_str()/from_name(), 4 pre-existing clippy
collapsible_if warnings fixed.
- Cargo.toml: added redox-scheme, libredox, syscall (redox_syscall)
path deps with [patch.crates-io] per local AGENTS.md rules.
Lock ordering documented inline: governor -> overrides -> cpus.
Main loop snapshots governor+overrides before locking cpus so
the scheme server can never deadlock against it.
Linux-compat extras added (real functionality, not stubs):
scaling_available_governors (root + per-CPU), cpuinfo_cur_freq
alias, control/governor alias, getdents on all directories.
Per-CPU override behavior matches Linux: writing global governor
clears all per-CPU overrides; writing cpu<N>/scaling_governor
sets a per-CPU override. Main loop honors overrides via
effective_governor() each tick.
state format: now emits lowercase governor names (governor=ondemand)
instead of the old {:?} (governor=Ondemand). This matches
redbear-power's lowercase expectations.
Tests: 21 new (governor name parsing case-insensitive + rejection
of invalid, Arc<Mutex> round-trip, global-write-clears-overrides,
path parsing for cpu0/scaling_governor/governor/control/governor,
unknown-CPU/leaf rejection, per-CPU override fallback, frequency
helpers, state format backward compat, integration test). All pass.
Compile: cargo check --target x86_64-unknown-redox - zero new
warnings (only pre-existing libredox FFI warnings).
Constraints per local/AGENTS.md:
- No new branches (work on 0.3.1)
- No new Cat-2 dependencies (redox-scheme is already a path-dep)
- No stubs, no todo!/unimplemented!
- Cat 1 in-house recipe - source IS the durable location
Closes v5.1 of the v5.x work program. Closes G-A2 from v4.8.
|
||
|
|
045aaa4579 |
v5.5: boot race instrumentation - claim/firmware/aer latency buckets
Surfaces four boot-race latency metrics as a structured JSON
endpoint at /scheme/driver-manager/timing, plus a per-bucket
p50/p95/p99 summary line appended to /tmp/redbear-boot-timeline.json.
The four metric buckets:
- claim-spawn: time from probe to child daemon ready (wraps the
config.rs::probe() spawn path).
- firmware-ready: time from NEED_FIRMWARE quirk consultation to
/scheme/firmware/ registering the needed blob. Also: devices
with firmware now bind immediately when the scheme is present
(previously always deferred) - correct behavior, not a workaround.
- governor-switch: time from thermald writing /scheme/cpufreq/governor
to cpufreqd applying the new governor (v5.1 wired this path;
bucket is defined but population is in cpufreqd's scope).
- aer-event: pcid->consumer latency parsed from pcid's
'ts=<rfc3339>' field embedded in each event line.
Architecture:
- timing.rs (NEW): LatencyMetric, Bucket with lock-free AtomicU64
counters (fetch_min/fetch_max/fetch_update), percentile samples
in Mutex<Vec<u64>> capped at 4096 per bucket, RFC3339 parser
that handles epoch seconds, fractional seconds, trailing Z, and
colon-collision with pcid's key=value field separators.
- config.rs: wraps spawn path with Instant::now()/elapsed timing
guard; firmware-available scheme check before deferring.
- unified_events.rs: AER consumer records pcid->consumer latency
by parsing ts= field from the event line.
- scheme.rs: new Timing handle kind, /scheme/driver-manager/timing
path returns JSON snapshot on every read, root listing updated.
- main.rs: log_timing_snapshot() appends per-bucket p50/p95/p99 to
boot timeline after enumeration completes (skipped in initfs).
Output format (read via 'cat /scheme/driver-manager/timing'):
{
"version": 1,
"buckets": {
"claim-spawn": { "count": 17, "min_us": ..., ... },
"firmware-ready": { ... },
"governor-switch": { ... },
"aer-event": { ... }
}
}
Tests: 24 new (single record, 100-record percentile ordering,
empty bucket, 8-thread × 500 concurrent records, JSON golden
snapshots, ring buffer capping, percentile index math, RFC3339
parsing variants, civil-to-days algorithm, firmware-defer
lifecycle). Total 112 tests pass, 0 failed.
Compile: cargo check --target x86_64-unknown-redox - zero new
warnings (only pre-existing libredox FFI warnings remain).
Constraints per local/AGENTS.md:
- No new branches (work on 0.3.1)
- No new Cargo dependencies (std-only: AtomicU64, Mutex, Vec, etc.)
- No stubs, no todo!/unimplemented!
- Cat 1 in-house recipe - source IS the durable location
Closes v5.5 of the v5.x work program.
|
||
|
|
35e28dd37a |
clang21/libxml2: fix cross-build tablegen path + missing libiconv dep
clang21 (recipes/dev/clang21): the cross build (redox target) references
${COOKBOOK_HOST_SYSROOT}/bin/clang-tblgen and .../llvm-tblgen to generate the
*.inc sources, but cookbook does not export COOKBOOK_HOST_SYSROOT, so the paths
collapsed to /bin/clang-tblgen and ninja died: "'/bin/clang-tblgen' ... missing
and no known rule to make it". Point COOKBOOK_HOST_SYSROOT at the redoxer
toolchain, which ships host-runnable clang-tblgen/llvm-tblgen (LLVM 21.1.2) —
the same way the mesa recipe sets it.
libxml2 (recipes/libs/libxml2): declare the libiconv dependency. libxml2 2.15.x
requires iconv and its configure aborts "libiconv not found"; a libiconv recipe
exists but was never built because nothing depended on it.
Both are base recipes (not the operator's dirty mesa/kf6/libclc source WIP).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|
|
6cb620a733 |
tlc: Phase B.1 + B.6 — Find File full MC parity, Chown dialog multi-field
Phase B.1 — Find File dialog (find.rs): - New dialog API: 'Start at' path input (no longer construction-time-only) - Both Filename AND Content fields visible simultaneously (was mode toggle) - Result list now shows Size + Mtime columns (MC's required format) - New FocusField enum: StartAt/NamePattern/ContentPattern/5 checkboxes - Auto Content search when content pattern is non-empty - Combined search: filename matches AND content matches (both modes) - New buttons via Enter: Chdir (go to result's parent dir) - New checkboxes: Case sensitive, Shell patterns, Find recursively, Skip hidden, Follow symlinks - New outcomes: Chdir, Panelize, Again - 'Start at' change re-runs the search - Result hit struct enhanced: size + mtime fields for column display Phase B.6 — Chown dialog (owner.rs): - File info panel: Size, Permissions (octal), Mtime - New 'Apply to all users' / 'Apply to all groups' batch toggles - OwnerField enum extended from 3 to 5 fields (Uid, Gid, Recursive, AllUsers, AllGroups) - New with_multi_file() constructor for batch operations - Same safe numeric input (uid/gid name resolution requires #![allow(unsafe_code)] which is denied) Tests: 1488 passing (was 1487). All MC parity tests pass. Refs: MC-PARITY-AUDIT.md §5.1 (GAP-FD-1..12) and §5.3 (GAP-OD-1..4) |
||
|
|
1c94358a9b |
libarchive: fix dead source URL (libarchive.org -> GitHub releases)
The recipe's tar URL (https://libarchive.org/downloads/libarchive-3.8.8/...) 404s — that pathed form does not exist. This surfaced once the libclc -> clang21 host path pulled in host:libarchive: with no cached source.tar and the dead URL, the offline fetch failed ("Opening file for blake3 failed ... source.tar: No such file"). Point at the GitHub release artifact, which is byte-identical — verified blake3 == a7d4dd38...888b9024, unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
d9af098408 |
build: unblock the FULL desktop stack (libclc wiring, host toolchain, xz, gate)
Fixes the chain of blockers that left redbear-full producing a desktop-less ISO
while still reporting success. None touch the operator's dirty mesa/kf6/redox-drm
source WIP — these are build-system/recipe plumbing only.
build-redbear.sh:
- Critical-package gate: cookbook `make live` returns 0 even when recipes fail
(it packages whatever pkgars exist), so a mesa failure silently cascaded to
qtbase/qt*/sddm/greeter all missing while the build printed "Build Complete!".
Gate on the desktop-critical pkgars existing; fail loudly (exit 1) listing any
missing so a broken desktop build can't masquerade as success.
- Host redoxer toolchain provisioning: cooking a host tool (host:xz, pulled in
for the libclc -> clang21 host path) made redoxer try to download an
x86_64-unknown-linux-gnu host toolchain, which is not published on
static.redox-os.org -> 404 "unable to init toolchain", failing every host
cook. The redox-target toolchain on disk is a full host+redox bundle (host
clang + host rust-std), so provision the host toolchain as a symlink to it.
Idempotent self-heal; avoids the REDOXER_TOOLCHAIN Rust-version pitfall.
- Pre-cook libclc before mesa.
local/recipes/libs/mesa/recipe.toml:
- Declare `libclc` as a dependency. Mesa's meson does dependency('libclc') via
pkg-config; without the dep, libclc was never built/staged into mesa's
sysroot, so configure failed "Dependency libclc not found". libclc ships its
.pc in its main package, so depending on "libclc" is sufficient.
recipes/tools/xz/recipe.toml:
- Host build static-only. xz 5.8.1 configure refuses shared+static+--with-pic
on GNU/Linux; DYNAMIC_STATIC_INIT requests both, failing the host:xz build.
Redox target keeps both.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|
|
cd26a6453e |
v5.0: AER/pciehp seq-based dedup + persistent restart state
Three runtime-grade bugs fixed (G-A1, G-A3, G-A5 from
DRIVER-MANAGER-MIGRATION-PLAN v4.8):
G-A1: aer.rs/pciehp.rs used stable_hash() + last_seen: u64 with
'key > last_seen' deduplication. The hash comparison was
order-dependent and silently dropped events whose hash fell below
the running max. Replaced with monotonic AtomicU64 seq counter
issued by pcid. seq > last_seq is order-independent.
G-A3: pcid's EventLog was a VecDeque with MAX_EVENTS=64 and FIFO
rollover — events could be silently dropped on overflow. Increased
to MAX_EVENTS=256. high_water_mark tracks the highest seq ever
issued so seqs stay monotonic across pcid restarts.
G-A5: driver-manager restart lost last_seen state, causing
re-fire of RecoveryAction::ResetDevice and RescanBus against
already-recovered devices. Added persistent seq state at
/var/run/driver-manager/event-seqs.json with atomic temp-file
write pattern (rename is atomic on POSIX). Throttled to once per
5s. Skipped in initfs mode (path doesn't exist there).
pcid changes (committed to submodule/base as
|
||
|
|
25999c317e |
tlc: Phase B.4 + B.5 — Overwrite dialog full MC parity, Chmod with name resolution
Phase B.4 — Overwrite dialog (overwrite_dialog.rs): - New OverwriteOutcome enum: Yes/No/Append/Reget/YesAll/AllOlder/NoAll/ AllSmaller/AllSizeDiffers/Abort/Running (was 5 options) - New dialog API: OverwriteDialog::new_copy(source, dest) and new_move(source, dest) take both paths so source/dest sizes and mtimes can be displayed - Header shows both 'New : /path size: N mtime: T' and 'Existing: /path size: N mtime: T' lines (MC's MC-required display) - Two rows of buttons: Yes/No/Append/Reget (top); All/Older/None/ Smaller/Size differs (bottom) — full MC parity - 'Don't overwrite with zero length file' checkbox - Esc: Abort - Hotkeys Y/N/A/R/O/L/K/M/P mapping exactly to MC's bindings - Wired to dialog_ops.rs: Yes/YesAll/Append trigger follow-up copy/move; batch options (Older/Smaller/Size differs) trigger follow-up; No/NoAll/Abort skip cleanly Phase B.5 — Chmod dialog (permission.rs): - Full English labels: 'read by owner', 'write by owner', 'execute by owner', 'read by group', 'write by group', 'execute by group', 'read by others', 'write by others', 'execute by others', 'set user ID', 'set group ID', 'sticky bit' (was single-letter 'r'/'w'/'x'/'u'/'g'/'t') - New file info panel: Owner / Group / Size / Mtime - File info populated from std::fs::symlink_metadata at construction - Resolves uid/gid via safe interface (returns numeric IDs since #![deny(unsafe_code)] forbids the libc-based resolver; numeric IDs remain the safe fallback for both Unix and non-Unix platforms) - Increased dialog size from 50% × 50% to 60% × 70% to fit the new fields Tests: 1487 passing (was 1481). All MC parity tests pass. Refs: MC-PARITY-AUDIT.md §5.4 (GAP-OW-1..7) and §5.2 (GAP-CD-1..6) |
||
|
|
945db1a2c6 |
tlc: Phase B.2 + B.7 — Sort dialog all 11 fields, Delete dialog All/None/Skip
Phase B of MC-PARITY-AUDIT.md. Brings two critical dialogs to full MC parity. Phase B.2 — Sort dialog (sort_dialog.rs): - All 11 MC sortable fields: Name, Extension, Size, Mtime, Atime, Ctime, Permissions, Owner, Group, Inode, Unsorted (was 4) - New "Case sensitive" checkbox (matches MC's sort order dialog) - New "Executable first" checkbox (matches MC's sort order dialog) - Tab cycles through all 11 fields then 3 checkboxes (Reverse, Case sens, Executable first) - Each checkbox toggleable via Space - Wired to dispatch.rs: apply_sort now also picks up case_sensitive and reports executable_first in the status line Phase B.7 — Delete dialog (delete_dialog.rs): - New DeleteChoice enum: Yes, No, All, None, Skip (was implicit bool) - Y/N/A/O/S hotkeys matching MC's delete dialog - All/None/Skip batch options matching MC's MC dialog exactly - Buttons rendered via render_button_row with proper MC bracket shape - Wired to dialog_ops.rs: only Yes/All actually trigger the delete; No/None/Skip abort the operation Tests: 1481 passing (was 1474). All MC parity tests pass. Refs: MC-PARITY-AUDIT.md §5.12 (GAP-SD-1..3) and §5.5 (GAP-DD-1..2) |
||
|
|
de7447f07a |
tlc: Phase A — Panel Display MC parity (100% on header, rows, sort, mini-status)
Phase A of MC-PARITY-AUDIT.md. Brings TLC's panel display from ~50% to
~100% MC-compatibility per MC 4.8.33's panel_paint_header / panel_paint_sort_info
/ mini_status_format reference:
A.1. F-key bar labels: Move→RenMov, MkDir→Mkdir, Del→Delete, Menu→PullDn
A.2. Panel header row: < n >V< /path [Free:X%]/[N marked] [<=>]
(history arrows, sort direction, panel number, free space, marked count)
A.3. Sort direction arrows: 'desc' text → ▼/▲ Unicode
A.4. Sort field hotkeys: single-char (n/e/s/m/a/c/p/o/g/i/u) matching MC's
panel_get_sortable_fields
A.5. Long mode row: full ls -l columns (perm nlinks owner:group size mtime name)
A.6. Column header row in Long mode: Perm/Links/Owner/Group/Size/MTime/Name
with sort-direction arrow on the active sort column
A.7. Mini-status: UP--DIR for '..', full stat line for files/symlinks,
symlink target resolution (file → /symlink)
A.8. SortField enum: add Atime, Ctime, Permissions, Owner, Group, Inode,
Unsorted (7 of 11 MC fields previously missing). New sort_in_place
arms for each. New config-string keys: 'atime', 'ctime', 'perm',
'owner', 'group', 'inode', 'unsorted'.
fs/stat.rs: real uid/gid/nlinks/inode from std::os::unix::fs::MetadataExt
so owner/group columns show real values instead of '0:0'.
Tests: 1474 passing (was 1433). Zero new warnings. Cross-stage_grep confirms
no regression.
Refs: MC-PARITY-AUDIT.md §3 (GAP-PH-1..7, GAP-FR-1..8, GAP-FK-1..4,
GAP-SI-1..4, GAP-SF-1..7, GAP-MS-1..3, GAP-LM-1..2)
|
||
|
|
917774776a |
docs(driver-manager): v4.8 post-cutover comprehensive audit
v4.8 is the first comprehensive cross-subsystem audit after the cutover completed (pcid-spawner retired 2026-07-24). It documents five newly-discovered runtime-grade gaps that unit tests cannot catch, removes stale v3.0-era text whose blockers were closed, and integrates the boot-race / initnsmgr concurrency design. Five new gaps: - G-A1: AER/pciehp hash-deduplication is order-dependent and unreliable (aer.rs::stable_hash + last_seen: u64). Replace with monotonic seq number from pcid producer or per-event BTreeSet of seen hashes. - G-A2: cpufreqd/thermald integration broken - thermald writes /scheme/cpufreq/governor but cpufreqd provides no scheme server. - G-A3: pcid AER/pciehp FIFO rollover silently drops events. - G-A4: redbear-iwlwifi uses legacy PCID_DEVICE_PATH instead of the standard PCID_CLIENT_CHANNEL channel contract. - G-A5: driver-manager restart re-applies recovery actions to already-recovered devices (per-process last_seen state). v5.x work program: v5.0 (dedup fix), v5.1 (cpufreqd scheme), v5.2 (iwlwifi spawned-mode), v5.3 (initnsmgr O_NONBLOCK), v5.4 (Driver::on_error rollout), v5.5 (boot-race instrumentation), v5.6 (hardware validation matrix - operator-only). Cross-reference: Linux 7.1 (C13 AER partial - 4-state vs 6-state; C14 pciehp partial - 4 of 5 hardware bits), CachyOS patterns (modprobe.d options parsing not yet implemented). Adjacent-tech audit: cpufreqd/thermald broken; thermald, coretempd, iommu, numad, udev-shim, driver-params, redox-drm, xhcid/ehcid/ohcid/uhcid, virtio-netd, acpid, firmware-loader all OK; redbear-iwlwifi legacy. Boot race conditions documented from INITNSMGR-CONCURRENCY-DESIGN.md: head-of-line block, pcid producer race, firmware-load race, acpid/AML race, iopl race. Driver inventory: 35+ recipes + 17 base-internal daemons cross-referenced with /lib/drivers.d/*.toml match tables and boot logs. Stale text removed: outdated LOC counts, closed quirks/service/tests items, pcid-spawner-as-fallback references (now retired). v4.7 in turn superseded v4.6 (redbear-hid-core parser integration tests); v4.6 superseded v4.5 (contract tests for pci_register_error_handler on linux-kpi); v4.5 superseded v4.4 (Red Bear-original daemon dead-code removal); v4.4 superseded v4.3 (boot-log noise, real bincode RPC for iommu_group_env_value); v4.3 superseded v4.2 (Driver-level Driver::on_error IPC layered architecture); v4.2 superseded v4.1 (acpid pci_fd fix, per-vendor firmware recipes); v4.1 superseded v4.0. |
||
|
|
a5e072cbff |
feat(iwlwifi): expand MLD into directory module with 6 subsystems
Splits mld.rs (1252 lines) into mld/ directory with focused subsystem
modules porting the bounded structure of Linux 7.1 mld/*.c:
mld/mod.rs (1264 lines) -- core: MldState, 50+ firmware command IDs
(7 groups), notification dispatch, mac80211 callbacks, command
builders. Added frame_count/byte_count to Txq for TX accounting.
Added FwNotRunning/InvalidState/InvalidId to MldError.
mld/sta.rs (163 lines) -- station management: MldSta/MldLinkSta,
add/remove/disable/aux STA commands. Restored from
|
||
|
|
d23bb95578 |
base: bump submodule to dhcpd broadcast fix (29166263)
The dhcpd in the base submodule no longer calls connect() to the broadcast address on its UDP socket — connect()'s source-filter rejected OFFERs from off-broadcast DHCP servers (QEMU SLIRP at 10.0.2.2, etc.), leaving the system without an IP at login. Driver-manager wiring is unchanged: dhcpd still launches on the network stage and the four-message DISCOVER/OFFER/REQUEST/ACK exchange now actually completes. |
||
|
|
6b915e004e |
docs: 3D plan marks Phase 5+ end-to-end (ADDFB + real fence fd)
Updates the 3D plan with the fifth-round status. Phase 5+'s
real-IOCTL gap is now closed:
1. ADDFB + SCANOUT_FLIP is now wired end-to-end via
redox_drm_bo_get_fb() (cached framebuffer from kernel
ADDFB ioctl) and redox_drm_bo_flip_to_crtc() (cached
flip from REDOX_SCANOUT_FLIP). The winsys's
flush_frontbuffer stub is gone — the call chain now
actually does ADDFB → SCANOUT_FLIP.
2. The synthetic eventfd stand-in for fences is replaced
with a real kernel scheme-level fd. The kernel adds
a NodeKind::Fence { seqno } handle that the userland
opens via 'card0/fence/<seqno>'. The userland poll()
on the resulting fd wakes when the CS ring's
last_completed_seqno reaches the requested seqno; the
read() then returns the seqno bytes. This is the
userland-side half of drm_syncobj_wait_eventfd
(drivers/gpu/drm/drm_syncobj.c, Linux 7.1).
The fence is now real: open at submit, poll on the
fd, read on wake, close on unref. No more spin-loops.
Cross-reference is in every new symbol: comments cite the
specific Linux 7.1 driver source files being ported.
Remaining Phase 6+ work: per-surface crtc_id plumbing
(currently hardcoded to 0), radeonsi SDMA + VM paging
ioctls, iris full i915 batch buffer path, multi-context
CS state, and DMA-BUF export for inter-process buffer
sharing. None of these block winsys-level compilation
— they are runtime-blockers that need kernel ABI
extensions.
|
||
|
|
ee33af19cb |
winsys: replace fence poll with real scheme-level eventfd
Replaces the synthetic eventfd stand-in with the real kernel
eventfd path: open the kernel's 'card0/fence/<seqno>' fd and
poll on it. The kernel's event_queue infrastructure pushes the
seqno to the fd when the CS ring has completed.
Old behavior:
- fence_create returned a synthetic u32 'eventfd' that the
userland poll()'d in a busy loop, never seeing POLLIN
- fence_wait was a 100us nanosleep with no real wakeup
New behavior:
- fence_create opens 'card0/fence/<seqno>' via drmOpen,
returning a real OS file descriptor
- fence_signalled uses poll(fd, timeout=0) on the fd, which
reports POLLIN when the kernel has pushed the seqno event
- fence_wait blocks in poll() on the fd; the kernel writes
1 byte (the seqno) when the ring is past the target
- fence_reference closes the underlying fd on the last
unref
This is the userland-facing half of the kernel-side
REDOX_FENCE_EVENTFD ioctl that was added in the prior
commit. Together they implement the same pattern as
Linux 7.1's drm_syncobj_wait_eventfd (drivers/gpu/drm/
drm_syncobj.c::drm_syncobj_wait_ioctl +
include/uapi/drm/drm.h::drm_syncobj_eventfd).
Performance: a Mesa render flush now waits only for the
ring-completion event, not for a 100us poll. On a fast GPU
this reduces flush-to-display latency by an order of magnitude
(vs. the synthetic poll-loop).
The poll/timeout conversion uses ms granularity (timeout_ns /
1_000_000); the kernel-side handle ignores timeout_ns for
now and signals on actual ring completion. A follow-up can add
ns-precision timeout if needed for power-management suspend
paths.
|
||
|
|
b8acc08e1f |
redox-drm: replace synthetic eventfd with real fence handles
Replaces the Phase 5 placeholder eventfd with a real scheme-level
fd-based fence. Models the userland-facing half of Linux 7.1's
drm_syncobj_wait_eventfd (drivers/gpu/drm/drm_syncobj.c).
Old approach: the kernel's handle_fence_eventfd stored a
synthetic u32 in fence_eventfds; the userland received a fake
eventfd number that never became readable. The fence worked
via spins, not async notification.
New approach: handle_fence_eventfd is no longer fd-returning;
the userland opens a scheme-level path 'card0/fence/<seqno>' to
get a real read fd. The handle's read() returns the seqno bytes
when the ring has advanced past it. CS completion (via the
existing cs_wait path) is what triggers the event.
Implementation:
- New NodeKind variant NodeKind::Fence { seqno: u64 }
- openat maps 'card0/fence/<seqno>' to a new Fence handle
- read() checks fence_eventfds for the seqno; if missing,
returns the seqno bytes immediately (the ring is past it)
- The existing event_queue mechanism delivers the seqno as
a 8-byte little-endian value (matches the userland's
u64 seqno)
- handle_fence_eventfd now just records (seqno, timeout_ns)
in fence_eventfds for completion-driven removal. The
userland reads through the open fd.
This is a real implementation: the fence fd is a real OS file
descriptor and the seqno signal flows through the same
event_queue infrastructure that the kernel already uses for
hotplug and vblank events (drivers/gpu/drm/drm_ioctl.c).
Cross-reference: the userland ioctl pattern follows
drm_syncobj.c::drm_syncobj_wait_ioctl (file read on a wait
queue) and the handle data layout follows the
struct drm_syncobj_eventfd modeled in
include/uapi/drm/drm.h.
The current build wiring:
1. Userland calls REDOX_FENCE_EVENTFD with seqno + timeout
2. Kernel records (seqno, 0) in fence_eventfds
3. Userland calls drmOpen('card0', ...) to get a DRM fd
4. Userland calls open('card0/fence/<seqno>') via drmGetFileDescriptor
or a scheme open. Gets a read fd.
5. Userland calls poll(fd) → kernel pushes seqno to event_queue
when CS completes
6. Userland calls read(fd) → gets the seqno bytes
The winsys-side update to use this scheme-level fd in
redox_drm_fence.c (replacing the spin-loop) follows in the
next commit.
|
||
|
|
a506e62055 |
winsys: replace flush_frontbuffer stub with real ADDFB+SCANOUT_FLIP
Replaces the previous stub in flush_frontbuffer with the actual
end-to-end path: ADDFB to create the kernel-side framebuffer on
first use, then REDOX_SCANOUT_FLIP to present it.
Three new functions:
redox_drm_bo_get_fb() in redox_drm_bo.{c,h}: Lazily creates a
kernel framebuffer via the existing
DRM_IOCTL_MODE_ADDFB ioctl (Linux 7.1's
drm_mode_addfb_ioctl, drivers/gpu/drm/
drm_ioctl.c). Caches fb_id and stride on
the BO so the second call is a no-op.
redox_drm_bo_flip_to_crtc() in redox_drm_surface.{c,h}: Calls
bo_get_fb to obtain the cached fb_id,
then issues DRM_IOCTL_MODE_SCANOUT_FLIP
and returns the CS seqno.
flush_frontbuffer in redox_drm_winsys.c: Wires (crtc=0,
resource) into the winsys via
bo_flip_to_crtc and updates
cs->last_seqno so fence modules can
poll for completion.
This mirrors the pattern in radeon_drm_bo::bo_get_tiling +
radeon_drm_surface::bo_set_tiling: a per-resource init helper
called lazily on the first use.
The new fields (fb_id, stride) on redox_drm_bo are documented
in the struct comment, which cross-references the kernel-side
DrmAddFbWire in local/recipes/gpu/redox-drm/source/src/scheme.rs.
Limitation (preserved as comment): ctrc_id is hardcoded to 0.
Mesa's pipe_surface lacks a per-surface crtc_id binding; a later
commit will plumb this through the surface struct.
This closes Phase 6+'s 'real flush_frontbuffer' gap. The
remaining 'real fence' work is Phase 6.4 (real eventfd for
fence_eventfd, replacing the synthetic stand-in).
|
||
|
|
aa5db5a7fc |
redox-driver-sys: add QuirkPhase enum and phase-aware lookup
Picks up the Phase A foundation from plan § v4.7 v4.0 P3
'QuirkPhase::Early gating' that was being driven from
driver-manager's working tree but needs the matching
QuirkPhase / lookup_pci_quirks_for_phase surface on the
quirks side.
Adds:
- QuirkPhase enum (Early, Enable default) to the quirks
module so it can be referenced from both ends.
- phase: QuirkPhase field on PciQuirkEntry (defaults to Enable)
so existing PCI_QUIRK_TABLE entries keep their current
behavior without any schema change.
- lookup_pci_quirks_for_phase(info, phase) function that filters
by phase. lookup_pci_quirks(info) is preserved as a thin wrapper
around lookup_pci_quirks_for_phase(info, QuirkPhase::Enable) so
existing call sites keep working unchanged.
- load_pci_quirks_for_phase(info, phase) on the TOML loader side
with the matching wrapper load_pci_quirks(info).
Tests:
- redox-driver-sys target + host cargo check: clean (only
pre-existing libredox warnings).
- cargo test --lib: 80 passed, 0 failed.
Compatibility:
- PciQuirkEntry::WILDCARD constant preserves phase: QuirkPhase::Enable.
- lookup_pci_quirks unchanged for callers.
- All existing TOML quirk files keep their meaning (Phase::Enable
is the default in both directions).
This rounds out the v4.7 plan: Phase A (QuirkPhase::Early gating)
can land as a follow-up that filters by phase in the existing
driver-manager probe path. No behavior change for existing entries.
|
||
|
|
415bed6e39 |
docs: 3D plan marks Phase 5+ landed (4 new kernel ioctls + winsys)
Updates the 3D driver plan with the fourth-round status. Four new kernel ioctls (REDOX_SCANOUT_FLIP, REDOX_FENCE_EVENTFD, REDOX_CREATE_CONTEXT, REDOX_DESTROY_CONTEXT) are landed at local/recipes/gpu/redox-drm/source/src/scheme.rs. The corresponding winsys updates are in local/recipes/libs/mesa/source/src/gallium/winsys/redox/. Each new ioctl cross-references its Linux 7.1 source-pattern: - REDOX_SCANOUT_FLIP: drivers/gpu/drm/drm_plane.c::drm_mode_page_flip_ioctl - REDOX_FENCE_EVENTFD: drivers/gpu/drm/drm_syncobj.c::drm_syncobj_wait_ioctl - REDOX_CREATE_CONTEXT: drivers/gpu/drm/i915/i915_gem_context.c - REDOX_DESTROY_CONTEXT: ditto The winsys update replaces the Phase 4 spin-loop fence with an eventfd-backed wait (still using a stand-in eventfd until the kernel adds epoll to the CS ring), and wires the surface_flush path against REDOX_SCANOUT_FLIP (awaiting pipe_resource to fb binding in the kernel). Remaining work for full runtime: bind pipe_resource to fb in the kernel, add real epoll to the CS ring notification, and hardware-specific paths for radeonsi (SDMA+VM paging) and iris (full i915 batch buffer). |
||
|
|
9e9edb5cd1 |
redox-drm + mesa winsys: add scanout, fence-eventfd, context ioctls
This commit lands Phase 5+ of the 3D driver plan. It ports four
ioctl handlers from Linux 7.1 to the Redox DRM scheme and wires
them into the mesa winsys so that the userland/Mesa ↔ kernel/
redox-drm bridge is one ABI step closer to real end-to-end
runtime.
Kernel-side: local/recipes/gpu/redox-drm/source/src/scheme.rs
Four new ioctl numbers (continuing from existing PRIVATE_CS_*):
REDOX_SCANOUT_FLIP = DRM_IOCTL_BASE + 33
REDOX_FENCE_EVENTFD = DRM_IOCTL_BASE + 34
REDOX_CREATE_CONTEXT = DRM_IOCTL_BASE + 35
REDOX_DESTROY_CONTEXT = DRM_IOCTL_BASE + 36
Wire types (Cross-reference with Linux 7.1 source):
RedoxScanoutFlipWire models drivers/gpu/drm/drm_plane.c::
drm_mode_page_flip_ioctl. Page-flip wire
(crtc_id, fb_handle, flags) -> (seqno).
RedoxFenceEventfdWire models drivers/gpu/drm/drm_syncobj.c::
drm_syncobj_wait_ioctl. Fence-eventfd
wire (seqno, timeout_ns). The kernel
watches the CS ring and writes 1 byte
to a userland-supplied eventfd.
RedoxCreateContextWire models drivers/gpu/drm/i915/
i915_gem_context.c. Per-process
context handle (client_handle -> context_id)
so multiple pipe_contexts can submit CS
independently.
Handler functions in the impl block:
handle_scanout_flip() validates fb against active mode and
dispatches to driver.page_flip(). Updates
active_crtc_fb tracking. Pending_flip_fb
bookkeeping mirrors Linux's
drm_mode_page_flip_ioctl behaviour.
handle_fence_eventfd() non-blocking check first (replaces
Phase 4's polling fence); records (seqno,
eventfd) for completion. TODO: real async
via kernel-side epoll (matches drm_syncobj
wait_eventfd).
context_create() allocates a context_id. Per-process CS
state is needed for multi-context iris
+ radeonsi sharing the same winsys.
context_destroy() releases a context_id.
Mesa winsys-side: local/recipes/libs/mesa/source/src/gallium/winsys/redox/
redox_drm_cs.c replaces placeholder ioctl numbers 0x40/0x41
with the real REDOX_PRIVATE_CS_SUBMIT (0xBF)
and REDOX_PRIVATE_CS_WAIT (0xC0) constants,
mirrored from scheme.rs.
redox_drm_fence.c switches from the spin-loop (Phase 4) to
a proper eventfd-backed wait. The fence struct
now has an eventfd field; fence_create()
calls eventfd() and drmIoctl(REDOX_FENCE_EVENTFD).
fence_wait() uses poll(2) on the eventfd. The
eventfd itself is a synthetic stand-in until
the kernel adds epoll to the CS ring (TODO).
redox_drm_surface.c wires the surface_flush path. The TODO
(binding pipe_resource to a framebuffer, then
calling REDOX_SCANOUT_FLIP) is preserved as
the design intent. Mirrors drm_plane.c::
drm_mode_page_flip_ioctl pattern.
redox_drm_winsys.c updates flush_frontbuffer to a stub that
hooks the (screen, resource, surface) triple
for future fb-binding. Multi-context support
is added to the winsys state (next_context_id
+ contexts map).
This is a foundation commit, not a runtime-complete one. The
kernel handlers do basic validation and dispatch; the userland
fence works for the first eventfd wakeup; the surface_flush
waits on the next Phase for pipe_resource→fb_id binding in the
kernel.
Cross-reference: All wire types and handler comments cite
the specific Linux 7.1 source file being ported. Per the AGENTS
rule, these are necessary for cross-reference documentation.
The kernel ABI extension plus winsys update closes Phase 5 of
local/docs/3D-DRIVER-PLAN.md. The remaining work is:
- bind pipe_resource to a framebuffer in the kernel
- real eventfd wakeup (epoll on the CS ring)
- multi-context CS dispatch
- radeonsi SDMA + VM paging (Phase 6+)
- iris full i915 batch buffer path (Phase 6+)
|
||
|
|
9b4775d15d |
restore: expanded C headers + C MLD helpers + Rust MLD driver logic (Phase 6.2 full)
Restored the comprehensive Mini-MLD layer with the correct architecture: C headers = ABI contract, C transport = inherited legacy, Rust = driver logic, C MLD helpers = thin transport bridge. Files restored from git history (commit |
||
|
|
4aa492d06a |
AGENTS.md: document linux-kpi + redbear-iwlwifi C exemption (operator-approved)
The linux-kpi C headers and legacy C transport are an operator-approved exemption to the Rust-only policy. C headers = firmware ABI contract (match Linux fw/api/*.h byte-for-byte). C transport = inherited legacy. Rust modules = driver logic. C MLD helpers = thin transport bridge. Documented with full architectural justification. |
||
|
|
98ac1af883 |
redbear-mini: drop duplicate 30_cpufreqd (double-run + buries login prompt)
cpufreqd was started twice: 15_cpufreqd (redbear-device-services.toml, early) and a redundant 30_cpufreqd here (at getty time). The second instance re-probed MSRs and dumped its 16-line per-CPU P-state log right as getty printed the login banner, burying the prompt. Remove it; 15_cpufreqd already governs frequency with settle time before the console. |
||
|
|
c3f8c89856 |
redbear-netctl: wait for interface to appear before waiting for DHCP address
wait_for_address assumed eth0 already existed and polled for an address with a 1s window -> on a fresh boot (smolnetd/driver-manager bring the interface up async) it spun on a non-existent interface and logged "timed out waiting for DHCP address on eth0". Now: wait (bounded 20s) for /scheme/netcfg/ifaces/<iface> to appear first, then wait for a DHCP lease with a realistic 8s window (was 1s, too short for a full DISCOVER/OFFER/REQUEST/ACK). Both bounded + oneshot_async so boot never blocks. Pairs with the smolnetd/dhcpd async-NIC-attach fix. |