The reason I was not getting interrupts on devices in the pci slot on the EPIA is because they were not set to be bus masters, so they would never generate interrupts. A quick write to the command register fixed the problem. Command register is being set to 0x02. It should be set to 0x06. a 6 to 4.
I haven't looked to see if this is pervasive throughout linuxbios, or if for other boards this is handled specifically, but it is a bug.
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
Hi Brian,
The reason I was not getting interrupts on devices in the pci slot on the EPIA is because they were not set to be bus masters, so they would never generate interrupts. A quick write to the command register fixed the problem. Command register is being set to 0x02. It should be set to 0x06. a 6 to 4.
Thanks for the catch. IIRC, I did have extra ethernet card working before.
-Andrew
On Fri, 13 Jun 2003, Andrew Ip wrote:
The reason I was not getting interrupts on devices in the pci slot on the EPIA is because they were not set to be bus masters, so they would never generate interrupts. A quick write to the command register fixed the problem. Command register is being set to 0x02. It should be set to 0x06. a 6 to 4.
Thanks for the catch. IIRC, I did have extra ethernet card working before.
PLEASE do not patch linuxbios to enable this.
thanks
ron
Ron,
I was always under the impression that the BIOS should enable a device (bus master) always. And slaves would not be able to be set. Some devices set a capability which you can read this from to know whether the device should be a master or not.
Why, or where, should the OS do it? Driver?
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Thu, 12 Jun 2003, ron minnich wrote:
On Fri, 13 Jun 2003, Andrew Ip wrote:
The reason I was not getting interrupts on devices in the pci slot on the EPIA is because they were not set to be bus masters, so they would never generate interrupts. A quick write to the command register fixed the problem. Command register is being set to 0x02. It should be set to 0x06. a 6 to 4.
Thanks for the catch. IIRC, I did have extra ethernet card working before.
PLEASE do not patch linuxbios to enable this.
thanks
ron
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
On Thu, 12 Jun 2003, Brian G. Rhodes wrote:
Why, or where, should the OS do it? Driver?
the os driver should do it, I think.
Many linux drivers do it, e.g.:
if (pci_flags & PCI_USES_MASTER) pci_set_master (pdev);
see drivers/net/*.c
ron
"Brian G. Rhodes" bgr@gw.linespeed.net writes:
Ron,
I was always under the impression that the BIOS should enable a device (bus master) always. And slaves would not be able to be set.
Nope. The BIOS only needs to do this for devices needed to boot.
Some devices set a capability which you can read this from to know whether the device should be a master or not.
Why, or where, should the OS do it? Driver?
Yes, in the driver. Under linux this is the pci_set_master call.
Eric
On Thu, 12 Jun 2003, Brian G. Rhodes wrote:
I haven't looked to see if this is pervasive throughout linuxbios, or if for other boards this is handled specifically, but it is a bug.
This is not a bug. Linuxbios should never bus master PCI devices; that is for the OS to do.
ron
Ron,
Other BIOS do. Or if you look at it this way...
02:0c.0 Multimedia controller: Sigma Designs, Inc.: Unknown device 8400 (rev 01) 00: 05 11 00 84 06 00 10 02 01 00 80 04 00 20 00 00 10: 00 00 30 e3 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 7a 16 e3 00 30: 00 00 00 00 40 00 00 00 00 00 00 00 0c 01 00 00
Is correct.
02:0c.0 Multimedia controller: Sigma Designs, Inc.: Unknown device 8400 (rev 01) 00: 05 11 00 84 02 00 10 02 01 00 80 04 00 40 00 00 10: 00 00 a0 fe 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 7a 16 e3 00 30: 00 00 00 00 40 00 00 00 00 00 00 00 0c 01 00 00
Is not correct.
The first is award BIOS, the second is linuxbios.
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Thu, 12 Jun 2003, ron minnich wrote:
On Thu, 12 Jun 2003, Brian G. Rhodes wrote:
I haven't looked to see if this is pervasive throughout linuxbios, or if for other boards this is handled specifically, but it is a bug.
This is not a bug. Linuxbios should never bus master PCI devices; that is for the OS to do.
ron
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
On Thu, 12 Jun 2003, Brian G. Rhodes wrote:
Other BIOS do. Or if you look at it this way...
It is true that (some) other BIOSes do this. But many do not.
There is danger in enabling this bit in the bios, which is why we don't do it.
We have this discussion about once a year, but the last 3 times we have decided not to set the bit.
ron
"Brian G. Rhodes" bgr@gw.linespeed.net writes:
The reason I was not getting interrupts on devices in the pci slot on the EPIA is because they were not set to be bus masters, so they would never generate interrupts. A quick write to the command register fixed the problem. Command register is being set to 0x02. It should be set to 0x06. a 6 to 4.
Actually this is an interesting symptom. Being a Bus Master means you can initiate transactions on the PCI bus i.e. DMA. There is no requirement that I know of that the bus master bit applies to IRQ's. Those are out of band signals.
Eric
On 13 Jun 2003, Eric W. Biederman wrote:
"Brian G. Rhodes" bgr@gw.linespeed.net writes:
The reason I was not getting interrupts on devices in the pci slot on the EPIA is because they were not set to be bus masters, so they would never generate interrupts. A quick write to the command register fixed the problem. Command register is being set to 0x02. It should be set to 0x06. a 6 to 4.
Actually this is an interesting symptom. Being a Bus Master means you can initiate transactions on the PCI bus i.e. DMA. There is no requirement that I know of that the bus master bit applies to IRQ's. Those are out of band signals.
Seems like a hardware bug to me.
ron
Eric,
It was a side effect. Since they were not initiating any tranfers.. DMA from system memory on the pci bus, they were never low on data, and hence never needed to generate an interrupt. Initially I believed it to be a pci routing problem, but when I saw the chips were not generating interrupts, I looked at the scope.
Brian G Rhodes bgr@linespeed.net brhodes@visualcircuits.com +1 612-741-1191
On Fri, 13 Jun 2003, Eric W. Biederman wrote:
"Brian G. Rhodes" bgr@gw.linespeed.net writes:
The reason I was not getting interrupts on devices in the pci slot on the EPIA is because they were not set to be bus masters, so they would never generate interrupts. A quick write to the command register fixed the problem. Command register is being set to 0x02. It should be set to 0x06. a 6 to 4.
Actually this is an interesting symptom. Being a Bus Master means you can initiate transactions on the PCI bus i.e. DMA. There is no requirement that I know of that the bus master bit applies to IRQ's. Those are out of band signals.
Eric
Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios