f315a9be3b
Phase 5 — Laptop ACPI events (LG Gram 16Z90TP compatibility plan):
- Vendor acpi-rs crate (rev 90cbe88) into base fork with a real
Opcode::Notify executor; upstream panicked on every Notify opcode,
which is the backbone of ACPI event flow on real laptop firmware.
Handler::handle_notify hook added; acpid + amlserde pointed at the
path dep so every consumer sees the same fork.
- gpe.rs: FADT-driven GPE block register map (status half + enable
half), write-1-to-clear status bits, read-modify-write enable
preserving every other GPE's firmware state. PM1 fixed-event bits
(PWRBTN/SLPBTN/RTC) per ACPI 6.4 §4.8.3.1.
- power_events.rs: init builds the GPE map, discovers the EC via ECDT
(ACPI 6.4 §5.2.16) with a _HID=PNP0C09 probe fallback over conven-
tional paths, enables the EC GPE + PM1 fixed events, discovers lid
and ACPI 4.0 fan devices. handle_sci dispatches PM1 → EC query loop
(bounded at 32) → AML notification drain, following Linux 7.1
evgpe.c / ec.c / button.c.
- notifications.rs: shared AmlNotifications queue (parking_lot::Mutex)
populated by the vendored acpi-rs handle_notify hook, drained by the
SCI handler and redbear-upower.
- ec.rs: sci_evt_set() and query() exposed on Ec for the SCI handler.
- scheme.rs: new handle kinds Lid, LidState, ButtonDir, Button,
Notifications, Fan, FanState, FanSpeed with proper dir/file
separation. Fan _FST on read, _FSL on write (percent clamped 0-100).
- main.rs: subscribes /scheme/irq/{sci_irq} (default 9) on the event
queue, dispatches SCI events through handle_sci. PowerButton incre-
ments edge counter and triggers the shutdown path; SleepButton incre-
ments counter and calls enter_s2idle.
- acpi.rs: AcpiContext gained gpe, ec_device, lid_device, lid_state,
power_button_events, sleep_button_events, fan_devices fields (all
RwLock-guarded). evaluate_acpi_method and enter_s2idle changed from
&mut self to &self (AML mutation goes through RwLock inner state).
- aml_physmem.rs: handle_notify impl pushes onto the shared queue.
Phase 4.4 — HID report descriptor parser (i2c-hidd):
- report_desc.rs: HID 1.11 §6.2.2 descriptor parser + decoder. Global-
state stack (Push/Pop), usage-min/max expansion, sign-extended
fields, contact reconstruction (id, tip, x, y). 3 unit tests.
- input.rs: forward_layout_report dispatches descriptor-driven reports
through forward_decoded: first touching contact → absolute
MouseEvent; two simultaneous contacts → vertical ScrollEvent (two-
finger scroll); buttons → ButtonEvent; keyboard-page reports fall
back to the existing boot-protocol path.
- hid.rs: stream_input_reports parses the descriptor once and uses
forward_layout_report when layouts are non-empty, otherwise keeps the
boot-protocol summary path.
Reference: Linux 7.1 drivers/acpi/{evgpeblk.c,evgpe.c,ec.c,button.c}
and drivers/hid/hid-core.c.
All affected crates compile for x86_64-unknown-redox; i2c-hidd 3/3
unit tests pass on host; acpid host-side tests still can't link
(pre-existing libredox limitation — must run via redoxer).
159 lines
4.4 KiB
TOML
159 lines
4.4 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"audiod",
|
|
"config",
|
|
"daemon",
|
|
"dhcpd",
|
|
"dhcpv6d",
|
|
"netdiag",
|
|
"init",
|
|
"initfs",
|
|
"initfs/tools",
|
|
"ipcd",
|
|
"logd",
|
|
"netstack",
|
|
"ptyd",
|
|
"ramfs",
|
|
"redbear-ufw",
|
|
"randd",
|
|
"scheme-utils",
|
|
"zerod",
|
|
|
|
"drivers/common",
|
|
"drivers/executor",
|
|
|
|
"drivers/acpid",
|
|
"drivers/hwd",
|
|
"drivers/pcid",
|
|
"drivers/pcid-spawner",
|
|
"drivers/rtcd",
|
|
"drivers/vboxd",
|
|
"drivers/inputd",
|
|
"drivers/virtio-core",
|
|
|
|
"drivers/audio/ac97d",
|
|
"drivers/audio/ihdad",
|
|
"drivers/audio/sb16d",
|
|
|
|
"drivers/graphics/console-draw",
|
|
"drivers/graphics/fbbootlogd",
|
|
"drivers/graphics/driver-graphics",
|
|
"drivers/graphics/fbcond",
|
|
"drivers/graphics/graphics-ipc",
|
|
"drivers/graphics/ihdgd",
|
|
"drivers/graphics/vesad",
|
|
"drivers/graphics/virtio-gpud",
|
|
|
|
"drivers/input/ps2d",
|
|
"drivers/input/usbhidd",
|
|
"drivers/thermald",
|
|
|
|
"drivers/net/driver-network",
|
|
"drivers/net/e1000d",
|
|
"drivers/net/ixgbed",
|
|
"drivers/net/rtl8139d",
|
|
"drivers/net/rtl8168d",
|
|
"drivers/net/virtio-netd",
|
|
|
|
"drivers/redoxerd",
|
|
|
|
"drivers/storage/ahcid",
|
|
"drivers/storage/bcm2835-sdhcid",
|
|
"drivers/storage/driver-block",
|
|
"drivers/storage/ided",
|
|
"drivers/storage/lived", # TODO: not really a driver...
|
|
"drivers/storage/nvmed",
|
|
"drivers/storage/usbscsid",
|
|
"drivers/storage/virtio-blkd",
|
|
|
|
"drivers/usb/xhcid",
|
|
"drivers/usb/usbctl",
|
|
"drivers/usb/usbhubd",
|
|
"drivers/usb/ucsid",
|
|
|
|
"drivers/acpi-rs",
|
|
"drivers/i2c/i2c-interface",
|
|
"drivers/i2c/i2cd",
|
|
"drivers/i2c/amd-mp2-i2cd",
|
|
"drivers/i2c/designware",
|
|
"drivers/i2c/dw-acpi-i2cd",
|
|
"drivers/i2c/intel-lpss-i2cd",
|
|
|
|
"drivers/gpio/gpiod",
|
|
"drivers/gpio/intel-gpiod",
|
|
"drivers/gpio/i2c-gpio-expanderd",
|
|
|
|
"drivers/input/i2c-hidd",
|
|
"drivers/input/intel-thc-hidd",
|
|
|
|
"drivers/acpi-resource",
|
|
]
|
|
|
|
# Bootstrap needs it's own profile configuration
|
|
exclude = ["bootstrap"]
|
|
|
|
# Low-level Redox OS crates should be kept in sync using workspace dependencies
|
|
# Remember to also update bootstrap dependencies, those are not in the workspace
|
|
[workspace.dependencies]
|
|
acpi = { git = "https://gitlab.redox-os.org/redox-os/acpi.git", branch = "redox-6.x" }
|
|
anyhow = "1"
|
|
bitflags = "2"
|
|
clap = "4"
|
|
drm = "0.15.0"
|
|
drm-sys = "0.8.1"
|
|
edid = "0.3.0" #TODO: edid is abandoned, fork it and maintain?
|
|
fdt = "0.1.5"
|
|
libc = "0.2.181"
|
|
log = "0.4"
|
|
libredox = { path = "../libredox", default-features = true }
|
|
orbclient = "0.3.51"
|
|
parking_lot = { git = "https://github.com/Amanieu/parking_lot.git", rev = "0.12.3", default-features = false }
|
|
pico-args = "0.5"
|
|
plain = "0.2.3"
|
|
ransid = "0.4"
|
|
redox_event = "0.4.8"
|
|
redox-ioctl = { path = "../relibc/redox-ioctl" }
|
|
redox-log = { git = "https://gitlab.redox-os.org/redox-os/redox-log.git" }
|
|
redox-rt = { path = "../relibc/redox-rt", default-features = false }
|
|
redox-scheme = { path = "../redox-scheme" }
|
|
redox_syscall = { path = "../syscall", features = ["std"] }
|
|
redox_termios = "0.1.3"
|
|
ron = "0.8.1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
slab = "0.4.9"
|
|
smallvec = "1"
|
|
spin = "0.10"
|
|
static_assertions = "1.1.0"
|
|
thiserror = "2"
|
|
toml = "1"
|
|
|
|
[workspace.lints.rust]
|
|
missing_docs = "allow" #TODO: set to deny when all public functions are documented
|
|
|
|
[workspace.lints.clippy]
|
|
missing_safety_doc = "warn" #TODO: set to deny when all safety documentation is completed
|
|
precedence = "deny"
|
|
|
|
[patch.crates-io]
|
|
# Red Bear OS Phase I: s2idle / Modern Standby support.
|
|
# The [patch.crates-io] replaces the upstream gitlab.redox-os.org
|
|
# redox_syscall (which lacks the new AcpiVerb::EnterS2Idle /
|
|
# ExitS2Idle variants) with the local fork at
|
|
# local/sources/syscall/ (a sibling directory of base/, both
|
|
# under local/sources/). The local fork is the upstream
|
|
# gitlab.redox-os.org/redox-os/syscall @ 79cb6d9 with our
|
|
# Red Bear OS P1 commit (cfa7f0c) on top. The version field
|
|
# stays at upstream 0.8.1 — periodic rebase via
|
|
# 'git fetch upstream && git rebase upstream/master' is the
|
|
# workflow when upstream changes. Hardware-agnostic — works
|
|
# for any platform with Modern Standby firmware (Dell, HP,
|
|
# Lenovo, LG Gram, etc.).
|
|
redox_syscall = { path = "../syscall" }
|
|
libredox = { path = "../libredox" }
|
|
redox-scheme = { path = "../redox-scheme" }
|
|
|
|
[patch."https://gitlab.redox-os.org/redox-os/relibc.git"]
|
|
redox-ioctl = { path = "../relibc/redox-ioctl" }
|