PCIAddress := struct { bus: u8, device: u8, function: u8, } find_device := fn(vendor_id: int, device_id: int, pci_address: PCIAddress): int { return 1 } scan_bus := fn(): void { } config_read32 := fn(bus: u32, device: u32, func: u32, offset: u32): u32 { // construct address param address := bus << 16 | device << 11 | func << 8 | offset & 0xFC | 0x80000000 // write address //Port::new(0xCF8).write(address); // read data //Port::new(0xCFC).read() return }