From owner-freebsd-acpi@FreeBSD.ORG Sun Apr 26 20:02:12 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 984AC106564A for ; Sun, 26 Apr 2009 20:02:12 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id 4D83E8FC12 for ; Sun, 26 Apr 2009 20:02:12 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LyAYF-00022C-AY for freebsd-acpi@freebsd.org; Sun, 26 Apr 2009 13:02:11 -0700 Message-ID: <23245990.post@talk.nabble.com> Date: Sun, 26 Apr 2009 13:02:11 -0700 (PDT) From: Jakub Lach To: freebsd-acpi@freebsd.org In-Reply-To: <20090419231713.GA1118@venon.lostgarden> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jakub_lach@mailplus.pl References: <20090419223118.GA1320@venon.lostgarden> <20090419231713.GA1118@venon.lostgarden> Subject: Re: EST on PentiumD-T2080 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Apr 2009 20:02:12 -0000 Hello. You may be interested in ACPICA patches against CURRENT provided by jkim. http://people.freebsd.org/~jkim/ (acpica-import) -best regards, Jakub Lach William Grzybowski wrote: > > Well, forget about it, sorry. > > I realized that the static table is not really necessary, the est.c tries > to fetch the table list from ACPI. > > I recompiled the module once again and now the freq_list has a lot of > possible frequencies, a lot more than before. > > Before I send the first e-mail there as only 6 and I could not set any of > them because was listed as XXXX/-1. > > This problem is possible related to my bug laptop's acpi which has a lot > of errors about allocating resources. > > By the way, I already sent a couple of e-mails to this list before, ACPI > is a subject which I really like, maybe there is any kind of task > (development) that I could accomplish to help the freebsd project and > increases my knowledge about this? > > That's all, sorry for the annoyance with the previously e-mail. > > William. > > On Sun, Apr 19, 2009 at 07:31:18PM -0300, William Grzybowski wrote: >> Hi, >> >> I'm running 8-CURRENT from yesterday. >> >> Before the update I was running the snapshot for 2008-02. >> >> In this snapshot the cpufreq with EST seemed t be working fine, but after >> the update it is not recognizing the processor MSR. >> >> After a little bit of debugging I was able to get my MSR (32 most >> significant bits) as 0x06190d28 . >> And this value is not in the ESTprocs list, which would be ID32(1300, >> 1340, 600, 1100, 100) and does not make any sense for this CPU. >> >> So, the ESTprocs list hasn't changed for a while if I've looked it right >> which means the rdmsr instruction is returning the wrong data for some >> reason!? >> >> I am not any kind of the expert in the subject, just curious what could >> be wrong... >> >> The CPU is: >> CPU: Genuine Intel(R) CPU T2080 @ 1.73GHz (1733.41-MHz >> 686-class CPU) >> Origin = "GenuineIntel" Id = 0x6ec Stepping = 12 >> >> Features=0xbfe9fbff >> Features2=0xc189 >> AMD Features=0x100000 >> TSC: P-state invariant >> Cores per package: 2 >> >> Any toughts? >> >> Thank you. > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" > > -- View this message in context: http://www.nabble.com/EST-on-PentiumD-T2080-tp23126771p23245990.html Sent from the freebsd-acpi mailing list archive at Nabble.com. From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 27 03:00:31 2009 Return-Path: Delivered-To: acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2DEB106566C; Mon, 27 Apr 2009 03:00:31 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from mail-gx0-f218.google.com (mail-gx0-f218.google.com [209.85.217.218]) by mx1.freebsd.org (Postfix) with ESMTP id 73DE48FC1A; Mon, 27 Apr 2009 03:00:31 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by gxk18 with SMTP id 18so1848438gxk.19 for ; Sun, 26 Apr 2009 20:00:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=pUsvqDt7M19zmTn73Ua5JkFaCAcDPz5upV4j6KHS6gU=; b=EqBhSoTUo8WleHQEQGXUYWp492f6G4Sz1J1zyEIYTpKJ/YO2x3NScnkxXTs0dgYR+B wC1+KIctsOikschyc8WRFj4rbR4cwqso7EnhGTsYXuwFkCwenx2lQRe3Nb7oLLc1e6F3 yS88oojYEv0k4azpzErgpA9o/OB9se1MrCfFk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=rbtBMdtv6Z/FGX7UUBBjW1dyUnXlVLffL7WNEVR3qjvYOFnTkBtKEsKiXbIpZVJKyr n9MmiG22AoaUIfNJHbt7WQ3ZxG42hdBPaOufyBEMgvXjmqpXfG08VNDErnDA3NoTWGwQ iXPu/kxbCoKWBjayHhvlMKVMx0MM+UKsLuVi8= MIME-Version: 1.0 Received: by 10.151.137.5 with SMTP id p5mr7844582ybn.223.1240799262908; Sun, 26 Apr 2009 19:27:42 -0700 (PDT) In-Reply-To: <200904270150.31912.pieter@degoeje.nl> References: <200904270150.31912.pieter@degoeje.nl> Date: Sun, 26 Apr 2009 19:27:42 -0700 Message-ID: <7d6fde3d0904261927s1a67cf85jc982c1a68e30e081@mail.gmail.com> From: Garrett Cooper To: Pieter de Goeje Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: acpi , freebsd-hackers@freebsd.org, freebsd-performance@freebsd.org Subject: Re: ACPI-fast default timecounter, but HPET 83% faster X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2009 03:00:32 -0000 On Sun, Apr 26, 2009 at 4:50 PM, Pieter de Goeje wrote: > Dear hackers, > > While fiddling with the sysctl kern.timecounter.hardware, I found out tha= t on > my system HPET is significantly faster than ACPI-fast. Using the program > below I measured the number of clock_gettime() calls the system can execu= te > per second. I ran the program 10 times for each configuration and here ar= e > the results: > > x ACPI-fast > + HPET > +------------------------------------------------------------------------= -+ > |x =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +| > |x =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +| > |x =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0++| > |x =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0++| > |x =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0++| > |x =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0++| > |A =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0|A| > +------------------------------------------------------------------------= -+ > =A0 =A0N =A0 =A0 =A0 =A0 =A0 Min =A0 =A0 =A0 =A0 =A0 Max =A0 =A0 =A0 =A0M= edian =A0 =A0 =A0 =A0 =A0 Avg =A0 =A0 =A0 =A0Stddev > x =A010 =A0 =A0 =A0 =A0822032 =A0 =A0 =A0 =A0823752 =A0 =A0 =A0 =A0823551= =A0 =A0 =A0823397.8 =A0 =A0 509.43254 > + =A010 =A0 =A0 =A0 1498348 =A0 =A0 =A0 1506862 =A0 =A0 =A0 1502830 =A0 = =A0 1503267.4 =A0 =A0 2842.9779 > Difference at 95.0% confidence > =A0 =A0 =A0 =A0679870 +/- 1918.94 > =A0 =A0 =A0 =A082.5688% +/- 0.233052% > =A0 =A0 =A0 =A0(Student's t, pooled s =3D 2042.31) > > System details: Intel(R) Core(TM)2 Duo CPU E6750 =A0@ 2.66GHz (3200.02-MH= z > 686-class CPU), Gigabyte P35-DS3R motherboard running i386 -CURRENT updat= ed > today. > > Unfortunately I only have one system with a HPET timecounter, so I cannot > verify these results on another system. If similar results are obtained o= n > other machines, I think the HPET timecounter quality needs to be increase= d > beyond that of ACPI-fast. > > Regards, > > Pieter de Goeje > > ----- 8< ----- clock_gettime.c ----- 8< ------ > #include > #include > #include > > #define COUNT 1000000 > > int main() { > =A0 =A0 =A0 =A0struct timespec ts_start, ts_stop, ts_read; > =A0 =A0 =A0 =A0double time; > =A0 =A0 =A0 =A0int i; > > =A0 =A0 =A0 =A0clock_gettime(CLOCK_MONOTONIC, &ts_start); > =A0 =A0 =A0 =A0for(i =3D 0; i < COUNT; i++) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0clock_gettime(CLOCK_MONOTONIC, &ts_read); > =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0clock_gettime(CLOCK_MONOTONIC, &ts_stop); > > =A0 =A0 =A0 =A0time =3D (ts_stop.tv_sec - ts_start.tv_sec) + (ts_stop.tv_= nsec - > ts_start.tv_nsec) * 1E-9; > =A0 =A0 =A0 =A0printf("%.0f\n", COUNT / time); > } I'm seeing similar results. [root@orangebox /usr/home/gcooper]# dmesg | grep 'Timecounter "' Timecounter "i8254" frequency 1193182 Hz quality 0 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 Timecounter "HPET" frequency 14318180 Hz quality 900 [root@orangebox /usr/home/gcooper]# ./cgt 1369355 [root@orangebox /usr/home/gcooper]# sysctl kern.timecounter.hardware=3D"ACPI-fast" kern.timecounter.hardware: HPET -> ACPI-fast [root@orangebox /usr/home/gcooper]# ./cgt 772289 Why's the default ACPI-fast? For power-saving functionality or because of the `quality' factor? What is the criteria that determines the `quality' of a clock as what's being reported above (I know what determines the quality of a clock visually from a oscilloscope =3D])? Thanks, -Garrett From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 27 11:06:49 2009 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 245DA1065670 for ; Mon, 27 Apr 2009 11:06:49 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 109B08FC1A for ; Mon, 27 Apr 2009 11:06:49 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n3RB6mvB002182 for ; Mon, 27 Apr 2009 11:06:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n3RB6mOo002178 for freebsd-acpi@FreeBSD.org; Mon, 27 Apr 2009 11:06:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 27 Apr 2009 11:06:48 GMT Message-Id: <200904271106.n3RB6mOo002178@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-acpi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2009 11:06:49 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/132602 acpi [acpi] ACPI Problem with Intel SS4200: System does not o kern/130683 acpi [ACPI] shutdown hangs after syncing disks - ACPI race? o i386/129953 acpi [acpi] ACPI timeout (CDROM) with Shuttle X27D o kern/129618 acpi [acpi] Problem with ACPI on HP Pavilion DV2899 laptop o kern/129563 acpi [acpi] sleep broken on IBM/Lenovo T61 in amd64 mode o kern/128639 acpi [patch] [acpi_asus] acpi for ASUS A6F,A3E,A3F,A3N not f kern/128634 acpi [patch] fix acpi_asus(4) in asus a6f laptop o kern/127581 acpi [patch] [acpi_sony] Add support for more Sony features o kern/124744 acpi [acpi] [patch] incorrect _BST result validation for To o kern/124412 acpi [acpi] power off error on Toshiba M40 laptop o kern/123039 acpi [acpi] ACPI AML_BUFFER_LIMIT errors during boot o kern/121504 acpi [patch] Correctly set hw.acpi.osname on certain machin f kern/121454 acpi [pst] Promise SuperTrak SX6000 does not load during bo o kern/121102 acpi [acpi_fujitsu] [patch] update acpi_fujitsu for the P80 o kern/120515 acpi [acpi] [patch] acpi_alloc_wakeup_handler: can't alloc o kern/119356 acpi [acpi]: i386 ACPI wakeup not work due resource exhaust o kern/119200 acpi [acpi] Lid close switch suspends CPU for 1 second on H o kern/118973 acpi [acpi]: Kernel panic with acpi boot o kern/117605 acpi [acpi] [request] add debug.cpufreq.highest o kern/116939 acpi [acpi] PCI-to-PCI misconfigured for bus three and can o i386/114562 acpi [acpi] cardbus is dead after s3 on Thinkpad T43 with a o kern/114165 acpi [acpi] Dell C810 - ACPI problem s kern/112544 acpi [acpi] [patch] Add High Precision Event Timer Driver f o kern/108954 acpi [acpi] 'sleep(1)' sleeps >1 seconds when speedstep (Cx o kern/108695 acpi [acpi]: Fatal trap 9: general protection fault when in o kern/108488 acpi [acpi] ACPI-1304: *** Error: Method execution failed o kern/108017 acpi [acpi]: Acer Aspire 5600 o kern/106924 acpi [acpi] ACPI resume returns g_vfs_done() errors and ker o kern/105537 acpi [acpi] problems in acpi on HP Compaq nc6320 o kern/104625 acpi ACPI on ASUS A8N-32 SLI/ASUS P4P800 does not show ther o kern/102252 acpi acpi thermal does not work on Abit AW8D (intel 975) o kern/97383 acpi Volume buttons on IBM Thinkpad crash system with ACPI s i386/91748 acpi acpi problem on Acer TravelMare 4652LMi (nvidia panic, s kern/91038 acpi [panic] [ata] [acpi] 6.0-RELEASE on Fujitsu Siemens Am s kern/90243 acpi Laptop fan doesn't turn off (ACPI enabled) (Packard Be f kern/89411 acpi [acpi] acpiconf bug o i386/83018 acpi [install] Installer will not boot on Asus P4S8X BIOS 1 o kern/81000 acpi [apic] Via 8235 sound card worked great with FreeBSD 5 o i386/79081 acpi ACPI suspend/resume not working on HP nx6110 o kern/76950 acpi ACPI wrongly blacklisted on Micron ClientPro 766Xi sys s kern/73823 acpi [request] acpi / power-on by timer support o i386/72566 acpi ACPI, FreeBSD disables fan on Compaq Armada 1750 o i386/69750 acpi Boot without ACPI failed on ASUS L5 o kern/56024 acpi ACPI suspend drains battery while in S3 o i386/55661 acpi ACPI suspend/resume problem on ARMADA M700 o i386/54756 acpi ACPI suspend/resume problem on CF-W2 laptop 46 problems total. From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 27 12:54:12 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E56151065670 for ; Mon, 27 Apr 2009 12:54:12 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4878FC12 for ; Mon, 27 Apr 2009 12:54:11 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA09909; Mon, 27 Apr 2009 15:54:09 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <49F5AAF0.9080607@freebsd.org> Date: Mon, 27 Apr 2009 15:54:08 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: Fabian Keil References: <49DB639A.4090504@icyb.net.ua> <49DCF5C2.60805@root.org> <49DDF906.8090400@icyb.net.ua> <49DF3CA4.1090309@freebsd.org> <49E4B2A7.3020302@freebsd.org> <49E61986.7040709@root.org> <49E8AED0.1090008@freebsd.org> <20090418125806.2a48b0a8@fabiankeil.de> <49E9FFB0.6090707@root.org> <49EC60C6.7000702@freebsd.org> <49EC9D2F.8080701@root.org> <49EDFBBA.1080504@freebsd.org> <20090422183214.1e3372c6@fabiankeil.de> <49F09A23.9080802@freebsd.org> <20090425102109.0520ce59@fabiankeil.de> In-Reply-To: <20090425102109.0520ce59@fabiankeil.de> X-Enigmail-Version: 0.95.7 Content-Type: multipart/mixed; boundary="------------050607000503030306050307" Cc: freebsd-acpi@freebsd.org Subject: Re: run resume code only for S1-S4 states X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2009 12:54:13 -0000 This is a multi-part message in MIME format. --------------050607000503030306050307 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit on 25/04/2009 11:21 Fabian Keil said the following: > Sure. It turns out that the problem is unrelated to your patch. > I can reproduce it with an unpatched kernel too, by once pressing > the power button before the second core is started. > > I probably did the same a few days ago, and forgot about it. Sorry. Fabian, thank you very much for the testing and the insight, this is very useful and interesting. I think that it might be that 'init' process in pre-natal state loses a signal sent to it. I decided to follow Nate's advice and exempt S5 from timeout policy (after all it is possible to execute shutdown(8) multiple times and concurrently with any other sleep request). With previous version of the patch once shutdown_nice() failed once it was impossible to enter any sleep state ever. shutdown_nice failure is quite exotic event, but as you have proven it is not impossible. So the new patch is attached. -- Andriy Gapon --------------050607000503030306050307 Content-Type: text/plain; name="acpi_s5.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="acpi_s5.diff" diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 50b84a5..d8626b4 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -2482,6 +2482,18 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state); + if (state < ACPI_STATE_S1 || state > ACPI_STATE_S5) + return_ACPI_STATUS (AE_BAD_PARAMETER); + + if (state == ACPI_STATE_S5) { + /* + * Shut down cleanly and power off. This will call us back through the + * shutdown handlers. + */ + shutdown_nice(RB_POWEROFF); + return_ACPI_STATUS (AE_OK); + } + /* Re-entry once we're suspending is not allowed. */ status = acpi_sleep_disable(sc); if (ACPI_FAILURE(status)) { @@ -2502,92 +2514,74 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) mtx_lock(&Giant); slp_state = ACPI_SS_NONE; - switch (state) { - case ACPI_STATE_S1: - case ACPI_STATE_S2: - case ACPI_STATE_S3: - case ACPI_STATE_S4: - status = AcpiGetSleepTypeData(state, &TypeA, &TypeB); - if (status == AE_NOT_FOUND) { - device_printf(sc->acpi_dev, - "Sleep state S%d not supported by BIOS\n", state); - break; - } else if (ACPI_FAILURE(status)) { - device_printf(sc->acpi_dev, "AcpiGetSleepTypeData failed - %s\n", - AcpiFormatException(status)); - break; - } + status = AcpiGetSleepTypeData(state, &TypeA, &TypeB); + if (status == AE_NOT_FOUND) { + device_printf(sc->acpi_dev, + "Sleep state S%d not supported by BIOS\n", state); + goto backout; + } else if (ACPI_FAILURE(status)) { + device_printf(sc->acpi_dev, "AcpiGetSleepTypeData failed - %s\n", + AcpiFormatException(status)); + goto backout; + } - sc->acpi_sstate = state; + sc->acpi_sstate = state; - /* Enable any GPEs as appropriate and requested by the user. */ - acpi_wake_prep_walk(state); - slp_state = ACPI_SS_GPE_SET; + /* Enable any GPEs as appropriate and requested by the user. */ + acpi_wake_prep_walk(state); + slp_state = ACPI_SS_GPE_SET; - /* - * Inform all devices that we are going to sleep. If at least one - * device fails, DEVICE_SUSPEND() automatically resumes the tree. - * - * XXX Note that a better two-pass approach with a 'veto' pass - * followed by a "real thing" pass would be better, but the current - * bus interface does not provide for this. - */ - if (DEVICE_SUSPEND(root_bus) != 0) { - device_printf(sc->acpi_dev, "device_suspend failed\n"); - break; - } - slp_state = ACPI_SS_DEV_SUSPEND; + /* + * Inform all devices that we are going to sleep. If at least one + * device fails, DEVICE_SUSPEND() automatically resumes the tree. + * + * XXX Note that a better two-pass approach with a 'veto' pass + * followed by a "real thing" pass would be better, but the current + * bus interface does not provide for this. + */ + if (DEVICE_SUSPEND(root_bus) != 0) { + device_printf(sc->acpi_dev, "device_suspend failed\n"); + goto backout; + } + slp_state = ACPI_SS_DEV_SUSPEND; - /* If testing device suspend only, back out of everything here. */ - if (acpi_susp_bounce) - break; + /* If testing device suspend only, back out of everything here. */ + if (acpi_susp_bounce) + goto backout; - status = AcpiEnterSleepStatePrep(state); - if (ACPI_FAILURE(status)) { - device_printf(sc->acpi_dev, "AcpiEnterSleepStatePrep failed - %s\n", - AcpiFormatException(status)); - break; - } - slp_state = ACPI_SS_SLP_PREP; + status = AcpiEnterSleepStatePrep(state); + if (ACPI_FAILURE(status)) { + device_printf(sc->acpi_dev, "AcpiEnterSleepStatePrep failed - %s\n", + AcpiFormatException(status)); + goto backout; + } + slp_state = ACPI_SS_SLP_PREP; - if (sc->acpi_sleep_delay > 0) - DELAY(sc->acpi_sleep_delay * 1000000); + if (sc->acpi_sleep_delay > 0) + DELAY(sc->acpi_sleep_delay * 1000000); - if (state != ACPI_STATE_S1) { - acpi_sleep_machdep(sc, state); + if (state != ACPI_STATE_S1) { + acpi_sleep_machdep(sc, state); - /* Re-enable ACPI hardware on wakeup from sleep state 4. */ - if (state == ACPI_STATE_S4) - AcpiEnable(); - } else { - ACPI_DISABLE_IRQS(); - status = AcpiEnterSleepState(state); - if (ACPI_FAILURE(status)) { - device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", - AcpiFormatException(status)); - break; - } + /* Re-enable ACPI hardware on wakeup from sleep state 4. */ + if (state == ACPI_STATE_S4) + AcpiEnable(); + } else { + ACPI_DISABLE_IRQS(); + status = AcpiEnterSleepState(state); + if (ACPI_FAILURE(status)) { + device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n", + AcpiFormatException(status)); + goto backout; } - slp_state = ACPI_SS_SLEPT; - break; - case ACPI_STATE_S5: - /* - * Shut down cleanly and power off. This will call us back through the - * shutdown handlers. - */ - shutdown_nice(RB_POWEROFF); - status = AE_OK; - break; - case ACPI_STATE_S0: - default: - status = AE_BAD_PARAMETER; - break; } + slp_state = ACPI_SS_SLEPT; /* * Back out state according to how far along we got in the suspend * process. This handles both the error and success cases. */ +backout: sc->acpi_next_sstate = 0; if (slp_state >= ACPI_SS_GPE_SET) { acpi_wake_prep_walk(state); @@ -2609,8 +2603,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) #endif /* Allow another sleep request after a while. */ - if (state != ACPI_STATE_S5) - timeout(acpi_sleep_enable, sc, hz * ACPI_MINIMUM_AWAKETIME); + timeout(acpi_sleep_enable, sc, hz * ACPI_MINIMUM_AWAKETIME); /* Run /etc/rc.resume after we are back. */ if (devctl_process_running()) --------------050607000503030306050307-- From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 27 19:20:23 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5E4110656BD; Mon, 27 Apr 2009 19:20:23 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay09.ispgateway.de (smtprelay09.ispgateway.de [80.67.29.23]) by mx1.freebsd.org (Postfix) with ESMTP id 67D038FC20; Mon, 27 Apr 2009 19:20:23 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from [62.143.132.243] (helo=localhost) by smtprelay09.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1LyWNK-0006LP-1a; Mon, 27 Apr 2009 21:20:22 +0200 Date: Mon, 27 Apr 2009 21:20:16 +0200 From: Fabian Keil To: Andriy Gapon Message-ID: <20090427212016.43dd83d6@fabiankeil.de> In-Reply-To: <49F5AAF0.9080607@freebsd.org> References: <49DB639A.4090504@icyb.net.ua> <49DCF5C2.60805@root.org> <49DDF906.8090400@icyb.net.ua> <49DF3CA4.1090309@freebsd.org> <49E4B2A7.3020302@freebsd.org> <49E61986.7040709@root.org> <49E8AED0.1090008@freebsd.org> <20090418125806.2a48b0a8@fabiankeil.de> <49E9FFB0.6090707@root.org> <49EC60C6.7000702@freebsd.org> <49EC9D2F.8080701@root.org> <49EDFBBA.1080504@freebsd.org> <20090422183214.1e3372c6@fabiankeil.de> <49F09A23.9080802@freebsd.org> <20090425102109.0520ce59@fabiankeil.de> <49F5AAF0.9080607@freebsd.org> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.1; i386-portbld-freebsd8.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2008-08-18.asc Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/mnqm9zSn_LDfWpgvZdfAAOr"; protocol="application/pgp-signature" X-Df-Sender: 775067 Cc: freebsd-acpi@freebsd.org Subject: Re: run resume code only for S1-S4 states X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2009 19:20:25 -0000 --Sig_/mnqm9zSn_LDfWpgvZdfAAOr Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Andriy Gapon wrote: > on 25/04/2009 11:21 Fabian Keil said the following: > > Sure. It turns out that the problem is unrelated to your patch. > > I can reproduce it with an unpatched kernel too, by once pressing > > the power button before the second core is started. > >=20 > > I probably did the same a few days ago, and forgot about it. Sorry. > thank you very much for the testing and the insight, this is very useful = and > interesting. > I think that it might be that 'init' process in pre-natal state loses a s= ignal > sent to it. >=20 > I decided to follow Nate's advice and exempt S5 from timeout policy (afte= r all it > is possible to execute shutdown(8) multiple times and concurrently with a= ny other > sleep request). With previous version of the patch once shutdown_nice() f= ailed > once it was impossible to enter any sleep state ever. shutdown_nice failu= re is > quite exotic event, but as you have proven it is not impossible. >=20 > So the new patch is attached. Thanks. The patch works and pressing the power button early on boot before it actually has any effect no longer prevents the power button from working later on. Fabian --Sig_/mnqm9zSn_LDfWpgvZdfAAOr Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkn2BXUACgkQBYqIVf93VJ1P8ACguVbw8uRZG2FrHIqtIRQkHQem xTEAoLcEzlvwOc2e1M9cTIonRHHmbIb+ =LOW1 -----END PGP SIGNATURE----- --Sig_/mnqm9zSn_LDfWpgvZdfAAOr-- From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 27 20:19:29 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 300841065680 for ; Mon, 27 Apr 2009 20:19:29 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id D7AB28FC12 for ; Mon, 27 Apr 2009 20:19:28 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LyXIW-0002ih-1x for freebsd-acpi@freebsd.org; Mon, 27 Apr 2009 13:19:28 -0700 Message-ID: <23264191.post@talk.nabble.com> Date: Mon, 27 Apr 2009 13:19:28 -0700 (PDT) From: Jakub Lach To: freebsd-acpi@freebsd.org In-Reply-To: <539c60b90904242313g20a3e6e4q20e555b318798764@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: jakub_lach@mailplus.pl References: <539c60b90904242313g20a3e6e4q20e555b318798764@mail.gmail.com> Subject: Re: lenovo s10e minor errors X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2009 20:19:29 -0000 Hello. If you are running CURRENT, you may like to try fresh acapica-import patches. http://people.freebsd.org/~jkim/ -best regards, Jakub Lach Steve Franks-4 wrote: > > Hi, > > These in no way seem to affect my system (although it won't resume, I > suspect that's seperate), but I thought someone would want a look at > it, since these netbooks are pretty new. > > Incidentally, if anyone picks one up, there's no bios-block against > replacing the broadcom 80211 with a ath (i.e. sparklan). > > Best, > Steve > > [steve@terra /usr/home/steve/projects/include]$ dmesg > ACPI Error (exfldio-0390): Region EmbeddedControl(3) has no handler > [20070320] > ACPI Error (psparse-0626): Method parse/execution failed > [\\_TZ_.TZ00._TMP] (Node 0xc41b7220), AE_NOT_EXIST > ACPI Error (evregion-0427): No handler for Region [ERAM] (0xc41b8c80) > [EmbeddedControl] [20070320] > ACPI Error (exfldio-0390): Region EmbeddedControl(3) has no handler > [20070320] > ACPI Error (psparse-0626): Method parse/execution failed > [\\_TZ_.TZ00._TMP] (Node 0xc41b7220), AE_NOT_EXIST > ACPI Error (evregion-0427): No handler for Region [ERAM] (0xc41b8c80) > [EmbeddedControl] [20070320] > ACPI Error (exfldio-0390): Region EmbeddedControl(3) has no handler > [20070320] > ACPI Error (psparse-0626): Method parse/execution failed [\\_GPE._L02] > (Node 0xc41b74a0), AE_NOT_EXIST > ACPI Exception (evgpe-0687): AE_NOT_EXIST, while evaluating GPE method > [_L02] [20070320] > ACPI Error (evregion-0427): No handler for Region [ERAM] (0xc41b8c80) > [EmbeddedControl] [20070320] > ACPI Error (exfldio-0390): Region EmbeddedControl(3) has no handler > [20070320] > > etc...as you can see, they overrun the dmesg buffer after a few minutes... > _______________________________________________ > freebsd-acpi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-acpi > To unsubscribe, send any mail to "freebsd-acpi-unsubscribe@freebsd.org" > > -- View this message in context: http://www.nabble.com/lenovo-s10e-minor-errors-tp23229166p23264191.html Sent from the freebsd-acpi mailing list archive at Nabble.com. From owner-freebsd-acpi@FreeBSD.ORG Mon Apr 27 20:57:26 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BE611065670 for ; Mon, 27 Apr 2009 20:57:26 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id E8D9A8FC12 for ; Mon, 27 Apr 2009 20:57:25 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so102851ywe.13 for ; Mon, 27 Apr 2009 13:57:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2uKtiauy7Kju6+/wH90KK7PLVL1T8Y22anaIPNBID2c=; b=igNJQyD7/Ub/WrqK/la83jkjElnPWJrKMFEkzu+AHeOYULoXfD3DZYECydPtbwwGiJ 5QzCDWL2JR9GDNpAPup3MS2+Gs0w31WieVOFeJyAuYEFIrTgch4ENuG9cNVX/GRakERL tKpfsRrobVHxNBylMKOrRL4MM/2QGXJg40dcY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Od5LDs0thn58b7xOd5CMplNGER0ckB0cZnKDbry9sASHejioTXkD97sqBgRHgSOQLg jiJ5d7HIVr1sl3b9B7Cs8z+QVCpTVUSyyurL6koAacvJkDe/xBPWoZpOMOXFODqFWPlw gkRRIa0wMu9AMuKAZv3WSH6iXbV5mg2KMUASw= MIME-Version: 1.0 Received: by 10.100.240.17 with SMTP id n17mr9169268anh.1.1240865845257; Mon, 27 Apr 2009 13:57:25 -0700 (PDT) In-Reply-To: <23264191.post@talk.nabble.com> References: <539c60b90904242313g20a3e6e4q20e555b318798764@mail.gmail.com> <23264191.post@talk.nabble.com> Date: Mon, 27 Apr 2009 13:57:25 -0700 Message-ID: <539c60b90904271357q2a1256d9qba46bdd8e63da2a7@mail.gmail.com> From: Steve Franks To: Jakub Lach Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-acpi@freebsd.org Subject: Re: lenovo s10e minor errors X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2009 20:57:26 -0000 On Mon, Apr 27, 2009 at 1:19 PM, Jakub Lach wrote: > > Hello. > > If you are running CURRENT, you may like to try > fresh acapica-import patches. > Thanks, I'm on STABLE - just pushing it up the chain, since it really doesn't affect me (other than barfing all over dmesg). Now if I could figure out why the box won't power off on shutdown, or resume past a blinking cursor, that would be worth a move to CURRENT... Steve From owner-freebsd-acpi@FreeBSD.ORG Tue Apr 28 03:39:03 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C80BA1065672 for ; Tue, 28 Apr 2009 03:39:03 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [220.233.188.227]) by mx1.freebsd.org (Postfix) with ESMTP id 4D0EF8FC12 for ; Tue, 28 Apr 2009 03:39:03 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id n3S3d0J6020853; Tue, 28 Apr 2009 13:39:00 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 28 Apr 2009 13:38:59 +1000 (EST) From: Ian Smith To: Steve Franks In-Reply-To: <539c60b90904271357q2a1256d9qba46bdd8e63da2a7@mail.gmail.com> Message-ID: <20090428132508.R89549@sola.nimnet.asn.au> References: <539c60b90904242313g20a3e6e4q20e555b318798764@mail.gmail.com> <23264191.post@talk.nabble.com> <539c60b90904271357q2a1256d9qba46bdd8e63da2a7@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-acpi@freebsd.org, Jakub Lach Subject: Re: lenovo s10e minor errors X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2009 03:39:04 -0000 On Mon, 27 Apr 2009, Steve Franks wrote: > On Mon, Apr 27, 2009 at 1:19 PM, Jakub Lach wrote: > > > > Hello. > > > > If you are running CURRENT, you may like to try > > fresh acapica-import patches. > > > > Thanks, I'm on STABLE - just pushing it up the chain, since it really > doesn't affect me (other than barfing all over dmesg). > > Now if I could figure out why the box won't power off on shutdown, or > resume past a blinking cursor, that would be worth a move to > CURRENT... Some older thinkpads (eg my T23) resume properly (or better, or at all) with sysctl hw.syscons.sc_no_suspend_vtswitch=1 Some others have reported benefit from hw.acpi.reset_video=1 Just curious: does loading acpi_ibm work with this lenovo? cheers, Ian From owner-freebsd-acpi@FreeBSD.ORG Wed Apr 29 23:52:29 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58F5C106566B for ; Wed, 29 Apr 2009 23:52:29 +0000 (UTC) (envelope-from patttern@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id BF0D28FC14 for ; Wed, 29 Apr 2009 23:52:28 +0000 (UTC) (envelope-from patttern@gmail.com) Received: by bwz9 with SMTP id 9so1480647bwz.43 for ; Wed, 29 Apr 2009 16:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=RaqvT8hRDwkWfKTYcdQUbBm0u9rBCH8XiNOrd0EDsTo=; b=dea/huGWmyKxKqzqGaleSX+PhFG59ORLl4ubDpvdHwAMID6u/pIG04Mw+93mzs8JAn Q6x1k1RZYIdGuSgos4KOW6MwlnpLpQfbq/c2/HXI1fHiYBq4XHQ+MGi5qnOzKk+dwDLJ OJ9bva8qC3wkD3gxMC4Av9tj8f9WUEKKZOajM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=LIQyk4P114PqPCjhAVkZUXn//pYfLSvEvTXVHH5K7/CRp0CWOc1hsB3DswBW4WBVJs CGA0o04QAEnivdP9uxcnBgpkD/6sFN4qT5z/J9SSZzNQHL7puyV9EVNReMVO/XtPlWZ2 K3UA2ZQvhZiKEbh6MBNSAiT9NoNFgY/zz6Fz0= MIME-Version: 1.0 Received: by 10.204.117.131 with SMTP id r3mr827613bkq.100.1241047629282; Wed, 29 Apr 2009 16:27:09 -0700 (PDT) Date: Thu, 30 Apr 2009 03:27:09 +0400 Message-ID: <107cc88f0904291627ra8517e6j661ae329446852a1@mail.gmail.com> From: =?ISO-8859-1?Q?Pattern=AE?= To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: ACPI on Toshiba A210 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2009 23:52:29 -0000 Hi! I have a problem with ACPI on notebook Toshiba Sattelite A210-16f. At loading FreeBSD by default, the system does not detect hard disks. Through acpidump i have received a dsl-file. (dsdt_SB600.dsl) After considerable editing of a file, i have received a file without errors. (dsdt_SB600.diff) Result of operation iasl. [2:36 pattern@toshiba /root/acpica]# iasl dsdt_SB600_edit.dsl Intel ACPI Component Architecture ASL Optimizing Compiler version 20070320 [Mar 31 2009] Copyright (C) 2000 - 2007 Intel Corporation Supports ACPI Specification Revision 3.0a ASL Input: dsdt_SB600_edit.dsl - 7596 lines, 283835 bytes, 3271 keywords AML Output: /root/acpica/dsdt_SB600_edit.aml - 29374 bytes 873 named objects 2398 executable opcodes Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 9 Optimizations I have placed the aml-file received as a result of operation in /boot and have registered it in loader.conf. [2:36 pattern@toshiba /root/acpica]# less /boot/loader.conf acpi_dsdt_load="YES" acpi_dsdt_name="/boot/dsdt_SB600_edit.aml" After system reboot, hard disks as have not found out. In the console following errors are output. acpi0: om motherboard ACPI Error (evregion-0427): No handler for Region [ERAM] (0xc69cde80) [EmbeddedControl] [20070320] ACPI Error (exfldio-0390): Region EmbeddedControl(3) has no handler [20070320] ACPI Error (psparse-0626): Method parse/execution failed [\_SB_.HTEV] (Node 0xc6897b60), AE_NOT_EXIST ACPI Error (psparse-0626): Method parse/execution failed [\_SB_.PCI0.LPC0.EC0_._REG] (Node 0xc69d6260), AE_NOT_EXIST acpi0: Could not initialise SystemIO handler: AE_NOT_EXIST ... unknown: can't assign resources (memory) unknown: can't assign resources (memory) unknown: can't assign resources (irq) unknown: can't assign resources (port) unknown: can't assign resources (memory) unknown: can't assign resources (memory) unknown: can't assign resources (memory) unknown: can't assign resources (irq) That the system has successfully booted it is required to apply the following file. (dsdt_SB600_addon.diff) (dsdt_SB600.dsl -> dsdt_SB600.diff -> dsdt_SB600_edit.dsl dsdt_SB600_edit.dsl -> dsdt_SB600_addon.diff -> dsdt_SB600_addon.dsl) Why it occurs and how it to fix? From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 30 00:38:33 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A4CE106564A for ; Thu, 30 Apr 2009 00:38:33 +0000 (UTC) (envelope-from patttern@gmail.com) Received: from mail-fx0-f162.google.com (mail-fx0-f162.google.com [209.85.220.162]) by mx1.freebsd.org (Postfix) with ESMTP id F159A8FC18 for ; Thu, 30 Apr 2009 00:38:32 +0000 (UTC) (envelope-from patttern@gmail.com) Received: by fxm6 with SMTP id 6so1516062fxm.43 for ; Wed, 29 Apr 2009 17:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=au8Yd6lQNCzWXb8rVWgmwQgufQavHihfL0gwAbv0Jbw=; b=T6PqPng9EHELJfXpwywnKnP0RxoBhkXCM2qBid/jRUCNgFrHYrRf8iS9Z6ytWvmx/Y +ws1Gkyta8PbdPQTRCibqwo9FKqfFFaaSffjvOqmIonocxcKEkTGyncJlhxply+I2fg3 j0e2gpYcQ7OkxUKoBzrENN0hvhe2UfxCt2bE8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xwTQ5bqmq+bkV2ufv5q/MwZWGlNHokBhOaYun9qqnVpqxZ2KAkMRPMXruTN/ngVnnT Tb5EReNETqiWrviglA0PfKWr4Ay2jssVNyJIri9jQ6TEH7fCg29R1kVblQ9RxwuWPru9 acNDUW/N2jpxXDiAhXRsxzODbodb71Rw1Nhi8= MIME-Version: 1.0 Received: by 10.204.55.140 with SMTP id u12mr859725bkg.127.1241051910324; Wed, 29 Apr 2009 17:38:30 -0700 (PDT) Date: Thu, 30 Apr 2009 04:38:30 +0400 Message-ID: <107cc88f0904291738g2708915dx7b797aac7a802547@mail.gmail.com> From: =?ISO-8859-1?Q?Pattern=AE?= To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: RE: ACPI on Toshiba A210 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 00:38:33 -0000 Sorry, i have forgotten to add files. http://pma.8855.ru/files/dsdt_SB600.dsl http://pma.8855.ru/files/dsdt_SB600.diff http://pma.8855.ru/files/dsdt_SB600_addon.diff From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 30 18:23:12 2009 Return-Path: Delivered-To: freebsd-acpi@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 635BE106566B; Thu, 30 Apr 2009 18:23:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-acpi@FreeBSD.org Date: Thu, 30 Apr 2009 14:22:54 -0400 User-Agent: KMail/1.6.2 References: <49DB639A.4090504@icyb.net.ua> <49F5AAF0.9080607@freebsd.org> <20090427212016.43dd83d6@fabiankeil.de> In-Reply-To: <20090427212016.43dd83d6@fabiankeil.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200904301423.03761.jkim@FreeBSD.org> Cc: Andriy Gapon Subject: Re: run resume code only for S1-S4 states X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 18:23:12 -0000 On Monday 27 April 2009 03:20 pm, Fabian Keil wrote: > Andriy Gapon wrote: > > on 25/04/2009 11:21 Fabian Keil said the following: > > > Sure. It turns out that the problem is unrelated to your patch. > > > I can reproduce it with an unpatched kernel too, by once > > > pressing the power button before the second core is started. > > > > > > I probably did the same a few days ago, and forgot about it. > > > Sorry. > > > > thank you very much for the testing and the insight, this is very > > useful and interesting. > > I think that it might be that 'init' process in pre-natal state > > loses a signal sent to it. > > > > I decided to follow Nate's advice and exempt S5 from timeout > > policy (after all it is possible to execute shutdown(8) multiple > > times and concurrently with any other sleep request). With > > previous version of the patch once shutdown_nice() failed once it > > was impossible to enter any sleep state ever. shutdown_nice > > failure is quite exotic event, but as you have proven it is not > > impossible. > > > > So the new patch is attached. > > Thanks. The patch works and pressing the power button early on > boot before it actually has any effect no longer prevents the > power button from working later on. Can you try r191699 acpi.c and tell me if there is any regression? Thanks! Jung-uk Kim From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 30 21:41:21 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D68F9106568A for ; Thu, 30 Apr 2009 21:41:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id A67878FC25 for ; Thu, 30 Apr 2009 21:41:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 47D7146B66; Thu, 30 Apr 2009 17:41:21 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 208A28A021; Thu, 30 Apr 2009 17:41:20 -0400 (EDT) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Thu, 30 Apr 2009 08:36:34 -0400 User-Agent: KMail/1.9.7 References: <43b1bb350904230622u4b7790f0p9f665b649c97a3b@mail.gmail.com> <43b1bb350904250326o63cb3085vc6a7079fba7cd700@mail.gmail.com> <43b1bb350904250327n2bc0c651y7e725abda56538b0@mail.gmail.com> In-Reply-To: <43b1bb350904250327n2bc0c651y7e725abda56538b0@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904300836.34238.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 30 Apr 2009 17:41:20 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-0.5 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_06_12,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: Re: Fwd: Kernel panic on 7.2-RC1 when booting with ACPI enabled kernel. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 21:41:22 -0000 On Saturday 25 April 2009 6:27:23 am Magnus Kling wrote: > 2009/4/24 John Baldwin > > Can you do 'frame 10' followed by 'p *(struct acpi_pci_devinfo > > *)child->ivars' > > > > -- > > John Baldwin > > > Sure, no problem. This is a none critical server so I can do alot of > debugging and testing if that is needed. > > > (kgdb) frame 10 > #10 0xc0db4ca8 in acpi_pci_child_location_str_method (cbdev=0xc2212680, > child=0xc2243400, buf=0xc22c2400 "slot=0 function=0 handle=", > buflen=1024) > at /usr/src/sys/modules/acpi/acpi/../../../dev/acpica/acpi_pci.c:150 > 150 strlcat(buf, acpi_name(dinfo->ap_handle), buflen); > > (kgdb) p *(struct acpi_pci_devinfo *)child->ivars > $1 = {ap_dinfo = {pci_links = {stqe_next = 0xc0b00f8c}, resources = { > stqh_first = 0xc0b00f8c, stqh_last = 0x1030000}, cfg = {dev = 0x0, > bar = {4, 0, 0, 3257136600, 0, 0}, bios = 0, subvendor = 0, > subdevice = 0, vendor = 0, device = 0, cmdreg = 0, statreg = 0, > baseclass = 0 '\0', subclass = 0 '\0', progif = 0 '\0', revid = 0 Hmm, this is all completely wrong and trashed. What if you do 'p *child'? -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 30 21:41:23 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CF60106567A for ; Thu, 30 Apr 2009 21:41:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id BB5758FC2B for ; Thu, 30 Apr 2009 21:41:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 50EFB46B7F; Thu, 30 Apr 2009 17:41:22 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 10EC58A022; Thu, 30 Apr 2009 17:41:21 -0400 (EDT) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Thu, 30 Apr 2009 08:44:24 -0400 User-Agent: KMail/1.9.7 References: <20090425190801.GA1150@venon.lostgarden> In-Reply-To: <20090425190801.GA1150@venon.lostgarden> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904300844.24710.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 30 Apr 2009 17:41:21 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-0.6 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_06_12,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: Re: pci access question X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 21:41:23 -0000 On Saturday 25 April 2009 3:08:01 pm William Grzybowski wrote: > Hi, > > I was reading some code and running some tests in freebsd and some doubts came out. > > I know this is not a school but I would like to ask some questions regarding 8086 architecture and pci access, I really appreciate if someone could answer or point me to some good book. > > As far as I can understund the pci controllers have some registers which the cpu can read and write stuff. > Everythings starts with the host pci bridge bus, this bus is define as _BBN in the acpi and is 0 when it is not set. > Then for every pci controller attached to this bus the interrupt routing table is set so this bridge can control them properly. If any of them is a pci controller of the type pci bridge this process is repeated. > > This is how I would describe in a very simple way how the process works with my limited knowledge. > > My questions would be: > > Does ACPI directly inteferes in how pci regs are accesses somehow or a pci_cfgregread is 100% inpendent just with proper locks and asm inb, inl, inw instructions after setting the bus and slot/func? ACPI does not interfere with PCI config access. It is all done by using I/O port access to 0xcf8 and 0xcfc. Newer PCI express systems do support an alternative method of PCI config access using a memory-mapped I/O window. (That is what pcie_cfgreg* implement.) ACPI does provide a table ('MCFG') that describes the available memory windows, but the BIOS does not provide any public AML methods to manage PCI config access. > How does the bridge discovers the pci controllers attached to the bus? Is there some kind of signal or all possible addresses are tested? When scanning a PCI bus, all possible addresses are tested. Look at pci_add_children() in sys/dev/pci/pci.c. When a PCI-PCI bridge driver attaches to a PCI-PCI bridge it scans its child bus during its attach routine. This is all using methods defined in the PCI standard which are true for all PCI implementations. One thing PCI does not define is how to enumerate the list of Host-PCI bridges. ACPI provides this by giving each top-level PCI bus a separate device node with a _BBN method in the ACPI namespace. Other architectures and firmwares provide this info via different methods. > Does the pci bridges need to be initialized by the OS (by initialized i mean set some registers in the controller or something)? Well, the firmware often does some of the setup, but it is not required to. There are all sorts of setup an OS may need to do. It may need to assign bus numbers to PCI-PCI bridges. It may need to assign resources to BARs on devices and to I/O windows on PCI-PCI bridges to provide resources to BARs on devices behind the bridges. > Again, sorry for asking this here, probably not the right place, but I would love any kind of "light", specially a good book about it. For PCI stuff, the Mindshare 'PCI System Architecture' book is what I use. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 30 21:41:23 2009 Return-Path: Delivered-To: acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFD82106567E; Thu, 30 Apr 2009 21:41:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 902F38FC22; Thu, 30 Apr 2009 21:41:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 4507146B09; Thu, 30 Apr 2009 17:41:23 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 294918A023; Thu, 30 Apr 2009 17:41:22 -0400 (EDT) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Thu, 30 Apr 2009 08:46:41 -0400 User-Agent: KMail/1.9.7 References: <200904270150.31912.pieter@degoeje.nl> <7d6fde3d0904261927s1a67cf85jc982c1a68e30e081@mail.gmail.com> In-Reply-To: <7d6fde3d0904261927s1a67cf85jc982c1a68e30e081@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904300846.41576.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 30 Apr 2009 17:41:22 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-0.6 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_06_12,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: acpi , freebsd-performance@freebsd.org, freebsd-hackers@freebsd.org, Pieter de Goeje Subject: Re: ACPI-fast default timecounter, but HPET 83% faster X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 21:41:24 -0000 On Sunday 26 April 2009 10:27:42 pm Garrett Cooper wrote: > I'm seeing similar results. > > [root@orangebox /usr/home/gcooper]# dmesg | grep 'Timecounter "' > Timecounter "i8254" frequency 1193182 Hz quality 0 > Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 > Timecounter "HPET" frequency 14318180 Hz quality 900 > [root@orangebox /usr/home/gcooper]# ./cgt > 1369355 > [root@orangebox /usr/home/gcooper]# sysctl > kern.timecounter.hardware="ACPI-fast" > kern.timecounter.hardware: HPET -> ACPI-fast > [root@orangebox /usr/home/gcooper]# ./cgt > 772289 > > Why's the default ACPI-fast? For power-saving functionality or because > of the `quality' factor? What is the criteria that determines the > `quality' of a clock as what's being reported above (I know what > determines the quality of a clock visually from a oscilloscope =])? I suspect that the quality of the HPET driver is lower simply because no one had measured it previously and HPET is newer and less "proven". -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 30 21:41:23 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFD82106567E; Thu, 30 Apr 2009 21:41:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 902F38FC22; Thu, 30 Apr 2009 21:41:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 4507146B09; Thu, 30 Apr 2009 17:41:23 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 294918A023; Thu, 30 Apr 2009 17:41:22 -0400 (EDT) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Thu, 30 Apr 2009 08:46:41 -0400 User-Agent: KMail/1.9.7 References: <200904270150.31912.pieter@degoeje.nl> <7d6fde3d0904261927s1a67cf85jc982c1a68e30e081@mail.gmail.com> In-Reply-To: <7d6fde3d0904261927s1a67cf85jc982c1a68e30e081@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904300846.41576.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Thu, 30 Apr 2009 17:41:22 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-0.6 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_06_12,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: acpi , freebsd-performance@freebsd.org, freebsd-hackers@freebsd.org, Pieter de Goeje Subject: Re: ACPI-fast default timecounter, but HPET 83% faster X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 21:41:24 -0000 On Sunday 26 April 2009 10:27:42 pm Garrett Cooper wrote: > I'm seeing similar results. > > [root@orangebox /usr/home/gcooper]# dmesg | grep 'Timecounter "' > Timecounter "i8254" frequency 1193182 Hz quality 0 > Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 > Timecounter "HPET" frequency 14318180 Hz quality 900 > [root@orangebox /usr/home/gcooper]# ./cgt > 1369355 > [root@orangebox /usr/home/gcooper]# sysctl > kern.timecounter.hardware="ACPI-fast" > kern.timecounter.hardware: HPET -> ACPI-fast > [root@orangebox /usr/home/gcooper]# ./cgt > 772289 > > Why's the default ACPI-fast? For power-saving functionality or because > of the `quality' factor? What is the criteria that determines the > `quality' of a clock as what's being reported above (I know what > determines the quality of a clock visually from a oscilloscope =])? I suspect that the quality of the HPET driver is lower simply because no one had measured it previously and HPET is newer and less "proven". -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 30 21:52:52 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E2E3106564A; Thu, 30 Apr 2009 21:52:52 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (brucec-1-pt.tunnel.tserv4.nyc4.ipv6.he.net [IPv6:2001:470:1f06:c09::2]) by mx1.freebsd.org (Postfix) with ESMTP id BBF3B8FC28; Thu, 30 Apr 2009 21:52:51 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 9B2B11900F; Thu, 30 Apr 2009 22:52:54 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon X-Spam-Level: X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 Received: from gluon.draftnet (unknown [IPv6:2a01:348:10f:0:240:f4ff:fe57:9871]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Thu, 30 Apr 2009 22:52:54 +0000 (GMT) Date: Thu, 30 Apr 2009 22:52:45 +0100 From: Bruce Cran To: John Baldwin Message-ID: <20090430225245.538d073e@gluon.draftnet> In-Reply-To: <200904300846.41576.jhb@freebsd.org> References: <200904270150.31912.pieter@degoeje.nl> <7d6fde3d0904261927s1a67cf85jc982c1a68e30e081@mail.gmail.com> <200904300846.41576.jhb@freebsd.org> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.14.7; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Pieter, freebsd-acpi@freebsd.org, Goeje , freebsd-performance@freebsd.org Subject: Re: ACPI-fast default timecounter, but HPET 83% faster X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 21:52:52 -0000 On Thu, 30 Apr 2009 08:46:41 -0400 John Baldwin wrote: > On Sunday 26 April 2009 10:27:42 pm Garrett Cooper wrote: > > Why's the default ACPI-fast? For power-saving functionality or > > because of the `quality' factor? What is the criteria that > > determines the `quality' of a clock as what's being reported above > > (I know what determines the quality of a clock visually from a > > oscilloscope =])? > > I suspect that the quality of the HPET driver is lower simply because > no one had measured it previously and HPET is newer and less "proven". > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/acpica/acpi_hpet.c shows some of the history behind the decision. Apparently it used to be slower but it was hoped it would get faster as systems supported it better. I guess that's happening now. -- Bruce Cran From owner-freebsd-acpi@FreeBSD.ORG Thu Apr 30 22:26:11 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BFFC1065688 for ; Thu, 30 Apr 2009 22:26:11 +0000 (UTC) (envelope-from sfourman@gmail.com) Received: from mail-qy0-f105.google.com (mail-qy0-f105.google.com [209.85.221.105]) by mx1.freebsd.org (Postfix) with ESMTP id 545F98FC1B for ; Thu, 30 Apr 2009 22:26:10 +0000 (UTC) (envelope-from sfourman@gmail.com) Received: by qyk3 with SMTP id 3so4273636qyk.3 for ; Thu, 30 Apr 2009 15:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=QsjyxuzgB4uccFP9sD1n3zUH2Y+NWxKiqFC1cGuTK3U=; b=VsbexQ5BJxdwT8izFc4A9HmKl0AIigPZ+79F9SbKvh8PocoDR3pCi+/MvzUsZxIFOR g3U/OnmknPKlsaLmi1JHaeO1wavEg2Flaw9lhTSXpD5uVi0zeyFqEHJwlqOUgFSBYNGI 0CqGBfCgIYEEATBBVa2/bQ6HNcqMAKZyiTHWI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=qanDREqIMi8IaLxB7VOapd6tu2ZyoYVCvsDicViDGkVKdW3OR3ZHF/0zHX8WXB7ewF A3qLEPc2l8syRY3bMskcuu6BT6l9BqAruPD3JsB4gnkYCmD0rv1h+Cwcy7TUyV+V3G2u KOaWXDVnQy3rPR3SYY+L3Wc6UIc2zmWzyN3gU= MIME-Version: 1.0 Received: by 10.229.82.10 with SMTP id z10mr1889292qck.83.1241130370504; Thu, 30 Apr 2009 15:26:10 -0700 (PDT) In-Reply-To: <200904300836.34238.jhb@freebsd.org> References: <43b1bb350904230622u4b7790f0p9f665b649c97a3b@mail.gmail.com> <43b1bb350904250326o63cb3085vc6a7079fba7cd700@mail.gmail.com> <43b1bb350904250327n2bc0c651y7e725abda56538b0@mail.gmail.com> <200904300836.34238.jhb@freebsd.org> Date: Thu, 30 Apr 2009 17:26:10 -0500 Message-ID: <11167f520904301526g3f0185a9m51e601cbfa04177a@mail.gmail.com> From: "Sam Fourman Jr." To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-acpi@freebsd.org Subject: Re: Fwd: Kernel panic on 7.2-RC1 when booting with ACPI enabled kernel. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 22:26:12 -0000 On Thu, Apr 30, 2009 at 7:36 AM, John Baldwin wrote: > On Saturday 25 April 2009 6:27:23 am Magnus Kling wrote: >> 2009/4/24 John Baldwin >> > Can you do 'frame 10' followed by 'p *(struct acpi_pci_devinfo >> > *)child->ivars' >> > >> > -- >> > John Baldwin >> >> (kgdb) frame 10 >> #10 0xc0db4ca8 in acpi_pci_child_location_str_method (cbdev=3D0xc2212680= , >> =A0 =A0 child=3D0xc2243400, buf=3D0xc22c2400 "slot=3D0 function=3D0 hand= le=3D", >> buflen=3D1024) >> =A0 =A0 at /usr/src/sys/modules/acpi/acpi/../../../dev/acpica/acpi_pci.c= :150 >> 150 =A0 =A0 =A0 =A0 =A0 =A0 strlcat(buf, acpi_name(dinfo->ap_handle), bu= flen); >> >> (kgdb) =A0p *(struct acpi_pci_devinfo *)child->ivars >> $1 =3D {ap_dinfo =3D {pci_links =3D {stqe_next =3D 0xc0b00f8c}, resource= s =3D { >> =A0 =A0 =A0 stqh_first =3D 0xc0b00f8c, stqh_last =3D 0x1030000}, cfg =3D= {dev =3D 0x0, >> =A0 =A0 =A0 bar =3D {4, 0, 0, 3257136600, 0, 0}, bios =3D 0, subvendor = =3D 0, >> =A0 =A0 =A0 subdevice =3D 0, vendor =3D 0, device =3D 0, cmdreg =3D 0, s= tatreg =3D 0, >> =A0 =A0 =A0 baseclass =3D 0 '\0', subclass =3D 0 '\0', progif =3D 0 '\0'= , revid =3D 0 I also have a ACPI problem that may be related http://www.nabble.com/Asus-X83VB-X2-Notebook-ACPI-kernel-panic-td23290433.h= tml Sam Fourman Jr. From owner-freebsd-acpi@FreeBSD.ORG Fri May 1 15:53:56 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21A43106567B for ; Fri, 1 May 2009 15:53:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E64DC8FC1A for ; Fri, 1 May 2009 15:53:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 8A36546B66; Fri, 1 May 2009 11:53:55 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 49D2B8A021; Fri, 1 May 2009 11:53:54 -0400 (EDT) From: John Baldwin To: "Sam Fourman Jr." Date: Fri, 1 May 2009 09:21:49 -0400 User-Agent: KMail/1.9.7 References: <43b1bb350904230622u4b7790f0p9f665b649c97a3b@mail.gmail.com> <200904300836.34238.jhb@freebsd.org> <11167f520904301526g3f0185a9m51e601cbfa04177a@mail.gmail.com> In-Reply-To: <11167f520904301526g3f0185a9m51e601cbfa04177a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200905010921.49712.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 01 May 2009 11:53:54 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.3 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: Fwd: Kernel panic on 7.2-RC1 when booting with ACPI enabled kernel. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2009 15:53:56 -0000 On Thursday 30 April 2009 6:26:10 pm Sam Fourman Jr. wrote: > On Thu, Apr 30, 2009 at 7:36 AM, John Baldwin wrote: > > On Saturday 25 April 2009 6:27:23 am Magnus Kling wrote: > >> 2009/4/24 John Baldwin > >> > Can you do 'frame 10' followed by 'p *(struct acpi_pci_devinfo > >> > *)child->ivars' > >> > > >> > -- > >> > John Baldwin > >> > >> (kgdb) frame 10 > >> #10 0xc0db4ca8 in acpi_pci_child_location_str_method (cbdev=3D0xc22126= 80, > >> =A0 =A0 child=3D0xc2243400, buf=3D0xc22c2400 "slot=3D0 function=3D0 ha= ndle=3D", > >> buflen=3D1024) > >> =A0 =A0 at /usr/src/sys/modules/acpi/acpi/../../../dev/acpica/acpi_pci= =2Ec:150 > >> 150 =A0 =A0 =A0 =A0 =A0 =A0 strlcat(buf, acpi_name(dinfo->ap_handle), = buflen); > >> > >> (kgdb) =A0p *(struct acpi_pci_devinfo *)child->ivars > >> $1 =3D {ap_dinfo =3D {pci_links =3D {stqe_next =3D 0xc0b00f8c}, resour= ces =3D { > >> =A0 =A0 =A0 stqh_first =3D 0xc0b00f8c, stqh_last =3D 0x1030000}, cfg = =3D {dev =3D 0x0, > >> =A0 =A0 =A0 bar =3D {4, 0, 0, 3257136600, 0, 0}, bios =3D 0, subvendor= =3D 0, > >> =A0 =A0 =A0 subdevice =3D 0, vendor =3D 0, device =3D 0, cmdreg =3D 0,= statreg =3D 0, > >> =A0 =A0 =A0 baseclass =3D 0 '\0', subclass =3D 0 '\0', progif =3D 0 '\= 0', revid =3D 0 >=20 > I also have a ACPI problem that may be related >=20 >=20 http://www.nabble.com/Asus-X83VB-X2-Notebook-ACPI-kernel-panic-td23290433.h= tml There aren't any panic messages in your messages file. There is a LOR that= is=20 a false-positive, but I don't see any panic info. =2D-=20 John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Fri May 1 18:30:29 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA30B106566B; Fri, 1 May 2009 18:30:29 +0000 (UTC) (envelope-from klingfon@gmail.com) Received: from mail-ew0-f171.google.com (mail-ew0-f171.google.com [209.85.219.171]) by mx1.freebsd.org (Postfix) with ESMTP id 10C3A8FC13; Fri, 1 May 2009 18:30:28 +0000 (UTC) (envelope-from klingfon@gmail.com) Received: by ewy19 with SMTP id 19so2463314ewy.43 for ; Fri, 01 May 2009 11:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=0GV51blqIHNJl6hf7uxtMXpKS7yVR/VWAKOnsPo5b2I=; b=mTGviJGtnyHAvD9iec//rq0da4tt2XBvWRxiI5CJSazEC0O8HNL5l8mxRTKJQ2dd5I 8t9lKdKPHD5Uq1meA1FEVLy9+q8qYV3wSf9axoqaVZf9Zbu2gjCLkf2GV9AyFAWKMzGD T44xYl9EHI1V8/2/qgeocbY5Z1PmTEo9/ATlM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=aKv6QvDj8XGfNGuo2a3sJB4nrpGH25a3LPx0qAXTaTdT/VVdpjD2PzE+sGEZm1Ft2B 3MRAyYT96i8syH+136ytMEDDVHo44WF5V9cTgwTVSwehMqQG/OGh31Qrig5ZyIa/AEmP lSUviS2GETD7G5ML/XsSuWjOgjzW8CeCmMBxo= MIME-Version: 1.0 Received: by 10.210.44.12 with SMTP id r12mr816051ebr.21.1241202628169; Fri, 01 May 2009 11:30:28 -0700 (PDT) In-Reply-To: <200904300836.34238.jhb@freebsd.org> References: <43b1bb350904230622u4b7790f0p9f665b649c97a3b@mail.gmail.com> <43b1bb350904250326o63cb3085vc6a7079fba7cd700@mail.gmail.com> <43b1bb350904250327n2bc0c651y7e725abda56538b0@mail.gmail.com> <200904300836.34238.jhb@freebsd.org> Date: Fri, 1 May 2009 20:30:28 +0200 Message-ID: <43b1bb350905011130q4f58c018g66a9e4624c364b65@mail.gmail.com> From: Magnus Kling To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-acpi@freebsd.org Subject: Re: Fwd: Kernel panic on 7.2-RC1 when booting with ACPI enabled kernel. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2009 18:30:30 -0000 2009/4/30 John Baldwin > On Saturday 25 April 2009 6:27:23 am Magnus Kling wrote: > > 2009/4/24 John Baldwin > > > Can you do 'frame 10' followed by 'p *(struct acpi_pci_devinfo > > > *)child->ivars' > > > > > > -- > > > John Baldwin > > > > > > Sure, no problem. This is a none critical server so I can do alot of > > debugging and testing if that is needed. > > > > > > (kgdb) frame 10 > > #10 0xc0db4ca8 in acpi_pci_child_location_str_method (cbdev=0xc2212680, > > child=0xc2243400, buf=0xc22c2400 "slot=0 function=0 handle=", > > buflen=1024) > > at /usr/src/sys/modules/acpi/acpi/../../../dev/acpica/acpi_pci.c:150 > > 150 strlcat(buf, acpi_name(dinfo->ap_handle), buflen); > > > > (kgdb) p *(struct acpi_pci_devinfo *)child->ivars > > $1 = {ap_dinfo = {pci_links = {stqe_next = 0xc0b00f8c}, resources = { > > stqh_first = 0xc0b00f8c, stqh_last = 0x1030000}, cfg = {dev = 0x0, > > bar = {4, 0, 0, 3257136600, 0, 0}, bios = 0, subvendor = 0, > > subdevice = 0, vendor = 0, device = 0, cmdreg = 0, statreg = 0, > > baseclass = 0 '\0', subclass = 0 '\0', progif = 0 '\0', revid = 0 > > Hmm, this is all completely wrong and trashed. What if you do 'p *child'? > > -- > John Baldwin > (kgdb) p *child $2 = {ops = 0xc2161800, link = {tqe_next = 0xc2243380, tqe_prev = 0xc2243484}, devlink = {tqe_next = 0xc2243380, tqe_prev = 0xc224348c}, parent = 0xc2212680, children = {tqh_first = 0xc2262880, tqh_last = 0xc2262704}, driver = 0xc0b7066c, devclass = 0xc211e240, unit = 0, nameunit = 0xc2241640 "atapci0", desc = 0xc223f900 "Promise PDC20621 UDMA100 controller", busy = 0, state = DS_ATTACHED, devflags = 0, flags = 13, order = 0 '\0', pad = 0 '\0', ivars = 0xc223f5c0, softc = 0xc2244800, sysctl_ctx = {tqh_first = 0xc2264380, tqh_last = 0xc2241594}, sysctl_tree = 0xc223f840} (kgdb) /Magnus From owner-freebsd-acpi@FreeBSD.ORG Fri May 1 19:08:36 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83659106564A for ; Fri, 1 May 2009 19:08:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 544188FC08 for ; Fri, 1 May 2009 19:08:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 084F446B37; Fri, 1 May 2009 15:08:36 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id E2E368A023; Fri, 1 May 2009 15:08:34 -0400 (EDT) From: John Baldwin To: Magnus Kling Date: Fri, 1 May 2009 14:50:13 -0400 User-Agent: KMail/1.9.7 References: <43b1bb350904230622u4b7790f0p9f665b649c97a3b@mail.gmail.com> <200904300836.34238.jhb@freebsd.org> <43b1bb350905011130q4f58c018g66a9e4624c364b65@mail.gmail.com> In-Reply-To: <43b1bb350905011130q4f58c018g66a9e4624c364b65@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905011450.13899.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 01 May 2009 15:08:34 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org Subject: Re: Fwd: Kernel panic on 7.2-RC1 when booting with ACPI enabled kernel. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2009 19:08:36 -0000 On Friday 01 May 2009 2:30:28 pm Magnus Kling wrote: > 2009/4/30 John Baldwin > > > On Saturday 25 April 2009 6:27:23 am Magnus Kling wrote: > > > 2009/4/24 John Baldwin > > > > Can you do 'frame 10' followed by 'p *(struct acpi_pci_devinfo > > > > *)child->ivars' > > > > > > > > -- > > > > John Baldwin > > > > > > > > > Sure, no problem. This is a none critical server so I can do alot of > > > debugging and testing if that is needed. > > > > > > > > > (kgdb) frame 10 > > > #10 0xc0db4ca8 in acpi_pci_child_location_str_method (cbdev=0xc2212680, > > > child=0xc2243400, buf=0xc22c2400 "slot=0 function=0 handle=", > > > buflen=1024) > > > at /usr/src/sys/modules/acpi/acpi/../../../dev/acpica/acpi_pci.c:150 > > > 150 strlcat(buf, acpi_name(dinfo->ap_handle), buflen); > > > > > > (kgdb) p *(struct acpi_pci_devinfo *)child->ivars > > > $1 = {ap_dinfo = {pci_links = {stqe_next = 0xc0b00f8c}, resources = { > > > stqh_first = 0xc0b00f8c, stqh_last = 0x1030000}, cfg = {dev = 0x0, > > > bar = {4, 0, 0, 3257136600, 0, 0}, bios = 0, subvendor = 0, > > > subdevice = 0, vendor = 0, device = 0, cmdreg = 0, statreg = 0, > > > baseclass = 0 '\0', subclass = 0 '\0', progif = 0 '\0', revid = 0 > > > > Hmm, this is all completely wrong and trashed. What if you do 'p *child'? > > > > -- > > John Baldwin > > > (kgdb) p *child > $2 = {ops = 0xc2161800, link = {tqe_next = 0xc2243380, tqe_prev = > 0xc2243484}, devlink = {tqe_next = 0xc2243380, tqe_prev = 0xc224348c}, > parent = 0xc2212680, children = {tqh_first = 0xc2262880, tqh_last = > 0xc2262704}, driver = 0xc0b7066c, devclass = 0xc211e240, unit = 0, > nameunit = 0xc2241640 "atapci0", desc = 0xc223f900 "Promise PDC20621 > UDMA100 controller", busy = 0, state = DS_ATTACHED, devflags = 0, > flags = 13, order = 0 '\0', pad = 0 '\0', ivars = 0xc223f5c0, softc = > 0xc2244800, sysctl_ctx = {tqh_first = 0xc2264380, tqh_last = 0xc2241594}, > sysctl_tree = 0xc223f840} > (kgdb) Maybe try adding KTR traces for all calls to device_set_ivars(). I wonder if something is trashing this device's ivars. Oh, dear. The ata(4) driver overwrites the ivars of some PCI devices it attaches to. This is very, very wrong. Which ATA controller do you have? -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Fri May 1 19:08:37 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D122D106566B; Fri, 1 May 2009 19:08:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2E28FC0A; Fri, 1 May 2009 19:08:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 25E8546B38; Fri, 1 May 2009 15:08:37 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id F40908A021; Fri, 1 May 2009 15:08:35 -0400 (EDT) From: John Baldwin To: freebsd-stable@freebsd.org Date: Fri, 1 May 2009 15:01:39 -0400 User-Agent: KMail/1.9.7 References: <49F8B859.7060908@umn.edu> <200905010947.54855.jhb@freebsd.org> <49FB2847.406@umn.edu> In-Reply-To: <49FB2847.406@umn.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905011501.40083.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 01 May 2009 15:08:36 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-acpi@freebsd.org, Alan Amesbury Subject: Re: Garbled output from kgdb? X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2009 19:08:38 -0000 On Friday 01 May 2009 12:50:15 pm Alan Amesbury wrote: > John Baldwin wrote: > > > Drop the '0x8:' from this and it will work better. Also, 'bt' output would be > > good. > > Thanks for the pointer (no pun intended). > > > (kgdb) list *0xffffffff80424561 > 0xffffffff80424561 is in turnstile_wait > (/usr/src/sys/kern/subr_turnstile.c:727). > 722 else > 723 > TAILQ_INSERT_TAIL(&ts->ts_blocked[queue], td, td_lockq); > 724 MPASS(owner == ts->ts_owner); > 725 mtx_unlock_spin(&td_contested_lock); > 726 MPASS(td->td_turnstile != NULL); > 727 LIST_INSERT_HEAD(&ts->ts_free, td->td_turnstile, > ts_hash); > 728 } > 729 thread_lock(td); > 730 thread_lock_set(td, &ts->ts_lock); > 731 td->td_turnstile = NULL; This is odd. > The backtrace looked odd (lots of stuff apparently missing), which is > why I didn't include it before. Here it is with repeated lines > collapsed for brevity: > > > (kgdb) backtrace > #0 doadump () at pcpu.h:195 > #1 0x0000000000000000 in ?? () > #2 0xffffffff803ee713 in boot (howto=260) at > /usr/src/sys/kern/kern_shutdown.c:418 > #3 0xffffffff803ee9c5 in panic (fmt=Variable "fmt" is not available. > ) at /usr/src/sys/kern/kern_shutdown.c:574 > #4 0xffffffff8062478e in trap_fatal (frame=0xffffffffac057a40, eva=96) > at /usr/src/sys/amd64/amd64/trap.c:764 > #5 0xffffffff806251c6 in trap (frame=0xffffffffac057a40) at > /usr/src/sys/amd64/amd64/trap.c:290 > #6 0xffffffff8060aafe in calltrap () at > /usr/src/sys/amd64/amd64/exception.S:209 > #7 0xffffffff80424561 in turnstile_wait (ts=0xffffff000105dd20, > owner=Variable "owner" is not available. > ) at /usr/src/sys/kern/subr_turnstile.c:727 > #8 0xffffffff803e0915 in _mtx_lock_sleep (m=0xffffff00011ff600, > tid=18446742974215718624, opts=Variable "opts" is not available. > ) at /usr/src/sys/kern/kern_mutex.c:420 > #9 0xffffffff801ee1e9 in AcpiOsAcquireLock (Handle=0xffffff000105dd20) > at /usr/src/sys/dev/acpica/Osd/OsdSynch.c:377 > #10 0xffffffff801aaf9c in AcpiSetRegister (RegisterId=1, Value=1) at > /usr/src/sys/contrib/dev/acpica/hwregs.c:444 > #11 0xffffffff801f5f6e in acpi_cpu_idle () at > /usr/src/sys/dev/acpica/acpi_cpu.c:928 > #12 0xffffffff806119a9 in cpu_idle () at > /usr/src/sys/amd64/amd64/machdep.c:581 > #13 0xffffffff8040f0e4 in sched_idletd (dummy=Variable "dummy" is not > available. > ) at /usr/src/sys/kern/sched_ule.c:2676 > #14 0xffffffff803caa30 in fork_exit (callout=0xffffffff8040ee00 > , arg=0x0, frame=0xffffffffac057c80) at > /usr/src/sys/kern/kern_fork.c:804 > #15 0xffffffff8060aece in fork_trampoline () at > /usr/src/sys/amd64/amd64/exception.S:455 The trace actually ends here. There is nothing super bad here but there is a big problem actually in that the idle threads cannot block on a lock, so it is a problem for the ACPI code to be acquiring a mutex here. Perhaps the locks protecting the idle registers need to use spin locks instead. The problem with blocking in the idle thread is that the scheduler assumes (even requires) that the idle thread is _always_ runnable. -- John Baldwin From owner-freebsd-acpi@FreeBSD.ORG Fri May 1 19:30:30 2009 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE6E3106572D for ; Fri, 1 May 2009 19:30:30 +0000 (UTC) (envelope-from klingfon@gmail.com) Received: from mail-ew0-f171.google.com (mail-ew0-f171.google.com [209.85.219.171]) by mx1.freebsd.org (Postfix) with ESMTP id 4007F8FC13 for ; Fri, 1 May 2009 19:30:30 +0000 (UTC) (envelope-from klingfon@gmail.com) Received: by ewy19 with SMTP id 19so2486195ewy.43 for ; Fri, 01 May 2009 12:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=HFGg1uuJ1vcgSijYGkfPmBhax/r6KEjZ1d8OkZSoQ6I=; b=guJUHqw0sj6+SxPZ0+m2riGc1Jgs3pkqNf+GNSfwKadJsncd+h/B9QhEcSQ5+pRV4T 0BjMNTTPkUt3qEz7MadAx31+KbUEqh505n9rpr0RUifOCge/uXpR1xcdLcF0kK2X9qnE Cxi7fP+ViIP/P2d0xq9DAIZsQE10eioqeaEDc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Ce6C6mb7WVvyWNhdHF8JNh3QeGDq4GDdjgb4bYPW12/taXy2G1tCcMfWPGq5xwJkE5 Ec12nAp4pFWttc94skOMiXIBvCZvz9Rc3G8tZUmy7BiGUxfk0E6IfJ3GytHi80zPa+WQ 7ai6GoVfjnLAO70Skh+kqtOdvBYaJWY9eWeVw= MIME-Version: 1.0 Received: by 10.210.18.8 with SMTP id 8mr3268693ebr.39.1241206228970; Fri, 01 May 2009 12:30:28 -0700 (PDT) In-Reply-To: <200905011450.13899.jhb@freebsd.org> References: <43b1bb350904230622u4b7790f0p9f665b649c97a3b@mail.gmail.com> <200904300836.34238.jhb@freebsd.org> <43b1bb350905011130q4f58c018g66a9e4624c364b65@mail.gmail.com> <200905011450.13899.jhb@freebsd.org> Date: Fri, 1 May 2009 21:30:28 +0200 Message-ID: <43b1bb350905011230p1372e1ffw5ab61985e7672e19@mail.gmail.com> From: Magnus Kling To: freebsd-acpi@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Fwd: Kernel panic on 7.2-RC1 when booting with ACPI enabled kernel. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2009 19:30:31 -0000 2009/5/1 John Baldwin > On Friday 01 May 2009 2:30:28 pm Magnus Kling wrote: > > 2009/4/30 John Baldwin > > > > > On Saturday 25 April 2009 6:27:23 am Magnus Kling wrote: > > > > 2009/4/24 John Baldwin > > > > > Can you do 'frame 10' followed by 'p *(struct acpi_pci_devinfo > > > > > *)child->ivars' > > > > > > > > > > -- > > > > > John Baldwin > > > > > > > > > > > > Sure, no problem. This is a none critical server so I can do alot o= f > > > > debugging and testing if that is needed. > > > > > > > > > > > > (kgdb) frame 10 > > > > #10 0xc0db4ca8 in acpi_pci_child_location_str_method > (cbdev=3D0xc2212680, > > > > child=3D0xc2243400, buf=3D0xc22c2400 "slot=3D0 function=3D0 han= dle=3D", > > > > buflen=3D1024) > > > > at > /usr/src/sys/modules/acpi/acpi/../../../dev/acpica/acpi_pci.c:150 > > > > 150 strlcat(buf, acpi_name(dinfo->ap_handle), buflen); > > > > > > > > (kgdb) p *(struct acpi_pci_devinfo *)child->ivars > > > > $1 =3D {ap_dinfo =3D {pci_links =3D {stqe_next =3D 0xc0b00f8c}, res= ources =3D { > > > > stqh_first =3D 0xc0b00f8c, stqh_last =3D 0x1030000}, cfg =3D = {dev =3D > 0x0, > > > > bar =3D {4, 0, 0, 3257136600, 0, 0}, bios =3D 0, subvendor = =3D 0, > > > > subdevice =3D 0, vendor =3D 0, device =3D 0, cmdreg =3D 0, st= atreg =3D 0, > > > > baseclass =3D 0 '\0', subclass =3D 0 '\0', progif =3D 0 '\0',= revid =3D > 0 > > > > > > Hmm, this is all completely wrong and trashed. What if you do 'p > *child'? > > > > > > -- > > > John Baldwin > > > > > (kgdb) p *child > > $2 =3D {ops =3D 0xc2161800, link =3D {tqe_next =3D 0xc2243380, tqe_prev= =3D > > 0xc2243484}, devlink =3D {tqe_next =3D 0xc2243380, tqe_prev =3D 0xc2243= 48c}, > > parent =3D 0xc2212680, children =3D {tqh_first =3D 0xc2262880, tqh_la= st =3D > > 0xc2262704}, driver =3D 0xc0b7066c, devclass =3D 0xc211e240, unit =3D 0= , > > nameunit =3D 0xc2241640 "atapci0", desc =3D 0xc223f900 "Promise PDC20= 621 > > UDMA100 controller", busy =3D 0, state =3D DS_ATTACHED, devflags =3D 0, > > flags =3D 13, order =3D 0 '\0', pad =3D 0 '\0', ivars =3D 0xc223f5c0,= softc =3D > > 0xc2244800, sysctl_ctx =3D {tqh_first =3D 0xc2264380, tqh_last =3D 0xc2= 241594}, > > sysctl_tree =3D 0xc223f840} > > (kgdb) > > Maybe try adding KTR traces for all calls to device_set_ivars(). I wonde= r > if > something is trashing this device's ivars. > > Oh, dear. The ata(4) driver overwrites the ivars of some PCI devices it > attaches to. This is very, very wrong. Which ATA controller do you have= ? > > -- > John Baldwin > Aha, I=B4m using a Promise Fasttrack SX4000 for a RAID1 setup. And the one included on the motherboard for the OS. And yes, I can confirm that without the Fasttrack SX4000 the system boots u= p correctly. (Pulled out the card and edited fstab.) So you are right regarding that the ata driver messes something up. Do you contact someone that is responsible for ata driver? Thank you for taking the time to "correct" this, Magnus