From owner-freebsd-hackers Mon Nov 11 09:46:25 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA28824 for hackers-outgoing; Mon, 11 Nov 1996 09:46:25 -0800 (PST) Received: from pluto.plutotech.com (root@pluto.plutotech.com [206.168.67.1]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA28819 for ; Mon, 11 Nov 1996 09:46:21 -0800 (PST) Received: from shane.plutotech.com (durian@shane.plutotech.com [206.168.67.21]) by pluto.plutotech.com (8.8.2/8.8.2) with ESMTP id KAA28562; Mon, 11 Nov 1996 10:35:29 -0700 (MST) Message-Id: <199611111735.KAA28562@pluto.plutotech.com> From: "Mike Durian" To: se@zpr.uni-koeln.de (Stefan Esser) cc: freebsd-hackers@freebsd.org Subject: Re: small bugs in pci code In-reply-to: Your message of "Mon, 11 Nov 1996 00:10:20 +0100." Date: Mon, 11 Nov 1996 10:35:29 -0700 Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Mon, 11 Nov 1996 00:10:20 +0100, se@zpr.uni-koeln.de (Stefan Esser) wrote: > >Please test the patches you'll find appended to this message ... I gave them a shot, and they seem to work fine. >Yes. > >Hmmm, but the same should apply to the memory regions! You're right. I didn't notice that. >Please test my suggested fix (you seem to have the required hardware, >or you wouldn't have noticed there was a problem, I suppose ;-) Yup. 4 PCI busses, 3 PCI-PCI bridges and about 20 adaptec conrollers. I'm guessing not many people are pushing the PCI spec as far. (In fact, we discovered a bug in the AMI bios that won't properly initialize more than 4 devices on the secondary busses). >Well, I can only agree to half of that sentence: The mapping type is >found in the address, but also in the size. The low bits of the map >registers are hardwired. For that reason, (data & 7) is guaranteed >to be identical to (map & 7) ... I'm not seeing this. I'm enclosing some output from a boot on my machine (not the one will all the PCI busses). I've added printfs to show the value of map, data and the addr, size parameters in each of the two cases. As you can see (as in the ahc device), there are cases where the lower nybble differs in the map and data variables. You can also see where a memory region gets treated as an io region. I'm still not sure about the strange 0x500a1011 io address found on the DEC ethernet cards. The BIOS is AMI. mike Nov 11 09:55:53 shane /kernel: FreeBSD 2.1.5-RELEASE #40: Mon Nov 11 09:54:30 MST 1996 Nov 11 09:55:53 shane /kernel: durian@shane.plutotech.com:/usr/src/sys-head/compile/AVIO Nov 11 09:55:53 shane /kernel: CPU: 132-MHz Pentium 735\90 or 815\100 (Pentium-class CPU) Nov 11 09:55:53 shane /kernel: Origin = "GenuineIntel" Id = 0x52b Stepping=11 Nov 11 09:55:53 shane /kernel: Features=0x1bf Nov 11 09:55:53 shane /kernel: dedicated mem= 2097152 (2048K) from 31457280 (30720K) to 33554432 (32768K) Nov 11 09:55:54 shane /kernel: real memory = 31457280 (30720K bytes) Nov 11 09:55:54 shane /kernel: avail memory = 28557312 (27888K bytes) Nov 11 09:55:54 shane /kernel: Probing for devices on PCI bus 0: Nov 11 09:55:54 shane /kernel: ahc0 rev 0 int a irq 11 on pci0:20 Nov 11 09:55:55 shane /kernel: map = 0xfc01, data = 0xffffff01 Nov 11 09:55:55 shane /kernel: case 1,5: I/O addr = 0xfc00, size = 0x100 Nov 11 09:55:55 shane /kernel: map = 0xffbdf000, data = 0xfffff000 Nov 11 09:55:55 shane /kernel: case 0,2,4: memory addr = 0xffbdf000, size = 0x1000 Nov 11 09:55:55 shane /kernel: map = 0xffbc0000, data = 0xffff0001 Nov 11 09:55:55 shane /kernel: case 1,5: I/O addr = 0xffbc0000, size = 0x10000 Nov 11 09:55:56 shane /kernel: ahc0: aic7880 Wide Channel, SCSI Id=7, 16 SCBs Nov 11 09:55:56 shane /kernel: ahc0 waiting for scsi devices to settle Nov 11 09:55:56 shane /kernel: ahc0: Getting Another SCB? numscb = 0 maxscb = 16 Nov 11 09:55:56 shane /kernel: (ahc0:0:0): "SEAGATE ST31230W 0640" type 0 fixed SCSI 2 Nov 11 09:55:56 shane /kernel: sd0(ahc0:0:0): Direct-Access 1010MB (2069860 512 byte sectors) Nov 11 09:55:56 shane /kernel: ahc0:A:2: refuses WIDE negotiation. Using 8bit transfers Nov 11 09:55:57 shane /kernel: (ahc0:2:0): "TOSHIBA CD-ROM XM-3701TA 3205" type 5 removable SCSI 2 Nov 11 09:55:57 shane /kernel: cd0(ahc0:2:0): CD-ROM cd present.[140377 x 2048 byte records] Nov 11 09:55:57 shane /kernel: ahc0:A:6: refuses WIDE negotiation. Using 8bit transfers Nov 11 09:55:57 shane /kernel: ahc0:A:6: refuses syncronous negotiation. Using asyncronous transfers Nov 11 09:55:57 shane /kernel: (ahc0:6:0): "HP C4324/C4325 1.27" type 5 removable SCSI 2 Nov 11 09:55:57 shane /kernel: worm0(ahc0:6:0): Write-Once - UNTESTED Nov 11 09:55:58 shane /kernel: worm0(ahc0:6:0): NOT READY asc:4,0 Nov 11 09:55:58 shane /kernel: worm0(ahc0:6:0): Logical unit not ready, cause not reportable Nov 11 09:55:58 shane /kernel: Nov 11 09:55:58 shane /kernel: worm0(ahc0:6:0): could not get size Nov 11 09:55:58 shane /kernel: - can't get capacity. Nov 11 09:55:59 shane /kernel: vga0 rev 3 on pci0:19 Nov 11 09:55:59 shane /kernel: map = 0xfe000000, data = 0xff000000 Nov 11 09:55:59 shane /kernel: case 0,2,4: memory addr = 0xfe000000, size = 0x1000000 Nov 11 09:55:59 shane /kernel: map = 0xffbe0000, data = 0xffff0001 Nov 11 09:55:59 shane /kernel: case 1,5: I/O addr = 0xffbe0000, size = 0x10000 Nov 11 09:55:59 shane /kernel: de0 rev 32 int a irq 10 on pci0:18 Nov 11 09:55:59 shane /kernel: map = 0xf881, data = 0xffffff81 Nov 11 09:56:00 shane /kernel: case 1,5: I/O addr = 0xf880, size = 0x80 Nov 11 09:56:00 shane /kernel: map = 0xffbdef80, data = 0xffffff80 Nov 11 09:56:00 shane /kernel: case 0,2,4: memory addr = 0xffbdef80, size = 0x80 Nov 11 09:56:00 shane /kernel: map = 0x500a1011, data = 0x500a1011 Nov 11 09:56:00 shane /kernel: case 1,5: I/O addr = 0x500a1010, size = 0x10 Nov 11 09:56:00 shane /kernel: map = 0xffb80000, data = 0xfffc0001 Nov 11 09:56:00 shane /kernel: case 1,5: I/O addr = 0xffb80000, size = 0x40000 Nov 11 09:56:00 shane /kernel: de0: DE500-AA DC21140A [10-100Mb/s] pass 2.0 Nov 11 09:56:00 shane /kernel: de0: address 00:00:f8:02:be:16 Nov 11 09:56:00 shane /kernel: de0(phy5): model = NS DP83840 (supports media autonegotiation) Nov 11 09:56:00 shane /kernel: de0(phy5): media = 10baseT, Full Duplex 10baseT, 100baseTX, Full Duplex 100baseTX Nov 11 09:56:01 shane /kernel: de0(phy5): autonegotiation restarted: 0x3300 Nov 11 09:56:01 shane /kernel: de1 rev 32 int a irq 15 on pci0:17 Nov 11 09:56:01 shane /kernel: map = 0xf801, data = 0xffffff81 Nov 11 09:56:01 shane /kernel: case 1,5: I/O addr = 0xf800, size = 0x80 Nov 11 09:56:01 shane /kernel: map = 0xffbdef00, data = 0xffffff80 Nov 11 09:56:01 shane /kernel: case 0,2,4: memory addr = 0xffbdef00, size = 0x80 Nov 11 09:56:01 shane /kernel: map = 0x500a1011, data = 0x500a1011 Nov 11 09:56:01 shane /kernel: case 1,5: I/O addr = 0x500a1010, size = 0x10 Nov 11 09:56:01 shane /kernel: map = 0xffb40000, data = 0xfffc0001 Nov 11 09:56:01 shane /kernel: case 1,5: I/O addr = 0xffb40000, size = 0x40000 Nov 11 09:56:01 shane /kernel: de1: DE500-AA DC21140A [10-100Mb/s] pass 2.0 Nov 11 09:56:02 shane /kernel: de1: address 00:00:f8:02:c5:5f Nov 11 09:56:02 shane /kernel: de1(phy5): model = NS DP83840 (supports media autonegotiation) Nov 11 09:56:02 shane /kernel: de1(phy5): media = 10baseT, Full Duplex 10baseT, 100baseTX, Full Duplex 100baseTX Nov 11 09:56:02 shane /kernel: de1(phy5): autonegotiation restarted: 0x3300 Nov 11 09:56:02 shane /kernel: chip0 rev 2 on pci0:7:0 Nov 11 09:56:02 shane /kernel: chip1 rev 2 on pci0:7:1 Nov 11 09:56:02 shane /kernel: map = 0xfff1, data = 0xfff1 Nov 11 09:56:02 shane /kernel: case 1,5: I/O addr = 0xfff0, size = 0x10 Nov 11 09:56:02 shane /kernel: chip2 rev 2 on pci0:0 Nov 11 09:56:02 shane /kernel: Probing for devices on the ISA bus: Nov 11 09:56:02 shane /kernel: sc0 at 0x60-0x6f irq 1 on motherboard Nov 11 09:56:03 shane /kernel: sc0: VGA color <16 virtual consoles, flags=0x0> Nov 11 09:56:03 shane /kernel: ed0 not found at 0x320 Nov 11 09:56:03 shane /kernel: sio0 at 0x3f8-0x3ff irq 4 on isa Nov 11 09:56:03 shane /kernel: sio0: type 16550A Nov 11 09:56:03 shane /kernel: mci0 at 0x2f8-0x2ff irq 3 on isa Nov 11 09:56:03 shane /kernel: mci0: type 16550A Nov 11 09:56:03 shane /kernel: sio2 not found at 0x3e8 Nov 11 09:56:03 shane /kernel: sio3 not found at 0x2e8 Nov 11 09:56:03 shane /kernel: lpt0 at 0x378-0x37f irq 7 on isa Nov 11 09:56:03 shane /kernel: lpt0: Interrupt-driven port Nov 11 09:56:03 shane /kernel: lp0: TCP/IP capable interface Nov 11 09:56:03 shane /kernel: mse0 not found at 0x23c Nov 11 09:56:04 shane /kernel: wdog0 not found Nov 11 09:56:04 shane /kernel: weather0 not found Nov 11 09:56:04 shane /kernel: power0 not found Nov 11 09:56:04 shane /kernel: dled0 at 0x0 maddr 0xdfff0 msize 16 on isa Nov 11 09:56:04 shane /kernel: pled0 at 0x0 maddr 0xdfff0 msize 16 on isa Nov 11 09:56:04 shane /kernel: sysstat0 at 0x0 maddr 0xdfff0 msize 16 on isa Nov 11 09:56:04 shane /kernel: sercon0 at 0x0 maddr 0xdfff0 msize 16 on isa Nov 11 09:56:04 shane /kernel: smpte0 at 0x0 maddr 0xdfff0 msize 16 on isa Nov 11 09:56:04 shane /kernel: xilinx0 at 0x0 maddr 0xdfff0 msize 16 on isa Nov 11 09:56:04 shane /kernel: nvram0 not found Nov 11 09:56:04 shane /kernel: fdc0 at 0x3f0-0x3f7 irq 6 drq 2 on isa Nov 11 09:56:05 shane /kernel: fdc0: NEC 765 Nov 11 09:56:05 shane /kernel: fd0: 1.44MB 3.5in Nov 11 09:56:05 shane /kernel: fd1: 1.2MB 5.25in Nov 11 09:56:05 shane /kernel: ep0 not found at 0x320 Nov 11 09:56:05 shane /kernel: npx0 on motherboard Nov 11 09:56:05 shane /kernel: npx0: INT 16 interface Nov 11 09:56:05 shane /kernel: changing root device to sd0a