Date: Fri, 07 Dec 2007 08:35:27 -0500 From: Coleman Kane <cokane@FreeBSD.org> To: "Andrey V. Elsukov" <bu7cher@yandex.ru> Cc: freebsd-hackers@freebsd.org, Gary Corcoran <gcorcoran@rcn.com> Subject: Re: Overlap in PCI memory ranges Message-ID: <47594C1F.8070103@FreeBSD.org> In-Reply-To: <4758D544.5060405@yandex.ru> References: <475897DB.1010308@FreeBSD.org> <4758B6E8.7030502@rcn.com> <4758BEAB.6020306@FreeBSD.org> <4758D544.5060405@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------000000060103000106080100 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Andrey V. Elsukov wrote: > Coleman Kane wrote: >> My apologies. The lines *should* read (mem ranges overlap): >> >> atapci0: <ATI IXP600 SATA300 controller> port >> 0x9000-0x9007,0x9008-0x900b,0x9010-0x9017,0x5018-0x501b,0x5020-0x502f >> mem 0xd0609000-0xd06093ff irq 16 at device 18.0 on pci0 >> ..... >> pcm0: <ATI SB600 High Definition Audio Controller> mem >> 0xd0608000-0xd060bfff irq 16 at device 20.2 on pci0 > > Why you want to do it? Your SATA controoler doesn't works? > Can you show a bit more log messages related to the atapci0? > Also can you show `pciconf -l | grep ^atapci`? > pcm0: hdac_mem_alloc: Unable to allocate memory resource (and then attach fails) Also, the mem resources of the SATA controller are used for AHCI (however, PATA compatibility mode is supported using the port ranges, which is what the controller is forced to do). In addition, the device name string on the SATA controller is only there because I've been fooling with ata-chipset.c (to unsuccessfully attempt to get AHCI working). Reading the MMIO registers in AHCI mode seems to produce spurious instances of reading garbage data, followed by reading the data that I want. For instance, in ata-chipset.c line 771 ata_ahci_reset(): if (!(ATA_INL(ctlr->r_res2, ATA_AHCI_PI) & (1 << ch->unit))) { device_printf(dev, "port not implemented\n"); return; } Produces "port not implemented" whenever it is executed (it ends up reading 0x00020070 or a similar unexpected value. However, if I put another ATA_INL(ctlr->r_res2, ATA_AHCI_PI) just above the if() statement, it will read 0x00000001, which is the expected value for my situation (a single port SATA controller on a laptop). This is supposed to read a bitmap of the enabled ports on the SATA controller. Attaching dmesg: You'll notice the "fpudna in kernel mode!" and "ndis0: bssid_list failed" messages. These are related to an NDIS 5.1 wifi driver and don't apply to my problem. -- Coleman Kane --------------000000060103000106080100 Content-Type: text/plain; name="dmesg.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dmesg.txt" Copyright (c) 1992-2007 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-CURRENT #0: Wed Nov 28 17:16:00 EST 2007 root@erwin:/usr/obj/usr/src/sys/ERWIN Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Turion(tm) 64 X2 Mobile Technology TL-64 (2194.59-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x60f81 Stepping = 1 Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT> Features2=0x2001<SSE3,CX16> AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!> AMD Features2=0x11f<LAHF,CMP,SVM,ExtAPIC,CR8,Prefetch> Cores per package: 2 usable memory = 2001375232 (1908 MB) avail memory = 1931157504 (1841 MB) ACPI APIC Table: <HP 0944 > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ACPI Error (tbfadt-0516): 32/64X address mismatch in "Pm2ControlBlock": [ 8800] [ 0 8100], using 64X [20070320] ioapic0: Changing APIC ID to 2 ioapic0 <Version 2.1> irqs 0-23 on motherboard kbd1 at kbdmux0 cryptosoft0: <software crypto> on motherboard acpi0: <HPQOEM SLIC-MPC> on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) unknown: I/O range not supported acpi0: reservation of 0, 8000000 (3) failed acpi0: reservation of 100000, fff00000 (3) failed Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x8008-0x800b on acpi0 acpi_ec0: <Embedded Controller: GPE 0x11> port 0x62,0x66 on acpi0 cpu0: <ACPI CPU> on acpi0 acpi_throttle0: <ACPI CPU Throttling> on cpu0 powernow0: <PowerNow! K8> on cpu0 cpu1: <ACPI CPU> on acpi0 acpi_throttle1: <ACPI CPU Throttling> on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 powernow1: <PowerNow! K8> on cpu1 pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0 pci0: <ACPI PCI bus> on pcib0 pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0 pci1: <ACPI PCI bus> on pcib1 vgapci0: <VGA-compatible display> port 0x4000-0x40ff mem 0xc0000000-0xc7ffffff,0xd0400000-0xd040ffff,0xd0500000-0xd05fffff irq 19 at device 5.0 on pci1 pcib2: <ACPI PCI-PCI bridge> at device 4.0 on pci0 pci16: <ACPI PCI bus> on pcib2 pci0:16:0:0: failed to read VPD data. bge0: <Broadcom BCM5754/5787 A2, ASIC rev. 0xb002> mem 0xd0000000-0xd000ffff irq 16 at device 0.0 on pci16 miibus0: <MII bus> on bge0 brgphy0: <BCM5787 10/100/1000baseTX PHY> PHY 1 on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto bge0: Ethernet address: 00:1a:4b:74:39:96 bge0: [ITHREAD] pcib3: <ACPI PCI-PCI bridge> at device 5.0 on pci0 pci32: <ACPI PCI bus> on pcib3 pcib4: <ACPI PCI-PCI bridge> at device 6.0 on pci0 pci48: <ACPI PCI bus> on pcib4 ndis0: <Dell Wireless 1500 Draft 802.11n WLAN Mini-Card> mem 0xc8100000-0xc8103fff,0xc8000000-0xc80fffff irq 18 at device 0.0 on pci48 ndis0: [ITHREAD] ndis0: NDIS API version: 5.1 fpudna in kernel mode! ndis0: using obsoleted if_watchdog interface ndis0: Ethernet address: 00:1a:73:86:02:df atapci0: <ATI IXP600 SATA300 controller> port 0x9000-0x9007,0x9008-0x900b,0x9010-0x9017,0x5018-0x501b,0x5020-0x502f mem 0xd0609000-0xd06093ff irq 16 at device 18.0 on pci0 atapci0: [ITHREAD] ata2: <ATA channel 0> on atapci0 ata2: [ITHREAD] ata3: <ATA channel 1> on atapci0 ata3: [ITHREAD] ohci0: <OHCI (generic) USB controller> mem 0xd0601000-0xd0601fff irq 23 at device 19.0 on pci0 ohci0: [GIANT-LOCKED] ohci0: [ITHREAD] usb0: OHCI version 1.0, legacy support usb0: <OHCI (generic) USB controller> on ohci0 usb0: USB revision 1.0 uhub0: <ATI OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0 uhub0: 2 ports with 2 removable, self powered ohci1: <OHCI (generic) USB controller> mem 0xd0602000-0xd0602fff irq 17 at device 19.1 on pci0 ohci1: [GIANT-LOCKED] ohci1: [ITHREAD] usb1: OHCI version 1.0, legacy support usb1: <OHCI (generic) USB controller> on ohci1 usb1: USB revision 1.0 uhub1: <ATI OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb1 uhub1: 2 ports with 2 removable, self powered ohci2: <OHCI (generic) USB controller> mem 0xd0603000-0xd0603fff irq 17 at device 19.2 on pci0 ohci2: [GIANT-LOCKED] ohci2: [ITHREAD] usb2: OHCI version 1.0, legacy support usb2: <OHCI (generic) USB controller> on ohci2 usb2: USB revision 1.0 uhub2: <ATI OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2 uhub2: 2 ports with 2 removable, self powered ohci3: <OHCI (generic) USB controller> mem 0xd0604000-0xd0604fff irq 17 at device 19.3 on pci0 ohci3: [GIANT-LOCKED] ohci3: [ITHREAD] usb3: OHCI version 1.0, legacy support usb3: <OHCI (generic) USB controller> on ohci3 usb3: USB revision 1.0 uhub3: <ATI OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb3 uhub3: 2 ports with 2 removable, self powered ohci4: <OHCI (generic) USB controller> mem 0xd0605000-0xd0605fff irq 17 at device 19.4 on pci0 ohci4: [GIANT-LOCKED] ohci4: [ITHREAD] usb4: OHCI version 1.0, legacy support usb4: <OHCI (generic) USB controller> on ohci4 usb4: USB revision 1.0 uhub4: <ATI OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb4 uhub4: 2 ports with 2 removable, self powered ehci0: <EHCI (generic) USB 2.0 controller> mem 0xd0606000-0xd06060ff irq 23 at device 19.5 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb5: EHCI version 1.0 usb5: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4 usb5: <EHCI (generic) USB 2.0 controller> on ehci0 usb5: USB revision 2.0 uhub5: <ATI EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb5 uhub5: 10 ports with 10 removable, self powered pci0: <serial bus, SMBus> at device 20.0 (no driver attached) atapci1: <ATI IXP600 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x5040-0x504f irq 16 at device 20.1 on pci0 ata0: <ATA channel 0> on atapci1 ata0: [ITHREAD] pci0: <multimedia> at device 20.2 (no driver attached) isab0: <PCI-ISA bridge> at device 20.3 on pci0 isa0: <ISA bus> on isab0 pcib5: <ACPI PCI-PCI bridge> at device 20.4 on pci0 pci2: <ACPI PCI bus> on pcib5 cbb0: <RF5C476 PCI-CardBus Bridge> mem 0xd0100000-0xd0100fff irq 20 at device 4.0 on pci2 cardbus0: <CardBus bus> on cbb0 pccard0: <16-bit PCCard bus> on cbb0 cbb0: [ITHREAD] pci2: <serial bus, FireWire> at device 4.1 (no driver attached) battery0: <ACPI Control Method Battery> on acpi0 battery1: <ACPI Control Method Battery> on acpi0 acpi_acad0: <AC Adapter> on acpi0 acpi_button0: <Sleep Button> on acpi0 acpi_lid0: <Control Method Lid Switch> on acpi0 acpi_tz0: <Thermal Zone> on acpi0 atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model IntelliMouse, device ID 3 orm0: <ISA Option ROM> at iomem 0xd0000-0xd0fff on isa0 sc0: <System console> at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 fb0 at vga0 ubt0: <Broadcom Corp HP Integrated Module, class 224/1, rev 2.00/1.00, addr 2> on uhub0 ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2 ubt0: Interface 1 (alt.config 4) endpoints: isoc-in=0x83, isoc-out=0x3; wMaxPacketSize=64; nframes=5, buffer size=320 ugen0: <vendor 0x08ff Fingerprint Sensor, class 255/255, rev 1.10/6.23, addr 2> on uhub2 Timecounters tick every 1.000 msec Fast IPsec: Initialized Security Association Processing. acd0: DVDR <MATSHITADVD-RAM UJ-861H/1.50> at ata0-master PIO4 ad0: DMA limited to UDMA33, device found non-ATA66 cable ad0: 152627MB <FUJITSU MHW2160BH PL 891F> at ata2-master UDMA33 SMP: AP CPU #1 Launched! GEOM_JOURNAL: Journal 3284468597: ad0s1e contains data. GEOM_JOURNAL: Journal 3284468597: ad0s1e contains journal. GEOM_JOURNAL: Journal ad0s1e clean. Trying to mount root from ufs:/dev/ad0s1a fpudna in kernel mode! acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00 cd0 at ata0 bus 0 target 0 lun 0 cd0: <MATSHITA DVD-RAM UJ-861H 1.50> Removable CD-ROM SCSI-0 device cd0: 16.000MB/s transfers cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed Setting ESSID to "" ndis0: bssid_list failed ndis0: link state changed to UP pcm0: <ATI SB600 High Definition Audio Controller> mem 0xd0608000-0xd060bfff irq 16 at device 20.2 on pci0 pcm0: hdac_mem_alloc: Unable to allocate memory resource device_attach: pcm0 attach returned 6 fpudna in kernel mode! fpudna in kernel mode! fpudna in kernel mode! Setting ESSID to "" ndis0: link state changed to DOWN ndis0: bssid_list failed ndis0: link state changed to UP pcm0: <ATI SB600 High Definition Audio Controller> mem 0xd0608000-0xd060bfff irq 16 at device 20.2 on pci0 pcm0: hdac_mem_alloc: Unable to allocate memory resource device_attach: pcm0 attach returned 6 pcm0: <ATI SB600 High Definition Audio Controller> mem 0xd0608000-0xd060bfff irq 16 at device 20.2 on pci0 pcm0: hdac_mem_alloc: Unable to allocate memory resource device_attach: pcm0 attach returned 6 pcm0: <ATI SB600 High Definition Audio Controller> mem 0xd0608000-0xd060bfff irq 16 at device 20.2 on pci0 pcm0: hdac_mem_alloc: Unable to allocate memory resource device_attach: pcm0 attach returned 6 --------------000000060103000106080100--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47594C1F.8070103>