danos/system/devices
Daniel Samson d5d15cefcb
Decode PCI/ACPI device identities and name their class codes as enums
Two related changes to make device identities legible in the boot log and in
the code that matches on them.

Logging: the pci-bus driver decodes each function's class/subclass/prog-IF
triple to human names (via the existing pci-class module), and the acpi
service appends each _HID's human name (via acpi-ids) to its report line. So
"class 0x01 (Mass Storage Controller) subclass 0x06 (Serial ATA Controller)
progif 0x01 (AHCI 1.0)" reads straight off the log when writing a driver.

Naming: a new coding standard ("Named values, not magic numbers") says a value
with meaning gets a name, prefer an enum for value sets. Applied:
- pci-class is refactored from u8-switch tables into a BaseClass enum plus
  per-class SubClass/ProgIf enums with name() methods (the usb-ids shape). The
  public className/subclassName/progIfName(u8...) API is unchanged, so the
  hardware-byte decoders (pci-bus, the kernel dump) are untouched; output is
  byte-identical.
- the device-manager builds the xHCI class triple from named parts instead of
  a bare 0x0C0330.
- the acpi service's _CRS walk names its resource-descriptor tags as
  SmallResourceType/LargeResourceType enums, and the _HID integer decode uses
  the AML module's existing *_opcode constants (now re-exported from aml.zig)
  rather than bare 0x0A/0xFF/... literals.
2026-07-13 05:05:25 +01:00
..
aml Decode PCI/ACPI device identities and name their class codes as enums 2026-07-13 05:05:25 +01:00
acpi-ids.zig Name ACPI hardware IDs instead of magic _HID strings 2026-07-11 23:23:16 +01:00
acpi.zig Delete the retired kernel AML device-building path (M20.3 cleanup) 2026-07-13 03:53:04 +01:00
device-abi.zig The AML interpreter runs in ring 3: the acpi service parses (M20.1) 2026-07-13 03:07:11 +01:00
device-model.zig zig fmt 2026-07-12 16:04:58 +01:00
device-tree.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
pci-class.zig Decode PCI/ACPI device identities and name their class codes as enums 2026-07-13 05:05:25 +01:00
platform.zig The AML interpreter runs in ring 3: the acpi service parses (M20.1) 2026-07-13 03:07:11 +01:00
power.zig Re-organize the source tree as a monorepo mirroring the FHS 2026-07-10 12:55:56 +01:00
usb-abi.zig WIP: USB 2026-07-12 22:24:47 +01:00
usb-ids.zig WIP: USB 2026-07-12 22:24:47 +01:00