Commit Graph

5 Commits

Author SHA1 Message Date
vasilito a3b8a34d9c acpid: fix extra closing brace in getdents match
In drivers/acpid/src/scheme.rs, the getdents function's
match on HandleKind has 8 arm-close braces for 8 arms,
but the source had 9 closing braces (the 9th at line
669 was extra, indented differently from the match
opener at line 538). Rust's parser couldn't match
them up:

  error: unexpected closing delimiter: '}'
  note: this delimiter might not be properly closed...
  note: ...as it matches this but it has different indentation

The extra brace was at line 669, immediately after the
HandleKind::ProcFile | DmiDir arm body, before the '_'
wildcard. Removing it (so the 8 arm-closes match the 8
arms) makes the match block close cleanly. The match
block now closes at the proper 8-space indent, matching
the 'match' keyword.

This is a pre-existing bug in the Phase II.X.W commit
'dcd70a1 acpid: Phase II.X.W S3 wake handling + kstop_enter_s3 helper'.
The brace was probably added by mistake during one of
the Phase II.X.W edits. The Phase II.X.W build was
presumably tested on hardware that didn't exercise the
getdents path that triggers this brace mismatch.

Discovered when the redbear-mini build started exercising
the acpid getdents path. Fix: delete the extra brace.
2026-07-02 11:37:53 +03:00
Red Bear OS 59f3e42af6 base: unify syscall dependency to local path source
Change [workspace.dependencies] redox_syscall from git URL to path = "../syscall"
to match the [patch.crates-io] source. This eliminates the dual-source 0.8.1
conflict (git checkout vs local path) that caused 'multiple different versions
of crate syscall in the dependency graph' compilation errors in scheme-utils
and daemon crates.

The local fork at local/sources/syscall/ is upstream 79cb6d9 (0.8.1).

parking_lot_core 0.9.12 still pulls redox_syscall 0.5.18 from crates.io
(semver prevents the path patch from satisfying ^0.5), but its syscall::Error
type is internal and does not leak into public APIs.
2026-07-01 07:08:58 +03:00
Red Bear OS ae57fe3226 base: re-sync ACPI userspace with upstream master
Phase B of the ACPI fork-sync plan (local/docs/ACPI-FORK-SYNC-STRATEGY-2026-06-30.md).
Pairs with the kernel fork-sync commit 4f2a043.

Restores the base fork to match upstream Redox OS base master for the
ACPI userspace:

- Cargo.toml (workspace):
  * Add acpi = { git = "...redox-os/acpi.git", branch = "redox-6.x" }
    workspace dependency. The jackpot51/acpi GitHub fork was
    deprecated in favor of the gitlab.redox-os.org fork that
    tracks the redox-6.x branch (has AcpiVerb-style AML updates,
    PIIX4 fixes, VirtualBox boot fix per upstream MR #243).
  * Switch redox_syscall from crates.io 0.8.1 to a git ref of
    gitlab.redox-os.org/redox-os/syscall.git, with [patch.crates-io]
    redirecting crates.io consumers to the gitlab fork. The
    crates.io 0.8.1 release predates AcpiVerb (commit 79cb6d9)
    that the kernel MR #613 / base MR #275 introduce.

- drivers/acpid/Cargo.toml: acpi.workspace = true.

- drivers/amlserde/Cargo.toml: acpi.workspace = true.

- drivers/hwd/Cargo.toml: add redox_syscall.workspace = true
  dependency. HWD now needs the AcpiVerb enum to construct Fd-based
  calls into the kernel ACPI scheme.

- drivers/amlserde/src/lib.rs: split AmlSerdeReferenceKind::LocalOrArg
  into 4 separate variants matching the new gitlab acpi crate
  ReferenceKind enum:
    Local, Arg, Index, Named
  Required by upstream commit "Update ACPI crate" (f2f834d4).

- drivers/acpid/src/main.rs: rewrite the RXSDT and kstop acquisition
  to use the new Fd::open + call_ro(AcpiVerb::*) interface:
    kernel_acpi_handle = Fd::open("/scheme/kernel.acpi", O_CLOEXEC, 0)
    rxsdt = kernel_acpi_handle.call_ro(buf, READ, &[ReadRxsdt])
    shutdown_pipe = kernel_acpi_handle.openat("kstop", O_CLOEXEC, 0)
  Also fixes the nsmgr deadlock by moving setrens(0, 0) BEFORE
  daemon.ready() (upstream commit 9dd6901d).

- drivers/hwd/src/backend/acpi.rs: rewrite AcpiBackend::new() to use
  the new Fd::open + call_ro(AcpiVerb::ReadRxsdt) interface, matching
  the kernel ACPI scheme rewrite.

Verified by: CI=1 ./local/scripts/build-redbear.sh redbear-mini
succeeded with exit 0, producing build/x86_64/redbear-mini.iso
(512 MB) at 2026-06-30 04:54.
2026-06-30 04:56:51 +03:00
Red Bear OS 011f0de1ae Bump redox_syscall to 0.8.1, libredox to 0.1.17 (upstream adaptation) 2026-06-27 10:44:52 +03:00
Red Bear OS dd08b76a39 Red Bear OS base baseline from 0.1.0 pre-patched archive 2026-06-27 09:21:43 +03:00