summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.de>2004-12-15 15:24:45 +0000
committerEgbert Eich <eich@suse.de>2004-12-15 15:24:45 +0000
commit5b650fe61dcd7509c72fa03ad1746b727018d00d (patch)
treeefa2c3877058bf766e54b7762fb83e7c5b90a7db
parent9d0102bcf7ed567c6ecd906d198acf2d8195d9f6 (diff)
Adding support for OS dependent probing of IA64 chipsets. Not all IA64
chipsets can be probed without OS support as probing them is only possible using ACPI. One example of this are the HP ZX1/2 chipsets: previously the code assumed that these chips were present when no other of the known chipsets could be probed. This assumption brought SGI Altrix machines with 64 CPUs to a grinding halt.
-rw-r--r--hw/xfree86/os-support/bus/460gxPCI.c42
-rw-r--r--hw/xfree86/os-support/bus/460gxPCI.h4
-rw-r--r--hw/xfree86/os-support/bus/e8870PCI.c14
-rw-r--r--hw/xfree86/os-support/bus/e8870PCI.h4
-rw-r--r--hw/xfree86/os-support/bus/zx1PCI.c16
-rw-r--r--hw/xfree86/os-support/bus/zx1PCI.h2
6 files changed, 50 insertions, 32 deletions
diff --git a/hw/xfree86/os-support/bus/460gxPCI.c b/hw/xfree86/os-support/bus/460gxPCI.c
index 3b16f401a..af4e230e6 100644
--- a/hw/xfree86/os-support/bus/460gxPCI.c
+++ b/hw/xfree86/os-support/bus/460gxPCI.c
@@ -201,32 +201,46 @@ Get460GXBridgeResources(int bus,
* the chipset scan is to be stopped, or FALSE if the scan is to move on to the
* next chipset.
*/
+
Bool
-xf86PreScan460GX(void)
+xorgProbe460GX(scanpciWrapperOpt flags)
{
pciBusInfo_t *pBusInfo;
PCITAG tag;
- CARD32 tmp;
- int i, devno;
/* Bus zero should already be set up */
if (!(pBusInfo = pciBusInfo[0])) {
cbn_460gx = -1;
return FALSE;
}
-
/* First look for a 460GX's primary host bridge */
tag = PCI_MAKE_TAG(0, 0x10, 0);
- if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
- cbn_460gx = -1;
- return FALSE;
+ if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
+ return TRUE;
}
+ cbn_460gx = -1;
+
+ return FALSE;
+}
+
+void
+xf86PreScan460GX(void)
+{
+ pciBusInfo_t *pBusInfo;
+ PCITAG tag;
+ CARD32 tmp;
+ int i, devno;
+
+ if (!(pBusInfo = pciBusInfo[0]))
+ return;
+
/* Get CBN (Chipset bus number) */
+ tag = PCI_MAKE_TAG(0, 0x10, 0);
if (!(cbn_460gx = (unsigned int)pciReadByte(tag, CBN))) {
/* Sanity check failed */
cbn_460gx = -1;
- return TRUE;
+ return;
}
if (pciNumBuses <= cbn_460gx)
@@ -242,7 +256,7 @@ xf86PreScan460GX(void)
if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
/* Sanity check failed */
cbn_460gx = -1;
- return TRUE;
+ return;
}
/*
@@ -257,7 +271,7 @@ xf86PreScan460GX(void)
DEVID(VENDOR_INTEL, CHIP_460GX_SAC)) {
/* Sanity check failed */
cbn_460gx = -1;
- return TRUE;
+ return;
}
if (devno == 0x10)
@@ -278,7 +292,7 @@ xf86PreScan460GX(void)
if (cbdevs_460gx & (1 << devno)) {
/* Sanity check failed */
cbn_460gx = -1;
- return TRUE;
+ return;
}
/*
@@ -294,7 +308,7 @@ xf86PreScan460GX(void)
if (cbdevs_460gx & (1 << devno)) {
/* Sanity check failed */
cbn_460gx = -1;
- return TRUE;
+ return;
}
/*
@@ -310,7 +324,7 @@ xf86PreScan460GX(void)
break;
/* Sanity check failed */
cbn_460gx = -1;
- return TRUE;
+ return;
}
}
@@ -337,7 +351,7 @@ xf86PreScan460GX(void)
break;
}
- return TRUE;
+ return;
}
/* This does some 460GX-related processing after the PCI bus scan */
diff --git a/hw/xfree86/os-support/bus/460gxPCI.h b/hw/xfree86/os-support/bus/460gxPCI.h
index 2ae9c3528..9459705d0 100644
--- a/hw/xfree86/os-support/bus/460gxPCI.h
+++ b/hw/xfree86/os-support/bus/460gxPCI.h
@@ -29,8 +29,10 @@
#define PCI_460GX_H 1
#include <X11/Xdefs.h>
+#include <Pci.h>
-Bool xf86PreScan460GX(void);
+Bool xorgProbe460GX(scanpciWrapperOpt flags);
+void xf86PreScan460GX(void);
void xf86PostScan460GX(void);
#endif
diff --git a/hw/xfree86/os-support/bus/e8870PCI.c b/hw/xfree86/os-support/bus/e8870PCI.c
index adbd189f1..9eb34a67a 100644
--- a/hw/xfree86/os-support/bus/e8870PCI.c
+++ b/hw/xfree86/os-support/bus/e8870PCI.c
@@ -34,17 +34,23 @@
#include "Pci.h"
Bool
-xf86PreScanE8870(void)
+xorgProbeE8870(scanpciWrapperOpt flags)
{
PCITAG tag;
/* Look for an E8870's Hub interface */
tag = PCI_MAKE_TAG(0, 0x1E, 0);
- if (pciReadLong(tag, PCI_ID_REG) != DEVID(VENDOR_INTEL, CHIP_82801_P2P))
- return FALSE;
+ if (pciReadLong(tag, PCI_ID_REG) == DEVID(VENDOR_INTEL, CHIP_82801_P2P))
+ return TRUE;
+
+ return FALSE;
+}
+void
+xf86PreScanE8870(void)
+{
/* XXX Fill me in... */
- return TRUE;
+ return;
}
void
diff --git a/hw/xfree86/os-support/bus/e8870PCI.h b/hw/xfree86/os-support/bus/e8870PCI.h
index b910bcfd8..2d16077ac 100644
--- a/hw/xfree86/os-support/bus/e8870PCI.h
+++ b/hw/xfree86/os-support/bus/e8870PCI.h
@@ -29,8 +29,10 @@
#define PCI_E8870_H 1
#include <X11/Xdefs.h>
+#include <Pci.h>
-Bool xf86PreScanE8870(void);
+Bool xorgProbeE8870(scanpciWrapperOpt flags);
+void xf86PreScanE8870(void);
void xf86PostScanE8870(void);
#endif
diff --git a/hw/xfree86/os-support/bus/zx1PCI.c b/hw/xfree86/os-support/bus/zx1PCI.c
index 5d4d6a991..ce3260c26 100644
--- a/hw/xfree86/os-support/bus/zx1PCI.c
+++ b/hw/xfree86/os-support/bus/zx1PCI.c
@@ -465,13 +465,7 @@ static pciBusInfo_t zx1FakeBus = {
NULL, /* bridge -- dynamically set */
};
-/*
- * This checks for, and validates, the presence of the ZX1 chipset, and sets
- * pZX1mio to a non-NULL pointer accordingly. This function is called before
- * the server's PCI bus scan and returns TRUE if the chipset scan is to be
- * stopped, or FALSE if the scan is to move on to the next chipset.
- */
-Bool
+void
xf86PreScanZX1(void)
{
resRange range;
@@ -491,7 +485,7 @@ xf86PreScanZX1(void)
mapSize = MIO_SIZE;
if (!(pZX1mio = xf86MapVidMem(-1, VIDMEM_MMIO, MIO_BASE, mapSize)))
- return FALSE;
+ return;
/* Look for ZX1's SBA and IOC */ /* XXX What about Dino? */
if ((MIO_LONG(MIO_FUNCTION0 + PCI_ID_REG) !=
@@ -500,7 +494,7 @@ xf86PreScanZX1(void)
DEVID(VENDOR_HP, CHIP_ZX1_IOC))) {
xf86UnMapVidMem(-1, pZX1mio, mapSize);
pZX1mio = NULL;
- return FALSE;
+ return;
}
/* Map rope configuration space */
@@ -510,7 +504,7 @@ xf86PreScanZX1(void)
!(pZX1ioa = xf86MapVidMem(-1, VIDMEM_MMIO, ioaaddr, IOA_SIZE))) {
xf86UnMapVidMem(-1, pZX1mio, mapSize);
pZX1mio = NULL;
- return TRUE;
+ return;
}
for (i = 0; i < 8; i++) {
@@ -924,7 +918,7 @@ xf86PreScanZX1(void)
nRange = 0;
- return TRUE;
+ return;
}
/* This is called to finalise the results of a PCI bus scan */
diff --git a/hw/xfree86/os-support/bus/zx1PCI.h b/hw/xfree86/os-support/bus/zx1PCI.h
index b1e8a95b5..f46a68a30 100644
--- a/hw/xfree86/os-support/bus/zx1PCI.h
+++ b/hw/xfree86/os-support/bus/zx1PCI.h
@@ -30,7 +30,7 @@
#include <X11/Xdefs.h>
-Bool xf86PreScanZX1(void);
+void xf86PreScanZX1(void);
void xf86PostScanZX1(void);
#endif