drivers: log devices.csv columns + friendly labels for all buses

Each bus's discovery line now prints the device's would-be /etc/devices.csv row
(bus, base, class, prog_if, vendor, device, subsystem / hid) in uppercase hex,
followed by the human-readable names — so a row for a new driver reads straight
off the boot log, for pci, usb, and acpi alike.

- pci-bus: logFunction moved to registerAndReport (where vendor/device/subsystem
  are read from config space) and reformatted to columns + names; subsystem
  prints '*' when the function has none. Read unclaimed via the bridge ECAM, so
  no per-function claim is needed.
- usb-xhci-bus, acpi: the same column framing on their existing discovery lines.
- qemu_test.py: the acpi-ps2 and acpi-report regexes updated to the new ACPI
  format (both verified passing in QEMU).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KJqSiLLchDUUCoXn5jsiwd
This commit is contained in:
2026-07-26 17:32:27 +01:00
co-authored by Claude Opus 4.8
parent 081ba1d74e
commit 48b9ed4001
4 changed files with 28 additions and 19 deletions
+3 -3
View File
@@ -628,7 +628,7 @@ CASES = [
{"name": "acpi-ps2",
"smp": 4,
"timeout": 150,
"expect": r"discovery: reported PNP0303[\s\S]*"
"expect": r"discovery: device \d+\s+bus=acpi hid=PNP0303[\s\S]*"
r"device-manager: spawned \S*ps2-bus[\s\S]*"
r"ps2-bus: keyboard driver attached",
"fail": r"DANOS-TEST-RESULT: FAIL"},
@@ -675,8 +675,8 @@ CASES = [
{"name": "acpi-report",
"smp": 4,
"timeout": 150,
"expect": r"discovery: reported PNP0303 \(device \d+, 3 resources\)[\s\S]*"
r"discovery: reported PNP0F13 \(device \d+, 1 resources\)",
"expect": r"discovery: device \d+\s+bus=acpi hid=PNP0303[^\n]*\(3 resources\)[\s\S]*"
r"discovery: device \d+\s+bus=acpi hid=PNP0F13[^\n]*\(1 resources\)",
"fail": r"DANOS-TEST-RESULT: FAIL"},
# M19.1/M19.3: the ring-3 PCI scan. pci-bus walks the ECAM through its mmio_map
# grant and registers every function it finds; the kernel's own walk retired, so