| 
     
      
      
      From: Adam K. <ako...@co...> - 2002-01-27 22:46:33
       
   | 
Hi, So far so good on the 2.4.17 version of the Prometheus PCI driver. I'm down to one message during the PCI initialization that I'm not too sure of what it means. I'm not sure what the following is telling me: > PCI: Cannot allocate resource region 1 of PCI bridge 0 If I take a look at /proc/iomem, there are clearly entries for the resource that I've set up for the PCI memory and entries for the Voodoo 3 card show up as well. Similarly, /proc/ioports shows the I/O port listing for the Voodoo 3 I/O port. Here is the dmesg file for reference. Any ideas what the message means? Adam > Total memory = 127MB; using 512kB for hash table (at c0300000) > Linux version 2.4.17 (ro...@lo...) (gcc version 2.95.3 20010111 (prerelease/franzo/20010111)) #87 Sun Jan 27 11:12:34 EST 2002 > Amiga hardware found: [A3000] VIDEO BLITTER AMBER_FF AUDIO FLOPPY A3000_SCSI KEYBOARD MOUSE SERIAL PARALLEL A3000_CLK CHIP_RAM PAULA DENISE_HR AGNUS_HR_NTSC MAGIC_REKICK ZORRO3 > On node 0 totalpages: 32640 > zone(0): 32640 pages. > zone(1): 0 pages. > zone(2): 0 pages. > Kernel command line: root=/dev/hdf2 video=tdfx:800x600-8@60,noaccel debug=mem > APUS: BATs=1, BUS=67MHz, RAM=70ns, PCI bridge=0 > time_init: decrementer frequency = 16.669943 MHz > Console: colour dummy device 80x25 > Calibrating delay loop... 399.76 BogoMIPS > Memory: 125276k available (1652k kernel code, 696k data, 240k init, 0k highmem) > Dentry-cache hash table entries: 16384 (order: 5, 131072 bytes) > Inode-cache hash table entries: 8192 (order: 4, 65536 bytes) > Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) > Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes) > Page-cache hash table entries: 32768 (order: 5, 131072 bytes) > POSIX conformance testing by UNIFIX > Zorro: Probing AutoConfig expansion devices: 4 devices > Start: 0x40000000 End: 0x5fffffff > Prometheus PCI bridge detected. > About to do a zorro_request_device() > I made it here! > prom_setup_pci_ptrs: PCI mem resource requested > About to perform ioremap(). > ioremap: 400f0000 (00010000) -> c8000000 > Check out this Data 0xc8000000 > About to leave prom_pci_setup_ptrs() > PCI: Probing PCI hardware > About to INIT_LIST_HEAD > Inside prom_pcibios_fixup_bus() > PCI: Cannot allocate resource region 1 of PCI bridge 0 > PCI: resource is 40100000..5fffffff (200), parent c01e9c38 > PCI:00:01.0: Resource 0: 42000000-43ffffff (f=200) > PCI:00:01.0: Resource 1: 44000000-45ffffff (f=1208) > PCI:00:01.0: Resource 2: 40000000-400000ff (f=101) > PCI: Switching off ROM of 00:01.0 > Linux NET4.0 for Linux 2.4 > Based upon Swansea University Computer Society NET3.039 > Initializing RT netlink socket > Starting kswapd > parport0: Amiga built-in port using irq > ioremap: 42000000 (01000000) -> c801e000 > ioremap: 44000000 (01000000) -> c901f000 > ioremap: 40000000 (00001000) -> ca020000 > fb: Voodoo3 memory = 16384K > Console: switching to colour frame buffer device 100x37 > fb0: 3Dfx Voodoo3 frame buffer device > ami_decode_var: fetch start too low > fb1: Amiga ECS frame buffer device, using 640K of video memory > clgen: Driver for Cirrus Logic based graphic boards, v1.9.9.1 > Couldn't find PCI device > pty: 256 Unix98 ptys configured > Amiga-builtin serial driver version 4.30 > ttyS00 is the amiga builtin serial port > Amiga mouse installed. > Generic RTC Driver v1.02 > block: 128 slots per queue, batch=32 > RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize > Uniform Multi-Platform E-IDE driver Revision: 6.31 > ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx > ide0: X-Surf IDE interface > ide1: X-Surf IDE interface > ide2: Catweasel IDE interface > ide3: Catweasel IDE interface > ide4: Catweasel IDE interface > hde: SAMSUNG SHD-30560A (APRO-5) SSI, ATA DISK drive > hdf: FUJITSU MPD3091AH, ATA DISK drive > ide2 at 80ea0800 on irq 0x0000000c > hde: 1096048 sectors (561 MB) w/126KiB Cache, CHS=1087/16/63 > hdf: 17840696 sectors (9134 MB) w/512KiB Cache, CHS=17699/16/63 > ide-floppy driver 0.97.sv > Partition check: > hde: RDSK hde1 hde2 > hdf:last_ipl[2] already set to 2f, now 2d! > 730: 2 -2 2 -2 2 -2 2 -2 2 -2 2 -2 2 3 -3 2 > RDSK hdf1 hdf2 hdf3 > FD: probing units > found <5>fd: drive 0 didn't identify, setting default ffffffff > fd0 > SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256) (6 bit encapsulation enabled). > CSLIP: code copyright 1989 Regents of the University of California. > SLIP linefill/keepalive option. > loop: loaded (max 8 devices) > PPP generic driver version 2.4.1 > PPP Deflate Compression module registered > PPP BSD Compression module registered > eth0: X-Surf at 0x00e90000, Ethernet Address 52:54:40:28:9e:ac > No Hydra ethernet card found. > ide-floppy driver 0.97.sv > SCSI subsystem driver Revision: 1.00 > wd33c93-0: chip=WD33c93A/9 no_sync=0xff no_dma=0 debug_flags=0x00 > setup_args=,,,,,,,,, > Version 1.25 - 09/Jul/1997, Compiled Jan 26 2002 at 14:07:15 > scsi0 : Amiga 3000 built-in SCSI > sending SDTR 0103010000sync_xfer=00last_ipl[2] already set to 2f, now 2d! > 925: 2 -2 2 -2 2 -2 2 -2 2 -2 2 -2 2 3 -3 2 > Vendor: PIONEER Model: CD-ROM DR-124X Rev: 1.01 > Type: CD-ROM ANSI SCSI revision: 02 > Attached scsi CD-ROM sr0 at scsi0, channel 0, id 6, lun 0 > sr0: scsi3-mmc drive: 4x/4x xa/form2 cdda tray > Uniform CD-ROM driver Revision: 3.12 > NET4: Linux TCP/IP 1.0 for NET4.0 > IP Protocols: ICMP, UDP, TCP > IP: routing cache hash table of 512 buckets, 4Kbytes > TCP: Hash tables configured (established 8192 bind 8192) > NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. > VFS: Mounted root (ext2 filesystem) readonly. > Freeing unused kernel memory: 240k init > Warning: unable to open an initial console. > Adding Swap: 352288k swap-space (priority -1) >  | 
| 
     
      
      
      From: Geert U. <ge...@li...> - 2002-01-28 20:24:51
       
   | 
