diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -289,7 +289,8 @@ #if defined(NEW_PCIB) && defined(PCI_RES_BUS) static int -first_decoded_bus(struct acpi_hpcib_softc *sc, rman_res_t *startp) +decoded_bus_range(struct acpi_hpcib_softc *sc, rman_res_t *startp, + rman_res_t *endp) { struct resource_list_entry *rle; @@ -297,6 +298,7 @@ if (rle == NULL) return (ENXIO); *startp = rle->start; + *endp = rle->end; return (0); } #endif @@ -366,7 +368,7 @@ u_int slot, func, busok; #if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct resource *bus_res; - rman_res_t start; + rman_res_t end, start; int rid; #endif int error, domain; @@ -495,7 +497,7 @@ * If we have a region of bus numbers, use the first * number for our bus. */ - if (first_decoded_bus(sc, &start) == 0) + if (decoded_bus_range(sc, &start, &end) == 0) sc->ap_bus = start; else { rid = 0; @@ -512,15 +514,21 @@ } } else { /* - * Require the bus number from _BBN to match the start of any - * decoded range. + * If there is a decoded bus range, assume the bus number is + * the first value in the range. Warn if _BBN doesn't match. */ - if (first_decoded_bus(sc, &start) == 0 && sc->ap_bus != start) { - device_printf(dev, - "bus number %d does not match start of decoded range %ju\n", - sc->ap_bus, (uintmax_t)start); - pcib_host_res_free(dev, &sc->ap_host_res); - return (ENXIO); + if (decoded_bus_range(sc, &start, &end) == 0) { + if (sc->ap_bus != start) { + device_printf(dev, + "WARNING: BIOS configured bus number (%d) is " + "not within decoded bus number range " + "(%ju - %ju).\n", + sc->ap_bus, (uintmax_t)start, (uintmax_t)end); + device_printf(dev, + "Using range start (%ju) as bus number.\n", + (uintmax_t)start); + sc->ap_bus = start; + } } } #else