Commit Graph

395 Commits

Author SHA1 Message Date
vasilito 274669d47d config: enable Mesa with Intel iris+crocus Gallium drivers
recipes/libs/mesa/recipe.toml:
- Add iris,crocus to -Dgallium-drivers (was swrast,virgl only)
- Intel iris: Gen8+ (Broadwell through Battlemage)
- Intel crocus: Gen4-7 (i965G through Haswell)

config/redbear-full.toml:
- Change mesa = "ignore" to mesa = {} for desktop target
- Mesa was previously excluded from redbear-full images
2026-06-02 15:17:57 +03:00
vasilito 7686729069 drm: implement syncobj and fence for VIRGL/VirtIO driver
Extract protocol-agnostic FenceTimeline from Intel to shared
src/drivers/fence.rs — atomic-based fence tracking suitable
for Intel, VIRGL, and AMD drivers.

Extract protocol-agnostic SyncobjManager from Intel to shared
src/drivers/syncobj.rs — syncobj create/destroy/signal/reset/
wait/query and sync_file fd export/import.

Wire both into VirtioDriver:
- Add FenceTimeline + SyncobjManager fields
- Implement all 5 GpuDriver syncobj trait methods
  (create, destroy, wait, export_fd, import_fd)
- Track fence seqnos in virgl_submit_3d (allocate
  before submit, signal after completion)

Intel fence.rs and syncobj.rs converted to thin re-export
modules pointing at shared sources — no behavioral change
for Intel driver.

This gives Mesa VIRGL userspace the standard DRM syncobj
API for GPU/compositor synchronization.
2026-06-02 14:33:28 +03:00
vasilito 7b80a2f13d mc: replace empty WIP recipe with symlink to local/recipes/tui/mc
The WIP recipes/wip/files/mc had an empty recipe.toml (0 bytes),
causing the cookbook to report 'successful' without producing any
output. Replaced with a symlink to the real recipe at
local/recipes/tui/mc which has the full build configuration.

Also fixed the recipe: removed broken cookbook_configure call
(which was cached from a previous failed attempt), replaced with
explicit configure+make+make install. Added gl_cv_list_mounted_fs=yes
since Redox has no /etc/mtab or /proc/mounts.
2026-06-02 13:26:29 +03:00
vasilito 17a1f1aa0d base-initfs: set BUILD_TIMESTAMP from build host clock
Passes the current Unix timestamp as BUILD_TIMESTAMP env var
to cargo, so rtcd can use it as a fallback when the hardware
RTC is unavailable or returns invalid data.

bison: fix __fseterr stub injection using LIBS variable instead
of ar rcs to avoid static archive member ordering issues.
2026-06-02 11:30:30 +03:00
vasilito d5636ae1de intel: P0/P1 — LRC context state, MI commands, DDI sequences, pipe scaler
context.rs: proper LRC image population
  Removed context restore inhibit — GPU now saves/restores state on preempt
  Added PDP register initialization in LRC image (4 PDP entries)
  Added FAULT_AND_STREAM_CTL, BB_STATE initialization
  set_pdp_registers() for per-context PPGTT configuration

ring.rs: MI command emission helpers
  emit_bb_start/emit_bb_end: batch buffer chaining
  emit_load_register_imm: LRI for workaround application
  emit_store_data_imm: store-to-memory for fence signaling
  emit_arb_check: preemption point insertion
  emit_semaphore_wait: inter-engine synchronization
  emit_user_interrupt: explicit interrupt generation

display.rs: DDI pre-enable/post-disable sequences
  ddi_pre_enable: DP link retrain + DDI_BUF_CTL enable with pipe routing
  ddi_post_disable: DDI_BUF_CTL, PIPECONF, DSPCNTR disable + pipe update
  Pipe scaler PS_CTRL/PS_WIN_POS/PS_WIN_SIZE programming in set_mode

regs.rs + regs_gen9/gen12/xe2: scaler register trait methods
  ps_ctrl, ps_win_pos, ps_win_size at 0x68180/0x68170/0x68174 per pipe
2026-06-01 23:58:13 +03:00
vasilito cc95ab1e25 fix: bootloader builds with rustup nightly + --cfg aes_force_soft
Direct build command proven working:
  RUST_TARGET_PATH=targets RUSTFLAGS='--cfg aes_force_soft' \
  rustup run nightly cargo -Zunstable-options rustc \
    --target x86_64-unknown-uefi -Z build-std=core,alloc \
    --bin bootloader --release -- --emit link=bootloader.efi