[ Note for the non-APUS readers: The Prometheus is a Zorro-PCI bridge for Amiga ] On Sun, 27 Jan 2002, Adam Kowalczyk wrote: > So far so good on the 2.4.17 version of the Prometheus PCI driver. I'm down > to one message during the PCI initialization that I'm not too sure of what > it means. I'm not sure what the following is telling me: > > > PCI: Cannot allocate resource region 1 of PCI bridge 0 So the PCI bus init code couldn't add the bus resource to the resource tree (i.e. that region was already occupied). > If I take a look at /proc/iomem, there are clearly entries for the resource > that I've set up for the PCI memory and entries for the Voodoo 3 card show > up as well. Similarly, /proc/ioports shows the I/O port listing for the > Voodoo 3 I/O port. Here is the dmesg file for reference. Any ideas what > the message means? Can you post the contents of /proc/iomem and /proc/ioports as well? And lspci -vv? I guess the Prometheus bus resources show up in /proc/ioports but not in /proc/iomem? > > Zorro: Probing AutoConfig expansion devices: 4 devices > > Start: 0x40000000 End: 0x5fffffff > > Prometheus PCI bridge detected. > > About to do a zorro_request_device() > > I made it here! > > prom_setup_pci_ptrs: PCI mem resource requested > > About to perform ioremap(). > > ioremap: 400f0000 (00010000) -> c8000000 > > Check out this Data 0xc8000000 > > About to leave prom_pci_setup_ptrs() > > PCI: Probing PCI hardware > > About to INIT_LIST_HEAD > > Inside prom_pcibios_fixup_bus() > > PCI: Cannot allocate resource region 1 of PCI bridge 0 > > PCI: resource is 40100000..5fffffff (200), parent c01e9c38 That's the PCI memory space of the Prometheus? (http://prometheus.amiga.pl/developer.html is refusing connections right now, so I can't verify). The error message is printed in pcibios_allocate_bus_resources() (arch/ppc/kernel/pci.c). That routine tries to find the parent resources for the resources of your PCI host bridge. Did you fill in bus->parent? - If no (I guess so), the code will use &iomem_resource as the parent resource. Then request_resource() will fail because the Zorro part of the Prometheus already has requested that region (you should see the Zorro part in /proc/iomem). - If yes (very unlikely), pci_find_parent_resource() did not find a correct resource to use as a parent for the region 40100000..5fffffff. So you should tell the bus setup code that your bus parent is the Prometheus Zorro device. Unfortunately that's not as simple as it sounds, since bus->parent is of type struct pci_bus *, which is not compatible with the Zorro bus ;-( The problem is that the PCI code assumes that PCI busses always hang off of nothing (i.e. the CPU) or other PCI busses, while in the Prometheus' case we don't have a PCI host bridge (bus->parent is NULL) or a PCI-PCI bridge (bus->parent is non-NULL), but a Zorro-PCI bridge. (Once we'll have had the generic device driver framework rewrite, I guess that'll be fixed) I think the best solution is to copy the pcibios_allocate_bus_resources() code to your Prometheus driver and modify it to always use &ioport_resource as the parent resource for PCI I/O resources, and zorro_dev.resource of the Prometheus Zorro device for PCI memory resources. It might still break other code that assumes bus->parent contains something valid, though. But since it works for normal PCI host bridges where bus->parent is NULL as well, I think everything will be fine. Question: Are there any other machines where the PCI subsystem doesn't hang off of the CPU, but of some other sufficiently intelligent bus (so VESA Local Bus doesn't count)? > > PCI:00:01.0: Resource 0: 42000000-43ffffff (f=200) > > PCI:00:01.0: Resource 1: 44000000-45ffffff (f=1208) > > PCI:00:01.0: Resource 2: 40000000-400000ff (f=101) > > PCI: Switching off ROM of 00:01.0 So your PCI devices are found and hooked up in the resource tree. > > ioremap: 42000000 (01000000) -> c801e000 > > ioremap: 44000000 (01000000) -> c901f000 > > ioremap: 40000000 (00001000) -> ca020000 > > fb: Voodoo3 memory = 16384K > > Console: switching to colour frame buffer device 100x37 > > fb0: 3Dfx Voodoo3 frame buffer device And the Voodoo3 is working! Very nice! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds  |