Placeholder discovery services and the -Ddiscovery build option
system/services/acpi and system/services/fdt exist as documented placeholders (silent clean-exit mains; the headers say exactly what each becomes and why). The build's -Ddiscovery=acpi|fdt option fills the ramdisk's neutral 'discovery' slot — the device manager will spawn "discovery" by that name in M20.3 and never learn which firmware it is on (m19-m20-plan.md decision 7). x86 defaults to acpi; the aarch64 target flips the default when it lands.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
//! /system/services/fdt — the devicetree discovery service: the ARM twin of the
|
||||
//! acpi service (docs/m19-m20-plan.md decision 7). **Placeholder: not
|
||||
//! implemented.** It exists so the build's `-Ddiscovery` option has both of its
|
||||
//! values from day one; the implementation lands with the Raspberry Pi
|
||||
//! bring-up (docs/arm.md).
|
||||
//!
|
||||
//! What it becomes: the per-firmware discoverer for boots that hand over a
|
||||
//! flattened device tree instead of ACPI tables. It claims the
|
||||
//! `devicetree-blob` node the kernel publishes (the FDT the loader received),
|
||||
//! walks the tree — pure data, no bytecode, so unlike the acpi service it
|
||||
//! needs no port grant and no interpreter — and, like any bus-shaped driver:
|
||||
//! `device_register`s what it finds (containment against the blob node's
|
||||
//! recorded apertures), reports each child to the device manager
|
||||
//! (`child_added`, identity = the node's `compatible` string), and stays
|
||||
//! resident under the manager's supervision (hello, restart, the usual
|
||||
//! contract).
|
||||
//!
|
||||
//! Known prerequisite recorded in the plan: `DeviceDescriptor`'s 8-byte `hid`
|
||||
//! cannot hold an FDT `compatible` string ("brcm,bcm2835-aux-uart") — identity
|
||||
//! widens before this file grows a body.
|
||||
|
||||
const runtime = @import("runtime");
|
||||
|
||||
pub fn main() void {
|
||||
// Not implemented: exit cleanly and silently (a bare spawn by the
|
||||
// initial-ramdisk sweep must not derange other tests' markers). The
|
||||
// supervisor reads a clean exit as "meant to stop" — correct for a
|
||||
// placeholder.
|
||||
}
|
||||
|
||||
pub const panic = runtime.panic;
|
||||
comptime {
|
||||
_ = &runtime.start._start; // pull the runtime entry shim into the image
|
||||
}
|
||||
Reference in New Issue
Block a user