[BACK]Return to pci_machdep.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / x86 / pci

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/x86/pci/pci_machdep.c between version 1.11.2.2 and 1.11.2.3

version 1.11.2.2, 2006/12/30 20:47:22 version 1.11.2.3, 2007/02/26 09:08:50
Line 119  __KERNEL_RCSID(0, "$NetBSD$");
Line 119  __KERNEL_RCSID(0, "$NetBSD$");
   
 #include "opt_pci_conf_mode.h"  #include "opt_pci_conf_mode.h"
   
   #ifdef __i386__
   #include "opt_xbox.h"
   #ifdef XBOX
   #include <machine/xbox.h>
   #endif
   #endif
   
 int pci_mode = -1;  int pci_mode = -1;
   
 static void pci_bridge_hook(pci_chipset_tag_t, pcitag_t, void *);  static void pci_bridge_hook(pci_chipset_tag_t, pcitag_t, void *);
Line 181  struct {
Line 188  struct {
  * of these functions.   * of these functions.
  */   */
 struct x86_bus_dma_tag pci_bus_dma_tag = {  struct x86_bus_dma_tag pci_bus_dma_tag = {
           0,                              /* tag_needs_free */
 #if defined(_LP64) || defined(PAE)  #if defined(_LP64) || defined(PAE)
         PCI32_DMA_BOUNCE_THRESHOLD,     /* bounce_thresh */          PCI32_DMA_BOUNCE_THRESHOLD,     /* bounce_thresh */
         ISA_DMA_BOUNCE_THRESHOLD,       /* bounce_alloclo */          ISA_DMA_BOUNCE_THRESHOLD,       /* bounce_alloclo */
Line 198  struct x86_bus_dma_tag pci_bus_dma_tag =
Line 206  struct x86_bus_dma_tag pci_bus_dma_tag =
         _bus_dmamap_load_uio,          _bus_dmamap_load_uio,
         _bus_dmamap_load_raw,          _bus_dmamap_load_raw,
         _bus_dmamap_unload,          _bus_dmamap_unload,
 #if defined(_LP64) || defined(PAE)  
         _bus_dmamap_sync,          _bus_dmamap_sync,
 #else  
         NULL,  
 #endif  
         _bus_dmamem_alloc,          _bus_dmamem_alloc,
         _bus_dmamem_free,          _bus_dmamem_free,
         _bus_dmamem_map,          _bus_dmamem_map,
         _bus_dmamem_unmap,          _bus_dmamem_unmap,
         _bus_dmamem_mmap,          _bus_dmamem_mmap,
           _bus_dmatag_subregion,
           _bus_dmatag_destroy,
 };  };
   
 #ifdef _LP64  #ifdef _LP64
 struct x86_bus_dma_tag pci_bus_dma64_tag = {  struct x86_bus_dma_tag pci_bus_dma64_tag = {
           0,                              /* tag_needs_free */
         0,          0,
         0,          0,
         0,          0,
Line 229  struct x86_bus_dma_tag pci_bus_dma64_tag
Line 236  struct x86_bus_dma_tag pci_bus_dma64_tag
         _bus_dmamem_map,          _bus_dmamem_map,
         _bus_dmamem_unmap,          _bus_dmamem_unmap,
         _bus_dmamem_mmap,          _bus_dmamem_mmap,
           _bus_dmatag_subregion,
           _bus_dmatag_destroy,
 };  };
 #endif  #endif
   
Line 251  int
Line 260  int
 pci_bus_maxdevs(pci_chipset_tag_t pc, int busno)  pci_bus_maxdevs(pci_chipset_tag_t pc, int busno)
 {  {
   
   #if defined(__i386__) && defined(XBOX)
           /*
            * Scanning above the first device is fatal on the Microsoft Xbox.
            * If busno=1, only allow for one device.
            */
           if (arch_i386_is_xbox) {
                   if (busno == 1)
                           return 1;
                   else if (busno > 1)
                           return 0;
           }
   #endif
   
         /*          /*
          * Bus number is irrelevant.  If Configuration Mechanism 2 is in           * Bus number is irrelevant.  If Configuration Mechanism 2 is in
          * use, can only have devices 0-15 on any bus.  If Configuration           * use, can only have devices 0-15 on any bus.  If Configuration
Line 354  pci_conf_read( pci_chipset_tag_t pc, pci
Line 376  pci_conf_read( pci_chipset_tag_t pc, pci
         pcireg_t data;          pcireg_t data;
         int s;          int s;
   
   #if defined(__i386__) && defined(XBOX)
           if (arch_i386_is_xbox) {
                   int bus, dev, fn;
                   pci_decompose_tag(pc, tag, &bus, &dev, &fn);
                   if (bus == 0 && dev == 0 && (fn == 1 || fn == 2))
                           return (pcireg_t)-1;
           }
   #endif
   
 #ifndef PCI_CONF_MODE  #ifndef PCI_CONF_MODE
         switch (pci_mode) {          switch (pci_mode) {
         case 1:          case 1:
Line 397  pci_conf_write(pci_chipset_tag_t pc, pci
Line 428  pci_conf_write(pci_chipset_tag_t pc, pci
 {  {
         int s;          int s;
   
   #if defined(__i386__) && defined(XBOX)
           if (arch_i386_is_xbox) {
                   int bus, dev, fn;
                   pci_decompose_tag(pc, tag, &bus, &dev, &fn);
                   if (bus == 0 && dev == 0 && (fn == 1 || fn == 2))
                           return;
           }
   #endif
   
 #ifndef PCI_CONF_MODE  #ifndef PCI_CONF_MODE
         switch (pci_mode) {          switch (pci_mode) {
         case 1:          case 1:

Legend:
Removed from v.1.11.2.2  
changed lines
  Added in v.1.11.2.3

CVSweb <webmaster@jp.NetBSD.org>