Print this page
XXX nobios

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/i86pc/os/pci_cfgspace.c
          +++ new/usr/src/uts/i86pc/os/pci_cfgspace.c
↓ open down ↓ 27 lines elided ↑ open up ↑
  28   28   */
  29   29  
  30   30  #include <sys/systm.h>
  31   31  #include <sys/psw.h>
  32   32  #include <sys/bootconf.h>
  33   33  #include <sys/reboot.h>
  34   34  #include <sys/pci_impl.h>
  35   35  #include <sys/pci_cfgspace.h>
  36   36  #include <sys/pci_cfgspace_impl.h>
  37   37  #include <sys/pci_cfgacc.h>
       38 +#include <sys/machsystm.h>
  38   39  #if defined(__xpv)
  39   40  #include <sys/hypervisor.h>
  40   41  #endif
  41   42  
  42      -#if defined(__xpv)
  43   43  int pci_max_nbus = 0xFE;
  44      -#endif
  45   44  int pci_bios_cfg_type = PCI_MECHANISM_UNKNOWN;
  46   45  int pci_bios_maxbus;
  47   46  int pci_bios_mech;
  48   47  int pci_bios_vers;
  49   48  
  50   49  /*
  51   50   * These two variables can be used to force a configuration mechanism or
  52   51   * to force which function is used to probe for the presence of the PCI bus.
  53   52   */
  54   53  int     PCI_CFG_TYPE = 0;
↓ open down ↓ 191 lines elided ↑ open up ↑
 246  245  
 247  246  #if !defined(__xpv)
 248  247  
 249  248  static int
 250  249  pci_check_bios(void)
 251  250  {
 252  251          struct bop_regs regs;
 253  252          uint32_t        carryflag;
 254  253          uint16_t        ax, dx;
 255  254  
      255 +        if (!bios_calls_available) {
      256 +                /*
      257 +                 * If this system does not support BIOS calls, we must fall
      258 +                 * back to default values and a search of all of the possible
      259 +                 * PCI buses.
      260 +                 */
      261 +                pci_bios_mech = 1;
      262 +                pci_bios_vers = 0;
      263 +                pci_bios_maxbus = pci_max_nbus;
      264 +                return (PCI_MECHANISM_1);
      265 +        }
      266 +
 256  267          bzero(&regs, sizeof (regs));
 257  268          regs.eax.word.ax = (PCI_FUNCTION_ID << 8) | PCI_BIOS_PRESENT;
 258  269  
 259  270          BOP_DOINT(bootops, 0x1a, &regs);
 260  271          carryflag = regs.eflags & PS_C;
 261  272          ax = regs.eax.word.ax;
 262  273          dx = regs.edx.word.dx;
 263  274  
 264  275          /* the carry flag must not be set */
 265  276          if (carryflag != 0)
↓ open down ↓ 55 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX