Power Patches

Lukas Ertl l.ertl at univie.ac.at
Fri Jan 2 05:19:40 PST 2004


On Thu, 1 Jan 2004, M. Warner Losh wrote:

> You should try it if:
>
> 	1) You are using hw.pci.unsupported_io=1.  Turn it off and use
> 	   these patches.  Let me know if it doesn't.  Typically it
> 	   appears that this helps people hitting the double
> 	   allocation problem.
> 	2) You have suspend/resume issues.  This should make them suck
> 	   less if they are with a specific device (not ata).

Hi Warner,

I experienced the following with this patch:

*) I still need to set hw.pci.allow_unsupported_io_range="1", otherwise
   cbb0 wouldn't attach:

cbb0: <TI1520 PCI-CardBus Bridge> mem 0xb0000000-0xb0000fff irq 4 at
device 0.0 on pci2
cbb0: Could not map register memory
device_probe_and_attach: cbb0 attach returned 12
cbb0: <TI1520 PCI-CardBus Bridge> mem 0xb1000000-0xb1000fff irq 5 at
device 0.1 on pci2
cbb0: Could not map register memory
device_probe_and_attach: cbb0 attach returned 12

*) My UHCI controller finally survives suspend/resume - YAY! :-)  But
   there is still something bogus with EHCI:

   *) boot - kldload usb -> ehci0 fails to attach.
   *) boot - suspend/resume - kldload usb -> ehci0 attaches successfully

   Failing looks like this:

uhci0: <Intel 82801DB (ICH4) USB controller USB-A> port 0x1800-0x181f irq
4 at device 29.0 on pci0
uhci0: Bus reserved 0x20 bytes for rid 0x20 type 4 at 0x1800
usb0: <Intel 82801DB (ICH4) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <Intel 82801DB (ICH4) USB controller USB-B> port 0x1820-0x183f irq
9 at device 29.1 on pci0
uhci1: Bus reserved 0x20 bytes for rid 0x20 type 4 at 0x1820
usb1: <Intel 82801DB (ICH4) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
uhci2: <Intel 82801DB (ICH4) USB controller USB-C> port 0x1840-0x185f irq
6 at device 29.2 on pci0
uhci2: Bus reserved 0x20 bytes for rid 0x20 type 4 at 0x1840
usb2: <Intel 82801DB (ICH4) USB controller USB-C> on uhci2
usb2: USB revision 1.0
uhub2: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 2 ports with 2 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xc0000000-0xc00003ff irq
11 at device 29.7 on pci0
ehci0: Bus reserved 0x400 bytes for rid 0x10 type 3 at 0xc0000000
ehci_pci_attach: companion usb0
ehci_pci_attach: companion usb1
ehci_pci_attach: companion usb2
usb3: EHCI version ff.ff
usb3: wrong number of companions (15 != 3)
ehci0: USB init failed err=13
device_probe_and_attach: ehci0 attach returned 5

*) I'm seeing some "Failed to set ACPI power state" on boot, dmesg is
   attached.

*) Otherwise, everything seems fine.

Copyright (c) 1992-2004 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 5.2-CURRENT #80: Fri Jan  2 13:45:19 CET 2004
    le at korben:/usr/obj/usr/src/sys/KORBEN
Preloaded elf kernel "/boot/kernel/kernel" at 0xc0852000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc085226c.
Preloaded acpi_dsdt "/boot/DSDT.aml" at 0xc08522bc.
Preloaded elf module "/boot/kernel/acpi.ko" at 0xc0852300.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) M processor 1300MHz (598.06-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x695  Stepping = 5
  Features=0xa7e9f9bf<FPU,VME,DE,PSE,TSC,MSR,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE>
real memory  = 536215552 (511 MB)
avail memory = 514973696 (491 MB)
Pentium Pro MTRR support enabled
ACPI: DSDT was overridden.
    ACPI-0374: *** Info: Table [DSDT] replaced by host OS
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <IBM    TP-1R   > on motherboard
acpi_ec0: <Embedded Controller: ECDT, GPE 0x1c, GLK> port 0x66,0x62 on acpi0
pcibios: BIOS version 2.10
Using $PIR table, 15 entries at 0xc00fdea0
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
acpi_cpu0: <CPU> port 0x530-0x537 on acpi0
acpi_tz0: <Thermal Zone> port 0x530-0x537 on acpi0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0:0:0: setting power state D0
pci0:29:0: setting power state D0
pcib0: slot 29 INTA is routed to irq 4
pci0:29:1: setting power state D0
pcib0: slot 29 INTB is routed to irq 9
pci0:29:2: setting power state D0
pcib0: slot 29 INTC is routed to irq 6
pci0:29:7: setting power state D0
pcib0: slot 29 INTD is routed to irq 11
pci0:31:0: setting power state D0
pci0:31:1: setting power state D0
pci0:31:3: setting power state D0
pcib0: slot 31 INTB is routed to irq 5
pci0:31:5: setting power state D0
pcib0: slot 31 INTB is routed to irq 5
pci0:31:6: setting power state D0
pcib0: slot 31 INTB is routed to irq 5
agp0: <Intel 82855 host to AGP bridge> mem 0xd0000000-0xdfffffff at device 0.0 on pci0
agp0: Bus reserved 0x10000000 bytes for rid 0x10 type 3 at 0xd0000000
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pci1:0:0: setting power state D0
pcib1: slot 0 INTA is routed to irq 4
pci1: <display, VGA> at device 0.0 (no driver attached)
pci0: <serial bus, USB> at device 29.0 (no driver attached)
pci0:29:0: setting power state D3
pci0: <serial bus, USB> at device 29.1 (no driver attached)
pci0:29:1: setting power state D3
pci0: <serial bus, USB> at device 29.2 (no driver attached)
pci0:29:2: setting power state D3
pci0: <serial bus, USB> at device 29.7 (no driver attached)
pci0:29:7: setting power state D3
pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci2: <ACPI PCI bus> on pcib2
start (b0000000) < sc->membase (c0200000)
start (b0000000) < sc->pmembase (e8000000)
pcib2: slot 0 INTA is routed to irq 4
start (b1000000) < sc->membase (c0200000)
start (b1000000) < sc->pmembase (e8000000)
pcib2: slot 0 INTB is routed to irq 5
pci2:2:0: setting power state D0
pcib2: slot 2 INTA is routed to irq 6
pci2:8:0: setting power state D0
pcib2: slot 8 INTA is routed to irq 10
cbb0: <TI1520 PCI-CardBus Bridge> mem 0xb0000000-0xb0000fff irq 4 at device 0.0 on pci2
cbb0: Bus reserved 0x1000 bytes for rid 0x10 type 3 at 0xb0000000
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb0: [MPSAFE]
cbb1: <TI1520 PCI-CardBus Bridge> mem 0xb1000000-0xb1000fff irq 5 at device 0.1 on pci2
cbb1: Bus reserved 0x1000 bytes for rid 0x10 type 3 at 0xb1000000
cardbus1: <CardBus bus> on cbb1
pccard1: <16-bit PCCard bus> on cbb1
cbb1: [MPSAFE]
pci2: <network> at device 2.0 (no driver attached)
pci2: Failed to set ACPI power state D3 on (null): AE_BAD_PARAMETER
pci2:2:0: setting power state D3
fxp0: <Intel 82801DB (ICH4) Pro/100 VE Ethernet> port 0x8000-0x803f mem 0xc0201000-0xc0201fff irq 10 at device 8.0 on pci2
fxp0: Bus reserved 0x1000 bytes for rid 0x10 type 3 at 0xc0201000
fxp0: Ethernet address 00:0d:60:38:76:78
miibus0: <MII bus> on fxp0
inphy0: <i82562ET 10/100 media interface> on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH4 UDMA100 controller> port 0x1860-0x186f at device 31.1 on pci0
atapci0: Bus reserved 0x10 bytes for rid 0x20 type 4 at 0x1860
ata0: at 0x1f0 irq 14 on atapci0
ata0: [MPSAFE]
ata1: at 0x170 irq 15 on atapci0
ata1: [MPSAFE]
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
pci0:31:3: setting power state D3
pcm0: <Intel ICH4 (82801DB)> port 0x18c0-0x18ff,0x1c00-0x1cff mem 0xc0000800-0xc00008ff,0xc0000c00-0xc0000dff irq 5 at device 31.5 on pci0
pcm0: Bus reserved 0x200 bytes for rid 0x18 type 3 at 0xc0000c00
pcm0: Bus reserved 0x100 bytes for rid 0x1c type 3 at 0xc0000800
pcm0: <Analog Devices AD1981B AC97 Codec>
pci0: <simple comms> at device 31.6 (no driver attached)
pci0: Failed to set ACPI power state D3 on (null): AE_BAD_PARAMETER
pci0:31:6: setting power state D3
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
psm0: <PS/2 Mouse> flags 0x2000 irq 12 on atkbdc0
psm0: model Generic PS/2 mouse, device ID 0
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 8250 or not responding
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
acpi_cmbat0: <Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
orm0: <Option ROMs> at iomem 0xe0000-0xeffff,0xdc000-0xdffff,0xd1000-0xd1fff,0xd0000-0xd0fff,0xc0000-0xcffff on isa0
pmtimer0 on isa0
fdc0: ready for input in output
fdc0: cmd 3 failed at out byte 1 of 3
ppc0: parallel port not found.
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounter "TSC" frequency 598062117 Hz quality 800
Timecounters tick every 10.000 msec
acpi_cpu: throttling enabled, 8 steps (100% to 12.5%), currently 100.0%
system power profile changed to 'economy'
start (88000000) < sc->membase (c0200000)
end (ffffffff) > sc->memlimit (cfffffff)
start (88000000) < sc->pmembase (e8000000)
end (ffffffff) > sc->pmemlimit (cfffffff)
start (88000000) < sc->membase (c0200000)
end (ffffffff) > sc->memlimit (cfffffff)
start (88000000) < sc->pmembase (e8000000)
end (ffffffff) > sc->pmemlimit (cfffffff)
ath0: <Atheros 5212> mem 0x88000000-0x8800ffff irq 5 at device 0.0 on cardbus1
start (88000000) < sc->membase (c0200000)
start (88000000) < sc->pmembase (e8000000)
ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
ath0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
ath0: 802.11 address: 00:09:5b:41:8d:ac
GEOM: create disk ad0 dp=0xc456b660
ad0: 57231MB <TOSHIBA MK6021GAS> [116280/16/63] at ata0-master UDMA100
acd0: CDRW <TOSHIBA DVD-ROM SD-R9012> at ata1-master UDMA33
Mounting root from ufs:/dev/ad0s2a

regards,
le

-- 
Lukas Ertl                             eMail: l.ertl at univie.ac.at
UNIX Systemadministrator               Tel.:  (+43 1) 4277-14073
Vienna University Computer Center      Fax.:  (+43 1) 4277-9140
University of Vienna                   http://mailbox.univie.ac.at/~le/


More information about the freebsd-hackers mailing list