Files
danos/system/kernel/devices/device-tree.zig
T
Daniel Samson 3a155cdc7d reorg: move system/devices into system/kernel/devices
With the shared device data (device-abi, pci-class, usb-abi, usb-ids, acpi-ids,
aml) now in library/device/, what remained in system/devices/ was purely
kernel-internal: the firmware-discovery machinery and the rich pointer-based
device model (platform, device-model, acpi, device-tree, power), reached only
through the "platform" module by three kernel files. It belongs with the kernel.

Move it to system/kernel/devices/. A pure relocation: the "platform" module
name is unchanged and every cross-dir dependency is a module import, so only the
one b.path and some comments move. The top-level split is now clean —
system/kernel/ is the kernel, library/device/ the shared device libraries,
system/{drivers,services} the userspace. The runtime /system/devices concept
(the virtual device tree) is unaffected; system/kernel/devices/ is its
implementation.

Also fixes two comment refs that still pointed device-abi at its pre-Wave-1a
home (system/devices/) — it lives at library/device/model/ now.

zig build + test green; smoke, discovery, acpi-parse, acpi-ps2, acpi-report pass.
2026-07-22 21:35:30 +01:00

17 lines
783 B
Zig

//! Device-tree (Flattened Device Tree / FDT) discovery backend — stub.
//!
//! This is the second backend the platform facade dispatches to, for machines
//! that describe hardware with a device-tree blob instead of ACPI (typically
//! ARM). It is intentionally unimplemented: the bootloader has no DTB handoff
//! field yet, so this path is currently unreachable. It exists so the facade
//! already routes to a backend rather than hard-coding ACPI — wiring the FDT
//! parser in later is a local change here, not an architectural one.
const device_model = @import("device-model.zig");
/// Populate `device_tree` from a device-tree blob. Not implemented yet.
pub fn discover(device_tree: *device_model.DeviceTree) !void {
_ = device_tree;
return error.Unsupported;
}