Date: Fri, 9 Feb 1996 16:30:12 +0100 (MET) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: se@zpr.uni-koeln.de (Stefan Esser) Cc: hackers@freebsd.org Subject: Re: scanpci.c and pci-related stuff Message-ID: <199602091530.QAA02610@labinfo.iet.unipi.it> In-Reply-To: <199602091507.AA07402@Sysiphos> from "Stefan Esser" at Feb 9, 96 04:07:22 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> But it surely is useful to have a user
> land tool to do the scan.
>
> } And, one thing I would like to know, is if there exist any program to
> } reconfigure a peripheral on the PCI bus.
>
> What do you mean with "reconfigure" ???
> The PCI bus is designed to be configured
> by the BIOS, and you can query the values
> choosen (memory, port and IRQ mappings,
> which possibly have resulted in chip set
> registers being set accordingly) but you
> can't easily modify them. If an interrupt
> has been assigned to some PCI chip, for
> example, then the chip set has set up a
> connection from the PCI IntA line to some
> IRQ input of the system interrupt controller
> (in the simplest case).
> You can change this value without knowing
I guess you mean "cannot"
> 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.
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".
> } I believe I have a broken BIOS on one of our motherboards which
> } incorrectly assigns the same interrupt to two boards. I'd like to
> } override this somehow. And I would also like to avoid using INT10 on
> } the PCI bus, as many ISA board often use this interrupt line and they
> } cannot be configured on INT11, 12 or 13
>
> The PCI BIOS is not necessarily broken, if
> it assigns one IRQ to multiple devices. Most
> motherboards sold until mid 1995 had the PCI
> IntA line of one slot connected to IntB of its
> neighbour, under the assumption, that devices
> that use IntB (multi-function devices or PCI
> to PCI bridges) aren't commonly used.
>
> Please describe the situation where the same
> IRQ was used for two PCI devices.
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
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.
Luigi
====================================================================
Luigi Rizzo Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it Universita' di Pisa
tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522 http://www.iet.unipi.it/~luigi/
====================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602091530.QAA02610>