UEFI target file fixed: removed -sse restriction causing LLVM
'Do not know how to split' error in aes crate.

Updated rust-toolchain.toml to 'nightly' (latest).
2026-06-01 22:06:48 +03:00
vasilito 6e55e00c53 fix: bootloader recipe TARGET handling, add -Zunstable-options to mk files
- Fix bootloader recipe: pass correct TARGET on make command line
  instead of hardcoding x86_64-unknown-uefi (breaks BIOS build)
- Add cargo -Zunstable-options to x86_64-unknown-uefi.mk and
  x86-unknown-none.mk for custom target support
- Add x86_64-unknown-uefi.json target file

Remaining: redoxer toolchain cargo/rust-src version mismatch
prevents build-std compilation. Needs 'make prefix' to rebuild
toolchain with matching versions.
2026-06-01 21:44:55 +03:00
vasilito d042a26375 fix: bootloader target file + -Zunstable-options + TARGET override
Bootloader needs x86_64-unknown-uefi (UEFI target) but redoxer
sets TARGET=x86_64-unknown-redox (OS target). Added:
- x86_64-unknown-uefi.json custom target file
- cargo -Zunstable-options in Makefile for custom target support
- TARGET= override in recipe (may still be overridden by redoxer)
2026-06-01 21:37:20 +03:00
vasilito 8b0cabaa47 fix: m4 builds successfully - complete gnulib cross-compilation recipe
Root cause chain discovered and fixed:
1. GCC built-in stddef.h shadowed by relibc's _STDDEF_H guard
   → fix_types.h with guarded typedefs for 15+ sys types
2. gnulib configure bakes raw typedefs into GL_CFLAG_GNULIB_WARNINGS
   → strip them from Makefiles after configure
3. __fseterr/__freadahead don't exist in relibc
   → compile C stubs and inject into link via Makefile patch

The recipe pattern is documented and reusable for other gnulib packages
(ninja-build, diffutils, etc.).

Also: bootloader recipe needs RUSTFLAGS=-Zunstable-options for
custom target support after redoxer toolchain restore.
2026-06-01 21:22:04 +03:00
vasilito b1e83ae89a fix: m4 recipe - strip GL_CFLAG_GNULIB_WARNINGS typedefs + fix_types.h
Root cause: gnulib configure bakes raw typedef statements
(typedef long unsigned int size_t; etc.) into the generated
Makefile's GL_CFLAG_GNULIB_WARNINGS variable. These break
shell command parsing when expanded on recipe lines.

Fix:
1. Strip raw typedefs from all generated Makefiles after configure
2. Provide fix_types.h with guarded typedefs for size_t, ptrdiff_t,
   off_t, wchar_t, ssize_t, time_t
3. Force-include fix_types.h via CPPFLAGS to work around the
   cross-compiler's GCC built-in stddef.h ordering issue

Also: comprehensive upstream relibc comparison and import plan
2026-06-01 20:50:26 +03:00
vasilito a52632f69d fix: bits_pthread cbindgen needs stddef.h for size_t type
The generated bits/pthread.h uses size_t but had no includes.
Also added openat cache vars to m4 recipe for gnulib cross-compilation.
2026-06-01 17:00:53 +03:00
vasilito 24584eb3c6 fix: remove garbled lines in AMD hotplug IRQ handler
Lines 649-651 had VramManager and info!() calls that don't belong
in handle_irq(). These were likely from a bad merge. The variables
fb_phys and fb_size are local to new() and don't exist in handle_irq().
2026-05-31 23:12:56 +03:00
vasilito 934ff65e2b base-initfs: add pcid-spawner binary and pcid storage config
Add pcid-spawner to initfs binaries for early boot driver spawning.
Add pcid.d/00-storage.toml with initfs-path driver commands.
pcid-spawner uses the channel protocol which works; driver-manager
hangs on pcid config handle reads.
2026-05-31 19:22:58 +03:00
vasilito 3431bbfeb2 Fix duplicate atomic_t typedef conflicting with types.h 2026-05-31 05:50:29 +03:00
vasilito ad85d9bf0c fix: daemon scheme_root/create_this_scheme_fd error conversion
Fix 4 E0277 errors in daemon/src/lib.rs where scheme_root()
and create_this_scheme_fd() return syscall::error::Error but
the function returns syscall::Error. Add .map_err() conversions.

