From 0628944b1560d9308ded23a46be4801e4ded6089 Mon Sep 17 00:00:00 2001 From: Daniel Samson <12231216+daniel-samson@users.noreply.github.com> Date: Mon, 13 Jul 2026 03:32:37 +0100 Subject: [PATCH] Docs: close the discovery migration (M20.3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit discovery.md records ACPI enumeration leaving the kernel; device-manager.md increment 8 marked done — enumeration now runs entirely in ring 3. --- docs/device-manager.md | 6 ++++-- docs/discovery.md | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/device-manager.md b/docs/device-manager.md index b28d998..2b50bc9 100644 --- a/docs/device-manager.md +++ b/docs/device-manager.md @@ -136,8 +136,10 @@ published exit events, signals + `runtime.process`). On top of those: the mouse and keyboard QEMU already hangs off it. 7. **App surface**: `enumerate`/`subscribe` over IPC; `device_enumerate` retreats to a manager-internal seam. -8. **Discovery migration**: pci-bus driver first, acpi service second, kernel scan - retired last. (AML-in-user-space is its own track.) +8. **Discovery migration** — DONE (M19–M20, 2026-07-13): pci-bus driver (M19) + then the acpi service (M20) moved enumeration to ring 3; the kernel seeds + only the host bridge and the acpi-tables node. See + [m19-m20-plan.md](m19-m20-plan.md). ## Settled questions (2026-07-12) diff --git a/docs/discovery.md b/docs/discovery.md index 6dad24b..94a0579 100644 --- a/docs/discovery.md +++ b/docs/discovery.md @@ -177,3 +177,17 @@ window). The per-function walk moved to the ring-3 `pci-bus` driver ECAM scan through its mmio grant, and `device_register`s what it finds, which the device manager mirrors and matches. The ACPI namespace walk follows in M20; the static tables (MADT, HPET, MCFG, FADT + `\\_S5`) stay kernel-side. + +## Update (M20.3, 2026-07-13): ACPI enumeration left the kernel too + +The kernel no longer folds the AML namespace's Device objects into the device +tree. It still parses the *static* tables (MADT for SMP, HPET for the tick, MCFG +for the host bridge, FADT) and still builds the AML namespace — but only to read +the `\\_S5` sleep type for poweroff. Device discovery is the ring-3 **acpi +service** ([device-manager.md](device-manager.md)): it claims the `acpi-tables` +node the kernel publishes (the AML blobs, a broad io_port grant, the SCI), +re-parses the same blobs with the shared AML module, evaluates `_STA`/`_CRS`, +and registers + reports each `_HID` device — the device manager matches drivers +(ps2-bus) from those reports. With M19's pci-bus driver, discovery now runs +entirely in user space; the kernel seeds only the host bridge and the +acpi-tables node.