func pciReadConfReg(bus, dev, function, offset uint32) (value uint32) { address := pciBuildAddress(bus, dev, function, offset) C.outl(C.uint(address), PciAddrPort) value = uint32(C.inl(PciDataPort)) return value }
func pciReadConfReg(bus, dev, function, offset uint32) (value uint32) { address := 0x80000000 | bus&PciBusMask<<16 | dev&PciDevMask<<11 | function&PciFuncMask<<8 | offset&PciRegMask C.outl(C.uint(address), PciAddrPort) value = uint32(C.inl(PciDataPort)) return }