Re: patch: p4tcc and speedstep cpufreq drivers

From: Tobias Grosser <dady0815_at_web.de>
Date: Fri, 18 Feb 2005 18:51:57 +0100
Hi,

i tried your patch on my IBM Thinkpad T41p.

Unfortunately it doesn't work very well. But I would like it to do so I
offer my help. ;-)

1. If I put acpi_perf_load="YES" before cpufreq_load="YES" in my
loader.conf everything boots fine. If I change the order and
cpufreq_load is first, my kernel crashes. I copyed last lines of the
screen for you:

--------------------------------------------------------------------
Pre-seeding: PRNG: acpi_ec0: info: new max delay is 70 us

Fatal trap 12 = page fault while in kernel mode
fault virtual address = 0x458b0d74
fault code = supervisor read, page not present
instruction pointer = 0x8:0xc0866429
stack pointer = 0x10:0xe6652ad4
frame pointer = 0x10:0xe6652ae4
code segment = base 0x0, limit dxfffff,
= DPC 0, pres 1, def32, gran 1
processor flags = interrupt enabled, resume, IOPL = 0
current process = 62 sysctl
trap number = 12
panic: page fault
--------------------------------------------------------------------

sysctl.conf
--------------------------------------------------------------------
hw.snd.pcm0.vchans=4
hw.ath.outdoor=0
dev.ath.0.rate_interval=200
--------------------------------------------------------------------

loader.conf
--------------------------------------------------------------------
ath_hal_load="YES"
hw.ath.outdoor="0"
ath_rate_load="YES"
if_ath_load="YES"
wlan_wep_load="YES"
autoboot_delay="1"
#ng_ubt_load="YES"
hw.ata.wc="0"
hw.snd.pcm0.vchans="4"
hw.acpi.verbose="1"
acpi_ibm_load="YES"
cpufreq_load="YES"
acpi_perf_load="YES"
--------------------------------------------------------------------

2. My dev.cpu sysctl shows not very much with this new patch:

with patch: "sysctl dev.cpu"
--------------------------------------------------------------------
dev.cpu.0.%desc: ACPI CPU (3 Cx states)
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU_
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq: -1
--------------------------------------------------------------------

without patch: "sysctl dev.cpu"
--------------------------------------------------------------------
dev.cpu.0.%desc: ACPI CPU (3 Cx states)
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU_
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq: 1700
dev.cpu.0.freq_levels: 1700/24500 1487/21437 1400/19500 1275/18375
1225/17062 12 00/16000 1062/15312 1000/13000 900/12000 875/12187
850/12250 800/9500 750/10000 700/9750 637/9187 600/6000 525/7312
500/6500 450/6000 425/6125 400/4750 375/4875  350/4875 300/4000 250/3250
212/3062 175/2437 150/2000 125/1625 100/1187 75/750
--------------------------------------------------------------------

3. Since always my CPU gets different numbers of Cx states, if connected
to power during boot or  not. 3 states with power 4 without. The number
of the states doesn't change, if I plug or unplug the power connection.

4. One question. Under Windows my battery should reach about 4.7 hrs
under FBSD i reached about 3 hrs with est. Will your new patches change
the BSD values?

Sincerly 
Tobias


Copyright (c) 1992-2005 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 6.0-CURRENT #12: Fri Feb 18 17:58:01 CET 2005
    root_at_tobias.home.web-wahnsinn.de:/usr/obj/usr/src/sys/MYKERNEL