redox-driver-sys errors (6 remaining E0308/E0061 in dma.rs/io.rs)
are pre-existing API mismatches between libredox and redox_syscall
crate versions — not addressed here.
2026-05-30 08:00:29 +03:00
vasilito 10aa80bb0b chore: AI slop cleanup — remove broken symlinks, .rej/.orig files, empty dirs, stale patch refs 2026-05-30 04:47:12 +03:00
vasilito df5b6d1c6f migrate: finalize source ownership — mini ISO builds and boots
- Restore all fork repos from properly pre-patched 0.1.0 release archives
  (kernel, relibc, base, bootloader, userutils — all now have full git history)
- Fix installer Cargo.toml: comment out broken ext4-blockdev path dependency
- Add initfs-storage.toml to base fork for base-initfs build
- Remove stale Phase 6 from BUILD-SYSTEM-HARDENING-PLAN.md
- Delete 282 archived .patch files (non-fork components, unused)
- Delete local/patches/ directory (empty, historical)
- Remove local/AGENTS.md stale references
- Fix pkgar signing keys: regenerate all 77 package signatures

Build verification (redbear-mini):
- kernel: BUILDS from local/sources/kernel
- relibc: BUILDS from local/sources/relibc
- base: BUILDS from local/sources/base
- bootloader: BUILDS from local/sources/bootloader
- userutils: BUILDS from local/sources/userutils
- installer: BUILDS from local/sources/installer
- redoxfs: BUILDS from local/sources/redoxfs
- 77 packages total in repo
- harddrive.img: 1.5GB, boots in QEMU (Stage 1 → Stage 2 confirmed)
- Final harddrive.img verified with SeaBIOS → iPXE → boot chain
2026-05-30 00:38:25 +03:00
vasilito 38a5d2018e migrate: apply remaining patches to source forks, clean up
Apply all active patches from archived patches to source forks:
- kernel: 33 individual patches + consolidated mega-patch (34 total commits)
- relibc: 33 individual patches (34 total commits)
- base: 26 individual patches + redox.patch mega-patch (28 total commits)
- bootloader: 4 patches (5 total commits)
- installer: 1 patch (2 total commits)
- redoxfs: 2 patches (3 total commits)
- userutils: 2 patches (3 total commits)

Cleanup:
- Remove all .rej and .orig files from fork repos
- Delete all absorbed/ subdirectories (71 already-folded patches)
- Delete stale .patch files from recipe directories (~130 upstream port patches)
- 282 remaining .patch files are for non-fork components (archived, not in build system)
2026-05-29 22:48:03 +03:00
vasilito 89d1306c8d migrate: complete source ownership transition
- Create source symlinks for all 7 core components (kernel, relibc, base,
  bootloader, installer, redoxfs, userutils) pointing at local/sources/
- Create redoxfs and userutils fork repos from frozen 0.1.0 archives
- Fix relibc-tests recipes: replace patch commands with direct fork build
- Archive all 417 patch files to local/archived/patches-2026-06-migration/
- Full AGENTS.md rewrite: remove all 31 remaining stale patch references,
  update DURABILITY POLICY to describe git commit workflow, update WHERE TO
  LOOK table, fix build flow description, replace Recipe Patch Wiring section
  with Recipe Source Configuration
- Zero active patches = [...] arrays remain in any recipe.toml file
- All 13 remaining grep hits for 'patches' are TODO comments in WIP recipes
2026-05-29 22:42:42 +03:00
vasilito a23012cee0 migrate: remove patch system, adopt direct source ownership
BREAKING CHANGE: The patch-based build system is removed.
All Red Bear source now lives in local/sources/<component>/ as git repos.

Changes:
- src/recipe.rs: remove patches field from SourceRecipe::Git/Tar, add Local variant
- src/cook/fetch.rs: delete fetch_apply_patches, validate_patches, normalize_patch,
  fetch_compute_patches_hash, fetch_write_patches_state, fetch_patches_state_stale,
  fetch_validate_patch_symlinks, fetch_is_patches_newer. Simplify fetch and
  fetch_offline. Remove recipe_has_patches. Add Local source handler.
