Versions in this module Expand all Collapse all v1 v1.3.3 Jun 11, 2020 Changes in this version + var DefaultBus = &vfio_main + func CloseDiscoveredDevices(bus Bus) (err error) + func DiscoverDevices(bus Bus) (err error) + func SetDriver(v Driver, args ...interface{}) (err error) + type BaseAddressReg U32 + func (b BaseAddressReg) Addr() uint32 + func (b BaseAddressReg) IsMem() bool + func (b BaseAddressReg) String() string + func (b BaseAddressReg) Valid() bool + type Bus interface + NewDevice func() BusDevice + Validate func() error + type BusAddress struct + Bus uint8 + Domain uint16 + Fn uint8 + Slot uint8 + func (a BusAddress) String() string + type BusDevice interface + Close func() error + ConfigRw func(offset, vʹ, nBytes uint, isWrite bool) (v uint) + GetDevice func() *Device + InterruptEnable func(UseMsi bool) (err error) + MapResource func(index uint) (res uintptr, err error) + Open func() error + UnmapResource func(index uint) (err error) + type Capability U8 + const AGP + const AGP3 + const AdvancedFeatures + const CompactPCIHotSwap + const CompactPciCentralControl + const DebugPort + const HyperTransport + const MSI + const MSIX + const PCIE + const PCIHotPlugController + const PCIX + const PowerManagement + const SATA + const SSVID + const SecureDevice + const SlotIdentification + const VendorSpecific + const VitalProductData + func (i Capability) String() string + type CapabilityHeader struct + NextCapabilityHeader U8 + type Command U16 + const AddressDataStepping + const BackToBackWrite + const BusMasterEnable + const INTxEmulationDisable + const IOEnable + const MemoryEnable + const Parity + const SERR + const SpecialCycles + const VgaPaletteSnoop + const WriteInvalidate + func (c *Command) Get(d *Device) Command + func (c *Command) Set(d *Device, v Command) + type ConfigHeader struct + Bist uint8 + CacheSize uint8 + LatencyTimer uint8 + Revision U8 + Tp uint8 + func (c ConfigHeader) Type() HeaderType + type Device struct + Addr BusAddress + ID DeviceID + Resources []Resource + func (d *Device) ConfigRw(offset, vʹ, nBytes uint, isWrite bool) (v uint) + func (d *Device) DeviceID() VendorDeviceID + func (d *Device) FindCap(c Capability) (offset uint, found bool) + func (d *Device) FindExtCap(c ExtCapability) (offset uint, found bool) + func (d *Device) ForeachCap(f func(h *CapabilityHeader, offset uint) (done bool, err error)) (err error) + func (d *Device) ForeachExtCap(f func(h *ExtCapabilityHeader, offset uint) (done bool, err error)) (err error) + func (d *Device) GetCap(c Capability) (p unsafe.Pointer) + func (d *Device) GetConfig() *ConfigHeader + func (d *Device) GetDeviceConfig() *DeviceConfig + func (d *Device) GetExtCap(c ExtCapability) (p unsafe.Pointer) + func (d *Device) MapResource(bar uint) (res uintptr, err error) + func (d *Device) ReadConfigUint16(o uint) (v uint16) + func (d *Device) ReadConfigUint32(o uint) (v uint32) + func (d *Device) ReadConfigUint8(o uint) (v uint8) + func (d *Device) ReadRawConfigUint16(o uint) (v uint16) + func (d *Device) ReadRawConfigUint32(o uint) (v uint32) + func (d *Device) ReadRawConfigUint8(o uint) (v uint8) + func (d *Device) SetMaster(enable bool) + func (d *Device) String() string + func (d *Device) SysfsOpenFile(format string, mode int, args ...interface{}) (f *os.File, err error) + func (d *Device) SysfsPath(format string, args ...interface{}) (path string) + func (d *Device) SysfsReadHexFile(format string, mode int, args ...interface{}) (v uint, err error) + func (d *Device) UnmapResource(bar uint) (err error) + func (d *Device) VendorID() VendorID + func (d *Device) WriteConfigUint16(o uint, value uint16) + func (d *Device) WriteConfigUint32(o uint, value uint32) + func (d *Device) WriteConfigUint8(o uint, value uint8) + func (d *Device) WriteRawConfigUint16(o uint, value uint16) + func (d *Device) WriteRawConfigUint32(o uint, value uint32) + func (d *Device) WriteRawConfigUint8(o uint, value uint8) + type DeviceClass uint16 + const Bridge_CARDBUS + const Bridge_EISA + const Bridge_Host + const Bridge_ISA + const Bridge_MC + const Bridge_NUBUS + const Bridge_Other + const Bridge_PCI + const Bridge_PCMCIA + const Bridge_RACEWAY + const Communication_Modem + const Communication_Multi_Serial + const Communication_Other + const Communication_Parallel + const Communication_Serial + const Crypt_Network + const Crypt_Other + const Crypt_entertainment + const Display_3D + const Display_Other + const Display_VGA + const Display_XGA + const Docking_GENERIC + const Docking_Other + const Input_GAMEPORT + const Input_Keyboard + const Input_Mouse + const Input_Other + const Input_Pen + const Input_Scanner + const Intelligent_I2O + const Memory_Flash + const Memory_Other + const Memory_RAM + const Multimedia_Audio + const Multimedia_Audio_Device + const Multimedia_Other + const Multimedia_Phone + const Multimedia_Video + const Network_ATM + const Network_Ethernet + const Network_FDDI + const Network_Other + const Network_Token_Ring + const Processor_386 + const Processor_486 + const Processor_Alpha + const Processor_CO + const Processor_MIPS + const Processor_Pentium + const Processor_Powerpc + const SP_DPIO + const SP_Other + const Satellite_Audio + const Satellite_Data + const Satellite_TV + const Satellite_Voice + const Serial_Access + const Serial_Fiber + const Serial_Firewire + const Serial_SMBUS + const Serial_SSA + const Serial_USB + const Storage_Floppy + const Storage_IDE + const Storage_IPI + const Storage_Other + const Storage_RAID + const Storage_SAS + const Storage_SATA + const Storage_SCSI + const System_DMA + const System_Other + const System_PCI_Hotplug + const System_PIC + const System_RTC + const System_SDHCI + const System_Timer + const Undefined + const Undefined_VGA + const Wireless_RF_Controller + func (i DeviceClass) String() string + type DeviceConfig struct + BaseAddressRegs [6]BaseAddressReg + CapabilityOffset U8 + CardBusCIS U32 + InterruptLine U8 + InterruptPin U8 + MaxLatency U8 + MinGrant U8 + RomAddress U32 + SubID DeviceID + type DeviceID struct + Device VendorDeviceID + Vendor VendorID + func (r *DeviceID) Get(d *Device) (i DeviceID) + type Driver interface + NewDevice func(d BusDevice) (i DriverDevice, err error) + func GetDriver(d DeviceID) Driver + type DriverDevice interface + Exit func() (err error) + Init func() (err error) + Interrupt func() + type ExtCapability U16 + const AccessControlServices + const AddressTranslationServices + const AdvancedErrorReporting + const AlternateRoutingID + const ConfigAccess + const DeviceSerialNumber + const DynamicPowerAllocation + const ExtVendorSpecific + const LatencyToleranceReporting + const MultiFunctionVC + const MultiRootIOVirtualization + const Multicast + const PageRequestInterface + const PowerBudgeting + const ProcessAddressSpaceID + const ProtocolMultiplexing + const ReservedAMD + const ResizableBAR + const RootComplexEventCollector + const RootComplexInternalLinkControl + const RootComplexLinkDeclaration + const RootComplexRB + const SecondaryPCIeCapability + const SingleRootIOVirtualization + const TPHRequester + const VirtualChannel + const VirtualChannel9 + func (i ExtCapability) String() string + type ExtCapabilityHeader struct + VersionAndNextOffset U16 + type HeaderType uint8 + const Bridge + const CardBus + const Normal + func (i HeaderType) String() string + type Resource struct + Base uint64 + Index uint32 + Mem []byte + Size uint64 + func (r Resource) String() string + type SoftwareInterface U8 + func (x SoftwareInterface) String() string + type Status U16 + type U16 hw.U16 + func (r *U16) Get(d *Device) uint16 + func (r *U16) GetRaw(d *Device) uint16 + func (r *U16) Set(d *Device, v uint16) + func (r *U16) SetRaw(d *Device, v uint16) + type U32 hw.U32 + func (r *U32) Get(d *Device) uint32 + func (r *U32) GetRaw(d *Device) uint32 + func (r *U32) Set(d *Device, v uint32) + func (r *U32) SetRaw(d *Device, v uint32) + type U8 hw.U8 + func (r *U8) Get(d *Device) uint8 + func (r *U8) GetRaw(d *Device) uint8 + func (r *U8) Set(d *Device, v uint8) + func (r *U8) SetRaw(d *Device, v uint8) + type VendorDeviceID U16 + func (d VendorDeviceID) String() string + func (r *VendorDeviceID) Get(d *Device) VendorDeviceID + type VendorID U16 + const Broadcom + const Intel + func (i VendorID) String() string + func (r *VendorID) Get(d *Device) VendorID