Commit Graph

30 Commits

Author SHA1 Message Date
Red Bear OS 28afc1fefd drivers: complete shared-IRQ re-arm sweep (audio, net, graphics)
Continuation of 92924224 — the same conditional-ack bug class found in
six more drivers: a foreign interrupt on a shared INTx line skipped the
write-back ack, leaving the kernel-masked IRQ line dead forever.

- sb16d, ac97d: ack before the not-ours continue
- rtl8139d, rtl8168d, ixgbed: ack unconditionally, tick only when ours
  (the stale 'TODO: spurious interrupts' comments removed — the
  spurious-interrupt confusion was this bug)
- ihdgd: ack unconditionally, handle_events/tick only when ours

Verified: cargo check -Z build-std --target x86_64-unknown-redox for
sb16d, ac97d, rtl8139d, rtl8168d, ixgbed, ihdgd — clean, no new
warnings. nvmed audited: not affected (per-queue MSI pattern, no
conditional ack).
2026-07-20 18:48:30 +09:00
Red Bear OS 9292422458 drivers: always re-arm shared IRQ lines after interrupt delivery
Same bug class as the ahcid fix (ad40fffd): the kernel masks the IRQ
line when it delivers an interrupt and only re-arms it on the userspace
write-back (irq scheme write -> acknowledge() -> pic/ioapic_unmask).
When a driver acks only if the interrupt was its own, one foreign
interrupt on a shared INTx line leaves the line masked forever and all
later interrupts for the device are lost.

- e1000d: ack unconditionally; ICR is read-to-clear, so the ownership
  check doubles as the device-level status clear
- ihdad: ack before the not-ours continue
- vboxd: ack unconditionally; device-side ack and event handling stay
  conditional on host_events
- xhcid: ack unconditionally in the IRQ reactor; for INTx the ownership
  check already clears IMAN.IP (RW1C) and device interrupts are masked
  before re-arming, so no storm. MSI/MSI-X vectors are never shared, so
  behavior there is unchanged (every delivery is ours by construction)

Verified: cargo check -Z build-std --target x86_64-unknown-redox for
e1000d, ihdad, vboxd, xhcid — clean, no new warnings.
2026-07-20 18:44:53 +09:00
Red Bear OS 3c9dda3253 virtio-netd: log MSI-X interrupt delivery at info level
The driver requires MSI-X (virtio-core probe errors out without it) and
binds both virtqueues to MSIX_PRIMARY_VECTOR, but only noted the
transport in a debug log — leaving zero runtime evidence of the MSI-X
path at the default level, which is why test-msix-qemu.sh found no live
MSI-X evidence. Log the delivery method at info where it is set up.
2026-07-20 00:24:54 +09:00
Red Bear OS 0120017484 fix(net): silence benign no-network warnings; add e1000e (82574) support
- smolnetd: an empty ip_router (DHCP-managed or deliberately network-less like
  the bare target) is a valid 'no default gateway' state, not a malformed config
  -> no warning.
- router: a limited/directed IPv4 broadcast (DHCP DISCOVER to 255.255.255.255
  before any lease/route exists) legitimately has no routing-table entry; don't
  warn 'No route found' for broadcast destinations.
- e1000d: add the 82574L (0x10d3, QEMU '-device e1000e') to the E1000 match
  list; it keeps the legacy descriptor/register interface this driver uses.
  I219 is intentionally excluded (integrated MDIO PHY, different init).
2026-07-18 00:49:44 +09:00
Red Bear OS 00b799d512 absorb: 41 orphaned base patches re-applied (Phase 1.0A)
Per local/docs/PATCH-PRESERVATION-AUDIT-2026-07-12.md the base
fork was carrying only 38 of 100 patches in local/patches/base/.
The other 62 patches' content was silently missing from the fork
working tree, even though their .patch files were preserved.

This commit re-applies 41 patches that genuinely still apply
cleanly + 17 hunks that partially applied. Recovery covers:

- D-Bus initfs service wiring (P4-initfs-dbus-services)
- USB service wiring (P4-initfs-usb-drm-services)
- netcfg/dhcp/dhcpv6 driver fixes
- acpid shutdown/PM/quirk fixes
- inputd/ps2d hard-fail logging
- pcid driver interface refinements (server cmd channel)
- virtio-core for VirtualBox support
- ixgbed/rtl8139/rtl8168 net drivers
- ahcid NCQ + per-function interrupt coalescing
- logd persistent logging
- bootstrap procmgr race-condition fixes
- cargo version pin to +rb0.3.0 (synchronized release branch)