- src/bin/repo.rs: remove validate-patches command and handle_validate_patches
- 70 recipe.toml files: remove patches arrays, convert core recipes to Local source
- 272 .patch symlinks deleted from recipe directories
- integrate-redbear.sh: replace patch symlink logic with source fork validation
- Makefile: replace validate-patches with validate-sources target
- AGENTS.md: remove 369 lines of patch documentation, add source ownership model
- local/docs/PATCH-GOVERNANCE.md: deleted (replaced by SOURCE-OWNERSHIP-MODEL.md)
- local/docs/SOURCE-OWNERSHIP-MODEL.md: new canonical reference
- local/sources/: Red Bear fork repos created (kernel, relibc, base, bootloader,
  installer) from frozen 0.1.0 pre-patched archives
- .gitignore: exclude local/sources/ (separate git repos)
- create-forks.sh: new script for initializing fork repos

Build: cargo check passes (5 warnings, 0 errors).
Developer workflow is now: edit local/sources/ → repo cook → test. No patches.
2026-05-29 22:32:36 +03:00
vasilito 520e92cad8 chore: checkpoint before 0.2.3 build system migration 2026-05-29 21:53:11 +03:00
vasilito 7cd5bfbb83 fix: enable redox-rt proc feature in userutils to fix login crash
userutils compiled redox-rt with default-features=false, disabling the proc feature. This caused login's fork to not pass proc fd to child shell, triggering assertion failed: info.has_proc_fd in redox-rt. P8 patch enables features=['proc']. Verified: zero panics on boot, login works for user/root.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-29 21:49:47 +03:00
vasilito 5987fffde7 fix: P12 init_debug import error in base init
The init_debug macro was used without importing it, causing a compile error. P12 patch adds the missing import. Wired into base recipe.toml patches list.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-05-29 21:49:07 +03:00
vasilito daf131d435 P7 login diagnostics, P11 init noise reduction, config layering fix 2026-05-29 19:13:16 +03:00
vasilito ce9ff8aebd feat: Phase 2 - kernel capability bitmask (uid==0 -> has_cap())
Replace all 9 kernel uid==0 privilege checks with a capability bitmask
model. Adds caps:u64 field to Context and CallerCtx, with CAP_ALL for
root processes. Zero behavioral change - uid==0 still gets all caps.

New module: src/scheme/caps.rs with 10 capability constants.
9 check sites converted: acpi, irq, memory, debug, serio, sys (msr+write),
scheme registration, and fchown.

Patch: local/patches/kernel/P27-capability-bitmask.patch
2026-05-29 10:25:09 +03:00
vasilito bb3ae6e63f feat: Phase 1 - Plan 9 namespace privilege drop + branding
- login.rs: drop privileges via setresugid after authentication
- login.rs: add namespace isolation to password auth path (was missing)
- login.rs: add drm, input schemes to DEFAULT_SCHEMES
- sudo service: rename 00_sudo -> 12_sudo, type daemon (no boot block)
- Branded login screen with figlet RedBear OS v0.2.2 'Liliya'
- Root user kept but not advertised on login screen
- P6-login-privilege-drop.patch generated and wired

Implements Phase 1 of Plan 9 namespace privilege model:
login creates restricted namespace (mkns/setns) then drops
uid/gid to authenticated user before spawning shell.
2026-05-29 09:54:28 +03:00
vasilito 9db9c3bdc9 feat: ISO size reduction, user account, SDDM, PAM, VirtIO fixes, KDE/Qt patches
- Trim redbear-firmware from 1816MB to 143MB (GPU+WiFi only)
- Reduce filesystem_size from 8192 to 2048 MB
- Add unprivileged user account (uid=1000, sudo group)
- Add SDDM display manager recipe with Wayland-only patches
- Add pam-redbear PAM module for authentication
- Fix VirtIO queue timeout (SeqCst fence, remove permanent failure)
- KDE/KWin build fixes (libinput, wayland socket, ramfile, tabletmode)
- Qt6 build fixes (platformdefs, socket engine, Wayland integration)
- KF6 CMake fixes (attica, kcmutils, kcolorscheme, kcompletion, etc.)
- libxml2 build fix, libxkbcommon recipe fix
- Remove gcc-native/binutils-native from desktop ISO
2026-05-29 09:00:55 +03:00
vasilito 845ae99f9d fix graphical boot: DRM scheme detection, ConsoleKit bypass, boot chain deps
Three fixes for the KWin DRM device discovery failure:

1. drm_scheme_ready(): replace head -c 1 with exec 3< open test.
   Reading from a DRM scheme fd blocks because the scheme expects
   ioctl-style request/response, not streaming reads. Use open()
   success as the scheme availability probe instead.

