summaryrefslogtreecommitdiff
path: root/util/autoport/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'util/autoport/main.go')
-rw-r--r--util/autoport/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/autoport/main.go b/util/autoport/main.go
index b2334e2b62..b04539af49 100644
--- a/util/autoport/main.go
+++ b/util/autoport/main.go
@@ -32,6 +32,7 @@ type PCIDevice interface {
type InteltoolData struct {
GPIO map[uint16]uint32
RCBA map[uint16]uint32
+ IOBP map[uint32]uint32
IGD map[uint32]uint32
}
@@ -224,6 +225,12 @@ func RestorePCI16Simple(f *os.File, pcidev PCIDevData, addr uint16) {
pcidev.ConfigDump[addr])
}
+func RestoreDIRRoute(f *os.File, regname string, val uint16) {
+ fmt.Fprintf(f, " RCBA16(%s) = DIR_ROUTE(PIRQ%c, PIRQ%c, PIRQ%c, PIRQ%c);\n",
+ regname, 'A'+(val&7), 'A'+((val>>4)&7),
+ 'A'+((val>>8)&7), 'A'+((val>>12)&7))
+}
+
func RestorePCI32Simple(f *os.File, pcidev PCIDevData, addr uint16) {
fmt.Fprintf(f, " pci_write_config32(PCI_DEV(%d, 0x%02x, %d), 0x%02x, 0x%02x%02x%02x%02x);\n",
pcidev.Bus, pcidev.Dev, pcidev.Func, addr,