58 files changed, +1444/-318 lines.

Untracked mnt/ tree and *.orig / *.rej files cleaned up after
patch application (leftover from absolute-path patch headers).
2026-07-12 01:29:08 +03:00
Red Bear OS bd595851e2 base: apply Red Bear patches on latest upstream/main
251 files: init, acpid, ipcd, netcfg, ihdgd, virtio-gpud, scheme-utils,
inputd, block driver, ptyd, ramfs, randd, initfs bootstrap, path deps,
version +rb0.3.1, author attribution
2026-07-11 11:39:24 +03:00
bjorn3 d528fb73b4 drivers: Use map_bar instead of physmap where possible
Physmap requires root, while map_bar in the future could be run as
unprivileged process given a pcid handle for the target device.
2026-05-09 20:12:41 +02:00
bjorn3 009ffe1dbc Fix compilation 2026-04-27 22:09:53 +02:00
Migue Magic 180bfe15a7 Fix typos across 3 drivers 2026-04-27 12:27:11 -06:00
bjorn3 daf726c30d scheme-utils: Have FpathWriter handle writing the scheme name 2026-04-19 19:07:41 +02:00
bjorn3 64d23e9e05 scheme-utils: Introduce FpathWriter helper 2026-04-19 19:07:41 +02:00
bjorn3 317a0178b6 Introduce scheme-utils crate and HandleMap type
HandleMap deduplicates the id assignment for handles and unlike most
existing implementations handles overflow just fine.
2026-04-13 22:19:07 +02:00
auronandace 557a3d1954 consolidate several dependencies into the workspace 2026-03-22 15:11:33 +00:00
auronandace 7be03d1815 add bitflags to the workspace Cargo.toml 2026-03-20 08:46:28 +00:00
Ribbon 90ea974ce0 Add missing Cargo package description and update drivers README 2026-03-16 10:39:15 -06:00
bjorn3 9795abb0ea Fix a bunch of warnings 2026-03-11 22:05:44 +01:00
Ibuki Omatsu 2738f69224 feat: Implement std_fs_call handling to initfs, ramfs, acpi and xhci 2026-02-28 08:15:16 -07:00
auronandace 4e77bb0f96 add precedence lint to drivers 2026-02-20 15:00:43 +00:00
bjorn3 ea96a9a697 Remove alxd
It hasn't been in a functional state for years.
2026-01-25 20:56:11 +01:00
bjorn3 fc1c391340 Move common::init call into pcid_interface::pci_daemon 2026-01-25 20:08:49 +01:00
Ibuki Omatsu 334928f151 feat: Introduce userspace namespace manager and adapt all schemes. 2026-01-20 20:56:58 -07:00
Jeremy Soller f740b61774 Use workspace dependencies for many common crates 2026-01-20 10:12:08 -07:00
Ibuki Omatsu e405b11d43 fix: Write responses after polling requests in audio and net drivers. 2025-12-24 06:33:59 -07:00
Ibuki Omatsu 3681e1b74a refactor: Replace unlink and rmdir with unlinkat in ramfs. Update redox-scheme and redox-rt for bootstrap. 2025-12-17 18:46:05 -07:00
bjorn3 3abe41d258 drivers/pcid: Add pci_daemon function
This handles daemonization and getting the PciFunctionHandle.
2025-12-04 11:44:29 +01:00
bjorn3 f06923b201 Standardize main function of all daemons 2025-12-04 11:44:29 +01:00
bjorn3 f1057b6750 daemon: Abort on errors
All users did this anyway. And handling it inside the daemon crate
allows avoiding a panic of the parent process when the child process
panicked.
2025-12-03 21:55:47 +01:00
bjorn3 54d81e7423 Merge redox-daemon into this repo 2025-12-03 21:07:13 +01:00
bjorn3 5250df46dc Fix a couple of warnings 2025-11-30 09:07:40 +01:00
bjorn3 07a2b97f08 Add 'drivers/' from commit '20ffe4d7f4a85b7cc1f59495d7e6e355fed4cb06'
git-subtree-dir: drivers
git-subtree-mainline: e76ecea4ce
git-subtree-split: 20ffe4d7f4
2025-11-29 19:04:04 +01:00