vgabios: Move static_functionality[] from vgatables.c to vgabios.c.
[seabios.git] / src / boot.c
index 4e86477e8b7d20959ccccc0831af48931b765b79..e26dad1ea54e7777e2f5d4f8249fb74dc3a2e8a3 100644 (file)
@@ -98,22 +98,9 @@ find_prio(const char *glob)
 
 #define FW_PCI_DOMAIN "/pci@i0cf8"
 
-static struct pci_device *
-find_pci(u16 bdf)
-{
-    struct pci_device *pci;
-    foreachpci(pci) {
-        if (pci->bdf == bdf)
-            return pci;
-    }
-    return NULL;
-}
-
 static char *
 build_pci_path(char *buf, int max, const char *devname, struct pci_device *pci)
 {
-    if (!pci)
-        return buf;
     // Build the string path of a bdf - for example: /pci@i0cf8/isa@1,2
     char *p = buf;
     if (pci->parent) {
@@ -204,9 +191,9 @@ int bootprio_find_usb(struct pci_device *pci, u64 path)
     for (i=56; i>0; i-=8) {
         int port = (path >> i) & 0xff;
         if (port != 0xff)
-            p += snprintf(p, desc+sizeof(desc)-p, "/hub@%x", port);
+            p += snprintf(p, desc+sizeof(desc)-p, "/hub@%x", port+1);
     }
-    snprintf(p, desc+sizeof(desc)-p, "/*@%x", (u32)(path & 0xff));
+    snprintf(p, desc+sizeof(desc)-p, "/*@%x", (u32)(path & 0xff)+1);
     return find_prio(desc);
 }
 
@@ -339,7 +326,7 @@ boot_add_bev(u16 seg, u16 bev, u16 desc, int prio)
 void
 boot_add_bcv(u16 seg, u16 ip, u16 desc, int prio)
 {
-    bootentry_add(IPL_TYPE_BCV, defPrio(prio, DEFAULT_PRIO)
+    bootentry_add(IPL_TYPE_BCV, defPrio(prio, DefaultHDPrio)
                   , SEGOFF(seg, ip).segoff
                   , desc ? MAKE_FLATPTR(seg, desc) : "Legacy option rom");
 }