2 * This file contains the glue necessary for support of SGI's Altix chipset.
4 #ifdef HAVE_XORG_CONFIG_H
5 #include <xorg-config.h>
14 void xf86PreScanAltix(void)
16 /* Nothing to see here... */
19 void xf86PostScanAltix(void)
25 * Some altix pci chipsets do not expose themselves as host
28 * Walk the devices looking for buses for which there is not a
29 * corresponding pciDevice entry (ie. pciBusInfo[]->bridge is NULL).
31 * It is assumed that this indicates a root bridge for which we will
32 * construct a fake pci host bridge device.
35 pdev
= xf86scanpci(0);
36 for (idx
= 0; pdev
[idx
] != NULL
; idx
++)
41 for (idx
= 0; idx
< free_idx
; idx
++) {
42 pciConfigPtr dev
, fakedev
;
43 pciBusInfo_t
*businfo
;
46 businfo
= pciBusInfo
[dev
->busnum
];
49 /* device has no bus ... should this be an error? */
53 if (businfo
->bridge
) {
54 /* bus has a device ... no need for fixup */
58 if (free_idx
>= MAX_PCI_DEVICES
)
59 FatalError("SN: No room for fake root bridge device\n");
62 * Construct a fake device and stick it at the end of the
63 * pdev array. Make it look like a host bridge.
65 fakedev
= xnfcalloc(1, sizeof(pciDevice
));
66 fakedev
->tag
= PCI_MAKE_TAG(dev
->busnum
, 0, 0);;
67 fakedev
->busnum
= dev
->busnum
;
70 fakedev
->fakeDevice
= 1;
71 /* should figure out a better DEVID */
72 fakedev
->pci_device_vendor
= DEVID(VENDOR_GENERIC
, CHIP_VGA
);
73 fakedev
->pci_base_class
= PCI_CLASS_BRIDGE
;
75 businfo
->secondary
= 0;
76 businfo
->primary_bus
= dev
->busnum
;
77 businfo
->bridge
= fakedev
;
79 fakedev
->businfo
= businfo
;
81 pdev
[free_idx
++] = fakedev
;