summaryrefslogtreecommitdiff
path: root/util/autoport/root.go
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-07-29 05:37:38 +0100
committerLeah Rowe <leah@libreboot.org>2024-07-29 05:37:38 +0100
commitd9403a4a57f4105ddb2350b45dbbcc0eaadd1256 (patch)
treebd7ae7c3126a128e6b2682aebdc5c24efe5dc0d2 /util/autoport/root.go
parente651c39db0e298ed991f7cc62f0fe1d4c0d460e5 (diff)
remove util/autoport20240612rev320240612_branch
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/autoport/root.go')
-rw-r--r--util/autoport/root.go47
1 files changed, 0 insertions, 47 deletions
diff --git a/util/autoport/root.go b/util/autoport/root.go
deleted file mode 100644
index 7e9e8145..00000000
--- a/util/autoport/root.go
+++ /dev/null
@@ -1,47 +0,0 @@
-package main
-
-import "fmt"
-import "os"
-
-var supportedPCIDevices map[uint32]PCIDevice = map[uint32]PCIDevice{}
-var PCIMap map[PCIAddr]PCIDevData = map[PCIAddr]PCIDevData{}
-
-func ScanRoot(ctx Context) {
- for _, pciDev := range ctx.InfoSource.GetPCIList() {
- PCIMap[pciDev.PCIAddr] = pciDev
- }
- for _, pciDev := range ctx.InfoSource.GetPCIList() {
- vendevid := (uint32(pciDev.PCIDevID) << 16) | uint32(pciDev.PCIVenID)
-
- dev, ok := supportedPCIDevices[vendevid]
- if !ok {
- if pciDev.PCIAddr.Bus != 0 {
- fmt.Printf("Unknown PCI device %04x:%04x, assuming removable\n",
- pciDev.PCIVenID, pciDev.PCIDevID)
- continue
- }
- fmt.Printf("Unsupported PCI device %04x:%04x\n",
- pciDev.PCIVenID, pciDev.PCIDevID)
- dev = GenericPCI{Comment: fmt.Sprintf("Unsupported PCI device %04x:%04x",
- pciDev.PCIVenID, pciDev.PCIDevID)}
- }
- dev.Scan(ctx, pciDev)
- }
- if SouthBridge == nil {
- fmt.Println("Could not detect southbridge. Aborting!")
- os.Exit(1)
- }
- dmi := ctx.InfoSource.GetDMI()
- if !dmi.IsLaptop {
- NoEC(ctx)
- } else if dmi.Vendor == "LENOVO" {
- LenovoEC(ctx)
- } else {
- FIXMEEC(ctx)
- }
-}
-
-func RegisterPCI(VenID uint16, DevID uint16, dev PCIDevice) {
- vendevid := (uint32(DevID) << 16) | uint32(VenID)
- supportedPCIDevices[vendevid] = dev
-}