Date: Thu, 10 Oct 1996 18:04:29 -0600 From: Steve Passe <smp@csn.net> To: hackers@freefall.freebsd.org Subject: PCI internals Message-ID: <199610110004.SAA07241@clem.systemsix.com>
next in thread | raw e-mail | index | archive | help
Hi, I am doing the code for symmetric IO in the freeBSD SMP kernel. I currently am struggling with the PCI INTerrupt redirection code. My problem: [ code in src/sys/pci/pci.c: ] 'pci_map_int( ... )' calls 'getirq( pcici_t tag )' to find the INTerrupt to register with the kernel for use by the PCI card being setup. 'getirq()' gets the "re-directed" ISA INTerrupt from: irq = PCI_INTERRUPT_LINE_EXTRACT( pci_conf_read (tag, PCI_INTERRUPT_REG)); BUT with the MP capable boards the 8259 PIC chips are abandoned after boot and an APIC (Advanced Programmable Interrupt Controller) is used instead. This chip directly supports 24 INTs, so the PCI INTS are directly attached to its upper pins, and the "redirected" ISA INTs never reach it. The MP motherboard provides a BIOS table that tells me which PCI INTerrupt line is attached to what APIC pin. This mapping is described as: PCI bus number, PCI device number, PCI line IRQ#: INT_[ABCD] So in 'getirq()' I need to determine the PCI bus/device# of interest at the time 'getirq()' is called. From this I can determine the APIC pin, and thus the real IRQ#, to return. I am most interested in the device#, I can assumme bus0 for now (but NOT forever). Can these be determined from 'tag'? If not, how do I go about this? Please cc: me, my "hackers-digest" is slow and unreliable. -- Steve Passe | powered by smp@csn.net | FreeBSD -----BEGIN PGP PUBLIC KEY BLOCK----- Version: 2.6.2 mQCNAzHe7tEAAAEEAM274wAEEdP+grIrV6UtBt54FB5ufifFRA5ujzflrvlF8aoE 04it5BsUPFi3jJLfvOQeydbegexspPXL6kUejYt2OeptHuroIVW5+y2M2naTwqtX WVGeBP6s2q/fPPAS+g+sNZCpVBTbuinKa/C4Q6HJ++M9AyzIq5EuvO0a8Rr9AAUR tBlTdGV2ZSBQYXNzZSA8c21wQGNzbi5uZXQ+ =ds99 -----END PGP PUBLIC KEY BLOCK-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610110004.SAA07241>