WARNING: debug.mpsafenet forced to 0 as ipsec requires Giant
WARNING: MPSAFE network stack disabled, expect reduced performance.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) M processor 1700MHz (1694.51-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 = 515444736 (491 MB)
ath_hal: 0.9.14.9 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413)
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <IBM TP-1R> on motherboard
acpi_ec0: <Embedded Controller: GPE 0x1c, ECDT> port 0x66,0x62 on acpi0
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
cpu0: <ACPI CPU (3 Cx states)> on acpi0
acpi_perf0: <ACPI CPU Frequency Control> on cpu0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
pci_link0: <ACPI PCI Link LNKA> irq 11 on acpi0
pci_link1: <ACPI PCI Link LNKB> irq 11 on acpi0
pci_link2: <ACPI PCI Link LNKC> irq 11 on acpi0
pci_link3: <ACPI PCI Link LNKD> irq 11 on acpi0
pci_link4: <ACPI PCI Link LNKE> on acpi0
pci_link5: <ACPI PCI Link LNKF> on acpi0
pci_link6: <ACPI PCI Link LNKG> on acpi0
pci_link7: <ACPI PCI Link LNKH> irq 11 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
agp0: <Intel 82855 host to AGP bridge> mem 0xd0000000-0xdfffffff at device 0.0 on pci0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
pci0: <serial bus, USB> at device 29.0 (no driver attached)
pci0: <serial bus, USB> at device 29.1 (no driver attached)
pci0: <serial bus, USB> at device 29.2 (no driver attached)
pci0: <serial bus, USB> at device 29.7 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci2: <ACPI PCI bus> on pcib2
cbb0: <PCI-CardBus Bridge> mem 0xb0000000-0xb0000fff irq 11 at device 0.0 on pci2
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb1: <PCI-CardBus Bridge> mem 0xb1000000-0xb1000fff irq 11 at device 0.1 on pci2
cardbus1: <CardBus bus> on cbb1
pccard1: <16-bit PCCard bus> on cbb1
em0: <Intel(R) PRO/1000 Network Connection, Version - 1.7.35> port 0x8000-0x803f mem 0xc0200000-0xc020ffff,0xc0220000-0xc023ffff irq 11 at device 1.0 on pci2
em0: [GIANT-LOCKED]
em0: Ethernet address: 00:0d:60:f9:2a:44
em0:  Speed:N/A  Duplex:N/A
ath0: <Atheros 5212> mem 0xc0210000-0xc021ffff irq 11 at device 2.0 on pci2
ath0: [GIANT-LOCKED]
ath0: Ethernet address: 00:05:4e:4a:49:ae
ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
ichss: enabling SpeedStep support
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH4 UDMA100 controller> port 0x1860-0x186f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0
ata0: channel #0 on atapci0
ata1: channel #1 on atapci0
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
pcm0: <Intel ICH4 (82801DB)> port 0x18c0-0x18ff,0x1c00-0x1cff mem 0xc0000800-0xc00008ff,0xc0000c00-0xc0000dff irq 11 at device 31.5 on pci0
pcm0: [GIANT-LOCKED]
pcm0: <Analog Devices AD1981B AC97 Codec>
pci0: <simple comms> at device 31.6 (no driver attached)
acpi_tz0: <Thermal Zone> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
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: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 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_ec0: info: new max delay is 60 us
acpi_cmbat0: <Control Method Battery> on acpi0
acpi_acad0: <AC Adapter> on acpi0
acpi_ibm0: <IBM ThinkPad Button> on acpi0
acpi_ibm0: Version 100
acpi_ibm0: Available Mask 9dc
acpi_ibm0: Initial Mask 80c
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
pmtimer0 on isa0
ppc0: parallel port not found.
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
Timecounter "TSC" frequency 1694509693 Hz quality 800
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
acpi_cmbat0: battery initialization start
acpi_cmbat0: battery initialization done, tried 1 times
acpi_acad0: acline initialization start
acpi_acad0: On Line
acpi_acad0: acline initialization done, tried 1 times
ad0: 57231MB <HTS726060M9AT00/MH4OA6BA> [116280/16/63] at ata0-master UDMA100
acd0: CDRW <HL-DT-STCD-RW/DVD DRIVE GCC-4242N/0201> at ata1-master UDMA33
cd0 at ata1 bus 0 target 0 lun 0
cd0: <HL-DT-ST RW/DVD GCC-4242N 0201> Removable CD-ROM SCSI-0 device 
cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/ad0s1a
WARNING: / was not properly dismounted
WARNING: /usr was not properly dismounted
WARNING: /var was not properly dismounted
acpi_ec0: info: new max delay is 70 us
acpi_ec0: info: new max delay is 230 us
acpi_ec0: info: new max delay is 290 us

Copyright (c) 1992-2005 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 6.0-CURRENT #10: Mon Feb 14 13:33:08 CET 2005
    root_at_tobias.home.web-wahnsinn.de:/usr/obj/usr/src/sys/MYKERNEL
