Files
RedBear-OS/local
Red Bear OS 5f1da52502 redbear-sessiond: port ACPI shutdown watcher to new Fd-based scheme
Phase D of the ACPI fork-sync plan (continuation).

Phase B replaced the `/scheme/kernel.acpi/kstop` filesystem file with
a single Fd-based call() interface. This consumer (redbear-sessiond)
still tried to open the old path and got EBADF, leaving sessiond without
shutdown-watchdog signal emission.

The new implementation:

- Opens `/scheme/kernel.acpi` and uses `openat("kstop", ...)` to
  get the kstop sub-handle. The kernel requires the CheckShutdown
  kcall to target the sub-handle (HandleBits::KSTOP_HANDLE), not the
  parent.
- Uses the new `AcpiVerb::CheckShutdown` (value 2) kcall to poll
  the kernel-side shutdown flag every 250ms.
- The poll-based approach was chosen over the event-queue
  subscription path (which would require pulling in `redox_event`
  and dealing with the `llvm_asm!` macro deprecation). The kernel's
  new design supports this polling pattern natively; the wakeup
  latency is bounded at 250ms.

Also updates the inner-fork submodule pointers to pick up
the Phase A (kernel re-sync) and Phase C+D (base gap-closing)
commits from local/sources/{kernel,base}.

Files:

- local/recipes/system/redbear-sessiond/source/src/acpi_watcher.rs:
  rewrote wait_for_shutdown_edge() to use the new Fd interface.

- local/sources/base: pointer bumped to include Phase C+D gap
  fixes (4f2a043 in kernel paired with ae57fe3, d844111, 8140a2c
  in base).

- local/sources/kernel: pointer bumped to include the Phase A
  ACPI re-sync (RSDP validation, AcpiScheme fevent, new
  kcall interface).

Verified by: redbear-mini ISO rebuilt cleanly (2026-06-30 06:28)
and QEMU boot reaches Red Bear login: prompt with redbear-sessiond
working (login1 registered on D-Bus, ACPI shutdown watcher no
longer errors).
2026-06-30 06:33:11 +03:00
..