2. ConsoleKitSession::create(): return nullptr immediately.
   The D-Bus isServiceRegistered() call can block indefinitely when
   the bus daemon doesn't fully implement org.freedesktop.DBus.
   With both LogindSession and ConsoleKitSession returning nullptr,
   Session::create() falls through to NoopSession which uses plain
   open() for DRM device access.

3. Boot chain deps: redox-drm depends on driver-manager,
   greeter depends on evdevd (keyboard/mouse ready before login).

Also includes: KF6 CMake build fixes, Qt6 platform patches,
libdrm Redox ioctl shim, and wayland.toml scheme check fix.
2026-05-28 23:19:49 +03:00
vasilito cb50169517 P0-P3 baseline for P4 2026-05-28 15:49:45 +03:00
vasilito 328d1abbcd rate-limit scheme error spam to prevent serial log flood 2026-05-28 00:36:17 +03:00
vasilito 3583ee0186 Fix logd panic: hard-depend on randd (P58)
logd was starting before randd, causing a panic when the Rust std
library tried to get random data from /scheme/rand which didn't
exist yet. This cascaded into fbbootlogd failing (no log scheme)
and vesad timing out, blocking the console/getty chain entirely.

P58 adds:
- 00_logd.service: requires = ["00_randd.service"]
- 20_fbbootlogd.service: requires = ["00_logd.service"]

Result: mini ISO boots to RedBear Login: prompt with working
console, D-Bus, driver-manager, and all boot stage markers.
2026-05-27 07:53:32 +03:00
vasilito b9de373b31 Merge bootprocess branch overlay into 0.2.0
Restore all bootprocess branch files that were overwritten by later 0.2.0
commits. This overlay brings back the complete boot infrastructure:

- Configs: redbear-full, redbear-mini, redbear-device-services, driver .d files
- Kernel: IRQ affinity, x2APIC, C-states, NUMA (SLIT/SRAT), MCS locks, cpuidle
- Base patches: P0-P55 + new P6 (lived block_size=512) + P57 (fbbootlogd graceful init)
- Driver infra: driver-manager, udev-shim, thermald, cpufreqd, iommu, redox-driver-sys/core
- GPU: redox-drm with improved connector handling
- System: redbear-info, redbear-hwutils phase-timer-check
- Build system: fetch.rs improvements, build-iso.sh, run_full.sh
- Kernel source: new ACPI (SLIT, SRAT), cpuidle, cstate, MCS lock modules

83 files changed, +3966/-1248 lines
2026-05-27 06:47:23 +03:00
vasilito af05babbb2 WIP: recipe patches, expat/libxml2/libmpfr autogen, kf6/qt cmake fixes, new relibc patches 2026-05-26 06:56:30 +03:00
vasilito 899dcb810c Merge master into 0.2.0 - 688 commits merged, restore 0.2.0 local dev recipes 2026-05-21 23:12:35 +03:00
vasilito 0c8be761eb Merge master into 0.2.0 (688 commits, theirs pref for conflicts) 2026-05-21 21:37:43 +03:00
vasilito 5715f86dc6 Add P55: JSON structured log format option to logd
When LOGD_JSON=1 is set in the environment, logd formats all log
lines as JSON objects with timestamp, source, and message fields.
Also fixes indentation issues in P51 logd rotation patch.
2026-05-21 00:48:13 +03:00
vasilito 4d914a0321 Add P46b fix for ac97d mutable pcid_handle borrow
P46 migrated ac97d to pci_allocate_interrupt_vector but missed
adding  to the pcid_handle parameter. This caused build
failure: cannot borrow pcid_handle as mutable.
2026-05-20 23:34:31 +03:00
vasilito 95bbc56f97 base: Fix P48 pattern and add P54 thermal module
- P48: Fix AmlSerdeValue::Package pattern (struct variant, not tuple)
- P54: Add missing thermal.rs module referenced by P44
  ThermalState with zone discovery via ACPI _TMP evaluation
2026-05-20 22:53:08 +03:00
vasilito 0046c76e43 base: Add e1000d interrupt throttling rate (ITR) coalescing (P53)
Re-implements work that was lost due to ephemeral source/ subdirectory.
ITR dynamically adjusts interrupt coalescing based on packet rate.

