iommu

package
v0.0.0-...-ca8a7fe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenDeviceLine

func GenDeviceLine(group int, device *pci.Device, pArg *params.Params) string

Generates a line with the Device info and formats it properly to be similar to the bash version of ls-iommu

func GenKernelInfo

func GenKernelInfo(group int, device *pci.Device) string

Generates the kernel driver info for a device

func GetAllDevices

func GetAllDevices(pArg *params.Params) []string

func GetDevicesFromGroups

func GetDevicesFromGroups(groups []int, related int, pArg *params.Params) []string

Function to print everything inside a specific IOMMU group

func GetRomPath

func GetRomPath(device *pci.Device, pArg *params.Params) []string

Function to get the vbios path for a device

func MatchDEVs

func MatchDEVs(regex string, pArg *params.Params) []string

func MatchSubclass

func MatchSubclass(searchval string, pArg *params.Params) []string

func PrintOutput

func PrintOutput(out []string, pArg *params.Params)

Function to just print out a string array to STDOUT

Types

type Group

type Group struct {
	ID      int
	Devices map[string]*ghwpci.Device
}

func NewGroup

func NewGroup(id int, devices map[string]*ghwpci.Device) *Group

Creates a new Group struct

func (*Group) AddDevice

func (g *Group) AddDevice(device *ghwpci.Device)

Adds a new pci device to the Group struct

type IOMMU

type IOMMU struct {
	Groups map[int]*Group
}

func NewIOMMU

func NewIOMMU() *IOMMU

Creates an IOMMU struct-

func (*IOMMU) AddGroup

func (i *IOMMU) AddGroup(group *Group)

Adds a Group struct to the IOMMU struct

func (*IOMMU) Read

func (i *IOMMU) Read()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL