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.
This commit is contained in:
Egbert Eich 2004-12-15 15:24:45 +00:00
parent 9d0102bcf7
commit 5b650fe61d
6 changed files with 50 additions and 32 deletions

View file

@ -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 */

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 */

View file

@ -30,7 +30,7 @@
#include <X11/Xdefs.h>
Bool xf86PreScanZX1(void);
void xf86PreScanZX1(void);
void xf86PostScanZX1(void);
#endif