Commit Graph

26 Commits

Author SHA1 Message Date
Red Bear OS 3fe7b12434 fix: add try_map_bar, try_pci_allocate_interrupt_vector, fix try_mem return type
- try_mem now returns Result (matching caller expectations)
- try_map_bar: non-panicking BAR mapping on PciFunctionHandle
- try_pci_allocate_interrupt_vector: non-panicking IRQ allocation
- virtio-core: reverted .ok_or() back to .map_err() for Result type
2026-07-12 02:48:16 +03:00
Red Bear OS 4932cb4d62 fix: add try_port() to PciBar and try_irq_handle() to LegacyInterruptLine
Non-panicking variants needed by ac97d, vboxd, and other drivers that
prefer error handling over panics.
2026-07-12 02:39:59 +03:00
Red Bear OS bf9989b7c0 fix: add try_mem() to PciBar, fix virtio-core caller
Added try_mem() returning Option<(usize, usize)> for non-panicking
memory BAR access. Fixed virtio-core/probe.rs to use .ok_or() instead
of .map_err() to match the Option return type.
2026-07-12 02:34:09 +03: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 24fb66e144 Fix warnings for updated rustc
And move away from an internal feature now that there is a proper
(unstable) function for it.
2026-05-27 21:11:53 +02:00
bjorn3 e9fd66c78e drivers/pcid: Map BAR through pcid
This way PCI drivers don't need to use the privileged physmap interface,
but only need access to a pcid handle. This is not yet enough for
running drivers as unprivileged processes. Interrupts also need
privileges and we need IOMMU support in the kernel.
2026-05-09 20:53:21 +02: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 28900f7c49 scheme-utils: Introduce Blocking as counterpart to ReadinessBased for blocking schemes 2026-04-19 11:05:04 +02:00
bjorn3 6686c73d26 Implement on_close method of SchemeSync instead of using a separate method 2026-04-19 10:42:19 +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
Ibuki Omatsu 2738f69224 feat: Implement std_fs_call handling to initfs, ramfs, acpi and xhci 2026-02-28 08:15:16 -07:00
bjorn3 7f0e870b76 Update to pci_types 0.10.1
And avoid hiding channel open errors in pcid-spawner. This would have
made the location of the problem more obvious.
2026-02-07 18:02:32 +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
Wildan M d08c6cbe6f Split driver log level env 2026-01-10 06:35:06 +07:00
Jeremy Soller b1c95d31e7 ihdgd: start parsing BIOS tables 2025-12-19 08:15:06 -07:00
Jeremy Soller 0fee261866 Allow reading PCI ROM address and size 2025-12-18 12:15:23 -07:00
bjorn3 256f4fe6b8 drivers/pcid: Update to redox-scheme 0.8 2025-12-13 13:08:31 +01:00
bjorn3 1ac570fe06 Couple of minor feature gate changes 2025-12-13 12:38:22 +01: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 7aa0776abd Rustfmt 2025-12-03 22:02:20 +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 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