p64h2apic.c revision 1.3
1/* 2 * Driver for P64H2 IOxAPIC 3 * 4 * This is an ioapic which appears in PCI space. 5 * This driver currently does nothing useful but will eventually 6 * thwak the ioapic into working correctly. 7 */ 8 9#include <sys/param.h> 10#include <sys/systm.h> 11#include <sys/kernel.h> 12#include <sys/device.h> 13 14#include <dev/pci/pcireg.h> 15#include <dev/pci/pcivar.h> 16#include <dev/pci/pcidevs.h> 17 18static int p64h2match __P((struct device *, struct cfdata *, void *)); 19static void p64h2attach __P((struct device *, struct device *, void *)); 20 21struct p64h2apic_softc 22{ 23 pcitag_t sc_tag; 24}; 25 26CFATTACH_DECL(p64h2apic, sizeof(struct p64h2apic_softc), 27 p64h2match, p64h2attach, NULL, NULL); 28 29int p64h2print __P((void *, const char *pnp)); 30 31 32static int 33p64h2match(parent, match, aux) 34 struct device *parent; 35 struct cfdata *match; 36 void *aux; 37{ 38 struct pci_attach_args *pa = aux; 39 40 if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_INTEL && 41 PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_INTEL_82870P2_IOxAPIC) 42 return (1); 43 44 return (0); 45} 46 47static void 48p64h2attach(parent, self, aux) 49 struct device *parent, *self; 50 void *aux; 51{ 52 struct p64h2apic_softc *sc = (void *) self; 53 struct pci_attach_args *pa = aux; 54 char devinfo[256]; 55 56 pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo); 57 printf(": %s (rev. 0x%02x)\n", devinfo, PCI_REVISION(pa->pa_class)); 58 59 sc->sc_tag = pa->pa_tag; 60} 61