#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) {
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);
}
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");
}