From d063f3351e94b843161a8f242217845487af0dca Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Fri, 18 Mar 2016 22:28:51 +0200 Subject: [PATCH] 8448 uts: pci_autoconfig should test for BIOS Reviewed by: Robert Mustachci Reviewed by: Yuri Pankov Reviewed by: Joshua M. Clulow Approved by: Dan McDonald --- usr/src/uts/intel/io/pci/pci_resource.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/usr/src/uts/intel/io/pci/pci_resource.c b/usr/src/uts/intel/io/pci/pci_resource.c index a088deb456..3aa0d87475 100644 --- a/usr/src/uts/intel/io/pci/pci_resource.c +++ b/usr/src/uts/intel/io/pci/pci_resource.c @@ -77,21 +77,31 @@ struct memlist * find_bus_res(int bus, int type) { struct memlist *res = NULL; + boolean_t bios = B_TRUE; + + /* if efi-systab property exist, there is no BIOS */ + if (ddi_prop_exists(DDI_DEV_T_ANY, ddi_root_node(), DDI_PROP_DONTPASS, + "efi-systab")) { + bios = B_FALSE; + } if (tbl_init == 0) { tbl_init = 1; acpi_pci_probe(); - hrt_probe(); - mps_probe(); + if (bios) { + hrt_probe(); + mps_probe(); + } } if (acpi_find_bus_res(bus, type, &res) > 0) return (res); - if (hrt_find_bus_res(bus, type, &res) > 0) + if (bios && hrt_find_bus_res(bus, type, &res) > 0) return (res); - (void) mps_find_bus_res(bus, type, &res); + if (bios) + (void) mps_find_bus_res(bus, type, &res); return (res); } -- 2.11.4.GIT