WARNING: debug.mpsafenet forced to 0 as ipsec requires Giant
WARNING: MPSAFE network stack disabled, expect reduced performance.
link_elf: symbol cpufreq_drv_type_desc undefined
KLD file cpufreq.ko - could not finalize loading
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) M processor 1700MHz (1694.51-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 = 515448832 (491 MB)
ath_hal: 0.9.14.9 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413)
npx0: [FAST]
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <IBM TP-1R> on motherboard
acpi_ec0: <Embedded Controller: GPE 0x1c, ECDT> port 0x66,0x62 on acpi0
acpi0: Power Button (fixed)
acpi_ec0: info: new max delay is 60 us
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
cpu0: <ACPI CPU (3 Cx states)> on acpi0
acpi_perf0: <ACPI CPU Frequency Control> on cpu0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
pci_link0: <ACPI PCI Link LNKA> irq 11 on acpi0
pci_link1: <ACPI PCI Link LNKB> irq 11 on acpi0
pci_link2: <ACPI PCI Link LNKC> irq 11 on acpi0
pci_link3: <ACPI PCI Link LNKD> irq 11 on acpi0
pci_link4: <ACPI PCI Link LNKE> on acpi0
pci_link5: <ACPI PCI Link LNKF> on acpi0
pci_link6: <ACPI PCI Link LNKG> on acpi0
pci_link7: <ACPI PCI Link LNKH> irq 11 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
agp0: <Intel 82855 host to AGP bridge> mem 0xd0000000-0xdfffffff at device 0.0 on pci0
pcib1: <ACPI PCI-PCI bridge> at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
pci0: <serial bus, USB> at device 29.0 (no driver attached)
pci0: <serial bus, USB> at device 29.1 (no driver attached)
pci0: <serial bus, USB> at device 29.2 (no driver attached)
pci0: <serial bus, USB> at device 29.7 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci2: <ACPI PCI bus> on pcib2
cbb0: <PCI-CardBus Bridge> mem 0xb0000000-0xb0000fff irq 11 at device 0.0 on pci2
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
cbb1: <PCI-CardBus Bridge> mem 0xb1000000-0xb1000fff irq 11 at device 0.1 on pci2
cardbus1: <CardBus bus> on cbb1
pccard1: <16-bit PCCard bus> on cbb1
em0: <Intel(R) PRO/1000 Network Connection, Version - 1.7.35> port 0x8000-0x803f mem 0xc0200000-0xc020ffff,0xc0220000-0xc023ffff irq 11 at device 1.0 on pci2
em0: [GIANT-LOCKED]
em0: Ethernet address: 00:0d:60:f9:2a:44
em0:  Speed:N/A  Duplex:N/A
ath0: <Atheros 5212> mem 0xc0210000-0xc021ffff irq 11 at device 2.0 on pci2
ath0: [GIANT-LOCKED]
ath0: Ethernet address: 00:05:4e:4a:49:ae
ath0: mac 5.6 phy 4.1 5ghz radio 1.7 2ghz radio 2.3
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH4 UDMA100 controller> port 0x1860-0x186f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0
ata0: channel #0 on atapci0
ata1: channel #1 on atapci0
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
pcm0: <Intel ICH4 (82801DB)> port 0x18c0-0x18ff,0x1c00-0x1cff mem 0xc0000800-0xc00008ff,0xc0000c00-0xc0000dff irq 11 at device 31.5 on pci0
pcm0: [GIANT-LOCKED]
pcm0: <Analog Devices AD1981B AC97 Codec>
pci0: <simple comms> at device 31.6 (no driver attached)
acpi_tz0: <Thermal Zone> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
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: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 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
acpi_ibm0: <IBM ThinkPad Button> on acpi0
acpi_ibm0: Version 100
acpi_ibm0: Available Mask 9dc
acpi_ibm0: Initial Mask 80c
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
pmtimer0 on isa0
ppc0: parallel port not found.
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
Timecounter "TSC" frequency 1694509531 Hz quality 800
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
acpi_cmbat0: battery initialization start
acpi_ec0: info: new max delay is 70 us
acpi_cmbat0: battery initialization done, tried 1 times
acpi_acad0: acline initialization start
acpi_acad0: On Line
acpi_acad0: acline initialization done, tried 1 times
ad0: 57231MB <HTS726060M9AT00/MH4OA6BA> [116280/16/63] at ata0-master UDMA100
acd0: CDRW <HL-DT-STCD-RW/DVD DRIVE GCC-4242N/0201> at ata1-master UDMA33
cd0 at ata1 bus 0 target 0 lun 0
cd0: <HL-DT-ST RW/DVD GCC-4242N 0201> Removable CD-ROM SCSI-0 device 
cd0: 33.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
Trying to mount root from ufs:/dev/ad0s1a
acpi_ec0: info: new max delay is 100 us
acpi_ec0: info: new max delay is 150 us
acpi_ec0: info: new max delay is 180 us
Received on Fri Feb 18 2005 - 16:52:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:28 UTC