diff --git a/build.zig b/build.zig index 038fa16..2df21ca 100644 --- a/build.zig +++ b/build.zig @@ -280,12 +280,12 @@ pub fn build(b: *std.Build) void { // its own module like vfs-protocol — importable by user space, unlike the // kernel-internal device model it also feeds (system/devices/device-model.zig). const device_abi_module = b.addModule("device-abi", .{ - .root_source_file = b.path("system/devices/device-abi.zig"), + .root_source_file = b.path("library/device/model/device-abi.zig"), }); // PCI class-code decoding (class/subclass/prog-IF -> names). Pure reference data, // shared by kernel discovery (the device-tree dump) and any user-space PCI tool. const pci_class_module = b.addModule("pci-class", .{ - .root_source_file = b.path("system/devices/pci-class.zig"), + .root_source_file = b.path("library/device/pci/pci-class.zig"), }); // ACPI/PnP hardware-ID (_HID) names — the flat analog of pci-class for acpi_device // nodes. Also shared reference data. @@ -293,11 +293,11 @@ pub fn build(b: *std.Build) void { // same parser the kernel does (docs/discovery.md — the shared AML module). // Pure Zig, no kernel imports — one source, two builds. const aml_module = b.addModule("aml", .{ - .root_source_file = b.path("system/devices/aml/aml.zig"), + .root_source_file = b.path("library/device/acpi/aml/aml.zig"), }); const acpi_ids_module = b.addModule("acpi-ids", .{ - .root_source_file = b.path("system/devices/acpi-ids.zig"), + .root_source_file = b.path("library/device/acpi/acpi-ids.zig"), }); // The USB device-framework wire ABI (chapter-9 set-up packets, standard + @@ -305,10 +305,10 @@ pub fn build(b: *std.Build) void { // reference the xHCI bus driver, the USB class drivers, and the device // manager's identity matcher all share. Pure data, like pci-class/acpi-ids. const usb_abi_module = b.addModule("usb-abi", .{ - .root_source_file = b.path("system/devices/usb-abi.zig"), + .root_source_file = b.path("library/device/usb/usb-abi.zig"), }); const usb_ids_module = b.addModule("usb-ids", .{ - .root_source_file = b.path("system/devices/usb-ids.zig"), + .root_source_file = b.path("library/device/usb/usb-ids.zig"), }); // The USB transfer protocol: what a USB class driver says to the xHCI bus // driver to drive its device (open / control / interrupt / bulk). A protocol @@ -919,12 +919,12 @@ pub fn build(b: *std.Build) void { "system/boot-handoff.zig", "system/abi.zig", "system/initial-ramdisk.zig", // v2 path-named entries: find/basename/magic - "system/devices/device-abi.zig", - "system/devices/pci-class.zig", // class/subclass/prog-IF name decoding - "system/devices/acpi-ids.zig", // _HID name decoding - "system/devices/aml/aml.zig", // AML parse + interpret, incl. Notify dispatch (M21) - "system/devices/usb-abi.zig", // wire sizes + bit packings + set-up packet encodings - "system/devices/usb-ids.zig", // class/subclass/protocol code assignments + "library/device/model/device-abi.zig", + "library/device/pci/pci-class.zig", // class/subclass/prog-IF name decoding + "library/device/acpi/acpi-ids.zig", // _HID name decoding + "library/device/acpi/aml/aml.zig", // AML parse + interpret, incl. Notify dispatch (M21) + "library/device/usb/usb-abi.zig", // wire sizes + bit packings + set-up packet encodings + "library/device/usb/usb-ids.zig", // class/subclass/protocol code assignments "library/mmio/mmio.zig", // barriers assemble + registers round-trip "system/drivers/ps2-bus/scancode.zig", // set-2 decode + keyboard state machine "system/drivers/ps2-bus/mouse-packet.zig", // 3-byte mouse packet assembly diff --git a/system/devices/acpi-ids.zig b/library/device/acpi/acpi-ids.zig similarity index 100% rename from system/devices/acpi-ids.zig rename to library/device/acpi/acpi-ids.zig diff --git a/system/devices/aml/aml.zig b/library/device/acpi/aml/aml.zig similarity index 100% rename from system/devices/aml/aml.zig rename to library/device/acpi/aml/aml.zig diff --git a/system/devices/aml/interpreter.zig b/library/device/acpi/aml/interpreter.zig similarity index 100% rename from system/devices/aml/interpreter.zig rename to library/device/acpi/aml/interpreter.zig diff --git a/system/devices/aml/namespace.zig b/library/device/acpi/aml/namespace.zig similarity index 100% rename from system/devices/aml/namespace.zig rename to library/device/acpi/aml/namespace.zig diff --git a/system/devices/aml/opcodes.zig b/library/device/acpi/aml/opcodes.zig similarity index 100% rename from system/devices/aml/opcodes.zig rename to library/device/acpi/aml/opcodes.zig diff --git a/system/devices/aml/parser.zig b/library/device/acpi/aml/parser.zig similarity index 100% rename from system/devices/aml/parser.zig rename to library/device/acpi/aml/parser.zig diff --git a/system/devices/device-abi.zig b/library/device/model/device-abi.zig similarity index 100% rename from system/devices/device-abi.zig rename to library/device/model/device-abi.zig diff --git a/system/devices/pci-class.zig b/library/device/pci/pci-class.zig similarity index 100% rename from system/devices/pci-class.zig rename to library/device/pci/pci-class.zig diff --git a/system/devices/usb-abi.zig b/library/device/usb/usb-abi.zig similarity index 100% rename from system/devices/usb-abi.zig rename to library/device/usb/usb-abi.zig diff --git a/system/devices/usb-ids.zig b/library/device/usb/usb-ids.zig similarity index 100% rename from system/devices/usb-ids.zig rename to library/device/usb/usb-ids.zig