Print this page
XXX nobios
*** 33,49 ****
#include <sys/reboot.h>
#include <sys/pci_impl.h>
#include <sys/pci_cfgspace.h>
#include <sys/pci_cfgspace_impl.h>
#include <sys/pci_cfgacc.h>
#if defined(__xpv)
#include <sys/hypervisor.h>
#endif
- #if defined(__xpv)
int pci_max_nbus = 0xFE;
- #endif
int pci_bios_cfg_type = PCI_MECHANISM_UNKNOWN;
int pci_bios_maxbus;
int pci_bios_mech;
int pci_bios_vers;
--- 33,48 ----
#include <sys/reboot.h>
#include <sys/pci_impl.h>
#include <sys/pci_cfgspace.h>
#include <sys/pci_cfgspace_impl.h>
#include <sys/pci_cfgacc.h>
+ #include <sys/machsystm.h>
#if defined(__xpv)
#include <sys/hypervisor.h>
#endif
int pci_max_nbus = 0xFE;
int pci_bios_cfg_type = PCI_MECHANISM_UNKNOWN;
int pci_bios_maxbus;
int pci_bios_mech;
int pci_bios_vers;
*** 251,260 ****
--- 250,271 ----
{
struct bop_regs regs;
uint32_t carryflag;
uint16_t ax, dx;
+ if (!bios_calls_available) {
+ /*
+ * If this system does not support BIOS calls, we must fall
+ * back to default values and a search of all of the possible
+ * PCI buses.
+ */
+ pci_bios_mech = 1;
+ pci_bios_vers = 0;
+ pci_bios_maxbus = pci_max_nbus;
+ return (PCI_MECHANISM_1);
+ }
+
bzero(®s, sizeof (regs));
regs.eax.word.ax = (PCI_FUNCTION_ID << 8) | PCI_BIOS_PRESENT;
BOP_DOINT(bootops, 0x1a, ®s);
carryflag = regs.eflags & PS_C;