The PCI scan from ring 3: pci-bus walks the ECAM it mapped (M19.1)
The manager matches the pci_host_bridge node and spawns pci-bus with the bridge id as its assignment — hello, supervision, restart, all the M18 contract for free. The driver claims the bridge, maps the ECAM window (resource 0) through the ordinary mmio grant, and repeats the kernel's brute-force bus/device/function walk from user space. The pci-scan scenario builds its expected marker from the kernel's own function count, so the two enumerations must agree exactly — the equivalence that licenses retiring the kernel walk in M19.3.
This commit is contained in:
@@ -318,6 +318,13 @@ fn initialise(endpoint: runtime.ipc.Handle) bool {
|
||||
|
||||
var matched: usize = 0;
|
||||
for (buffer[0..count]) |descriptor| {
|
||||
if (descriptor.class == @intFromEnum(device.DeviceClass.pci_host_bridge)) {
|
||||
// The PCI bus driver: enumeration in ring 3 (M19), one instance
|
||||
// per bridge, the bridge id as its assignment.
|
||||
matched += 1;
|
||||
addDriver("pci-bus", descriptor.id, true);
|
||||
continue;
|
||||
}
|
||||
if (pciDriverFor(descriptor)) |driver_name| {
|
||||
matched += 1;
|
||||
addDriver(driver_name, descriptor.id, true);
|
||||
|
||||
Reference in New Issue
Block a user