IO ports assign

Eric W. Biederman ebiederman at lnxi.com
Mon Aug 4 15:48:00 CEST 2003


YhLu <YhLu at tyan.com> writes:

> Eric,
> 
> I have tested s2880 with all addon cards, and found interesting problem.
> 
> When I plug Adaptec 29320 PCI X scsi card into slot 3 and 4. That share
> BUS_A of 8131 with LSI SCSI. Linux bios got IO port allocation problem on
> bus 1.
> 
> BUS 1: 1000-2fff
> LSI will use 3000 later...

I believe this is a bug that failed to get pushed forward
from freebios tree.  I have just committed this fix and
a patch is attached.


The problem is because it was performing it's size calculations
at address 0.  It figured the I/O space registers could be safely
packed more tightly then they actually can be.

Eric


bash-2.05a$ cvs diff -u src/devices/device.c
ebiederm at cvs.freebios.sourceforge.net's password: 
Index: src/devices/device.c
===================================================================
RCS file: /cvsroot/freebios/freebios2/src/devices/device.c,v
retrieving revision 1.4
diff -u -r1.4 device.c
--- src/devices/device.c	21 Jul 2003 20:13:42 -0000	1.4
+++ src/devices/device.c	4 Aug 2003 19:52:30 -0000
@@ -217,8 +217,12 @@
 		if (resource->flags & IORESOURCE_IO) {
 			/* Don't allow potential aliases over the
 			 * legacy pci expansion card addresses.
+			 * The legacy pci decodes only 10 bits,
+			 * uses 100h - 3ffh. Therefor, only 0 - ff
+			 * can be used out of each 400h block of io
+			 * space.
 			 */
-			if ((base > 0x3ff) && ((base & 0x300) != 0)) {
+			if ((base & 0x300) != 0) {
 				base = (base & ~0x3ff) + 0x400;
 			}
 			/* Don't allow allocations in the VGA IO range.




More information about the coreboot mailing list