- Add ITR register (0xC4) and set_itr() to device.rs
- Add itr.rs tracker with hysteresis-based rate adaptation
- Wire tracker into IRQ handler in main.rs
- Document in AGENTS.md: source/ is ALWAYS rewritten
2026-05-20 22:15:03 +03:00
vasilito b2eaa8d96f base: Add ACPI C-state discovery and thermal-based C-state policy (P52)
- drivers/acpid/src/cstate.rs: Evaluate _CST per processor, parse
  Package-of-Packages into CStateInfo structs
- AcpiContext: add cstate_state field with refresh, add processor_names()
  to scan _PR namespace
- acpid scheme: expose /scheme/acpi/cstates/<proc> read handles
- thermald: read /scheme/sys/cstate, set /scheme/sys/cstate_policy
  to restrict to C1 when temp exceeds WARNING_TEMP

Works with kernel P25 cpuidle deep C-states.
2026-05-20 20:47:37 +03:00
vasilito 5f0c54ebfe baseline 2026-05-20 19:58:12 +03:00
vasilito e5b82a644a coretempd: Add AMD Zen temperature sensor support
Detect CPU vendor by probing MSRs (Intel IA32_THERM_STATUS vs AMD
TCTL MSR C0010293). Support both Intel Tjmax-based and AMD direct
temperature reading. Log detected vendor per CPU at startup.
2026-05-20 18:52:01 +03:00
vasilito 2c7de8dea6 base: Add per-service log files and size-based rotation to logd (P51)
Extend logd output thread to write logs to per-service files in
/var/log/<service>.log, with automatic size-based rotation (10 MB
threshold, 5 backup files). All logs also go to /var/log/system.log.
Backwards compatible with existing sink file descriptors.
2026-05-20 18:39:49 +03:00
vasilito fb2de33c6d base: Add structured logging rate limiter and thermald integration (P50)
Add RateLimitedLog to common::logger for per-message rate limiting with
"last message repeated N times" warnings. Add structured_log! macro for
key=value formatted logs. Update thermald to rate-limit the max-temp
summary line (30s interval) to reduce log volume.
2026-05-20 18:14:47 +03:00
vasilito 3890840001 base: Add IRQ affinity logging and CPU tracking to pcid (P49)
Track the target CPU ID in InterruptVector, and log the interrupt type
(MSI-X/MSI/Legacy) and CPU affinity at allocation time in
pci_allocate_interrupt_vector. Add log_affinity() helper for drivers
to call after setup.
2026-05-20 17:55:36 +03:00
vasilito b360748b82 base: Add ACPI fan device discovery and status exposure (P48)
Add fan.rs module to acpid that discovers FAN* devices under \_TZ,
evaluates _FST for current speed level and RPM, and exposes them via
/scheme/acpi/fan/<name>/status. Update thermald to read and log fan
status alongside temperature sensors.
2026-05-20 17:47:39 +03:00
vasilito ad2e85079d base: Update thermald to use P44 thermal zones and coretempd (P47)
Replace the old hardcoded /scheme/acpi/thermal_zone/{n} paths with
proper discovery of /scheme/acpi/thermal/ zones and /scheme/coretemp/
CPU temperatures. Logs per-zone and per-CPU temps with max tracking.
2026-05-20 17:23:19 +03:00
vasilito 1a0a684765 base: Migrate ahcid and ac97d to MSI-X interrupts (P46)
Switch storage and audio drivers from legacy INTx to
pci_allocate_interrupt_vector which auto-prefers MSI-X > MSI > Legacy.
2026-05-20 17:12:51 +03:00
vasilito e178e0fd86 base: Migrate e1000d and ixgbed to MSI-X interrupts (P45)
Switch network drivers from legacy INTx to pci_allocate_interrupt_vector
which auto-prefers MSI-X > MSI > Legacy. rtl8139d and rtl8168d already
used this helper; e1000d and ixgbed were the remaining legacy-only NIC
drivers.
2026-05-20 17:03:05 +03:00
vasilito bb4f757ba0 kernel: Add MONITOR/MWAIT C1 idle support (P24)
Implement CPU power-saving idle loop using x86 MONITOR/MWAIT:
- Add monitor(), mwait(), enable_and_mwait() to interrupt module
- Detect MWAIT availability via CPUID at boot
- Use MONITOR+MWAIT instead of STI+HLT when supported
- Expose /scheme/sys/cstate_policy for userspace control
- Add RdWr Kind variant to sys scheme for read+write files
2026-05-20 16:49:48 +03:00