Date: Sat, 10 Feb 1996 03:34:58 +0100 From: se@zpr.uni-koeln.de (Stefan Esser) To: Luigi Rizzo <luigi@labinfo.iet.unipi.it> Cc: hackers@freebsd.org Subject: Re: scanpci.c and pci-related stuff Message-ID: <199602100234.AA22397@Sysiphos> In-Reply-To: Luigi Rizzo <luigi@labinfo.iet.unipi.it> "Re: scanpci.c and pci-related stuff" (Feb 9, 16:30)
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 9, 16:30, Luigi Rizzo wrote: } Subject: Re: scanpci.c and pci-related stuff } > You can change this value without knowing } } I guess you mean "cannot" Yes. I really shouldn't write mail replies long after midnight after working some 16 hours (what's the current time :) } > the details of the chip set. There are now } > PCI BIOS calls that ought to allow such an } } From the meteor.c driver : } } ... } #ifdef METEOR_IRQ /* from the meteor.h file */ } old_irq = pci_conf_read(tag, PCI_INTERRUPT_REG); } pci_conf_write(tag, PCI_INTERRUPT_REG, METEOR_IRQ); } new_irq = pci_conf_read(tag, PCI_INTERRUPT_REG); } printf("meteor_attach: irq changed from %d to %d\n", (old_irq & 0xff), } (new_irq & 0xff)); } #endif METEOR_IRQ } ... } } it looks like it is not that hard, if the above works. Yes. It looks trivially simple. And it does of course not work at all ... The PCI_INTERRUPT_REG is a Byte register, which has the sole purpose to let the driver know about the BIOS provided interrupt routing setup. You can change this value to whatever you want, but all it will do is confuse whoever later reads the register and believes what he finds :) } Note that I don't want to chang IRQ settings for an active board, just } to remap the setting for a board which is not correctly recognised. } It is intended as a fixit tool, "use at your own risk". It is a NOOP ... (Well, not really. The code later uses this value for the call to register_intr(). But the only reason for a wrong number being written by the BIOS is, that the IRQ routing is done in hardware (i.e. by jumpers) and the PCI BIOS settings have not been adjusted accordingly. Such BIOS jumpers were state of the art in mid 1994, but I doubt there are many systems that still use them. And the correct values have just to be entered in teh BIOS setup ...) } I have two identical PC-net PCI boards, plugged in adjacent slots. } On one particular motherboard they are both configured with IRQ10, on a } similar motherboard one gets IRQ10, the other IRQ11 Yes, I just read your other message ... The problem is the level of PCI support for the Lance. It needs just a few hours of work, I guess ... } Also, at times I'd like to free some specific IRQs. As an example: here } I have a system with the following devices: } } sio0,1,2 (irq 3, 4, 5) } lpt0 (irq7) } ed0 (irq10, PCI) } meteor (irq9,PCI) } vga (irq11, PCI) } } and I'd like to put in a scanner (can use irq3,5,10) and an SB16. } I must free irq10, and possibly irq9 as well. I don't know how your PCI BIOS chooses the IRQ values. All PCI cards but the Lance Etherner cards can share an interrupt. I prefer boards, where I can assign any IRQ to IntA of each PCI slot, but current systems are delivered as PnP, and they just don't offer this config mode anymore ... You really need the PCI attach code for the Lance ... Regards, STefan -- Stefan Esser, Zentrum fuer Paralleles Rechnen Tel: +49 221 4706021 Universitaet zu Koeln, Weyertal 80, 50931 Koeln FAX: +49 221 4705160 ============================================================================== http://www.zpr.uni-koeln.de/~se <se@ZPR.Uni-Koeln.DE>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602100234.AA22397>