From bugmaster at FreeBSD.org Mon Jun 1 11:06:45 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 1 11:07:12 2009 Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org Message-ID: <200906011106.n51B6iZA020944@freefall.freebsd.org> 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/135070 acpi [acpi] [patch] BIOS resource allocation and FreeBSD AC 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 47 problems total. From avg at icyb.net.ua Mon Jun 1 12:05:46 2009 From: avg at icyb.net.ua (Andriy Gapon) Date: Mon Jun 1 12:05:53 2009 Subject: ACPI Panic on Current, AMD64 In-Reply-To: <2492E55D-5C36-4A93-BB69-B1539AAB0087@mukaibo.com> References: <49159824-57EB-4628-9F1C-CE9243465D02@mukaibo.com> <200905271725.44235.jhb@freebsd.org> <849F0899-7AD9-4D7A-B849-D7FB36CE73AE@mukaibo.com> <200905280800.24867.jhb@freebsd.org> <4A1E9B34.3040202@icyb.net.ua> <2492E55D-5C36-4A93-BB69-B1539AAB0087@mukaibo.com> Message-ID: <4A23C409.70704@icyb.net.ua> on 30/05/2009 03:44 Timothy Mukaibo said the following: > Hello Andriy, > > timothy@tinkysama:~$ cat /boot/loader.conf > snd_hda_load="YES" > uscanner_load="YES" > > Here's the dmesg: it didn't look like a verbose one... -- Andriy Gapon From rea-fbsd at codelabs.ru Mon Jun 1 14:05:38 2009 From: rea-fbsd at codelabs.ru (Eygene Ryabinkin) Date: Mon Jun 1 14:05:45 2009 Subject: [rea-fbsd@codelabs.ru: Patch for "device_attach: estX attach returned 6" on half of the cores] In-Reply-To: <1Rc2f/mn4q/bRzg8uAsl4ZMkCeY@XX1fo6zQUfC4h0jjRC6IBz3oNH4> References: <200905261234.42869.jkim@FreeBSD.org> <1Rc2f/mn4q/bRzg8uAsl4ZMkCeY@XX1fo6zQUfC4h0jjRC6IBz3oNH4> Message-ID: Jung-uk, good day. Wed, May 27, 2009 at 02:17:12PM +0400, Eygene Ryabinkin wrote: > But I want to be mistaken and will try your patch that imports the > latest ACPI-CA for the -CURRENT. Will report on my findings. OK, I was wrong and latest ACPI-CA from your import is fine. I had spotted some weirdness in the fault messages (I have Asus BIOS that has some inconsistensies); the attached patch should heal them. Probably this patch should go directly upstream -- will try to submit it there. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From jhb at FreeBSD.org Mon Jun 1 14:30:06 2009 From: jhb at FreeBSD.org (John Baldwin) Date: Mon Jun 1 14:30:11 2009 Subject: kern/135070: [acpi] [patch] BIOS resource allocation and FreeBSD ACPI Message-ID: <200906011430.n51EU53V079713@freefall.freebsd.org> The following reply was made to PR kern/135070; it has been noted by GNATS. From: John Baldwin To: bug-followup@freebsd.org, freebsd@abv.bg Cc: Subject: Re: kern/135070: [acpi] [patch] BIOS resource allocation and FreeBSD ACPI Date: Mon, 1 Jun 2009 08:07:53 -0400 Note that the patch is a hack for a very-specific laptop, it is not a general solution. I hope to be able to provide a framework in 8.0 to help address the resource issue and then implement the proper solution in 9.0 (and hopefully backport it to 8.x.). -- John Baldwin From freebsd at abv.bg Tue Jun 2 04:50:04 2009 From: freebsd at abv.bg (Mario Pavlov) Date: Tue Jun 2 04:50:11 2009 Subject: kern/135070: [acpi] [patch] BIOS resource allocation and FreeBSD ACPI Message-ID: <200906020450.n524o3kG038739@freefall.freebsd.org> The following reply was made to PR kern/135070; it has been noted by GNATS. From: Mario Pavlov To: bug-followup@FreeBSD.org Cc: John Baldwin Subject: Re: kern/135070: [acpi] [patch] BIOS resource allocation and FreeBSD ACPI Date: Tue, 2 Jun 2009 07:42:24 +0300 (EEST) Yes, indeed that's why I stated in the Fix section that this is a very dirty hack but someone put a [patch] tag in the Synopsis Is this framework you mentioned planned or is work on it going on already ? From josef.moellers at ts.fujitsu.com Tue Jun 2 07:49:22 2009 From: josef.moellers at ts.fujitsu.com (Josef Moellers) Date: Tue Jun 2 07:49:29 2009 Subject: Failure to get past a PCI bridge Message-ID: <4A24D29A.5030604@ts.fujitsu.com> Hi, (I've posted this to freebsd-questions before. Ian Smith redirected me to this list). I'm trying to install 7.2-RELEASE on a pretty new system (a Fujitsu RX300S5). The first obstacle was the fact that while the system has an AT-Keyboard-Controller, it ist not used (keyboard and mouse are connected via USB) and I have found that I can get past that by specifying set hint.atkbd.0.disabled=1 set hint.atkbdc.0.disabled=1 The install kernel then boots properly and reaches the "Country Selection". At that point, no keyboard input is accepted. An optical mouse is off, so I assume the USB power to be off. I have hooked up a serial connection to log the kernel's output (some 1000+ lines): set boot_serial=1 set boot_verbose=1 set boot_multicons=1 set console="comconsole vidconsole" The following lines make me wonder if the kernel fails to get past PCI bridges and thus can't reach the UHCI controllers: pcib0: on acpi0 pcib0: could not get PCI interrupt routing table for \_SB_.CPU0 - AE_NOT_FOUND : pcib1: on acpi0 pcib1: could not get PCI interrupt routing table for \_SB_.CPU1 - AE_NOT_FOUND : pcib2: port 0xcf8-0xcff on acpi0 pcib2: couldn't find _ADR pcib2: trying bus number 2 pci2: on pcib2 pci2: domain=0, physical bus=2 I talked to the guy who does the BIOS for the machine and he says that it makes no sense for the kernel to try and find the _PRT for \_SB_.CPU0 or \_SB_.CPU1! Can anyone help? I haven't been using FreeBSD since 4.2 and haven't dug through deep kernel functions for quite some time. Josef -- These are my personal views and not those of Fujitsu Technology Solutions! Josef M?llers (Pinguinpfleger bei FTS) If failure had no penalty success would not be a prize (T. Pratchett) Company Details: http://de.ts.fujitsu.com/imprint.html From jhb at freebsd.org Tue Jun 2 12:42:59 2009 From: jhb at freebsd.org (John Baldwin) Date: Tue Jun 2 12:43:11 2009 Subject: kern/135070: [acpi] [patch] BIOS resource allocation and FreeBSD ACPI In-Reply-To: <200906020450.n524o3kG038739@freefall.freebsd.org> References: <200906020450.n524o3kG038739@freefall.freebsd.org> Message-ID: <200906020809.46159.jhb@freebsd.org> On Tuesday 02 June 2009 12:50:03 am Mario Pavlov wrote: > The following reply was made to PR kern/135070; it has been noted by GNATS. > > From: Mario Pavlov > To: bug-followup@FreeBSD.org > Cc: John Baldwin > Subject: Re: kern/135070: [acpi] [patch] BIOS resource allocation and > FreeBSD ACPI > Date: Tue, 2 Jun 2009 07:42:24 +0300 (EEST) > > Yes, indeed > that's why I stated in the Fix section that this is a very dirty hack but someone put a [patch] tag in the Synopsis > Is this framework you mentioned planned or is work on it going on already ? The framework (multiple passes) is done (I want to get it into 8.0 but am waiting for review). However, doing the actual resource discovery and management bits is another large task on top of the framework. You can read more about the multiple passes thing and some ideas on how to use it for the resource problem at http://people.freebsd.org/~jhb/papers/bsdcan/2009/ -- John Baldwin From jhb at freebsd.org Tue Jun 2 12:42:59 2009 From: jhb at freebsd.org (John Baldwin) Date: Tue Jun 2 12:43:11 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <4A24D29A.5030604@ts.fujitsu.com> References: <4A24D29A.5030604@ts.fujitsu.com> Message-ID: <200906020811.35082.jhb@freebsd.org> On Tuesday 02 June 2009 3:19:54 am Josef Moellers wrote: > Hi, > > (I've posted this to freebsd-questions before. Ian Smith redirected me > to this list). > > I'm trying to install 7.2-RELEASE on a pretty new system (a Fujitsu > RX300S5). > The first obstacle was the fact that while the system has an > AT-Keyboard-Controller, it ist not used (keyboard and mouse are > connected via USB) and I have found that I can get past that by specifying > > set hint.atkbd.0.disabled=1 > set hint.atkbdc.0.disabled=1 > > The install kernel then boots properly and reaches the "Country Selection". > At that point, no keyboard input is accepted. An optical mouse is off, > so I assume the USB power to be off. > > I have hooked up a serial connection to log the kernel's output (some > 1000+ lines): > > set boot_serial=1 > set boot_verbose=1 > set boot_multicons=1 > set console="comconsole vidconsole" > > The following lines make me wonder if the kernel fails to get past PCI > bridges and thus can't reach the UHCI controllers: > > pcib0: on acpi0 > pcib0: could not get PCI interrupt routing table for \_SB_.CPU0 - > AE_NOT_FOUND > : > pcib1: on acpi0 > pcib1: could not get PCI interrupt routing table for \_SB_.CPU1 - > AE_NOT_FOUND > : > pcib2: port 0xcf8-0xcff on acpi0 > pcib2: couldn't find _ADR > pcib2: trying bus number 2 > pci2: on pcib2 > pci2: domain=0, physical bus=2 > > I talked to the guy who does the BIOS for the machine and he says that > it makes no sense for the kernel to try and find the _PRT for \_SB_.CPU0 > or \_SB_.CPU1! Can you get an acpidump? It seems that the BIOS has the wrong _HID for the CPU objects and has marked them as Host-PCI bridges instead. Although CPUs should be Processor objects and not Device objects anyway. Sounds like a very busted BIOS. -- John Baldwin From freebsd at abv.bg Tue Jun 2 19:30:05 2009 From: freebsd at abv.bg (Mario Pavlov) Date: Tue Jun 2 19:30:14 2009 Subject: kern/135070: [acpi] [patch] BIOS resource allocation and FreeBSD ACPI Message-ID: <200906021930.n52JU4ZS051041@freefall.freebsd.org> The following reply was made to PR kern/135070; it has been noted by GNATS. From: Mario Pavlov To: bug-followup@FreeBSD.org Cc: freebsd-acpi@freebsd.org, John Baldwin Subject: Re: kern/135070: [acpi] [patch] BIOS resource allocation and FreeBSD ACPI Date: Tue, 2 Jun 2009 22:25:41 +0300 (EEST) wow great work! if I understand correctly this falls into the "PCI-PCI Bridge Problem" right ? please let me know if you think I can help with something! From freebsd at abv.bg Tue Jun 2 19:43:40 2009 From: freebsd at abv.bg (Mario Pavlov) Date: Tue Jun 2 19:43:46 2009 Subject: kern/135070: [acpi] [patch] BIOS resource allocation and FreeBSD ACPI Message-ID: <1415140441.52696.1243970741134.JavaMail.apache@mail51.abv.bg> wow great work! if I understand correctly this falls into the "PCI-PCI Bridge Problem" right ? please let me know if you think I can help with something! From vova at fbsd.ru Wed Jun 3 08:48:31 2009 From: vova at fbsd.ru (Vladimir Grebenschikov) Date: Wed Jun 3 08:48:44 2009 Subject: Any success with Lenovo T60 In-Reply-To: <20090528201844.7df2e164.taku@tackymt.homeip.net> References: <20090528191311.b68ab3b7.taku@tackymt.homeip.net> <200905281022.n4SAMdxr065296@sana.init-main.com> <20090528201844.7df2e164.taku@tackymt.homeip.net> Message-ID: <1244018899.1784.45.camel@localhost> Hi > I'll attach the patch in a Triaez fashion :) > though I don't think this is the way to go. > # We need to implement suspend_cpus() for i386 and utilize it. Just tested patch with modem suggestion on my T60. Kind of success, If I boot kernel without modules and then do suspend It resumes, and kind of 'lived' after that (everything expect display). If I had X on another vt I can switch here and it works fine. On switch back to console I get again black screen (no even backlight). hw.acpi.reset_video=1 makes difference, now after wake-up there is backlight, even sometimes just after wake-up it shows previous screen for a moment then makes it black again (but with backlight). Only switching to X reconfigures video mode again. If I try to suspend with modules loaded it does not wake up. (need to dig what module is problem) Any hints are very appreciated. PS. fresh 8-CURRENT, recent ports, patch from this thread. -- Vladimir B. Grebenschikov vova@fbsd.ru From josef.moellers at ts.fujitsu.com Thu Jun 4 14:16:38 2009 From: josef.moellers at ts.fujitsu.com (Josef Moellers) Date: Thu Jun 4 14:16:55 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <200906020811.35082.jhb@freebsd.org> References: <4A24D29A.5030604@ts.fujitsu.com> <200906020811.35082.jhb@freebsd.org> Message-ID: <4A27D73D.1010703@ts.fujitsu.com> John Baldwin wrote: > On Tuesday 02 June 2009 3:19:54 am Josef Moellers wrote: > >> Hi, >> >> (I've posted this to freebsd-questions before. Ian Smith redirected me >> to this list). >> >> I'm trying to install 7.2-RELEASE on a pretty new system (a Fujitsu >> RX300S5). >> The first obstacle was the fact that while the system has an >> AT-Keyboard-Controller, it ist not used (keyboard and mouse are >> connected via USB) and I have found that I can get past that by specifying >> >> set hint.atkbd.0.disabled=1 >> set hint.atkbdc.0.disabled=1 >> >> The install kernel then boots properly and reaches the "Country Selection". >> At that point, no keyboard input is accepted. An optical mouse is off, >> so I assume the USB power to be off. >> >> I have hooked up a serial connection to log the kernel's output (some >> 1000+ lines): >> >> set boot_serial=1 >> set boot_verbose=1 >> set boot_multicons=1 >> set console="comconsole vidconsole" >> >> The following lines make me wonder if the kernel fails to get past PCI >> bridges and thus can't reach the UHCI controllers: >> >> pcib0: on acpi0 >> pcib0: could not get PCI interrupt routing table for \_SB_.CPU0 - >> AE_NOT_FOUND >> : >> pcib1: on acpi0 >> pcib1: could not get PCI interrupt routing table for \_SB_.CPU1 - >> AE_NOT_FOUND >> : >> pcib2: port 0xcf8-0xcff on acpi0 >> pcib2: couldn't find _ADR >> pcib2: trying bus number 2 >> pci2: on pcib2 >> pci2: domain=0, physical bus=2 >> >> I talked to the guy who does the BIOS for the machine and he says that >> it makes no sense for the kernel to try and find the _PRT for \_SB_.CPU0 >> or \_SB_.CPU1! >> > > Can you get an acpidump? It seems that the BIOS has the wrong _HID for the > CPU objects and has marked them as Host-PCI bridges instead. Although CPUs > should be Processor objects and not Device objects anyway. Sounds like a > very busted BIOS. > Does this help? -- These are my personal views and not those of Fujitsu Technology Solutions! Josef M?llers (Pinguinpfleger bei FTS) If failure had no penalty success would not be a prize (T. Pratchett) Company Details: http://de.ts.fujitsu.com/imprint.html -------------- next part -------------- DSDT @ 0xbf7c2fd5 0000: 44 53 44 54 a4 48 00 00 01 4d 46 53 43 20 20 20 DSDT.H...MFSC 0010: 44 32 36 31 39 20 20 20 00 00 06 00 4d 53 46 54 D2619 ....MSFT 0020: 01 00 00 03 10 44 07 5c 00 08 53 55 43 41 0a 07 .....D.\..SUCA.. 0030: 08 4d 54 59 50 0a 00 08 4d 41 52 43 0c 90 5f 01 .MTYP...MARC.._. 0040: 00 08 4d 53 4d 54 0b e8 03 08 4d 49 4e 41 0b d0 ..MSMT....MINA.. 0050: 07 08 4d 41 58 41 0b a0 0f 08 54 50 48 4d 0c ff ..MAXA....TPHM.. 0060: ff ff ff 08 48 4c 49 43 ff 08 4d 49 43 4c 0c 20 ....HLIC..MICL. 0070: a1 07 00 08 4d 41 43 4c 0c 60 ae 0a 00 08 50 4d ....MACL.`....PM 0080: 4d 43 0c e0 93 04 00 08 48 4c 4d 54 0c 60 ae 0a MC......HLMT.`.. 0090: 00 08 50 41 49 43 0b d0 07 10 45 15 5c 5f 53 42 ..PAIC....E.\_SB 00a0: 5f 5b 82 2c 50 53 44 5f 08 5f 48 49 44 0d 41 43 _[.,PSD_._HID.AC 00b0: 50 49 30 30 30 33 00 08 5f 55 49 44 0a 01 08 5f PI0003.._UID..._ 00c0: 53 54 41 0a 0f 14 09 5f 50 53 52 00 a4 0a 01 5b STA...._PSR....[ 00d0: 82 4e 11 50 4d 4f 5f 08 5f 48 49 44 0d 41 43 50 .N.PMO_._HID.ACP 00e0: 49 30 30 30 44 00 08 5f 53 54 41 0a 0f 14 4d 06 I000D.._STA...M. 00f0: 5f 50 4d 43 00 08 50 4d 43 44 12 4b 05 0e 53 55 _PMC..PMCD.K..SU 0100: 43 41 0a 00 4d 54 59 50 4d 41 52 43 4d 53 4d 54 CA..MTYPMARCMSMT 0110: 4d 49 4e 41 4d 41 58 41 54 50 48 4d 48 4c 49 43 MINAMAXATPHMHLIC 0120: 4d 49 43 4c 4d 41 43 4c 0d 4d 6f 64 65 6c 20 4e MICLMACL.Model N 0130: 75 6d 62 65 72 00 0d 53 65 72 69 61 6c 20 4e 75 umber..Serial Nu 0140: 6d 62 65 72 00 0d 4f 45 4d 20 49 6e 66 6f 72 6d mber..OEM Inform 0150: 61 74 69 6f 6e 00 a4 50 4d 43 44 14 0f 5f 50 4d ation..PMCD.._PM 0160: 44 00 a4 12 07 01 0d 5f 53 42 00 14 0b 5f 50 4d D......_SB..._PM 0170: 4d 00 a4 50 4d 4d 43 14 21 5f 50 41 49 01 a0 11 M..PMMC.!_PAI... 0180: 91 94 68 4d 41 58 41 95 68 4d 49 4e 41 a4 0a 01 ..hMAXA.hMINA... 0190: 70 68 50 41 49 43 a4 0a 00 14 0b 5f 47 41 49 00 phPAIC....._GAI. 01a0: a4 50 41 49 43 14 1b 5f 50 54 50 02 a0 11 91 94 .PAIC.._PTP..... 01b0: 50 4d 4d 43 68 95 50 4d 4d 43 69 a4 0a 01 a4 0a PMMCh.PMMCi..... 01c0: 00 14 0b 5f 47 48 4c 00 a4 48 4c 4d 54 14 21 5f ..._GHL..HLMT.!_ 01d0: 53 48 4c 01 a0 11 91 94 68 4d 41 43 4c 95 68 4d SHL.....hMACL.hM 01e0: 49 43 4c a4 0a 01 70 68 48 4c 4d 54 a4 0a 00 08 ICL...phHLMT.... 01f0: 43 31 45 4e 0a 01 08 43 32 45 4e 0a 01 08 53 4c C1EN...C2EN...SL 0200: 50 53 0a 00 08 4f 53 46 4c 0a 00 08 50 49 43 4d PS...OSFL...PICM 0210: 0a 00 14 4d 10 4f 53 43 4b 00 70 01 4f 53 46 4c ...M.OSCK.p.OSFL 0220: 70 00 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 p.\/._SB_PCI0LPC 0230: 5f 41 41 4f 46 a0 38 53 54 52 43 5c 5f 4f 53 5f _AAOF.8STRC\_OS_ 0240: 0d 4d 69 63 72 6f 73 6f 66 74 20 57 69 6e 64 6f .Microsoft Windo 0250: 77 73 00 70 00 4f 53 46 4c 70 01 5c 2f 04 5f 53 ws.p.OSFLp.\/._S 0260: 42 5f 50 43 49 30 4c 50 43 5f 41 41 4f 46 a0 40 B_PCI0LPC_AAOF.@ 0270: 05 53 54 52 43 5c 5f 4f 53 5f 0d 4d 69 63 72 6f .STRC\_OS_.Micro 0280: 73 6f 66 74 20 57 69 6e 64 6f 77 73 4d 45 3a 20 soft WindowsME: 0290: 4d 69 6c 6c 65 6e 6e 69 75 6d 20 45 64 69 74 69 Millennium Editi 02a0: 6f 6e 00 70 00 4f 53 46 4c 70 0a 02 5c 2f 04 5f on.p.OSFLp..\/._ 02b0: 53 42 5f 50 43 49 30 4c 50 43 5f 41 41 4f 46 a0 SB_PCI0LPC_AAOF. 02c0: 40 06 5b 12 5c 5f 4f 53 49 60 a0 2a 5c 5f 4f 53 @.[.\_OSI`.*\_OS 02d0: 49 0d 57 69 6e 64 6f 77 73 20 32 30 30 31 00 70 I.Windows 2001.p 02e0: 0a 03 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 ..\/._SB_PCI0LPC 02f0: 5f 41 41 4f 46 a0 2a 5c 5f 4f 53 49 0d 57 69 6e _AAOF.*\_OSI.Win 0300: 64 6f 77 73 20 32 30 30 36 00 70 0a 08 5c 2f 04 dows 2006.p..\/. 0310: 5f 53 42 5f 50 43 49 30 4c 50 43 5f 41 41 4f 46 _SB_PCI0LPC_AAOF 0320: 14 4f 04 53 54 52 43 02 a0 09 92 93 87 68 87 69 .O.STRC......h.i 0330: a4 00 72 87 68 01 60 08 53 54 52 31 11 02 60 70 ..r.h.`.STR1..`p 0340: 68 53 54 52 31 08 53 54 52 32 11 02 60 70 69 53 hSTR1.STR2..`piS 0350: 54 52 32 a2 1a 60 76 60 a0 15 92 93 83 88 53 54 TR2..`v`......ST 0360: 52 31 60 00 83 88 53 54 52 32 60 00 a4 00 a4 01 R1`...STR2`..... 0370: 14 0c 5f 50 49 43 01 70 68 50 49 43 4d 08 5f 53 .._PIC.phPICM._S 0380: 30 5f 12 0a 04 0a 00 0a 00 0a 00 0a 00 08 5f 53 0_............_S 0390: 31 5f 12 0a 04 0a 01 0a 01 0a 00 0a 00 08 5f 53 1_............_S 03a0: 34 5f 12 0a 04 0a 06 0a 06 0a 00 0a 00 08 5f 53 4_............_S 03b0: 35 5f 12 0a 04 0a 07 0a 07 0a 00 0a 00 14 3b 5c 5_............;\ 03c0: 5f 50 54 53 01 5c 2f 05 5f 53 42 5f 50 43 49 30 _PTS.\/._SB_PCI0 03d0: 4c 50 43 5f 53 49 4f 32 53 4c 45 50 68 a0 15 93 LPC_SIO2SLEPh... 03e0: 68 0a 05 5c 2e 5f 53 42 5f 50 48 53 52 0a 4b 0a h..\._SB_PHSR.K. 03f0: 00 0a 00 70 68 53 4c 50 53 14 4a 0c 5c 5f 57 41 ...phSLPS.J.\_WA 0400: 4b 01 5c 2f 05 5f 53 42 5f 50 43 49 30 4c 50 43 K.\/._SB_PCI0LPC 0410: 5f 53 49 4f 32 57 41 4b 45 68 70 00 53 4c 50 53 _SIO2WAKEhp.SLPS 0420: a0 43 0a 93 68 0a 04 86 5c 2e 5f 53 42 5f 50 57 .C..h...\._SB_PW 0430: 52 42 0a 02 86 5c 2f 03 5f 53 42 5f 50 43 49 30 RB...\/._SB_PCI0 0440: 55 53 42 31 0a 00 86 5c 2f 03 5f 53 42 5f 50 43 USB1...\/._SB_PC 0450: 49 30 55 53 42 32 0a 00 86 5c 2f 03 5f 53 42 5f I0USB2...\/._SB_ 0460: 50 43 49 30 55 53 42 33 0a 00 86 5c 2f 03 5f 53 PCI0USB3...\/._S 0470: 42 5f 50 43 49 30 55 53 42 34 0a 00 86 5c 2f 03 B_PCI0USB4...\/. 0480: 5f 53 42 5f 50 43 49 30 55 53 42 35 0a 00 86 5c _SB_PCI0USB5...\ 0490: 2f 03 5f 53 42 5f 50 43 49 30 55 53 42 36 0a 00 /._SB_PCI0USB6.. 04a0: 86 5c 2f 03 5f 53 42 5f 50 43 49 30 55 53 42 37 .\/._SB_PCI0USB7 04b0: 0a 00 86 5c 2f 03 5f 53 42 5f 50 43 49 30 55 53 ...\/._SB_PCI0US 04c0: 42 38 0a 00 10 47 0d 5c 5f 50 52 5f 5b 83 0b 50 B8...G.\_PR_[..P 04d0: 52 30 30 00 00 00 00 00 00 5b 83 0b 50 52 30 31 R00......[..PR01 04e0: 08 00 00 00 00 00 5b 83 0b 50 52 30 32 01 00 00 ......[..PR02... 04f0: 00 00 00 5b 83 0b 50 52 30 33 09 00 00 00 00 00 ...[..PR03...... 0500: 5b 83 0b 50 52 30 34 02 00 00 00 00 00 5b 83 0b [..PR04......[.. 0510: 50 52 30 35 0a 00 00 00 00 00 5b 83 0b 50 52 30 PR05......[..PR0 0520: 36 03 00 00 00 00 00 5b 83 0b 50 52 30 37 0b 00 6......[..PR07.. 0530: 00 00 00 00 5b 83 0b 50 52 31 30 04 00 00 00 00 ....[..PR10..... 0540: 00 5b 83 0b 50 52 31 31 0c 00 00 00 00 00 5b 83 .[..PR11......[. 0550: 0b 50 52 31 32 05 00 00 00 00 00 5b 83 0b 50 52 .PR12......[..PR 0560: 31 33 0d 00 00 00 00 00 5b 83 0b 50 52 31 34 06 13......[..PR14. 0570: 00 00 00 00 00 5b 83 0b 50 52 31 35 0e 00 00 00 .....[..PR15.... 0580: 00 00 5b 83 0b 50 52 31 36 07 00 00 00 00 00 5b ..[..PR16......[ 0590: 83 0b 50 52 31 37 0f 00 00 00 00 00 10 4e 5c 5c ..PR17.......N\\ 05a0: 5f 47 50 45 14 18 5f 4c 30 33 00 86 5c 2f 03 5f _GPE.._L03..\/._ 05b0: 53 42 5f 50 43 49 30 55 53 42 31 0a 02 14 18 5f SB_PCI0USB1...._ 05c0: 4c 30 34 00 86 5c 2f 03 5f 53 42 5f 50 43 49 30 L04..\/._SB_PCI0 05d0: 55 53 42 32 0a 02 14 18 5f 4c 30 35 00 86 5c 2f USB2...._L05..\/ 05e0: 03 5f 53 42 5f 50 43 49 30 55 53 42 35 0a 02 14 ._SB_PCI0USB5... 05f0: 49 3c 5f 4c 30 39 00 a2 46 05 5c 2f 04 5f 53 42 I<_L09..F.\/._SB 0600: 5f 50 43 49 30 50 45 31 41 50 53 5f 5f 70 01 5c _PCI0PE1APS__p.\ 0610: 2f 04 5f 53 42 5f 50 43 49 30 50 45 31 41 50 53 /._SB_PCI0PE1APS 0620: 5f 5f 5b 22 0a 0a a0 27 92 5c 2f 04 5f 53 42 5f __["...'.\/._SB_ 0630: 50 43 49 30 50 45 31 41 50 53 5f 5f 86 5c 2f 03 PCI0PE1APS__.\/. 0640: 5f 53 42 5f 50 43 49 30 50 45 31 41 0a 02 a2 2d _SB_PCI0PE1A...- 0650: 5c 2f 04 5f 53 42 5f 50 43 49 30 50 45 31 41 50 \/._SB_PCI0PE1AP 0660: 4d 43 53 70 01 5c 2f 04 5f 53 42 5f 50 43 49 30 MCSp.\/._SB_PCI0 0670: 50 45 31 41 50 4d 43 53 5b 22 0a 0a a2 46 05 5c PE1APMCS["...F.\ 0680: 2f 04 5f 53 42 5f 50 43 49 30 50 45 31 45 50 53 /._SB_PCI0PE1EPS 0690: 5f 5f 70 01 5c 2f 04 5f 53 42 5f 50 43 49 30 50 __p.\/._SB_PCI0P 06a0: 45 31 45 50 53 5f 5f 5b 22 0a 0a a0 27 92 5c 2f E1EPS__["...'.\/ 06b0: 04 5f 53 42 5f 50 43 49 30 50 45 31 45 50 53 5f ._SB_PCI0PE1EPS_ 06c0: 5f 86 5c 2f 03 5f 53 42 5f 50 43 49 30 50 45 31 _.\/._SB_PCI0PE1 06d0: 45 0a 02 a2 2d 5c 2f 04 5f 53 42 5f 50 43 49 30 E...-\/._SB_PCI0 06e0: 50 45 31 45 50 4d 43 53 70 01 5c 2f 04 5f 53 42 PE1EPMCSp.\/._SB 06f0: 5f 50 43 49 30 50 45 31 45 50 4d 43 53 5b 22 0a _PCI0PE1EPMCS[". 0700: 0a a2 46 05 5c 2f 04 5f 53 42 5f 50 43 49 30 50 ..F.\/._SB_PCI0P 0710: 45 30 5f 50 53 5f 5f 70 01 5c 2f 04 5f 53 42 5f E0_PS__p.\/._SB_ 0720: 50 43 49 30 50 45 30 5f 50 53 5f 5f 5b 22 0a 0a PCI0PE0_PS__[".. 0730: a0 27 92 5c 2f 04 5f 53 42 5f 50 43 49 30 50 45 .'.\/._SB_PCI0PE 0740: 30 5f 50 53 5f 5f 86 5c 2f 03 5f 53 42 5f 50 43 0_PS__.\/._SB_PC 0750: 49 30 50 45 30 5f 0a 02 a2 46 05 5c 2f 04 5f 53 I0PE0_...F.\/._S 0760: 42 5f 50 43 49 30 50 45 31 5f 50 53 5f 5f 70 01 B_PCI0PE1_PS__p. 0770: 5c 2f 04 5f 53 42 5f 50 43 49 30 50 45 31 5f 50 \/._SB_PCI0PE1_P 0780: 53 5f 5f 5b 22 0a 0a a0 27 92 5c 2f 04 5f 53 42 S__["...'.\/._SB 0790: 5f 50 43 49 30 50 45 31 5f 50 53 5f 5f 86 5c 2f _PCI0PE1_PS__.\/ 07a0: 03 5f 53 42 5f 50 43 49 30 50 45 31 5f 0a 02 a2 ._SB_PCI0PE1_... 07b0: 46 05 5c 2f 04 5f 53 42 5f 50 43 49 30 50 45 33 F.\/._SB_PCI0PE3 07c0: 5f 50 53 5f 5f 70 01 5c 2f 04 5f 53 42 5f 50 43 _PS__p.\/._SB_PC 07d0: 49 30 50 45 33 5f 50 53 5f 5f 5b 22 0a 0a a0 27 I0PE3_PS__["...' 07e0: 92 5c 2f 04 5f 53 42 5f 50 43 49 30 50 45 33 5f .\/._SB_PCI0PE3_ 07f0: 50 53 5f 5f 86 5c 2f 03 5f 53 42 5f 50 43 49 30 PS__.\/._SB_PCI0 0800: 50 45 33 5f 0a 02 a2 46 05 5c 2f 04 5f 53 42 5f PE3_...F.\/._SB_ 0810: 50 43 49 30 50 45 35 5f 50 53 5f 5f 70 01 5c 2f PCI0PE5_PS__p.\/ 0820: 04 5f 53 42 5f 50 43 49 30 50 45 35 5f 50 53 5f ._SB_PCI0PE5_PS_ 0830: 5f 5b 22 0a 0a a0 27 92 5c 2f 04 5f 53 42 5f 50 _["...'.\/._SB_P 0840: 43 49 30 50 45 35 5f 50 53 5f 5f 86 5c 2f 03 5f CI0PE5_PS__.\/._ 0850: 53 42 5f 50 43 49 30 50 45 35 5f 0a 02 a2 46 05 SB_PCI0PE5_...F. 0860: 5c 2f 04 5f 53 42 5f 50 43 49 30 50 45 37 5f 50 \/._SB_PCI0PE7_P 0870: 53 5f 5f 70 01 5c 2f 04 5f 53 42 5f 50 43 49 30 S__p.\/._SB_PCI0 0880: 50 45 37 5f 50 53 5f 5f 5b 22 0a 0a a0 27 92 5c PE7_PS__["...'.\ 0890: 2f 04 5f 53 42 5f 50 43 49 30 50 45 37 5f 50 53 /._SB_PCI0PE7_PS 08a0: 5f 5f 86 5c 2f 03 5f 53 42 5f 50 43 49 30 50 45 __.\/._SB_PCI0PE 08b0: 37 5f 0a 02 a2 46 05 5c 2f 04 5f 53 42 5f 50 43 7_...F.\/._SB_PC 08c0: 49 30 50 45 38 5f 50 53 5f 5f 70 01 5c 2f 04 5f I0PE8_PS__p.\/._ 08d0: 53 42 5f 50 43 49 30 50 45 38 5f 50 53 5f 5f 5b SB_PCI0PE8_PS__[ 08e0: 22 0a 0a a0 27 92 5c 2f 04 5f 53 42 5f 50 43 49 "...'.\/._SB_PCI 08f0: 30 50 45 38 5f 50 53 5f 5f 86 5c 2f 03 5f 53 42 0PE8_PS__.\/._SB 0900: 5f 50 43 49 30 50 45 38 5f 0a 02 a2 46 05 5c 2f _PCI0PE8_...F.\/ 0910: 04 5f 53 42 5f 50 43 49 30 50 45 39 5f 50 53 5f ._SB_PCI0PE9_PS_ 0920: 5f 70 01 5c 2f 04 5f 53 42 5f 50 43 49 30 50 45 _p.\/._SB_PCI0PE 0930: 39 5f 50 53 5f 5f 5b 22 0a 0a a0 27 92 5c 2f 04 9_PS__["...'.\/. 0940: 5f 53 42 5f 50 43 49 30 50 45 39 5f 50 53 5f 5f _SB_PCI0PE9_PS__ 0950: 86 5c 2f 03 5f 53 42 5f 50 43 49 30 50 45 39 5f .\/._SB_PCI0PE9_ 0960: 0a 02 a2 46 05 5c 2f 04 5f 53 42 5f 50 43 49 30 ...F.\/._SB_PCI0 0970: 50 45 31 30 50 53 5f 5f 70 01 5c 2f 04 5f 53 42 PE10PS__p.\/._SB 0980: 5f 50 43 49 30 50 45 31 30 50 53 5f 5f 5b 22 0a _PCI0PE10PS__[". 0990: 0a a0 27 92 5c 2f 04 5f 53 42 5f 50 43 49 30 50 ..'.\/._SB_PCI0P 09a0: 45 31 30 50 53 5f 5f 86 5c 2f 03 5f 53 42 5f 50 E10PS__.\/._SB_P 09b0: 43 49 30 50 45 31 30 0a 02 14 18 5f 4c 30 43 00 CI0PE10...._L0C. 09c0: 86 5c 2f 03 5f 53 42 5f 50 43 49 30 55 53 42 33 .\/._SB_PCI0USB3 09d0: 0a 02 14 2a 5f 4c 30 44 00 86 5c 2f 03 5f 53 42 ...*_L0D..\/._SB 09e0: 5f 50 43 49 30 55 53 42 37 0a 02 86 5c 2f 03 5f _PCI0USB7...\/._ 09f0: 53 42 5f 50 43 49 30 55 53 42 38 0a 02 14 18 5f SB_PCI0USB8...._ 0a00: 4c 30 45 00 86 5c 2f 03 5f 53 42 5f 50 43 49 30 L0E..\/._SB_PCI0 0a10: 55 53 42 34 0a 02 14 1d 5f 4c 31 36 00 5c 2f 05 USB4...._L16.\/. 0a20: 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4b 43 53 35 _SB_PCI0LPC_KCS5 0a30: 53 49 52 53 14 4d 11 5f 4c 31 38 00 a0 4a 08 90 SIRS.M._L18..J.. 0a40: 5c 2f 05 5f 53 42 5f 50 43 49 30 4c 50 43 5f 53 \/._SB_PCI0LPC_S 0a50: 49 4f 32 52 49 31 53 5c 2f 05 5f 53 42 5f 50 43 IO2RI1S\/._SB_PC 0a60: 49 30 4c 50 43 5f 53 49 4f 32 52 49 31 45 86 5c I0LPC_SIO2RI1E.\ 0a70: 2e 5f 53 42 5f 50 57 52 42 0a 02 86 5c 2f 05 5f ._SB_PWRB...\/._ 0a80: 53 42 5f 50 43 49 30 4c 50 43 5f 53 49 4f 32 43 SB_PCI0LPC_SIO2C 0a90: 4f 4d 31 0a 02 a2 31 5c 2f 05 5f 53 42 5f 50 43 OM1...1\/._SB_PC 0aa0: 49 30 4c 50 43 5f 53 49 4f 32 52 49 31 53 70 01 I0LPC_SIO2RI1Sp. 0ab0: 5c 2f 05 5f 53 42 5f 50 43 49 30 4c 50 43 5f 53 \/._SB_PCI0LPC_S 0ac0: 49 4f 32 52 49 31 53 a0 4a 08 90 5c 2f 05 5f 53 IO2RI1S.J..\/._S 0ad0: 42 5f 50 43 49 30 4c 50 43 5f 53 49 4f 32 52 49 B_PCI0LPC_SIO2RI 0ae0: 32 53 5c 2f 05 5f 53 42 5f 50 43 49 30 4c 50 43 2S\/._SB_PCI0LPC 0af0: 5f 53 49 4f 32 52 49 32 45 86 5c 2e 5f 53 42 5f _SIO2RI2E.\._SB_ 0b00: 50 57 52 42 0a 02 86 5c 2f 05 5f 53 42 5f 50 43 PWRB...\/._SB_PC 0b10: 49 30 4c 50 43 5f 53 49 4f 32 43 4f 4d 32 0a 02 I0LPC_SIO2COM2.. 0b20: a2 31 5c 2f 05 5f 53 42 5f 50 43 49 30 4c 50 43 .1\/._SB_PCI0LPC 0b30: 5f 53 49 4f 32 52 49 32 53 70 01 5c 2f 05 5f 53 _SIO2RI2Sp.\/._S 0b40: 42 5f 50 43 49 30 4c 50 43 5f 53 49 4f 32 52 49 B_PCI0LPC_SIO2RI 0b50: 32 53 14 18 5f 4c 32 30 00 86 5c 2f 03 5f 53 42 2S.._L20..\/._SB 0b60: 5f 50 43 49 30 55 53 42 36 0a 02 10 45 07 5c 5f _PCI0USB6...E.\_ 0b70: 53 49 5f 14 26 5f 53 53 54 01 a0 0f 93 68 0a 01 SI_.&_SST....h.. 0b80: 53 53 49 4c 0a 01 0a 00 0a 01 a0 0f 93 68 0a 03 SSIL.........h.. 0b90: 53 53 49 4c 0a 01 0a 01 0a 01 14 46 04 53 53 49 SSIL.......F.SSI 0ba0: 4c 03 70 68 5c 2f 04 5f 53 42 5f 50 43 49 30 4c L.ph\/._SB_PCI0L 0bb0: 50 43 5f 53 53 4c 45 70 69 5c 2f 04 5f 53 42 5f PC_SSLEpi\/._SB_ 0bc0: 50 43 49 30 4c 50 43 5f 53 50 4c 42 70 6a 5c 2f PCI0LPC_SPLBpj\/ 0bd0: 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 53 50 4c ._SB_PCI0LPC_SPL 0be0: 45 10 82 cc 03 5c 5f 53 42 5f 5b 80 53 4d 49 30 E....\_SB_[.SMI0 0bf0: 01 0c 00 fe 00 00 0c 02 00 00 00 5b 81 0b 53 4d ...........[..SM 0c00: 49 30 00 53 4d 49 43 08 5b 80 53 4d 49 31 00 0c I0.SMIC.[.SMI1.. 0c10: bc be 7c bf 0c 90 00 00 00 5b 81 16 53 4d 49 31 ..|......[..SMI1 0c20: 00 42 43 4d 44 08 44 49 44 5f 20 49 4e 46 4f 40 .BCMD.DID_ INFO@ 0c30: 40 5b 80 54 43 47 31 00 0c b5 be 7c bf 0b 07 00 @[.TCG1....|.... 0c40: 5b 81 29 54 43 47 31 00 50 50 52 51 08 50 50 4c [.)TCG1.PPRQ.PPL 0c50: 4f 08 50 50 52 50 08 50 50 4f 52 08 54 50 52 53 O.PPRP.PPOR.TPRS 0c60: 08 54 50 4d 56 08 4d 4f 52 5f 08 14 35 50 48 53 .TPMV.MOR_..5PHS 0c70: 52 0b 70 68 42 43 4d 44 70 69 44 49 44 5f 70 6a R.phBCMDpiDID_pj 0c80: 49 4e 46 4f 70 00 53 4d 49 43 a0 07 93 42 43 4d INFOp.SMIC...BCM 0c90: 44 68 70 00 42 43 4d 44 70 00 44 49 44 5f a4 0a Dhp.BCMDp.DID_.. 0ca0: 00 5b 80 50 45 43 46 00 0c 00 00 00 e0 0c 00 00 .[.PECF......... 0cb0: 10 00 5b 81 46 09 50 45 43 46 03 00 40 c4 00 02 ..[.F.PECF..@... 0cc0: 50 4d 45 30 01 00 1d 50 45 49 30 01 00 8f fd 3f PME0...PEI0....? 0cd0: 00 02 50 4d 45 31 01 00 1d 50 45 49 31 01 00 8f ..PME1...PEI1... 0ce0: fd 7f 00 02 50 4d 45 33 01 00 1d 50 45 49 33 01 ....PME3...PEI3. 0cf0: 00 8f fd 7f 00 02 50 4d 45 35 01 00 1d 50 45 49 ......PME5...PEI 0d00: 35 01 00 8f fd 7f 00 02 50 4d 45 37 01 00 1d 50 5.......PME7...P 0d10: 45 49 37 01 00 8f fd 3f 00 02 50 4d 45 38 01 00 EI7....?..PME8.. 0d20: 1d 50 45 49 38 01 00 8f fd 3f 00 02 50 4d 45 39 .PEI8....?..PME9 0d30: 01 00 1d 50 45 49 39 01 00 8f fd 3f 00 02 50 4d ...PEI9....?..PM 0d40: 45 41 01 00 1d 50 45 49 41 01 5b 82 49 19 4d 43 EA...PEIA.[.I.MC 0d50: 46 47 08 5f 48 49 44 0c 41 d0 0c 02 08 5f 55 49 FG._HID.A...._UI 0d60: 44 0a 02 08 43 52 45 53 11 1f 0a 1c 87 17 00 00 D...CRES........ 0d70: 0d 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0d80: 00 00 00 00 00 00 79 00 14 4c 15 5f 43 52 53 00 ......y..L._CRS. 0d90: 8a 43 52 45 53 0a 0a 4d 49 4e 50 8a 43 52 45 53 .CRES..MINP.CRES 0da0: 0a 0e 4d 41 58 50 8a 43 52 45 53 0a 16 4c 45 4e ..MAXP.CRES..LEN 0db0: 50 a0 49 09 93 5c 2f 04 5f 53 42 5f 43 50 55 30 P.I..\/._SB_CPU0 0dc0: 53 41 44 5f 56 49 44 5f 0b 86 80 79 5c 2f 04 5f SAD_VID_...y\/._ 0dd0: 53 42 5f 43 50 55 30 53 41 44 5f 43 46 47 41 0a SB_CPU0SAD_CFGA. 0de0: 14 4d 49 4e 50 a0 21 93 5c 2f 04 5f 53 42 5f 43 .MINP.!.\/._SB_C 0df0: 50 55 30 53 41 44 5f 43 46 47 53 0a 06 70 0c 00 PU0SAD_CFGS..p.. 0e00: 00 00 04 4c 45 4e 50 a0 21 93 5c 2f 04 5f 53 42 ...LENP.!.\/._SB 0e10: 5f 43 50 55 30 53 41 44 5f 43 46 47 53 0a 07 70 _CPU0SAD_CFGS..p 0e20: 0c 00 00 00 08 4c 45 4e 50 a0 21 93 5c 2f 04 5f .....LENP.!.\/._ 0e30: 53 42 5f 43 50 55 30 53 41 44 5f 43 46 47 53 0a SB_CPU0SAD_CFGS. 0e40: 00 70 0c 00 00 00 10 4c 45 4e 50 a1 42 08 79 5c .p.....LENP.B.y\ 0e50: 2f 04 5f 53 42 5f 43 50 55 31 53 41 44 5f 43 46 /._SB_CPU1SAD_CF 0e60: 47 41 0a 14 4d 49 4e 50 a0 21 93 5c 2f 04 5f 53 GA..MINP.!.\/._S 0e70: 42 5f 43 50 55 31 53 41 44 5f 43 46 47 53 0a 06 B_CPU1SAD_CFGS.. 0e80: 70 0c 00 00 00 04 4c 45 4e 50 a0 21 93 5c 2f 04 p.....LENP.!.\/. 0e90: 5f 53 42 5f 43 50 55 31 53 41 44 5f 43 46 47 53 _SB_CPU1SAD_CFGS 0ea0: 0a 07 70 0c 00 00 00 08 4c 45 4e 50 a0 21 93 5c ..p.....LENP.!.\ 0eb0: 2f 04 5f 53 42 5f 43 50 55 31 53 41 44 5f 43 46 /._SB_CPU1SAD_CF 0ec0: 47 53 0a 00 70 0c 00 00 00 10 4c 45 4e 50 72 4d GS..p.....LENPrM 0ed0: 49 4e 50 4c 45 4e 50 4d 41 58 50 76 4d 41 58 50 INPLENPMAXPvMAXP 0ee0: a4 43 52 45 53 5b 82 0f 50 57 52 42 08 5f 48 49 .CRES[..PWRB._HI 0ef0: 44 0c 41 d0 0c 0c 5b 82 4f 0a 43 50 55 30 08 5f D.A...[.O.CPU0._ 0f00: 48 49 44 0c 41 d0 0a 03 08 5f 55 49 44 0a 01 08 HID.A...._UID... 0f10: 5f 42 42 4e 0a ff 08 43 52 45 53 11 15 0a 12 88 _BBN...CRES..... 0f20: 0d 00 02 0c 00 00 00 ff 00 ff 00 00 00 01 00 79 ...............y 0f30: 00 14 0b 5f 43 52 53 00 a4 43 52 45 53 5b 82 48 ..._CRS..CRES[.H 0f40: 06 53 41 44 5f 08 5f 41 44 52 0a 01 08 5f 53 54 .SAD_._ADR..._ST 0f50: 41 0a 0f 5b 80 50 45 43 46 02 0a 00 0b 00 01 5b A..[.PECF......[ 0f60: 81 46 04 50 45 43 46 03 56 49 44 5f 10 00 40 1f .F.PECF.VID_..@. 0f70: 50 41 4d 30 08 50 41 4d 31 08 50 41 4d 32 08 50 PAM0.PAM1.PAM2.P 0f80: 41 4d 33 08 50 41 4d 34 08 50 41 4d 35 08 50 41 AM3.PAM4.PAM5.PA 0f90: 4d 36 08 00 48 04 43 46 47 45 01 43 46 47 53 03 M6..H.CFGE.CFGS. 0fa0: 00 10 43 46 47 41 14 5b 82 4f 0a 43 50 55 31 08 ..CFGA.[.O.CPU1. 0fb0: 5f 48 49 44 0c 41 d0 0a 03 08 5f 55 49 44 0a 02 _HID.A...._UID.. 0fc0: 08 5f 42 42 4e 0a fe 08 43 52 45 53 11 15 0a 12 ._BBN...CRES.... 0fd0: 88 0d 00 02 0c 00 00 00 fe 00 fe 00 00 00 01 00 ................ 0fe0: 79 00 14 0b 5f 43 52 53 00 a4 43 52 45 53 5b 82 y..._CRS..CRES[. 0ff0: 48 06 53 41 44 5f 08 5f 41 44 52 0a 01 08 5f 53 H.SAD_._ADR..._S 1000: 54 41 0a 0f 5b 80 50 45 43 46 02 0a 00 0b 00 01 TA..[.PECF...... 1010: 5b 81 46 04 50 45 43 46 03 56 49 44 5f 10 00 40 [.F.PECF.VID_..@ 1020: 1f 50 41 4d 30 08 50 41 4d 31 08 50 41 4d 32 08 .PAM0.PAM1.PAM2. 1030: 50 41 4d 33 08 50 41 4d 34 08 50 41 4d 35 08 50 PAM3.PAM4.PAM5.P 1040: 41 4d 36 08 00 48 04 43 46 47 45 01 43 46 47 53 AM6..H.CFGE.CFGS 1050: 03 00 10 43 46 47 41 14 5b 82 8a 84 03 50 43 49 ...CFGA.[....PCI 1060: 30 08 5f 48 49 44 0c 41 d0 0a 08 08 5f 43 49 44 0._HID.A...._CID 1070: 0c 41 d0 0a 03 08 5f 55 49 44 0a 00 08 5f 42 42 .A...._UID..._BB 1080: 4e 0a 00 14 0b 5f 49 4e 49 00 5c 4f 53 43 4b 08 N...._INI.\OSCK. 1090: 43 52 45 53 11 4a 0d 0a d6 88 0d 00 02 0c 00 00 CRES.J.......... 10a0: 00 00 00 3d 00 00 00 3e 00 88 0d 00 01 0c 03 00 ...=...>........ 10b0: 00 00 00 f7 0c 00 00 f8 0c 47 01 f8 0c f8 0c 01 .........G...... 10c0: 08 88 0d 00 01 0c 03 00 00 00 0d ff ff 00 00 00 ................ 10d0: f3 87 17 00 00 0c 01 00 00 00 00 00 00 0a 00 ff ................ 10e0: ff 0b 00 00 00 00 00 00 00 02 00 87 17 00 00 0c ................ 10f0: 01 00 00 00 00 00 80 0c 00 ff ff 0d 00 00 00 00 ................ 1100: 00 00 80 01 00 87 17 00 00 0c 03 00 00 00 00 00 ................ 1110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 87 ................ 1120: 17 00 00 0c 03 00 00 00 00 00 00 00 f0 ff ff bf ................ 1130: fe 00 00 00 00 00 00 c0 0e 87 17 00 00 0c 03 00 ................ 1140: 00 00 00 00 00 d0 fe ff ff df fe 00 00 00 00 00 ................ 1150: 00 10 00 87 17 00 00 0c 03 00 00 00 00 00 00 f0 ................ 1160: fe ff ff bf ff 00 00 00 00 00 00 d0 00 79 00 14 .............y.. 1170: 42 0b 5f 43 52 53 00 8a 43 52 45 53 0a 76 4d 49 B._CRS..CRES.vMI 1180: 4e 31 8a 43 52 45 53 0a 7a 4d 41 58 31 8a 43 52 N1.CRES.zMAX1.CR 1190: 45 53 0a 82 4c 45 4e 31 72 5c 2f 04 5f 53 42 5f ES..LEN1r\/._SB_ 11a0: 50 43 49 30 43 4f 52 45 54 4f 4c 4d 0a 01 60 79 PCI0CORETOLM..`y 11b0: 60 0a 1a 4d 49 4e 31 a0 32 93 5c 2f 04 5f 53 42 `..MIN1.2.\/._SB 11c0: 5f 43 50 55 30 53 41 44 5f 56 49 44 5f 0b 86 80 _CPU0SAD_VID_... 11d0: 79 5c 2f 04 5f 53 42 5f 43 50 55 30 53 41 44 5f y\/._SB_CPU0SAD_ 11e0: 43 46 47 41 0a 14 4d 41 58 31 a1 1b 79 5c 2f 04 CFGA..MAX1..y\/. 11f0: 5f 53 42 5f 43 50 55 31 53 41 44 5f 43 46 47 41 _SB_CPU1SAD_CFGA 1200: 0a 14 4d 41 58 31 76 4d 41 58 31 74 4d 41 58 31 ..MAX1vMAX1tMAX1 1210: 4d 49 4e 31 4c 45 4e 31 75 4c 45 4e 31 a4 43 52 MIN1LEN1uLEN1.CR 1220: 45 53 14 43 80 5f 50 52 54 00 a0 4f 57 93 50 49 ES.C._PRT..OW.PI 1230: 43 4d 0a 00 a4 12 44 57 2d 12 1c 04 0b ff ff 0a CM....DW-....... 1240: 00 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f .\/._SB_PCI0LPC_ 1250: 4c 4e 4b 41 0a 00 12 1e 04 0c ff ff 01 00 0a 00 LNKA............ 1260: 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c \/._SB_PCI0LPC_L 1270: 4e 4b 41 0a 00 12 1e 04 0c ff ff 01 00 0a 01 5c NKA............\ 1280: 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e /._SB_PCI0LPC_LN 1290: 4b 42 0a 00 12 1e 04 0c ff ff 01 00 0a 02 5c 2f KB............\/ 12a0: 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b ._SB_PCI0LPC_LNK 12b0: 43 0a 00 12 1e 04 0c ff ff 01 00 0a 03 5c 2f 04 C............\/. 12c0: 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 44 _SB_PCI0LPC_LNKD 12d0: 0a 00 12 1e 04 0c ff ff 03 00 0a 00 5c 2f 04 5f ............\/._ 12e0: 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 41 0a SB_PCI0LPC_LNKA. 12f0: 00 12 1e 04 0c ff ff 03 00 0a 01 5c 2f 04 5f 53 ...........\/._S 1300: 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 42 0a 00 B_PCI0LPC_LNKB.. 1310: 12 1e 04 0c ff ff 03 00 0a 02 5c 2f 04 5f 53 42 ..........\/._SB 1320: 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 43 0a 00 12 _PCI0LPC_LNKC... 1330: 1e 04 0c ff ff 03 00 0a 03 5c 2f 04 5f 53 42 5f .........\/._SB_ 1340: 50 43 49 30 4c 50 43 5f 4c 4e 4b 44 0a 00 12 1e PCI0LPC_LNKD.... 1350: 04 0c ff ff 05 00 0a 00 5c 2f 04 5f 53 42 5f 50 ........\/._SB_P 1360: 43 49 30 4c 50 43 5f 4c 4e 4b 41 0a 00 12 1e 04 CI0LPC_LNKA..... 1370: 0c ff ff 05 00 0a 01 5c 2f 04 5f 53 42 5f 50 43 .......\/._SB_PC 1380: 49 30 4c 50 43 5f 4c 4e 4b 42 0a 00 12 1e 04 0c I0LPC_LNKB...... 1390: ff ff 05 00 0a 02 5c 2f 04 5f 53 42 5f 50 43 49 ......\/._SB_PCI 13a0: 30 4c 50 43 5f 4c 4e 4b 43 0a 00 12 1e 04 0c ff 0LPC_LNKC....... 13b0: ff 05 00 0a 03 5c 2f 04 5f 53 42 5f 50 43 49 30 .....\/._SB_PCI0 13c0: 4c 50 43 5f 4c 4e 4b 44 0a 00 12 1e 04 0c ff ff LPC_LNKD........ 13d0: 07 00 0a 00 5c 2f 04 5f 53 42 5f 50 43 49 30 4c ....\/._SB_PCI0L 13e0: 50 43 5f 4c 4e 4b 41 0a 00 12 1e 04 0c ff ff 07 PC_LNKA......... 13f0: 00 0a 01 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 ...\/._SB_PCI0LP 1400: 43 5f 4c 4e 4b 42 0a 00 12 1e 04 0c ff ff 07 00 C_LNKB.......... 1410: 0a 02 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 ..\/._SB_PCI0LPC 1420: 5f 4c 4e 4b 43 0a 00 12 1e 04 0c ff ff 07 00 0a _LNKC........... 1430: 03 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f .\/._SB_PCI0LPC_ 1440: 4c 4e 4b 44 0a 00 12 1e 04 0c ff ff 08 00 0a 00 LNKD............ 1450: 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c \/._SB_PCI0LPC_L 1460: 4e 4b 41 0a 00 12 1e 04 0c ff ff 08 00 0a 01 5c NKA............\ 1470: 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e /._SB_PCI0LPC_LN 1480: 4b 42 0a 00 12 1e 04 0c ff ff 08 00 0a 02 5c 2f KB............\/ 1490: 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b ._SB_PCI0LPC_LNK 14a0: 43 0a 00 12 1e 04 0c ff ff 08 00 0a 03 5c 2f 04 C............\/. 14b0: 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 44 _SB_PCI0LPC_LNKD 14c0: 0a 00 12 1e 04 0c ff ff 09 00 0a 00 5c 2f 04 5f ............\/._ 14d0: 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 41 0a SB_PCI0LPC_LNKA. 14e0: 00 12 1e 04 0c ff ff 09 00 0a 01 5c 2f 04 5f 53 ...........\/._S 14f0: 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 42 0a 00 B_PCI0LPC_LNKB.. 1500: 12 1e 04 0c ff ff 09 00 0a 02 5c 2f 04 5f 53 42 ..........\/._SB 1510: 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 43 0a 00 12 _PCI0LPC_LNKC... 1520: 1e 04 0c ff ff 09 00 0a 03 5c 2f 04 5f 53 42 5f .........\/._SB_ 1530: 50 43 49 30 4c 50 43 5f 4c 4e 4b 44 0a 00 12 1e PCI0LPC_LNKD.... 1540: 04 0c ff ff 0a 00 0a 00 5c 2f 04 5f 53 42 5f 50 ........\/._SB_P 1550: 43 49 30 4c 50 43 5f 4c 4e 4b 41 0a 00 12 1e 04 CI0LPC_LNKA..... 1560: 0c ff ff 0a 00 0a 01 5c 2f 04 5f 53 42 5f 50 43 .......\/._SB_PC 1570: 49 30 4c 50 43 5f 4c 4e 4b 42 0a 00 12 1e 04 0c I0LPC_LNKB...... 1580: ff ff 0a 00 0a 02 5c 2f 04 5f 53 42 5f 50 43 49 ......\/._SB_PCI 1590: 30 4c 50 43 5f 4c 4e 4b 43 0a 00 12 1e 04 0c ff 0LPC_LNKC....... 15a0: ff 0a 00 0a 03 5c 2f 04 5f 53 42 5f 50 43 49 30 .....\/._SB_PCI0 15b0: 4c 50 43 5f 4c 4e 4b 44 0a 00 12 1e 04 0c ff ff LPC_LNKD........ 15c0: 16 00 0a 00 5c 2f 04 5f 53 42 5f 50 43 49 30 4c ....\/._SB_PCI0L 15d0: 50 43 5f 4c 4e 4b 41 0a 00 12 1e 04 0c ff ff 16 PC_LNKA......... 15e0: 00 0a 01 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 ...\/._SB_PCI0LP 15f0: 43 5f 4c 4e 4b 42 0a 00 12 1e 04 0c ff ff 16 00 C_LNKB.......... 1600: 0a 02 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 ..\/._SB_PCI0LPC 1610: 5f 4c 4e 4b 43 0a 00 12 1e 04 0c ff ff 16 00 0a _LNKC........... 1620: 03 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f .\/._SB_PCI0LPC_ 1630: 4c 4e 4b 44 0a 00 12 1e 04 0c ff ff 1a 00 0a 00 LNKD............ 1640: 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c \/._SB_PCI0LPC_L 1650: 4e 4b 44 0a 00 12 1e 04 0c ff ff 1a 00 0a 01 5c NKD............\ 1660: 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e /._SB_PCI0LPC_LN 1670: 4b 43 0a 00 12 1e 04 0c ff ff 1a 00 0a 02 5c 2f KC............\/ 1680: 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b ._SB_PCI0LPC_LNK 1690: 43 0a 00 12 1e 04 0c ff ff 1c 00 0a 00 5c 2f 04 C............\/. 16a0: 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 41 _SB_PCI0LPC_LNKA 16b0: 0a 00 12 1e 04 0c ff ff 1c 00 0a 01 5c 2f 04 5f ............\/._ 16c0: 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 42 0a SB_PCI0LPC_LNKB. 16d0: 00 12 1e 04 0c ff ff 1c 00 0a 02 5c 2f 04 5f 53 ...........\/._S 16e0: 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 43 0a 00 B_PCI0LPC_LNKC.. 16f0: 12 1e 04 0c ff ff 1c 00 0a 03 5c 2f 04 5f 53 42 ..........\/._SB 1700: 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 44 0a 00 12 _PCI0LPC_LNKD... 1710: 1e 04 0c ff ff 1d 00 0a 00 5c 2f 04 5f 53 42 5f .........\/._SB_ 1720: 50 43 49 30 4c 50 43 5f 4c 4e 4b 48 0a 00 12 1e PCI0LPC_LNKH.... 1730: 04 0c ff ff 1d 00 0a 01 5c 2f 04 5f 53 42 5f 50 ........\/._SB_P 1740: 43 49 30 4c 50 43 5f 4c 4e 4b 47 0a 00 12 1e 04 CI0LPC_LNKG..... 1750: 0c ff ff 1d 00 0a 02 5c 2f 04 5f 53 42 5f 50 43 .......\/._SB_PC 1760: 49 30 4c 50 43 5f 4c 4e 4b 46 0a 00 12 1e 04 0c I0LPC_LNKF...... 1770: ff ff 1f 00 0a 00 5c 2f 04 5f 53 42 5f 50 43 49 ......\/._SB_PCI 1780: 30 4c 50 43 5f 4c 4e 4b 41 0a 00 12 1e 04 0c ff 0LPC_LNKA....... 1790: ff 1f 00 0a 01 5c 2f 04 5f 53 42 5f 50 43 49 30 .....\/._SB_PCI0 17a0: 4c 50 43 5f 4c 4e 4b 42 0a 00 a1 4b 27 a4 12 47 LPC_LNKB...K'..G 17b0: 27 2d 12 0b 04 0b ff ff 0a 00 0a 00 0a 2f 12 0d '-.........../.. 17c0: 04 0c ff ff 01 00 0a 00 0a 00 0a 1c 12 0d 04 0c ................ 17d0: ff ff 01 00 0a 01 0a 00 0a 28 12 0d 04 0c ff ff .........(...... 17e0: 01 00 0a 02 0a 00 0a 29 12 0d 04 0c ff ff 01 00 .......)........ 17f0: 0a 03 0a 00 0a 2f 12 0d 04 0c ff ff 03 00 0a 00 ...../.......... 1800: 0a 00 0a 18 12 0d 04 0c ff ff 03 00 0a 01 0a 00 ................ 1810: 0a 22 12 0d 04 0c ff ff 03 00 0a 02 0a 00 0a 23 .".............# 1820: 12 0d 04 0c ff ff 03 00 0a 03 0a 00 0a 24 12 0d .............$.. 1830: 04 0c ff ff 05 00 0a 00 0a 00 0a 1a 12 0d 04 0c ................ 1840: ff ff 05 00 0a 01 0a 00 0a 19 12 0d 04 0c ff ff ................ 1850: 05 00 0a 02 0a 00 0a 1b 12 0d 04 0c ff ff 05 00 ................ 1860: 0a 03 0a 00 0a 1d 12 0d 04 0c ff ff 07 00 0a 00 ................ 1870: 0a 00 0a 1e 12 0d 04 0c ff ff 07 00 0a 01 0a 00 ................ 1880: 0a 25 12 0d 04 0c ff ff 07 00 0a 02 0a 00 0a 27 .%.............' 1890: 12 0d 04 0c ff ff 07 00 0a 03 0a 00 0a 26 12 0d .............&.. 18a0: 04 0c ff ff 08 00 0a 00 0a 00 0a 1f 12 0d 04 0c ................ 18b0: ff ff 08 00 0a 01 0a 00 0a 27 12 0d 04 0c ff ff .........'...... 18c0: 08 00 0a 02 0a 00 0a 26 12 0d 04 0c ff ff 08 00 .......&........ 18d0: 0a 03 0a 00 0a 25 12 0d 04 0c ff ff 09 00 0a 00 .....%.......... 18e0: 0a 00 0a 20 12 0d 04 0c ff ff 09 00 0a 01 0a 00 ... ............ 18f0: 0a 2a 12 0d 04 0c ff ff 09 00 0a 02 0a 00 0a 2f .*............./ 1900: 12 0d 04 0c ff ff 09 00 0a 03 0a 00 0a 29 12 0d .............).. 1910: 04 0c ff ff 0a 00 0a 00 0a 00 0a 21 12 0d 04 0c ...........!.... 1920: ff ff 0a 00 0a 01 0a 00 0a 1f 12 0d 04 0c ff ff ................ 1930: 0a 00 0a 02 0a 00 0a 2e 12 0d 04 0c ff ff 0a 00 ................ 1940: 0a 03 0a 00 0a 2d 12 0d 04 0c ff ff 16 00 0a 00 .....-.......... 1950: 0a 00 0a 2b 12 0d 04 0c ff ff 16 00 0a 01 0a 00 ...+............ 1960: 0a 2c 12 0d 04 0c ff ff 16 00 0a 02 0a 00 0a 2d .,.............- 1970: 12 0d 04 0c ff ff 16 00 0a 03 0a 00 0a 2e 12 0d ................ 1980: 04 0c ff ff 1a 00 0a 00 0a 00 0a 13 12 0d 04 0c ................ 1990: ff ff 1a 00 0a 01 0a 00 0a 12 12 0d 04 0c ff ff ................ 19a0: 1a 00 0a 02 0a 00 0a 12 12 0d 04 0c ff ff 1c 00 ................ 19b0: 0a 00 0a 00 0a 10 12 0d 04 0c ff ff 1c 00 0a 01 ................ 19c0: 0a 00 0a 11 12 0d 04 0c ff ff 1c 00 0a 02 0a 00 ................ 19d0: 0a 12 12 0d 04 0c ff ff 1c 00 0a 03 0a 00 0a 13 ................ 19e0: 12 0d 04 0c ff ff 1d 00 0a 00 0a 00 0a 17 12 0d ................ 19f0: 04 0c ff ff 1d 00 0a 01 0a 00 0a 16 12 0d 04 0c ................ 1a00: ff ff 1d 00 0a 02 0a 00 0a 15 12 0d 04 0c ff ff ................ 1a10: 1f 00 0a 00 0a 00 0a 10 12 0d 04 0c ff ff 1f 00 ................ 1a20: 0a 01 0a 00 0a 11 5b 82 4c 06 50 45 30 5f 08 5f ......[.L.PE0_._ 1a30: 41 44 52 0a 00 08 5f 53 54 41 0a 0f 08 5f 50 52 ADR..._STA..._PR 1a40: 57 12 06 02 0a 09 0a 04 5b 80 50 45 43 46 02 0a W.......[.PECF.. 1a50: 00 0b 00 01 5b 81 19 50 45 43 46 03 00 40 56 00 ....[..PECF..@V. 1a60: 03 50 49 45 5f 01 00 1c 00 10 50 53 5f 5f 01 14 .PIE_.....PS__.. 1a70: 24 5f 49 4e 49 00 70 01 5c 2e 5f 53 42 5f 50 4d $_INI.p.\._SB_PM 1a80: 45 30 70 01 5c 2e 5f 53 42 5f 50 45 49 30 70 00 E0p.\._SB_PEI0p. 1a90: 50 49 45 5f 5b 82 46 14 50 45 31 5f 08 5f 41 44 PIE_[.F.PE1_._AD 1aa0: 52 0c 00 00 01 00 08 5f 53 54 41 0a 0f 08 5f 50 R......_STA..._P 1ab0: 52 57 12 06 02 0a 09 0a 04 5b 80 50 45 43 46 02 RW.......[.PECF. 1ac0: 0a 00 0b 00 01 5b 81 19 50 45 43 46 03 00 40 56 .....[..PECF..@V 1ad0: 00 03 50 49 45 5f 01 00 1c 00 10 50 53 5f 5f 01 ..PIE_.....PS__. 1ae0: 14 24 5f 49 4e 49 00 70 01 5c 2e 5f 53 42 5f 50 .$_INI.p.\._SB_P 1af0: 4d 45 31 70 01 5c 2e 5f 53 42 5f 50 45 49 31 70 ME1p.\._SB_PEI1p 1b00: 00 50 49 45 5f 14 40 0c 5f 50 52 54 00 a0 42 08 .PIE_.@._PRT..B. 1b10: 93 50 49 43 4d 0a 00 a4 12 47 07 04 12 1c 04 0b .PICM....G...... 1b20: ff ff 0a 00 5c 2f 04 5f 53 42 5f 50 43 49 30 4c ....\/._SB_PCI0L 1b30: 50 43 5f 4c 4e 4b 41 0a 00 12 1c 04 0b ff ff 0a PC_LNKA......... 1b40: 01 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f .\/._SB_PCI0LPC_ 1b50: 4c 4e 4b 42 0a 00 12 1c 04 0b ff ff 0a 02 5c 2f LNKB..........\/ 1b60: 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b ._SB_PCI0LPC_LNK 1b70: 43 0a 00 12 1c 04 0b ff ff 0a 03 5c 2f 04 5f 53 C..........\/._S 1b80: 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 44 0a 00 B_PCI0LPC_LNKD.. 1b90: a1 35 a4 12 32 04 12 0b 04 0b ff ff 0a 00 0a 00 .5..2........... 1ba0: 0a 1c 12 0b 04 0b ff ff 0a 01 0a 00 0a 28 12 0b .............(.. 1bb0: 04 0b ff ff 0a 02 0a 00 0a 29 12 0b 04 0b ff ff .........)...... 1bc0: 0a 03 0a 00 0a 2f 5b 82 14 53 4c 54 31 08 5f 41 ...../[..SLT1._A 1bd0: 44 52 0b ff ff 08 5f 53 55 4e 0a 01 5b 82 46 14 DR...._SUN..[.F. 1be0: 50 45 33 5f 08 5f 41 44 52 0c 00 00 03 00 08 5f PE3_._ADR......_ 1bf0: 53 54 41 0a 0f 08 5f 50 52 57 12 06 02 0a 09 0a STA..._PRW...... 1c00: 04 5b 80 50 45 43 46 02 0a 00 0b 00 01 5b 81 19 .[.PECF......[.. 1c10: 50 45 43 46 03 00 40 56 00 03 50 49 45 5f 01 00 PECF..@V..PIE_.. 1c20: 1c 00 10 50 53 5f 5f 01 14 24 5f 49 4e 49 00 70 ...PS__..$_INI.p 1c30: 01 5c 2e 5f 53 42 5f 50 4d 45 33 70 01 5c 2e 5f .\._SB_PME3p.\._ 1c40: 53 42 5f 50 45 49 33 70 00 50 49 45 5f 14 40 0c SB_PEI3p.PIE_.@. 1c50: 5f 50 52 54 00 a0 42 08 93 50 49 43 4d 0a 00 a4 _PRT..B..PICM... 1c60: 12 47 07 04 12 1c 04 0b ff ff 0a 00 5c 2f 04 5f .G..........\/._ 1c70: 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 41 0a SB_PCI0LPC_LNKA. 1c80: 00 12 1c 04 0b ff ff 0a 01 5c 2f 04 5f 53 42 5f .........\/._SB_ 1c90: 50 43 49 30 4c 50 43 5f 4c 4e 4b 42 0a 00 12 1c PCI0LPC_LNKB.... 1ca0: 04 0b ff ff 0a 02 5c 2f 04 5f 53 42 5f 50 43 49 ......\/._SB_PCI 1cb0: 30 4c 50 43 5f 4c 4e 4b 43 0a 00 12 1c 04 0b ff 0LPC_LNKC....... 1cc0: ff 0a 03 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 ...\/._SB_PCI0LP 1cd0: 43 5f 4c 4e 4b 44 0a 00 a1 35 a4 12 32 04 12 0b C_LNKD...5..2... 1ce0: 04 0b ff ff 0a 00 0a 00 0a 18 12 0b 04 0b ff ff ................ 1cf0: 0a 01 0a 00 0a 22 12 0b 04 0b ff ff 0a 02 0a 00 .....".......... 1d00: 0a 23 12 0b 04 0b ff ff 0a 03 0a 00 0a 24 5b 82 .#...........$[. 1d10: 14 53 4c 54 37 08 5f 41 44 52 0b ff ff 08 5f 53 .SLT7._ADR...._S 1d20: 55 4e 0a 07 5b 82 46 14 50 45 35 5f 08 5f 41 44 UN..[.F.PE5_._AD 1d30: 52 0c 00 00 05 00 08 5f 53 54 41 0a 0f 08 5f 50 R......_STA..._P 1d40: 52 57 12 06 02 0a 09 0a 04 5b 80 50 45 43 46 02 RW.......[.PECF. 1d50: 0a 00 0b 00 01 5b 81 19 50 45 43 46 03 00 40 56 .....[..PECF..@V 1d60: 00 03 50 49 45 5f 01 00 1c 00 10 50 53 5f 5f 01 ..PIE_.....PS__. 1d70: 14 24 5f 49 4e 49 00 70 01 5c 2e 5f 53 42 5f 50 .$_INI.p.\._SB_P 1d80: 4d 45 35 70 01 5c 2e 5f 53 42 5f 50 45 49 35 70 ME5p.\._SB_PEI5p 1d90: 00 50 49 45 5f 14 40 0c 5f 50 52 54 00 a0 42 08 .PIE_.@._PRT..B. 1da0: 93 50 49 43 4d 0a 00 a4 12 47 07 04 12 1c 04 0b .PICM....G...... 1db0: ff ff 0a 00 5c 2f 04 5f 53 42 5f 50 43 49 30 4c ....\/._SB_PCI0L 1dc0: 50 43 5f 4c 4e 4b 41 0a 00 12 1c 04 0b ff ff 0a PC_LNKA......... 1dd0: 01 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f .\/._SB_PCI0LPC_ 1de0: 4c 4e 4b 42 0a 00 12 1c 04 0b ff ff 0a 02 5c 2f LNKB..........\/ 1df0: 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b ._SB_PCI0LPC_LNK 1e00: 43 0a 00 12 1c 04 0b ff ff 0a 03 5c 2f 04 5f 53 C..........\/._S 1e10: 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 44 0a 00 B_PCI0LPC_LNKD.. 1e20: a1 35 a4 12 32 04 12 0b 04 0b ff ff 0a 00 0a 00 .5..2........... 1e30: 0a 1a 12 0b 04 0b ff ff 0a 01 0a 00 0a 19 12 0b ................ 1e40: 04 0b ff ff 0a 02 0a 00 0a 1b 12 0b 04 0b ff ff ................ 1e50: 0a 03 0a 00 0a 1d 5b 82 14 53 4c 54 36 08 5f 41 ......[..SLT6._A 1e60: 44 52 0b ff ff 08 5f 53 55 4e 0a 06 5b 82 46 14 DR...._SUN..[.F. 1e70: 50 45 37 5f 08 5f 41 44 52 0c 00 00 07 00 08 5f PE7_._ADR......_ 1e80: 53 54 41 0a 0f 08 5f 50 52 57 12 06 02 0a 09 0a STA..._PRW...... 1e90: 04 5b 80 50 45 43 46 02 0a 00 0b 00 01 5b 81 19 .[.PECF......[.. 1ea0: 50 45 43 46 03 00 40 56 00 03 50 49 45 5f 01 00 PECF..@V..PIE_.. 1eb0: 1c 00 10 50 53 5f 5f 01 14 24 5f 49 4e 49 00 70 ...PS__..$_INI.p 1ec0: 01 5c 2e 5f 53 42 5f 50 4d 45 37 70 01 5c 2e 5f .\._SB_PME7p.\._ 1ed0: 53 42 5f 50 45 49 37 70 00 50 49 45 5f 14 40 0c SB_PEI7p.PIE_.@. 1ee0: 5f 50 52 54 00 a0 42 08 93 50 49 43 4d 0a 00 a4 _PRT..B..PICM... 1ef0: 12 47 07 04 12 1c 04 0b ff ff 0a 00 5c 2f 04 5f .G..........\/._ 1f00: 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 41 0a SB_PCI0LPC_LNKA. 1f10: 00 12 1c 04 0b ff ff 0a 01 5c 2f 04 5f 53 42 5f .........\/._SB_ 1f20: 50 43 49 30 4c 50 43 5f 4c 4e 4b 42 0a 00 12 1c PCI0LPC_LNKB.... 1f30: 04 0b ff ff 0a 02 5c 2f 04 5f 53 42 5f 50 43 49 ......\/._SB_PCI 1f40: 30 4c 50 43 5f 4c 4e 4b 43 0a 00 12 1c 04 0b ff 0LPC_LNKC....... 1f50: ff 0a 03 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 ...\/._SB_PCI0LP 1f60: 43 5f 4c 4e 4b 44 0a 00 a1 35 a4 12 32 04 12 0b C_LNKD...5..2... 1f70: 04 0b ff ff 0a 00 0a 00 0a 1e 12 0b 04 0b ff ff ................ 1f80: 0a 01 0a 00 0a 25 12 0b 04 0b ff ff 0a 02 0a 00 .....%.......... 1f90: 0a 27 12 0b 04 0b ff ff 0a 03 0a 00 0a 26 5b 82 .'...........&[. 1fa0: 14 53 4c 54 35 08 5f 41 44 52 0b ff ff 08 5f 53 .SLT5._ADR...._S 1fb0: 55 4e 0a 05 5b 82 46 14 50 45 38 5f 08 5f 41 44 UN..[.F.PE8_._AD 1fc0: 52 0c 00 00 08 00 08 5f 53 54 41 0a 0f 08 5f 50 R......_STA..._P 1fd0: 52 57 12 06 02 0a 09 0a 04 5b 80 50 45 43 46 02 RW.......[.PECF. 1fe0: 0a 00 0b 00 01 5b 81 19 50 45 43 46 03 00 40 56 .....[..PECF..@V 1ff0: 00 03 50 49 45 5f 01 00 1c 00 10 50 53 5f 5f 01 ..PIE_.....PS__. 2000: 14 24 5f 49 4e 49 00 70 01 5c 2e 5f 53 42 5f 50 .$_INI.p.\._SB_P 2010: 4d 45 38 70 01 5c 2e 5f 53 42 5f 50 45 49 38 70 ME8p.\._SB_PEI8p 2020: 00 50 49 45 5f 14 40 0c 5f 50 52 54 00 a0 42 08 .PIE_.@._PRT..B. 2030: 93 50 49 43 4d 0a 00 a4 12 47 07 04 12 1c 04 0b .PICM....G...... 2040: ff ff 0a 00 5c 2f 04 5f 53 42 5f 50 43 49 30 4c ....\/._SB_PCI0L 2050: 50 43 5f 4c 4e 4b 41 0a 00 12 1c 04 0b ff ff 0a PC_LNKA......... 2060: 01 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f .\/._SB_PCI0LPC_ 2070: 4c 4e 4b 42 0a 00 12 1c 04 0b ff ff 0a 02 5c 2f LNKB..........\/ 2080: 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b ._SB_PCI0LPC_LNK 2090: 43 0a 00 12 1c 04 0b ff ff 0a 03 5c 2f 04 5f 53 C..........\/._S 20a0: 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 44 0a 00 B_PCI0LPC_LNKD.. 20b0: a1 35 a4 12 32 04 12 0b 04 0b ff ff 0a 00 0a 00 .5..2........... 20c0: 0a 1f 12 0b 04 0b ff ff 0a 01 0a 00 0a 27 12 0b .............'.. 20d0: 04 0b ff ff 0a 02 0a 00 0a 26 12 0b 04 0b ff ff .........&...... 20e0: 0a 03 0a 00 0a 25 5b 82 14 53 4c 54 34 08 5f 41 .....%[..SLT4._A 20f0: 44 52 0b ff ff 08 5f 53 55 4e 0a 04 5b 82 46 14 DR...._SUN..[.F. 2100: 50 45 39 5f 08 5f 41 44 52 0c 00 00 09 00 08 5f PE9_._ADR......_ 2110: 53 54 41 0a 0f 08 5f 50 52 57 12 06 02 0a 09 0a STA..._PRW...... 2120: 04 5b 80 50 45 43 46 02 0a 00 0b 00 01 5b 81 19 .[.PECF......[.. 2130: 50 45 43 46 03 00 40 56 00 03 50 49 45 5f 01 00 PECF..@V..PIE_.. 2140: 1c 00 10 50 53 5f 5f 01 14 24 5f 49 4e 49 00 70 ...PS__..$_INI.p 2150: 01 5c 2e 5f 53 42 5f 50 4d 45 39 70 01 5c 2e 5f .\._SB_PME9p.\._ 2160: 53 42 5f 50 45 49 39 70 00 50 49 45 5f 14 40 0c SB_PEI9p.PIE_.@. 2170: 5f 50 52 54 00 a0 42 08 93 50 49 43 4d 0a 00 a4 _PRT..B..PICM... 2180: 12 47 07 04 12 1c 04 0b ff ff 0a 00 5c 2f 04 5f .G..........\/._ 2190: 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 41 0a SB_PCI0LPC_LNKA. 21a0: 00 12 1c 04 0b ff ff 0a 01 5c 2f 04 5f 53 42 5f .........\/._SB_ 21b0: 50 43 49 30 4c 50 43 5f 4c 4e 4b 42 0a 00 12 1c PCI0LPC_LNKB.... 21c0: 04 0b ff ff 0a 02 5c 2f 04 5f 53 42 5f 50 43 49 ......\/._SB_PCI 21d0: 30 4c 50 43 5f 4c 4e 4b 43 0a 00 12 1c 04 0b ff 0LPC_LNKC....... 21e0: ff 0a 03 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 ...\/._SB_PCI0LP 21f0: 43 5f 4c 4e 4b 44 0a 00 a1 35 a4 12 32 04 12 0b C_LNKD...5..2... 2200: 04 0b ff ff 0a 00 0a 00 0a 20 12 0b 04 0b ff ff ......... ...... 2210: 0a 01 0a 00 0a 2a 12 0b 04 0b ff ff 0a 02 0a 00 .....*.......... 2220: 0a 2f 12 0b 04 0b ff ff 0a 03 0a 00 0a 29 5b 82 ./...........)[. 2230: 14 53 4c 54 33 08 5f 41 44 52 0b ff ff 08 5f 53 .SLT3._ADR...._S 2240: 55 4e 0a 03 5b 82 46 14 50 45 31 30 08 5f 41 44 UN..[.F.PE10._AD 2250: 52 0c 00 00 0a 00 08 5f 53 54 41 0a 0f 08 5f 50 R......_STA..._P 2260: 52 57 12 06 02 0a 09 0a 04 5b 80 50 45 43 46 02 RW.......[.PECF. 2270: 0a 00 0b 00 01 5b 81 19 50 45 43 46 03 00 40 56 .....[..PECF..@V 2280: 00 03 50 49 45 5f 01 00 1c 00 10 50 53 5f 5f 01 ..PIE_.....PS__. 2290: 14 24 5f 49 4e 49 00 70 01 5c 2e 5f 53 42 5f 50 .$_INI.p.\._SB_P 22a0: 4d 45 41 70 01 5c 2e 5f 53 42 5f 50 45 49 41 70 MEAp.\._SB_PEIAp 22b0: 00 50 49 45 5f 14 40 0c 5f 50 52 54 00 a0 42 08 .PIE_.@._PRT..B. 22c0: 93 50 49 43 4d 0a 00 a4 12 47 07 04 12 1c 04 0b .PICM....G...... 22d0: ff ff 0a 00 5c 2f 04 5f 53 42 5f 50 43 49 30 4c ....\/._SB_PCI0L 22e0: 50 43 5f 4c 4e 4b 41 0a 00 12 1c 04 0b ff ff 0a PC_LNKA......... 22f0: 01 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f .\/._SB_PCI0LPC_ 2300: 4c 4e 4b 42 0a 00 12 1c 04 0b ff ff 0a 02 5c 2f LNKB..........\/ 2310: 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b ._SB_PCI0LPC_LNK 2320: 43 0a 00 12 1c 04 0b ff ff 0a 03 5c 2f 04 5f 53 C..........\/._S 2330: 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 44 0a 00 B_PCI0LPC_LNKD.. 2340: a1 35 a4 12 32 04 12 0b 04 0b ff ff 0a 00 0a 00 .5..2........... 2350: 0a 21 12 0b 04 0b ff ff 0a 01 0a 00 0a 1f 12 0b .!.............. 2360: 04 0b ff ff 0a 02 0a 00 0a 2e 12 0b 04 0b ff ff ................ 2370: 0a 03 0a 00 0a 2d 5b 82 14 53 4c 54 32 08 5f 41 .....-[..SLT2._A 2380: 44 52 0b ff ff 08 5f 53 55 4e 0a 02 5b 82 34 43 DR...._SUN..[.4C 2390: 4f 52 45 08 5f 41 44 52 0c 00 00 14 00 08 5f 53 ORE._ADR......_S 23a0: 54 41 0a 0f 5b 80 50 45 43 46 02 0a 00 0b 00 01 TA..[.PECF...... 23b0: 5b 81 10 50 45 43 46 03 00 40 68 00 1a 54 4f 4c [..PECF..@h..TOL 23c0: 4d 06 5b 82 46 10 50 45 31 41 08 5f 41 44 52 0c M.[.F.PE1A._ADR. 23d0: 00 00 1c 00 08 5f 53 54 41 0a 0f 08 5f 50 52 57 ....._STA..._PRW 23e0: 12 06 02 0a 09 0a 04 5b 80 50 45 43 46 02 0a 00 .......[.PECF... 23f0: 0b 00 01 5b 81 2a 50 45 43 46 03 00 40 2e 00 03 ...[.*PECF..@... 2400: 50 49 45 5f 01 00 1c 00 10 50 53 5f 5f 01 00 4f PIE_.....PS__..O 2410: 3a 00 1f 50 4d 43 45 01 00 1f 50 4d 43 53 01 14 :..PMCE...PMCS.. 2420: 12 5f 49 4e 49 00 70 01 50 4d 43 45 70 00 50 49 ._INI.p.PMCEp.PI 2430: 45 5f 14 4d 06 5f 50 52 54 00 a0 47 04 93 50 49 E_.M._PRT..G..PI 2440: 43 4d 0a 00 a4 12 3c 02 12 1c 04 0b ff ff 0a 00 CM....<......... 2450: 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c \/._SB_PCI0LPC_L 2460: 4e 4b 41 0a 00 12 1c 04 0b ff ff 0a 01 5c 2f 04 NKA..........\/. 2470: 5f 53 42 5f 50 43 49 30 4c 50 43 5f 4c 4e 4b 42 _SB_PCI0LPC_LNKB 2480: 0a 00 a1 1d a4 12 1a 02 12 0b 04 0b ff ff 0a 00 ................ 2490: 0a 00 0a 10 12 0b 04 0b ff ff 0a 01 0a 00 0a 11 ................ 24a0: 5b 82 13 4c 41 4e 31 08 5f 41 44 52 0a 00 08 5f [..LAN1._ADR..._ 24b0: 53 54 41 0a 0f 5b 82 13 4c 41 4e 32 08 5f 41 44 STA..[..LAN2._AD 24c0: 52 0a 01 08 5f 53 54 41 0a 0f 5b 82 47 0c 50 45 R..._STA..[.G.PE 24d0: 31 45 08 5f 41 44 52 0c 04 00 1c 00 08 5f 53 54 1E._ADR......_ST 24e0: 41 0a 0f 08 5f 50 52 57 12 06 02 0a 09 0a 04 5b A..._PRW.......[ 24f0: 80 50 45 43 46 02 0a 00 0b 00 01 5b 81 2a 50 45 .PECF......[.*PE 2500: 43 46 03 00 40 2e 00 03 50 49 45 5f 01 00 1c 00 CF..@...PIE_.... 2510: 10 50 53 5f 5f 01 00 4f 3a 00 1f 50 4d 43 45 01 .PS__..O:..PMCE. 2520: 00 1f 50 4d 43 53 01 14 12 5f 49 4e 49 00 70 01 ..PMCS..._INI.p. 2530: 50 4d 43 45 70 00 50 49 45 5f 14 43 04 5f 50 52 PMCEp.PIE_.C._PR 2540: 54 00 a0 29 93 50 49 43 4d 0a 00 a4 12 1f 01 12 T..).PICM....... 2550: 1c 04 0b ff ff 0a 00 5c 2f 04 5f 53 42 5f 50 43 .......\/._SB_PC 2560: 49 30 4c 50 43 5f 4c 4e 4b 41 0a 00 a1 11 a4 12 I0LPC_LNKA...... 2570: 0e 01 12 0b 04 0b ff ff 0a 00 0a 00 0a 10 5b 82 ..............[. 2580: 13 56 47 41 5f 08 5f 41 44 52 0a 00 08 5f 53 54 .VGA_._ADR..._ST 2590: 41 0a 0f 5b 82 43 05 55 53 42 31 08 5f 41 44 52 A..[.C.USB1._ADR 25a0: 0c 00 00 1d 00 08 5f 53 54 41 0a 0f 08 5f 50 52 ......_STA..._PR 25b0: 57 12 06 02 0a 03 0a 01 5b 80 52 45 53 31 02 0a W.......[.RES1.. 25c0: c4 0a 01 5b 81 10 52 45 53 31 00 50 30 45 31 01 ...[..RES1.P0E1. 25d0: 50 31 45 31 01 14 12 5f 50 53 57 01 70 68 50 30 P1E1..._PSW.phP0 25e0: 45 31 70 68 50 31 45 31 5b 82 43 05 55 53 42 32 E1phP1E1[.C.USB2 25f0: 08 5f 41 44 52 0c 01 00 1d 00 08 5f 53 54 41 0a ._ADR......_STA. 2600: 0f 08 5f 50 52 57 12 06 02 0a 04 0a 01 5b 80 52 .._PRW.......[.R 2610: 45 53 31 02 0a c4 0a 01 5b 81 10 52 45 53 31 00 ES1.....[..RES1. 2620: 50 30 45 31 01 50 31 45 31 01 14 12 5f 50 53 57 P0E1.P1E1..._PSW 2630: 01 70 68 50 30 45 31 70 68 50 31 45 31 5b 82 43 .phP0E1phP1E1[.C 2640: 05 55 53 42 33 08 5f 41 44 52 0c 02 00 1d 00 08 .USB3._ADR...... 2650: 5f 53 54 41 0a 0f 08 5f 50 52 57 12 06 02 0a 0c _STA..._PRW..... 2660: 0a 01 5b 80 52 45 53 31 02 0a c4 0a 01 5b 81 10 ..[.RES1.....[.. 2670: 52 45 53 31 00 50 30 45 31 01 50 31 45 31 01 14 RES1.P0E1.P1E1.. 2680: 12 5f 50 53 57 01 70 68 50 30 45 31 70 68 50 31 ._PSW.phP0E1phP1 2690: 45 31 5b 82 43 05 55 53 42 34 08 5f 41 44 52 0c E1[.C.USB4._ADR. 26a0: 00 00 1a 00 08 5f 53 54 41 0a 0f 08 5f 50 52 57 ....._STA..._PRW 26b0: 12 06 02 0a 0e 0a 01 5b 80 52 45 53 31 02 0a c4 .......[.RES1... 26c0: 0a 01 5b 81 10 52 45 53 31 00 50 30 45 31 01 50 ..[..RES1.P0E1.P 26d0: 31 45 31 01 14 12 5f 50 53 57 01 70 68 50 30 45 1E1..._PSW.phP0E 26e0: 31 70 68 50 31 45 31 5b 82 43 05 55 53 42 35 08 1phP1E1[.C.USB5. 26f0: 5f 41 44 52 0c 01 00 1a 00 08 5f 53 54 41 0a 0f _ADR......_STA.. 2700: 08 5f 50 52 57 12 06 02 0a 05 0a 01 5b 80 52 45 ._PRW.......[.RE 2710: 53 31 02 0a c4 0a 01 5b 81 10 52 45 53 31 00 50 S1.....[..RES1.P 2720: 30 45 31 01 50 31 45 31 01 14 12 5f 50 53 57 01 0E1.P1E1..._PSW. 2730: 70 68 50 30 45 31 70 68 50 31 45 31 5b 82 43 05 phP0E1phP1E1[.C. 2740: 55 53 42 36 08 5f 41 44 52 0c 02 00 1a 00 08 5f USB6._ADR......_ 2750: 53 54 41 0a 0f 08 5f 50 52 57 12 06 02 0a 20 0a STA..._PRW.... . 2760: 01 5b 80 52 45 53 31 02 0a c4 0a 01 5b 81 10 52 .[.RES1.....[..R 2770: 45 53 31 00 50 30 45 31 01 50 31 45 31 01 14 12 ES1.P0E1.P1E1... 2780: 5f 50 53 57 01 70 68 50 30 45 31 70 68 50 31 45 _PSW.phP0E1phP1E 2790: 31 5b 82 22 55 53 42 37 08 5f 41 44 52 0c 07 00 1[."USB7._ADR... 27a0: 1d 00 08 5f 53 54 41 0a 0f 08 5f 50 52 57 12 06 ..._STA..._PRW.. 27b0: 02 0a 0d 0a 01 5b 82 22 55 53 42 38 08 5f 41 44 .....[."USB8._AD 27c0: 52 0c 07 00 1a 00 08 5f 53 54 41 0a 0f 08 5f 50 R......_STA..._P 27d0: 52 57 12 06 02 0a 0d 0a 01 5b 82 28 50 43 49 48 RW.......[.(PCIH 27e0: 08 5f 41 44 52 0c 00 00 1e 00 08 5f 53 54 41 0a ._ADR......_STA. 27f0: 0f 08 4e 41 54 41 12 0c 02 0c 02 00 1f 00 0c 05 ..NATA.......... 2800: 00 1f 00 5b 82 16 41 54 41 31 08 5f 41 44 52 0c ...[..ATA1._ADR. 2810: 02 00 1f 00 08 5f 53 54 41 0a 0f 5b 82 16 41 54 ....._STA..[..AT 2820: 41 32 08 5f 41 44 52 0c 05 00 1f 00 08 5f 53 54 A2._ADR......_ST 2830: 41 0a 0f 5b 82 16 50 4d 5f 5f 08 5f 41 44 52 0c A..[..PM__._ADR. 2840: 03 00 1f 00 08 5f 53 54 41 0a 0f 5b 82 87 05 02 ....._STA..[.... 2850: 4c 50 43 5f 08 5f 41 44 52 0c 00 00 1f 00 08 5f LPC_._ADR......_ 2860: 53 54 41 0a 0f 5b 80 50 49 52 51 02 0a 60 0a 0c STA..[.PIRQ..`.. 2870: 5b 81 30 50 49 52 51 01 50 49 52 41 08 50 49 52 [.0PIRQ.PIRA.PIR 2880: 42 08 50 49 52 43 08 50 49 52 44 08 00 20 50 49 B.PIRC.PIRD.. PI 2890: 52 45 08 50 49 52 46 08 50 49 52 47 08 50 49 52 RE.PIRF.PIRG.PIR 28a0: 48 08 5b 80 44 43 4f 44 02 0a 80 0a 10 5b 81 25 H.[.DCOD.....[.% 28b0: 44 43 4f 44 01 43 4f 4d 41 03 00 01 43 4f 4d 42 DCOD.COMA...COMB 28c0: 03 00 09 43 4d 41 45 01 43 4d 42 45 01 00 0e 47 ...CMAE.CMBE...G 28d0: 44 52 31 10 5b 80 47 50 49 4f 01 0b 80 11 0a 80 DR1.[.GPIO...... 28e0: 5b 81 21 47 50 49 4f 00 00 40 06 00 0e 53 53 4c [.!GPIO..@...SSL 28f0: 45 01 00 04 53 50 4c 45 01 00 4c 04 00 13 53 50 E...SPLE..L...SP 2900: 4c 42 01 5b 80 43 4d 53 49 01 0a 72 0a 02 5b 81 LB.[.CMSI..r..[. 2910: 10 43 4d 53 49 01 49 4e 44 58 08 44 41 54 41 08 .CMSI.INDX.DATA. 2920: 5b 86 12 49 4e 44 58 44 41 54 41 01 00 40 3f 41 [..INDXDATA..@?A 2930: 41 4f 46 04 14 14 44 43 52 31 01 70 47 44 52 31 AOF...DCR1.pGDR1 2940: 60 70 68 47 44 52 31 a4 60 5b 82 4d 27 54 50 4d `phGDR1.`[.M'TPM 2950: 5f 5b 80 54 50 4d 43 00 0c 00 00 d4 fe 0b 00 50 _[.TPMC........P 2960: 5b 81 0f 54 50 4d 43 01 00 80 80 07 54 49 49 44 [..TPMC.....TIID 2970: 20 08 5f 48 49 44 0c 24 d8 01 02 14 1e 5f 53 54 ._HID.$....._ST 2980: 41 00 a0 0f 93 54 49 49 44 0c d1 15 0b 00 70 0a A....TIID.....p. 2990: 0f 60 a1 05 70 0a 00 60 a4 60 08 5f 55 49 44 0a .`..p..`.`._UID. 29a0: 01 08 5f 43 49 44 0c 41 d0 0c 31 08 5f 43 52 53 .._CID.A..1._CRS 29b0: 11 11 0a 0e 86 09 00 01 00 00 d4 fe 00 50 00 00 .............P.. 29c0: 79 00 14 3c 55 43 4d 50 02 a0 0a 92 93 0a 10 87 y.. 37b0: 0a 3b 31 00 47 01 f8 03 f8 03 08 08 23 10 00 01 .;1.G.......#... 37c0: 31 05 47 01 e8 03 e8 03 08 08 23 10 00 01 31 0a 1.G.......#...1. 37d0: 47 01 f8 02 f8 02 08 08 23 08 00 01 31 0a 47 01 G.......#...1.G. 37e0: e8 02 e8 02 08 08 23 08 00 01 38 79 00 08 43 4d ......#...8y..CM 37f0: 31 4c 12 0e 04 0b f8 03 0b f8 02 0b e8 02 0b e8 1L.............. 3800: 03 08 43 4d 31 43 12 0a 04 0a 00 0a 01 0a 05 0a ..CM1C.......... 3810: 07 14 4a 07 5f 53 52 53 01 55 4c 43 4b 70 0a 02 ..J._SRS.ULCKp.. 3820: 46 55 4e 43 8c 68 0a 02 49 4f 53 4c 8c 68 0a 03 FUNC.h..IOSL.h.. 3830: 49 4f 53 48 8b 68 0a 02 49 4f 53 41 8b 68 0a 09 IOSH.h..IOSA.h.. 3840: 49 52 51 53 70 49 4f 53 4c 44 41 44 4c 70 49 4f IRQSpIOSLDADLpIO 3850: 53 48 44 41 44 48 70 83 88 43 4d 31 43 89 43 4d SHDADHp..CM1C.CM 3860: 31 4c 01 49 4f 53 41 00 0a 00 0a 00 00 43 4f 4d 1L.IOSA......COM 3870: 41 82 49 52 51 53 60 a0 04 60 76 60 70 60 44 49 A.IRQS`..`v`p`DI 3880: 52 5f 70 01 44 45 4e 5f 4c 43 4b 5f 5b 82 47 21 R_p.DEN_LCK_[.G! 3890: 43 4f 4d 32 08 5f 48 49 44 0c 41 d0 05 01 08 5f COM2._HID.A...._ 38a0: 55 49 44 0a 02 14 36 5f 53 54 41 00 55 4c 43 4b UID...6_STA.ULCK 38b0: 70 0a 01 46 55 4e 43 a0 18 93 43 32 45 4e 0a 01 p..FUNC...C2EN.. 38c0: a0 09 44 45 4e 5f 70 0a 0f 60 a1 05 70 0a 0d 60 ..DEN_p..`..p..` 38d0: a1 05 70 0a 08 60 4c 43 4b 5f a4 60 14 0e 5f 50 ..p..`LCK_.`.._P 38e0: 52 57 00 a4 12 06 02 0a 18 0a 01 14 1f 5f 50 53 RW..........._PS 38f0: 57 01 70 68 5c 2f 05 5f 53 42 5f 50 43 49 30 4c W.ph\/._SB_PCI0L 3900: 50 43 5f 53 49 4f 32 52 49 32 45 14 1b 5f 44 49 PC_SIO2RI2E.._DI 3910: 53 00 55 4c 43 4b 70 0a 01 46 55 4e 43 70 00 44 S.ULCKp..FUNCp.D 3920: 45 4e 5f 4c 43 4b 5f 14 4a 09 5f 43 52 53 00 55 EN_LCK_.J._CRS.U 3930: 4c 43 4b 70 0a 01 46 55 4e 43 08 42 55 46 46 11 LCKp..FUNC.BUFF. 3940: 11 0a 0e 47 01 00 00 00 00 08 08 23 01 00 01 79 ...G.......#...y 3950: 00 8c 42 55 46 46 0a 02 41 44 31 4c 8c 42 55 46 ..BUFF..AD1L.BUF 3960: 46 0a 03 41 44 31 48 8c 42 55 46 46 0a 04 41 44 F..AD1H.BUFF..AD 3970: 32 4c 8c 42 55 46 46 0a 05 41 44 32 48 70 44 41 2L.BUFF..AD2HpDA 3980: 44 4c 41 44 31 4c 70 44 41 44 48 41 44 31 48 70 DLAD1LpDADHAD1Hp 3990: 44 41 44 4c 41 44 32 4c 70 44 41 44 48 41 44 32 DADLAD2LpDADHAD2 39a0: 48 8b 42 55 46 46 0a 09 49 52 51 53 70 01 60 79 H.BUFF..IRQSp.`y 39b0: 60 44 49 52 5f 49 52 51 53 4c 43 4b 5f a4 42 55 `DIR_IRQSLCK_.BU 39c0: 46 46 08 5f 50 52 53 11 3e 0a 3b 31 00 47 01 f8 FF._PRS.>.;1.G.. 39d0: 02 f8 02 08 08 23 08 00 01 31 05 47 01 e8 02 e8 .....#...1.G.... 39e0: 02 08 08 23 08 00 01 31 0a 47 01 f8 03 f8 03 08 ...#...1.G...... 39f0: 08 23 10 00 01 31 0a 47 01 e8 03 e8 03 08 08 23 .#...1.G.......# 3a00: 10 00 01 38 79 00 08 43 4d 32 4c 12 0e 04 0b f8 ...8y..CM2L..... 3a10: 03 0b f8 02 0b e8 02 0b e8 03 08 43 4d 32 43 12 ...........CM2C. 3a20: 0a 04 0a 00 0a 01 0a 05 0a 07 14 4a 07 5f 53 52 ...........J._SR 3a30: 53 01 55 4c 43 4b 70 0a 01 46 55 4e 43 8c 68 0a S.ULCKp..FUNC.h. 3a40: 02 49 4f 53 4c 8c 68 0a 03 49 4f 53 48 8b 68 0a .IOSL.h..IOSH.h. 3a50: 02 49 4f 53 41 8b 68 0a 09 49 52 51 53 70 49 4f .IOSA.h..IRQSpIO 3a60: 53 4c 44 41 44 4c 70 49 4f 53 48 44 41 44 48 70 SLDADLpIOSHDADHp 3a70: 83 88 43 4d 32 43 89 43 4d 32 4c 01 49 4f 53 41 ..CM2C.CM2L.IOSA 3a80: 00 0a 00 0a 00 00 43 4f 4d 42 82 49 52 51 53 60 ......COMB.IRQS` 3a90: a0 04 60 76 60 70 60 44 49 52 5f 70 01 44 45 4e ..`v`p`DIR_p.DEN 3aa0: 5f 4c 43 4b 5f 5b 82 46 06 4d 49 30 5f 08 5f 48 _LCK_[.F.MI0_._H 3ab0: 49 44 0c 26 09 00 01 14 26 5f 53 54 41 00 a0 1a ID.&....&_STA... 3ac0: 95 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f .\/._SB_PCI0LPC_ 3ad0: 41 41 4f 46 0a 08 a4 0a 08 a1 04 a4 0a 0f 08 5f AAOF..........._ 3ae0: 55 49 44 0a 00 08 5f 43 52 53 11 0d 0a 0a 47 01 UID..._CRS....G. 3af0: a2 0c a2 0c 01 02 79 00 14 09 5f 49 46 54 00 a4 ......y..._IFT.. 3b00: 0a 01 14 0a 5f 53 52 56 00 a4 0b 00 02 5b 82 41 ...._SRV.....[.A 3b10: 05 4b 43 53 31 08 5f 48 49 44 0c 41 d0 0c 02 08 .KCS1._HID.A.... 3b20: 5f 55 49 44 0a 04 14 26 5f 53 54 41 00 a0 1a 95 _UID...&_STA.... 3b30: 5c 2f 04 5f 53 42 5f 50 43 49 30 4c 50 43 5f 41 \/._SB_PCI0LPC_A 3b40: 41 4f 46 0a 08 a4 0a 0f a1 04 a4 0a 08 08 5f 43 AOF..........._C 3b50: 52 53 11 0d 0a 0a 47 01 a2 0c a2 0c 01 02 79 00 RS....G.......y. 3b60: 5b 82 42 d4 4b 43 53 35 08 5f 48 49 44 0c 41 d0 [.B.KCS5._HID.A. 3b70: 0a 05 08 5f 55 49 44 0a 03 08 5f 53 54 41 0a 0f ..._UID..._STA.. 3b80: 5b 80 4b 43 53 52 01 0b a4 0c 0a 04 5b 81 33 4b [.KCSR......[.3K 3b90: 43 53 52 01 44 5f 4f 55 08 4f 42 46 5f 01 49 42 CSR.D_OU.OBF_.IB 3ba0: 46 5f 01 53 4d 53 5f 01 43 44 5f 5f 01 4f 45 4d F_.SMS_.CD__.OEM 3bb0: 31 01 4f 45 4d 32 01 53 30 5f 5f 01 53 31 5f 5f 1.OEM2.S0__.S1__ 3bc0: 01 5b 80 4b 43 53 57 01 0b a4 0c 0a 04 5b 81 10 .[.KCSW......[.. 3bd0: 4b 43 53 57 01 44 5f 49 4e 08 43 4d 44 5f 08 08 KCSW.D_IN.CMD_.. 3be0: 5f 53 31 44 0a 03 08 5f 53 32 44 0a 03 08 5f 53 _S1D..._S2D..._S 3bf0: 33 44 0a 03 08 5f 53 34 44 0a 03 08 5f 50 53 43 3D..._S4D..._PSC 3c00: 0a 00 14 0a 5f 49 4e 49 00 57 41 4b 45 14 47 14 ...._INI.WAKE.G. 3c10: 57 41 4b 45 00 70 0a 00 5f 50 53 43 08 42 55 46 WAKE.p.._PSC.BUF 3c20: 47 11 09 0a 06 b8 f1 80 28 00 29 08 52 45 54 31 G.......(.).RET1 3c30: 11 05 0b 01 01 00 a0 4e 11 92 53 45 4e 44 42 55 .......N..SENDBU 3c40: 46 47 52 45 54 31 a0 4e 10 83 88 52 45 54 31 0a FGRET1.N...RET1. 3c50: 00 00 a0 42 10 92 83 88 52 45 54 31 0a 03 00 08 ...B....RET1.... 3c60: 42 55 46 53 11 0d 0a 0a b8 f1 80 28 00 28 01 80 BUFS.......(.(.. 3c70: 00 00 7d 83 88 42 55 46 53 0a 06 00 83 88 52 45 ..}..BUFS.....RE 3c80: 54 31 0a 07 00 88 42 55 46 53 0a 06 00 7d 83 88 T1....BUFS...}.. 3c90: 42 55 46 53 0a 07 00 83 88 52 45 54 31 0a 08 00 BUFS.....RET1... 3ca0: 88 42 55 46 53 0a 07 00 70 83 88 52 45 54 31 0a .BUFS...p..RET1. 3cb0: 09 00 88 42 55 46 53 0a 08 00 70 83 88 52 45 54 ...BUFS...p..RET 3cc0: 31 0a 0a 00 88 42 55 46 53 0a 09 00 08 52 45 54 1....BUFS....RET 3cd0: 32 11 05 0b 01 01 00 a0 4d 07 92 53 45 4e 44 42 2.......M..SENDB 3ce0: 55 46 53 52 45 54 32 a0 4d 06 83 88 52 45 54 32 UFSRET2.M...RET2 3cf0: 0a 00 00 a0 41 06 92 83 88 52 45 54 32 0a 03 00 ....A....RET2... 3d00: 08 53 4d 49 50 11 0b 0a 08 b8 f1 80 28 00 32 00 .SMIP.......(.2. 3d10: 00 08 52 45 54 33 11 05 0b 01 01 00 a0 2c 5b 12 ..RET3.......,[. 3d20: 5c 2f 03 5f 50 52 5f 50 52 30 30 5f 50 50 43 60 \/._PR_PR00_PPC` 3d30: 70 87 5c 2f 03 5f 50 52 5f 50 52 30 30 5f 50 53 p.\/._PR_PR00_PS 3d40: 53 88 53 4d 49 50 0a 06 00 53 45 4e 44 53 4d 49 S.SMIP...SENDSMI 3d50: 50 52 45 54 33 14 4f 0f 53 4c 45 50 00 70 0a 03 PRET3.O.SLEP.p.. 3d60: 5f 50 53 43 08 53 4d 49 50 11 0b 0a 08 b8 f1 80 _PSC.SMIP....... 3d70: 28 00 32 00 00 08 52 45 54 30 11 05 0b 01 01 00 (.2...RET0...... 3d80: a0 44 0d 92 53 45 4e 44 53 4d 49 50 52 45 54 30 .D..SENDSMIPRET0 3d90: a0 44 0c 83 88 52 45 54 30 0a 00 00 a0 48 0b 92 .D...RET0....H.. 3da0: 83 88 52 45 54 30 0a 03 00 08 42 55 46 47 11 09 ..RET0....BUFG.. 3db0: 0a 06 b8 f1 80 28 00 29 08 52 45 54 31 11 05 0b .....(.).RET1... 3dc0: 01 01 00 a0 41 09 92 53 45 4e 44 42 55 46 47 52 ....A..SENDBUFGR 3dd0: 45 54 31 a0 41 08 83 88 52 45 54 31 0a 00 00 a0 ET1.A...RET1.... 3de0: 45 07 92 83 88 52 45 54 31 0a 03 00 08 42 55 46 E....RET1....BUF 3df0: 53 11 0d 0a 0a b8 f1 80 28 00 28 fe 00 00 00 7b S.......(.(....{ 3e00: 83 88 42 55 46 53 0a 06 00 83 88 52 45 54 31 0a ..BUFS.....RET1. 3e10: 07 00 88 42 55 46 53 0a 06 00 70 83 88 52 45 54 ...BUFS...p..RET 3e20: 31 0a 09 00 88 42 55 46 53 0a 08 00 70 83 88 52 1....BUFS...p..R 3e30: 45 54 31 0a 0a 00 88 42 55 46 53 0a 09 00 08 52 ET1....BUFS....R 3e40: 45 54 32 11 05 0b 01 01 00 53 45 4e 44 42 55 46 ET2......SENDBUF 3e50: 53 52 45 54 32 14 45 0d 53 49 52 53 00 08 53 4d SRET2.E.SIRS..SM 3e60: 49 53 11 09 0a 06 b8 f1 80 28 00 2a 08 52 45 54 IS.......(.*.RET 3e70: 53 11 05 0b 01 01 00 a0 43 0b 92 5c 2f 05 5f 53 S.......C..\/._S 3e80: 42 5f 50 43 49 30 4c 50 43 5f 4b 43 53 35 53 45 B_PCI0LPC_KCS5SE 3e90: 4e 44 53 4d 49 53 52 45 54 53 a0 40 09 83 88 52 NDSMISRETS.@...R 3ea0: 45 54 53 0a 00 00 a0 44 08 92 83 88 52 45 54 53 ETS....D....RETS 3eb0: 0a 03 00 a0 47 07 7b 83 88 52 45 54 53 0a 07 00 ....G.{..RETS... 3ec0: 0a 01 00 a0 47 06 7b 83 88 52 45 54 53 0a 08 00 ....G.{..RETS... 3ed0: 0a 80 00 08 53 4d 49 52 11 0d 0a 0a b8 f1 80 28 ....SMIR.......( 3ee0: 00 2b 01 80 00 00 08 52 45 54 52 11 05 0b 01 01 .+.....RETR..... 3ef0: 00 5c 2f 05 5f 53 42 5f 50 43 49 30 4c 50 43 5f .\/._SB_PCI0LPC_ 3f00: 4b 43 53 35 53 45 4e 44 53 4d 49 52 52 45 54 52 KCS5SENDSMIRRETR 3f10: 70 0a 10 60 a2 16 60 43 53 50 53 7b 83 88 52 45 p..`..`CSPS{..RE 3f20: 54 53 0a 08 00 0a 0f 00 60 76 60 14 46 6a 43 53 TS......`v`.FjCS 3f30: 50 53 02 a2 4e 69 01 08 5f 54 5f 30 0a 00 70 69 PS..Ni.._T_0..pi 3f40: 5f 54 5f 30 a0 45 06 93 5f 54 5f 30 0a 01 a0 4b _T_0.E.._T_0...K 3f50: 05 5b 12 5c 2f 03 5f 50 52 5f 50 52 30 30 5f 50 .[.\/._PR_PR00_P 3f60: 50 43 60 a0 28 92 95 68 87 5c 2f 03 5f 50 52 5f PC`.(..h.\/._PR_ 3f70: 50 52 30 30 5f 50 53 53 74 87 5c 2f 03 5f 50 52 PR00_PSSt.\/._PR 3f80: 5f 50 52 30 30 5f 50 53 53 0a 01 68 70 68 5c 2f _PR00_PSS..hph\/ 3f90: 03 5f 50 52 5f 50 52 30 30 5f 50 50 43 86 5c 2e ._PR_PR00_PPC.\. 3fa0: 5f 50 52 5f 50 52 30 30 0a 80 a1 46 62 a0 45 06 _PR_PR00...Fb.E. 3fb0: 93 5f 54 5f 30 0a 02 a0 4b 05 5b 12 5c 2f 03 5f ._T_0...K.[.\/._ 3fc0: 50 52 5f 50 52 30 31 5f 50 50 43 60 a0 28 92 95 PR_PR01_PPC`.(.. 3fd0: 68 87 5c 2f 03 5f 50 52 5f 50 52 30 31 5f 50 53 h.\/._PR_PR01_PS 3fe0: 53 74 87 5c 2f 03 5f 50 52 5f 50 52 30 31 5f 50 St.\/._PR_PR01_P 3ff0: 53 53 0a 01 68 70 68 5c 2f 03 5f 50 52 5f 50 52 SS..hph\/._PR_PR 4000: 30 31 5f 50 50 43 86 5c 2e 5f 50 52 5f 50 52 30 01_PPC.\._PR_PR0 4010: 31 0a 80 a1 4d 5b a0 45 06 93 5f 54 5f 30 0a 03 1...M[.E.._T_0.. 4020: a0 4b 05 5b 12 5c 2f 03 5f 50 52 5f 50 52 30 32 .K.[.\/._PR_PR02 4030: 5f 50 50 43 60 a0 28 92 95 68 87 5c 2f 03 5f 50 _PPC`.(..h.\/._P 4040: 52 5f 50 52 30 32 5f 50 53 53 74 87 5c 2f 03 5f R_PR02_PSSt.\/._ 4050: 50 52 5f 50 52 30 32 5f 50 53 53 0a 01 68 70 68 PR_PR02_PSS..hph 4060: 5c 2f 03 5f 50 52 5f 50 52 30 32 5f 50 50 43 86 \/._PR_PR02_PPC. 4070: 5c 2e 5f 50 52 5f 50 52 30 32 0a 80 a1 44 55 a0 \._PR_PR02...DU. 4080: 45 06 93 5f 54 5f 30 0a 04 a0 4b 05 5b 12 5c 2f E.._T_0...K.[.\/ 4090: 03 5f 50 52 5f 50 52 30 33 5f 50 50 43 60 a0 28 ._PR_PR03_PPC`.( 40a0: 92 95 68 87 5c 2f 03 5f 50 52 5f 50 52 30 33 5f ..h.\/._PR_PR03_ 40b0: 50 53 53 74 87 5c 2f 03 5f 50 52 5f 50 52 30 33 PSSt.\/._PR_PR03 40c0: 5f 50 53 53 0a 01 68 70 68 5c 2f 03 5f 50 52 5f _PSS..hph\/._PR_ 40d0: 50 52 30 33 5f 50 50 43 86 5c 2e 5f 50 52 5f 50 PR03_PPC.\._PR_P 40e0: 52 30 33 0a 80 a1 4b 4e a0 45 06 93 5f 54 5f 30 R03...KN.E.._T_0 40f0: 0a 05 a0 4b 05 5b 12 5c 2f 03 5f 50 52 5f 50 52 ...K.[.\/._PR_PR 4100: 30 34 5f 50 50 43 60 a0 28 92 95 68 87 5c 2f 03 04_PPC`.(..h.\/. 4110: 5f 50 52 5f 50 52 30 34 5f 50 53 53 74 87 5c 2f _PR_PR04_PSSt.\/ 4120: 03 5f 50 52 5f 50 52 30 34 5f 50 53 53 0a 01 68 ._PR_PR04_PSS..h 4130: 70 68 5c 2f 03 5f 50 52 5f 50 52 30 34 5f 50 50 ph\/._PR_PR04_PP 4140: 43 86 5c 2e 5f 50 52 5f 50 52 30 34 0a 80 a1 42 C.\._PR_PR04...B 4150: 48 a0 45 06 93 5f 54 5f 30 0a 06 a0 4b 05 5b 12 H.E.._T_0...K.[. 4160: 5c 2f 03 5f 50 52 5f 50 52 30 35 5f 50 50 43 60 \/._PR_PR05_PPC` 4170: a0 28 92 95 68 87 5c 2f 03 5f 50 52 5f 50 52 30 .(..h.\/._PR_PR0 4180: 35 5f 50 53 53 74 87 5c 2f 03 5f 50 52 5f 50 52 5_PSSt.\/._PR_PR 4190: 30 35 5f 50 53 53 0a 01 68 70 68 5c 2f 03 5f 50 05_PSS..hph\/._P 41a0: 52 5f 50 52 30 35 5f 50 50 43 86 5c 2e 5f 50 52 R_PR05_PPC.\._PR 41b0: 5f 50 52 30 35 0a 80 a1 49 41 a0 45 06 93 5f 54 _PR05...IA.E.._T 41c0: 5f 30 0a 07 a0 4b 05 5b 12 5c 2f 03 5f 50 52 5f _0...K.[.\/._PR_ 41d0: 50 52 30 36 5f 50 50 43 60 a0 28 92 95 68 87 5c PR06_PPC`.(..h.\ 41e0: 2f 03 5f 50 52 5f 50 52 30 36 5f 50 53 53 74 87 /._PR_PR06_PSSt. 41f0: 5c 2f 03 5f 50 52 5f 50 52 30 36 5f 50 53 53 0a \/._PR_PR06_PSS. 4200: 01 68 70 68 5c 2f 03 5f 50 52 5f 50 52 30 36 5f .hph\/._PR_PR06_ 4210: 50 50 43 86 5c 2e 5f 50 52 5f 50 52 30 36 0a 80 PPC.\._PR_PR06.. 4220: a1 40 3b a0 45 06 93 5f 54 5f 30 0a 08 a0 4b 05 .@;.E.._T_0...K. 4230: 5b 12 5c 2f 03 5f 50 52 5f 50 52 30 37 5f 50 50 [.\/._PR_PR07_PP 4240: 43 60 a0 28 92 95 68 87 5c 2f 03 5f 50 52 5f 50 C`.(..h.\/._PR_P 4250: 52 30 37 5f 50 53 53 74 87 5c 2f 03 5f 50 52 5f R07_PSSt.\/._PR_ 4260: 50 52 30 37 5f 50 53 53 0a 01 68 70 68 5c 2f 03 PR07_PSS..hph\/. 4270: 5f 50 52 5f 50 52 30 37 5f 50 50 43 86 5c 2e 5f _PR_PR07_PPC.\._ 4280: 50 52 5f 50 52 30 37 0a 80 a1 47 34 a0 45 06 93 PR_PR07...G4.E.. 4290: 5f 54 5f 30 0a 09 a0 4b 05 5b 12 5c 2f 03 5f 50 _T_0...K.[.\/._P 42a0: 52 5f 50 52 31 30 5f 50 50 43 60 a0 28 92 95 68 R_PR10_PPC`.(..h 42b0: 87 5c 2f 03 5f 50 52 5f 50 52 31 30 5f 50 53 53 .\/._PR_PR10_PSS 42c0: 74 87 5c 2f 03 5f 50 52 5f 50 52 31 30 5f 50 53 t.\/._PR_PR10_PS 42d0: 53 0a 01 68 70 68 5c 2f 03 5f 50 52 5f 50 52 31 S..hph\/._PR_PR1 42e0: 30 5f 50 50 43 86 5c 2e 5f 50 52 5f 50 52 31 30 0_PPC.\._PR_PR10 42f0: 0a 80 a1 4e 2d a0 45 06 93 5f 54 5f 30 0a 0a a0 ...N-.E.._T_0... 4300: 4b 05 5b 12 5c 2f 03 5f 50 52 5f 50 52 31 31 5f K.[.\/._PR_PR11_ 4310: 50 50 43 60 a0 28 92 95 68 87 5c 2f 03 5f 50 52 PPC`.(..h.\/._PR 4320: 5f 50 52 31 31 5f 50 53 53 74 87 5c 2f 03 5f 50 _PR11_PSSt.\/._P 4330: 52 5f 50 52 31 31 5f 50 53 53 0a 01 68 70 68 5c R_PR11_PSS..hph\ 4340: 2f 03 5f 50 52 5f 50 52 31 31 5f 50 50 43 86 5c /._PR_PR11_PPC.\ 4350: 2e 5f 50 52 5f 50 52 31 31 0a 80 a1 45 27 a0 45 ._PR_PR11...E'.E 4360: 06 93 5f 54 5f 30 0a 0b a0 4b 05 5b 12 5c 2f 03 .._T_0...K.[.\/. 4370: 5f 50 52 5f 50 52 31 32 5f 50 50 43 60 a0 28 92 _PR_PR12_PPC`.(. 4380: 95 68 87 5c 2f 03 5f 50 52 5f 50 52 31 32 5f 50 .h.\/._PR_PR12_P 4390: 53 53 74 87 5c 2f 03 5f 50 52 5f 50 52 31 32 5f SSt.\/._PR_PR12_ 43a0: 50 53 53 0a 01 68 70 68 5c 2f 03 5f 50 52 5f 50 PSS..hph\/._PR_P 43b0: 52 31 32 5f 50 50 43 86 5c 2e 5f 50 52 5f 50 52 R12_PPC.\._PR_PR 43c0: 31 32 0a 80 a1 4c 20 a0 45 06 93 5f 54 5f 30 0a 12...L .E.._T_0. 43d0: 0c a0 4b 05 5b 12 5c 2f 03 5f 50 52 5f 50 52 31 ..K.[.\/._PR_PR1 43e0: 33 5f 50 50 43 60 a0 28 92 95 68 87 5c 2f 03 5f 3_PPC`.(..h.\/._ 43f0: 50 52 5f 50 52 31 33 5f 50 53 53 74 87 5c 2f 03 PR_PR13_PSSt.\/. 4400: 5f 50 52 5f 50 52 31 33 5f 50 53 53 0a 01 68 70 _PR_PR13_PSS..hp 4410: 68 5c 2f 03 5f 50 52 5f 50 52 31 33 5f 50 50 43 h\/._PR_PR13_PPC 4420: 86 5c 2e 5f 50 52 5f 50 52 31 33 0a 80 a1 43 1a .\._PR_PR13...C. 4430: a0 45 06 93 5f 54 5f 30 0a 0d a0 4b 05 5b 12 5c .E.._T_0...K.[.\ 4440: 2f 03 5f 50 52 5f 50 52 31 34 5f 50 50 43 60 a0 /._PR_PR14_PPC`. 4450: 28 92 95 68 87 5c 2f 03 5f 50 52 5f 50 52 31 34 (..h.\/._PR_PR14 4460: 5f 50 53 53 74 87 5c 2f 03 5f 50 52 5f 50 52 31 _PSSt.\/._PR_PR1 4470: 34 5f 50 53 53 0a 01 68 70 68 5c 2f 03 5f 50 52 4_PSS..hph\/._PR 4480: 5f 50 52 31 34 5f 50 50 43 86 5c 2e 5f 50 52 5f _PR14_PPC.\._PR_ 4490: 50 52 31 34 0a 80 a1 4a 13 a0 45 06 93 5f 54 5f PR14...J..E.._T_ 44a0: 30 0a 0e a0 4b 05 5b 12 5c 2f 03 5f 50 52 5f 50 0...K.[.\/._PR_P 44b0: 52 31 35 5f 50 50 43 60 a0 28 92 95 68 87 5c 2f R15_PPC`.(..h.\/ 44c0: 03 5f 50 52 5f 50 52 31 35 5f 50 53 53 74 87 5c ._PR_PR15_PSSt.\ 44d0: 2f 03 5f 50 52 5f 50 52 31 35 5f 50 53 53 0a 01 /._PR_PR15_PSS.. 44e0: 68 70 68 5c 2f 03 5f 50 52 5f 50 52 31 35 5f 50 hph\/._PR_PR15_P 44f0: 50 43 86 5c 2e 5f 50 52 5f 50 52 31 35 0a 80 a1 PC.\._PR_PR15... 4500: 41 0d a0 45 06 93 5f 54 5f 30 0a 0f a0 4b 05 5b A..E.._T_0...K.[ 4510: 12 5c 2f 03 5f 50 52 5f 50 52 31 36 5f 50 50 43 .\/._PR_PR16_PPC 4520: 60 a0 28 92 95 68 87 5c 2f 03 5f 50 52 5f 50 52 `.(..h.\/._PR_PR 4530: 31 36 5f 50 53 53 74 87 5c 2f 03 5f 50 52 5f 50 16_PSSt.\/._PR_P 4540: 52 31 36 5f 50 53 53 0a 01 68 70 68 5c 2f 03 5f R16_PSS..hph\/._ 4550: 50 52 5f 50 52 31 36 5f 50 50 43 86 5c 2e 5f 50 PR_PR16_PPC.\._P 4560: 52 5f 50 52 31 36 0a 80 a1 48 06 a0 45 06 93 5f R_PR16...H..E.._ 4570: 54 5f 30 0a 10 a0 4b 05 5b 12 5c 2f 03 5f 50 52 T_0...K.[.\/._PR 4580: 5f 50 52 31 37 5f 50 50 43 60 a0 28 92 95 68 87 _PR17_PPC`.(..h. 4590: 5c 2f 03 5f 50 52 5f 50 52 31 37 5f 50 53 53 74 \/._PR_PR17_PSSt 45a0: 87 5c 2f 03 5f 50 52 5f 50 52 31 37 5f 50 53 53 .\/._PR_PR17_PSS 45b0: 0a 01 68 70 68 5c 2f 03 5f 50 52 5f 50 52 31 37 ..hph\/._PR_PR17 45c0: 5f 50 50 43 86 5c 2e 5f 50 52 5f 50 52 31 37 0a _PPC.\._PR_PR17. 45d0: 80 a5 14 48 12 53 45 4e 44 02 08 57 52 53 54 0a ...H.SEND..WRST. 45e0: 61 08 57 52 45 4e 0a 62 a0 08 57 49 42 46 a4 0a a.WREN.b..WIBF.. 45f0: 03 a0 08 43 4f 42 46 a4 0a 04 70 57 52 53 54 43 ...COBF...pWRSTC 4600: 4d 44 5f a0 08 57 49 42 46 a4 0a 03 a0 0d 92 93 MD_..WIBF....... 4610: 43 48 4b 57 00 a4 45 52 45 58 a0 08 43 4f 42 46 CHKW..EREX..COBF 4620: a4 0a 04 70 0a 00 60 70 87 68 61 76 61 a2 31 92 ...p..`p.hava.1. 4630: 93 60 61 70 83 88 68 60 00 44 5f 49 4e a0 08 57 .`ap..h`.D_IN..W 4640: 49 42 46 a4 0a 03 a0 0d 92 93 43 48 4b 57 00 a4 IBF.......CHKW.. 4650: 45 52 45 58 a0 08 43 4f 42 46 a4 0a 04 75 60 70 EREX..COBF...u`p 4660: 57 52 45 4e 43 4d 44 5f a0 08 57 49 42 46 a4 0a WRENCMD_..WIBF.. 4670: 03 a0 0b 92 93 43 48 4b 57 00 a4 0a 01 a0 08 43 .....CHKW......C 4680: 4f 42 46 a4 0a 04 70 83 88 68 60 00 44 5f 49 4e OBF...p..h`.D_IN 4690: 08 52 45 41 42 0a 68 a0 08 57 49 42 46 a4 0a 03 .REAB.h..WIBF... 46a0: 70 0a 01 60 a2 2d 93 43 48 4b 52 00 a0 08 57 4f p..`.-.CHKR...WO 46b0: 42 46 a4 0a 03 70 44 5f 4f 55 88 69 60 00 70 52 BF...pD_OU.i`.pR 46c0: 45 41 42 44 5f 49 4e a0 08 57 49 42 46 a4 0a 03 EABD_IN..WIBF... 46d0: 75 60 76 60 70 60 88 69 0a 00 00 a0 0d 92 93 43 u`v`p`.i.......C 46e0: 48 4b 49 00 a4 45 52 45 58 a0 08 57 4f 42 46 a4 HKI..EREX..WOBF. 46f0: 0a 03 70 44 5f 4f 55 60 a4 0a 00 14 20 45 52 45 ..pD_OU`.... ERE 4700: 58 00 70 0a 00 60 a2 12 95 60 0a 0a a0 0a 93 45 X.p..`...`.....E 4710: 52 43 48 00 a4 0a 01 75 60 a4 0a 02 14 47 09 45 RCH....u`....G.E 4720: 52 43 48 00 08 47 53 41 42 0a 60 08 52 45 41 42 RCH..GSAB.`.REAB 4730: 0a 68 a0 08 57 49 42 46 a4 0a 03 70 47 53 41 42 .h..WIBF...pGSAB 4740: 43 4d 44 5f a0 08 57 49 42 46 a4 0a 03 a0 08 43 CMD_..WIBF.....C 4750: 4f 42 46 a4 0a 04 70 0a 00 44 5f 49 4e a0 08 57 OBF...p..D_IN..W 4760: 49 42 46 a4 0a 03 a0 0b 92 93 43 48 4b 52 00 a4 IBF.......CHKR.. 4770: 0a 01 a0 08 57 4f 42 46 a4 0a 03 70 44 5f 4f 55 ....WOBF...pD_OU 4780: 60 70 52 45 41 42 44 5f 49 4e a0 08 57 49 42 46 `pREABD_IN..WIBF 4790: a4 0a 03 a0 0b 92 93 43 48 4b 49 00 a4 0a 01 a0 .......CHKI..... 47a0: 08 57 4f 42 46 a4 0a 03 a0 08 43 4f 42 46 a4 0a .WOBF.....COBF.. 47b0: 04 a4 0a 00 14 26 43 48 4b 57 00 70 53 30 5f 5f .....&CHKW.pS0__ 47c0: 60 70 53 31 5f 5f 61 a0 08 92 93 60 00 a4 0a 01 `pS1__a....`.... 47d0: a0 07 93 61 00 a4 0a 01 a4 0a 00 14 26 43 48 4b ...a........&CHK 47e0: 52 00 70 53 30 5f 5f 60 70 53 31 5f 5f 61 a0 07 R.pS0__`pS1__a.. 47f0: 93 60 00 a4 0a 01 a0 08 92 93 61 00 a4 0a 01 a4 .`........a..... 4800: 0a 00 14 27 43 48 4b 49 00 70 53 30 5f 5f 60 70 ...'CHKI.pS0__`p 4810: 53 31 5f 5f 61 a0 08 92 93 60 00 a4 0a 01 a0 08 S1__a....`...... 4820: 92 93 61 00 a4 0a 01 a4 0a 00 14 28 57 4f 42 46 ..a........(WOBF 4830: 00 70 0b 88 13 62 a2 19 94 62 00 70 4f 42 46 5f .p...b...b.pOBF_ 4840: 61 a0 05 61 a4 0a 00 5b 22 0a 0a 74 62 0a 0a 62 a..a...["..tb..b 4850: a4 0a 01 14 29 57 49 42 46 00 70 0b 88 13 62 a2 ....)WIBF.p...b. 4860: 1a 94 62 00 70 49 42 46 5f 61 a0 06 92 61 a4 0a ..b.pIBF_a...a.. 4870: 00 5b 22 0a 0a 74 62 0a 0a 62 a4 0a 01 14 26 43 .["..tb..b....&C 4880: 4f 42 46 00 70 0b e8 03 60 a2 1a 94 60 00 70 4f OBF.p...`...`.pO 4890: 42 46 5f 61 a0 0a 61 70 44 5f 4f 55 61 76 60 a1 BF_a..apD_OUav`. 48a0: 04 a4 0a 00 .... FACS @ 0xbf7cbfc0 0000: 46 41 43 53 40 00 00 00 00 00 00 00 00 00 00 00 FACS@........... 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ FACP @ 0xbf7cbfc0 0000: 46 41 43 50 84 00 00 00 02 aa 46 53 43 20 20 20 FACP......FSC 0010: 50 43 20 20 20 20 20 20 00 00 06 00 50 54 4c 20 PC ....PTL 0020: 40 42 0f 00 c0 bf 7c bf d5 2f 7c bf 00 07 09 00 @B....|../|..... 0030: b2 00 00 00 f0 f1 00 00 00 10 00 00 00 00 00 00 ................ 0040: 04 10 00 00 00 00 00 00 50 10 00 00 08 10 00 00 ........P....... 0050: 20 10 00 00 00 00 00 00 04 02 01 04 10 00 00 00 ............... 0060: ff ff ff ff 00 00 00 00 01 03 0d 00 32 01 00 00 ............2... 0070: a5 04 00 00 01 08 00 00 f9 0c 00 00 00 00 00 00 ................ 0080: 06 00 00 00 .... TCPA @ 0xbf7c79f1 0000: 54 43 50 41 32 00 00 00 01 43 50 68 6f 65 6e 69 TCPA2....CPhoeni 0010: 78 20 20 20 20 20 20 00 00 00 06 00 54 4c 20 00 x .....TL . 0020: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 ................ 0030: 00 00 .. SLIT @ 0xbf7c7a23 0000: 53 4c 49 54 30 00 00 00 01 43 46 53 43 20 20 20 SLIT0....CFSC 0010: 20 20 20 20 20 20 20 20 00 00 06 00 20 20 20 20 .... 0020: 5a 00 00 00 02 00 00 00 00 00 00 00 0a 0f 0f 0a Z............... EINJ @ 0xbf7c7a53 0000: 45 49 4e 4a b0 01 00 00 01 24 50 54 4c 20 20 20 EINJ.....$PTL 0010: 57 48 45 41 50 54 4c 20 00 00 06 00 50 54 4c 20 WHEAPTL ....PTL 0020: 01 00 00 00 0c 00 00 00 00 00 00 00 0c 00 00 00 ................ 0030: 00 03 00 00 00 08 00 01 00 50 7d bf 00 00 00 00 .........P}..... 0040: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0050: 01 03 00 00 00 10 00 02 bc be 7c bf 00 00 00 00 ..........|..... 0060: ea 06 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0070: 01 03 00 00 01 08 00 01 00 fe 00 00 00 00 00 00 ................ 0080: 06 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0090: 01 00 00 00 00 40 00 04 01 50 7d bf 00 00 00 00 .....@...P}..... 00a0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 00b0: 02 02 00 00 00 20 00 03 09 50 7d bf 00 00 00 00 ..... ...P}..... 00c0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 00d0: 03 00 00 00 00 20 00 03 0d 50 7d bf 00 00 00 00 ..... ...P}..... 00e0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 00f0: 04 03 00 00 00 10 00 02 bc be 7c bf 00 00 00 00 ..........|..... 0100: ea 05 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0110: 04 03 00 00 01 08 00 01 00 fe 00 00 00 00 00 00 ................ 0120: 05 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0130: 05 03 00 00 00 10 00 02 bc be 7c bf 00 00 00 00 ..........|..... 0140: ea 04 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0150: 05 03 00 00 01 08 00 01 00 fe 00 00 00 00 00 00 ................ 0160: 04 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0170: 06 01 00 00 00 08 00 01 11 50 7d bf 00 00 00 00 .........P}..... 0180: 01 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0190: 07 00 00 00 00 08 00 01 12 50 7d bf 00 00 00 00 .........P}..... 01a0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ HEST @ 0xbf7c7c03 0000: 48 45 53 54 68 02 00 00 01 45 50 54 4c 20 20 20 HESTh....EPTL 0010: 57 48 45 41 50 54 4c 20 00 00 06 00 50 54 4c 20 WHEAPTL ....PTL 0020: 01 00 00 00 09 00 00 00 09 00 09 00 ff ff 00 01 ................ 0030: 01 00 00 00 03 00 00 00 00 08 00 00 00 40 00 04 .............@.. 0040: 00 c0 7c bf 00 00 00 00 00 1c 00 00 60 ea 00 00 ..|.........`... 0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 00 00 00 08 00 00 09 00 09 00 ff ff 00 01 ................ 0070: 01 00 00 00 03 00 00 00 00 08 00 00 00 40 00 04 .............@.. 0080: 00 d0 7c bf 00 00 00 00 04 1c 00 00 60 ea 00 00 ..|.........`... 0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00a0: 00 00 00 00 00 08 00 00 09 00 09 00 ff ff 00 01 ................ 00b0: 01 00 00 00 03 00 00 00 00 08 00 00 00 40 00 04 .............@.. 00c0: 00 e0 7c bf 00 00 00 00 04 1c 00 00 60 ea 00 00 ..|.........`... 00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00e0: 00 00 00 00 00 08 00 00 09 00 09 00 ff ff 00 01 ................ 00f0: 01 00 00 00 03 00 00 00 00 08 00 00 00 40 00 04 .............@.. 0100: 00 f0 7c bf 00 00 00 00 00 1c 00 00 60 ea 00 00 ..|.........`... 0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0120: 00 00 00 00 00 08 00 00 09 00 09 00 ff ff 00 01 ................ 0130: 01 00 00 00 03 00 00 00 00 08 00 00 00 40 00 04 .............@.. 0140: 00 00 7d bf 00 00 00 00 04 1c 00 00 60 ea 00 00 ..}.........`... 0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0160: 00 00 00 00 00 08 00 00 09 00 09 00 ff ff 00 01 ................ 0170: 01 00 00 00 03 00 00 00 00 08 00 00 00 40 00 04 .............@.. 0180: 00 10 7d bf 00 00 00 00 04 1c 00 00 60 ea 00 00 ..}.........`... 0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01a0: 00 00 00 00 00 08 00 00 09 00 09 00 ff ff 00 01 ................ 01b0: 01 00 00 00 03 00 00 00 00 08 00 00 00 40 00 04 .............@.. 01c0: 00 20 7d bf 00 00 00 00 00 1c 00 00 60 ea 00 00 . }.........`... 01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01e0: 00 00 00 00 00 08 00 00 09 00 09 00 ff ff 00 01 ................ 01f0: 01 00 00 00 03 00 00 00 00 08 00 00 00 40 00 04 .............@.. 0200: 00 30 7d bf 00 00 00 00 04 1c 00 00 60 ea 00 00 .0}.........`... 0210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0220: 00 00 00 00 00 08 00 00 09 00 09 00 ff ff 00 01 ................ 0230: 01 00 00 00 03 00 00 00 00 08 00 00 00 40 00 04 .............@.. 0240: 00 40 7d bf 00 00 00 00 04 1c 00 00 60 ea 00 00 .@}.........`... 0250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0260: 00 00 00 00 00 08 00 00 ........ BERT @ 0xbf7c7e6b 0000: 42 45 52 54 30 00 00 00 01 66 50 54 4c 20 20 20 BERT0....fPTL 0010: 57 48 45 41 50 54 4c 20 00 00 06 00 50 54 4c 20 WHEAPTL ....PTL 0020: 01 00 00 00 00 04 00 00 00 60 7d bf 00 00 00 00 .........`}..... SSDT @ 0xbf7c7e9b 0000: 53 53 44 54 e1 00 00 00 01 42 77 68 65 61 6f 73 SSDT.....Bwheaos 0010: 77 68 65 61 6f 73 63 00 00 00 06 00 49 4e 54 4c wheaosc.....INTL 0020: 24 06 05 20 10 4c 0b 5c 5f 53 42 5f 5b 80 57 48 $.. .L.\_SB_[.WH 0030: 45 30 01 0c 00 fe 00 00 0c 02 00 00 00 5b 81 0b E0...........[.. 0040: 57 48 45 30 00 57 48 45 43 08 5b 80 57 48 45 31 WHE0.WHEC.[.WHE1 0050: 00 0c bc be 7c bf 0c 90 00 00 00 5b 81 16 57 48 ....|......[..WH 0060: 45 31 00 57 43 4d 44 08 57 44 49 44 20 57 49 4e E1.WCMD.WDID WIN 0070: 46 40 40 5b 81 10 57 48 45 31 00 01 01 00 00 28 F@@[..WHE1.....( 0080: 49 4e 46 57 08 14 4b 05 5f 4f 53 43 04 a0 40 05 INFW..K._OSC..@. 0090: 93 68 11 13 0a 10 0c 5e 85 ed 90 6c bf 47 a6 2a .h.....^...l.G.* 00a0: 26 de 0f c5 ad 5c 8a 6b 0a 00 43 44 57 31 8a 6b &....\.k..CDW1.k 00b0: 0a 04 43 44 57 32 8a 6b 0a 08 43 44 57 33 a0 1f ..CDW2.k..CDW3.. 00c0: 7b 43 44 57 32 0a 01 00 70 0a ea 57 43 4d 44 70 {CDW2...p..WCMDp 00d0: 0a 03 57 44 49 44 70 00 57 48 45 43 a4 6b a4 0a ..WDIDp.WHEC.k.. 00e0: 00 . ERST @ 0xbf7c7f7c 0000: 45 52 53 54 70 02 00 00 01 46 50 54 4c 20 20 20 ERSTp....FPTL 0010: 57 48 45 41 50 54 4c 20 00 00 06 00 50 54 4c 20 WHEAPTL ....PTL 0020: 01 00 00 00 0c 00 00 00 00 00 00 00 12 00 00 00 ................ 0030: 00 03 00 00 00 08 00 01 00 80 7d bf 00 00 00 00 ..........}..... 0040: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0050: 01 03 00 00 00 08 00 01 00 80 7d bf 00 00 00 00 ..........}..... 0060: 01 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0070: 02 03 00 00 00 08 00 01 00 80 7d bf 00 00 00 00 ..........}..... 0080: 02 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0090: 03 03 00 00 00 10 00 02 bc be 7c bf 00 00 00 00 ..........|..... 00a0: ea 02 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 00b0: 03 03 00 00 01 08 00 01 00 fe 00 00 00 00 00 00 ................ 00c0: 02 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 00d0: 04 02 00 00 00 20 00 03 01 80 7d bf 00 00 00 00 ..... ....}..... 00e0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 00f0: 05 03 00 00 00 10 00 02 bc be 7c bf 00 00 00 00 ..........|..... 0100: ea 01 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0110: 05 03 00 00 01 08 00 01 00 fe 00 00 00 00 00 00 ................ 0120: 01 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0130: 06 01 00 00 00 08 00 01 05 80 7d bf 00 00 00 00 ..........}..... 0140: 01 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0150: 07 00 00 00 00 08 00 01 06 80 7d bf 00 00 00 00 ..........}..... 0160: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0170: 08 00 00 00 00 40 00 04 07 80 7d bf 00 00 00 00 .....@....}..... 0180: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0190: 09 02 00 00 00 40 00 04 0f 80 7d bf 00 00 00 00 .....@....}..... 01a0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 01b0: 0a 00 00 00 00 08 00 01 17 80 7d bf 00 00 00 00 ..........}..... 01c0: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 01d0: 0b 03 00 00 00 08 00 01 00 80 7d bf 00 00 00 00 ..........}..... 01e0: 0b 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 01f0: 0c 00 00 00 00 20 00 02 18 80 7d bf 00 00 00 00 ..... ....}..... 0200: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0210: 0d 00 00 00 00 40 00 04 1c 80 7d bf 00 00 00 00 .....@....}..... 0220: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0230: 0e 00 00 00 00 40 00 04 24 80 7d bf 00 00 00 00 .....@..$.}..... 0240: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ 0250: 0f 00 00 00 00 20 00 02 2c 80 7d bf 00 00 00 00 ..... ..,.}..... 0260: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff ................ SRAT @ 0xbf7c81ec 0000: 53 52 41 54 a8 01 00 00 01 e7 49 6e 74 65 6c 20 SRAT......Intel 0010: 54 79 6c 65 72 62 72 67 00 00 06 00 50 48 58 2e Tylerbrg....PHX. 0020: 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0030: 00 10 01 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0040: 00 10 01 01 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0050: 00 10 01 02 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0060: 00 10 01 03 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0070: 00 10 01 04 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0080: 00 10 01 05 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0090: 00 10 01 06 01 00 00 00 00 00 00 00 00 00 00 00 ................ 00a0: 00 10 01 07 01 00 00 00 00 00 00 00 00 00 00 00 ................ 00b0: 00 10 02 10 01 00 00 00 00 00 00 00 00 00 00 00 ................ 00c0: 00 10 02 11 01 00 00 00 00 00 00 00 00 00 00 00 ................ 00d0: 00 10 02 12 01 00 00 00 00 00 00 00 00 00 00 00 ................ 00e0: 00 10 02 13 01 00 00 00 00 00 00 00 00 00 00 00 ................ 00f0: 00 10 02 14 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0100: 00 10 02 15 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0110: 00 10 02 16 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0120: 00 10 02 17 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0130: 01 28 01 00 00 00 00 00 00 00 00 00 00 00 00 00 .(.............. 0140: 00 00 00 c0 00 00 00 00 00 00 00 00 01 00 00 00 ................ 0150: 00 00 00 00 00 00 00 00 01 28 01 00 00 00 00 00 .........(...... 0160: 00 00 00 00 01 00 00 00 00 00 00 40 01 00 00 00 ...........@.... 0170: 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ 0180: 01 28 02 00 00 00 00 00 00 00 00 40 02 00 00 00 .(.........@.... 0190: 00 00 00 00 02 00 00 00 00 00 00 00 01 00 00 00 ................ 01a0: 00 00 00 00 00 00 00 00 ........ SSDT @ 0xbf7c8394 0000: 53 53 44 54 d8 00 00 00 01 08 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 30 30 00 00 06 00 20 43 53 46 CST_PR00.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 30 .....C.\._PR_PR0 0030: 30 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 0._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 00 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 00 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c846c 0000: 53 53 44 54 d8 00 00 00 01 06 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 30 31 00 00 06 00 20 43 53 46 CST_PR01.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 30 .....C.\._PR_PR0 0030: 31 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 1._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 00 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 00 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c8544 0000: 53 53 44 54 d8 00 00 00 01 00 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 30 32 00 00 06 00 20 43 53 46 CST_PR02.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 30 .....C.\._PR_PR0 0030: 32 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 2._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 02 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 02 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c861c 0000: 53 53 44 54 d8 00 00 00 01 fe 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 30 33 00 00 06 00 20 43 53 46 CST_PR03.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 30 .....C.\._PR_PR0 0030: 33 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 3._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 02 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 02 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c86f4 0000: 53 53 44 54 d8 00 00 00 01 f8 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 30 34 00 00 06 00 20 43 53 46 CST_PR04.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 30 .....C.\._PR_PR0 0030: 34 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 4._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 04 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 04 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c87cc 0000: 53 53 44 54 d8 00 00 00 01 f6 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 30 35 00 00 06 00 20 43 53 46 CST_PR05.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 30 .....C.\._PR_PR0 0030: 35 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 5._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 04 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 04 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c88a4 0000: 53 53 44 54 d8 00 00 00 01 f0 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 30 36 00 00 06 00 20 43 53 46 CST_PR06.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 30 .....C.\._PR_PR0 0030: 36 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 6._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 06 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 06 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c897c 0000: 53 53 44 54 d8 00 00 00 01 ee 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 30 37 00 00 06 00 20 43 53 46 CST_PR07.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 30 .....C.\._PR_PR0 0030: 37 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 7._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 06 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 06 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c8a54 0000: 53 53 44 54 d8 00 00 00 01 e6 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 31 30 00 00 06 00 20 43 53 46 CST_PR10.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 31 .....C.\._PR_PR1 0030: 30 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 0._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 10 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 10 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c8b2c 0000: 53 53 44 54 d8 00 00 00 01 e4 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 31 31 00 00 06 00 20 43 53 46 CST_PR11.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 31 .....C.\._PR_PR1 0030: 31 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 1._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 10 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 10 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c8c04 0000: 53 53 44 54 d8 00 00 00 01 de 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 31 32 00 00 06 00 20 43 53 46 CST_PR12.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 31 .....C.\._PR_PR1 0030: 32 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 2._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 12 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 12 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c8cdc 0000: 53 53 44 54 d8 00 00 00 01 dc 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 31 33 00 00 06 00 20 43 53 46 CST_PR13.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 31 .....C.\._PR_PR1 0030: 33 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 3._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 12 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 12 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c8db4 0000: 53 53 44 54 d8 00 00 00 01 d6 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 31 34 00 00 06 00 20 43 53 46 CST_PR14.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 31 .....C.\._PR_PR1 0030: 34 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 4._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 14 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 14 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c8e8c 0000: 53 53 44 54 d8 00 00 00 01 d4 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 31 35 00 00 06 00 20 43 53 46 CST_PR15.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 31 .....C.\._PR_PR1 0030: 35 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 5._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 14 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 14 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c8f64 0000: 53 53 44 54 d8 00 00 00 01 ce 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 31 36 00 00 06 00 20 43 53 46 CST_PR16.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 31 .....C.\._PR_PR1 0030: 36 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 6._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 16 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 16 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c903c 0000: 53 53 44 54 d8 00 00 00 01 cc 46 53 43 20 20 20 SSDT......FSC 0010: 43 53 54 5f 50 52 31 37 00 00 06 00 20 43 53 46 CST_PR17.... CSF 0020: 01 00 00 00 10 43 0b 5c 2e 5f 50 52 5f 50 52 31 .....C.\._PR_PR1 0030: 37 08 5f 43 53 54 12 42 06 04 0a 03 12 1e 04 11 7._CST.B........ 0040: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0050: 00 00 79 00 0a 01 0a 03 0b e8 03 12 1e 04 11 14 ..y............. 0060: 0a 11 82 0c 00 01 08 00 01 14 10 00 00 00 00 00 ................ 0070: 00 79 00 0a 02 0a cd 0b f4 01 12 1e 04 11 14 0a .y.............. 0080: 11 82 0c 00 01 08 00 01 15 10 00 00 00 00 00 00 ................ 0090: 79 00 0a 03 0a f5 0b 5e 01 08 5f 43 53 44 12 49 y......^.._CSD.I 00a0: 03 03 12 1a 06 0a 06 0a 00 0c 16 00 00 00 0c fe ................ 00b0: 00 00 00 0c 02 00 00 00 0c 01 00 00 00 12 1a 06 ................ 00c0: 0a 06 0a 00 0c 16 00 00 00 0c fe 00 00 00 0c 02 ................ 00d0: 00 00 00 0c 02 00 00 00 ........ SSDT @ 0xbf7c9114 0000: 53 53 44 54 be 01 00 00 01 71 46 53 43 20 20 20 SSDT.....qFSC 0010: 50 53 54 5f 50 52 30 30 00 00 06 00 20 43 53 46 PST_PR00.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 30 .....I.\._PR_PR0 0030: 30 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 0._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7c92d2 0000: 53 53 44 54 be 01 00 00 01 6f 46 53 43 20 20 20 SSDT.....oFSC 0010: 50 53 54 5f 50 52 30 31 00 00 06 00 20 43 53 46 PST_PR01.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 30 .....I.\._PR_PR0 0030: 31 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 1._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7c9490 0000: 53 53 44 54 be 01 00 00 01 6d 46 53 43 20 20 20 SSDT.....mFSC 0010: 50 53 54 5f 50 52 30 32 00 00 06 00 20 43 53 46 PST_PR02.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 30 .....I.\._PR_PR0 0030: 32 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 2._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7c964e 0000: 53 53 44 54 be 01 00 00 01 6b 46 53 43 20 20 20 SSDT.....kFSC 0010: 50 53 54 5f 50 52 30 33 00 00 06 00 20 43 53 46 PST_PR03.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 30 .....I.\._PR_PR0 0030: 33 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 3._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7c980c 0000: 53 53 44 54 be 01 00 00 01 69 46 53 43 20 20 20 SSDT.....iFSC 0010: 50 53 54 5f 50 52 30 34 00 00 06 00 20 43 53 46 PST_PR04.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 30 .....I.\._PR_PR0 0030: 34 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 4._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7c99ca 0000: 53 53 44 54 be 01 00 00 01 67 46 53 43 20 20 20 SSDT.....gFSC 0010: 50 53 54 5f 50 52 30 35 00 00 06 00 20 43 53 46 PST_PR05.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 30 .....I.\._PR_PR0 0030: 35 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 5._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7c9b88 0000: 53 53 44 54 be 01 00 00 01 65 46 53 43 20 20 20 SSDT.....eFSC 0010: 50 53 54 5f 50 52 30 36 00 00 06 00 20 43 53 46 PST_PR06.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 30 .....I.\._PR_PR0 0030: 36 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 6._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7c9d46 0000: 53 53 44 54 be 01 00 00 01 63 46 53 43 20 20 20 SSDT.....cFSC 0010: 50 53 54 5f 50 52 30 37 00 00 06 00 20 43 53 46 PST_PR07.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 30 .....I.\._PR_PR0 0030: 37 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 7._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7c9f04 0000: 53 53 44 54 be 01 00 00 01 6f 46 53 43 20 20 20 SSDT.....oFSC 0010: 50 53 54 5f 50 52 31 30 00 00 06 00 20 43 53 46 PST_PR10.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 31 .....I.\._PR_PR1 0030: 30 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 0._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7ca0c2 0000: 53 53 44 54 be 01 00 00 01 6d 46 53 43 20 20 20 SSDT.....mFSC 0010: 50 53 54 5f 50 52 31 31 00 00 06 00 20 43 53 46 PST_PR11.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 31 .....I.\._PR_PR1 0030: 31 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 1._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7ca280 0000: 53 53 44 54 be 01 00 00 01 6b 46 53 43 20 20 20 SSDT.....kFSC 0010: 50 53 54 5f 50 52 31 32 00 00 06 00 20 43 53 46 PST_PR12.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 31 .....I.\._PR_PR1 0030: 32 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 2._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7ca43e 0000: 53 53 44 54 be 01 00 00 01 69 46 53 43 20 20 20 SSDT.....iFSC 0010: 50 53 54 5f 50 52 31 33 00 00 06 00 20 43 53 46 PST_PR13.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 31 .....I.\._PR_PR1 0030: 33 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 3._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7ca5fc 0000: 53 53 44 54 be 01 00 00 01 67 46 53 43 20 20 20 SSDT.....gFSC 0010: 50 53 54 5f 50 52 31 34 00 00 06 00 20 43 53 46 PST_PR14.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 31 .....I.\._PR_PR1 0030: 34 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 4._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7ca7ba 0000: 53 53 44 54 be 01 00 00 01 65 46 53 43 20 20 20 SSDT.....eFSC 0010: 50 53 54 5f 50 52 31 35 00 00 06 00 20 43 53 46 PST_PR15.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 31 .....I.\._PR_PR1 0030: 35 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 5._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7ca978 0000: 53 53 44 54 be 01 00 00 01 63 46 53 43 20 20 20 SSDT.....cFSC 0010: 50 53 54 5f 50 52 31 36 00 00 06 00 20 43 53 46 PST_PR16.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 31 .....I.\._PR_PR1 0030: 36 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 6._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SSDT @ 0xbf7cab36 0000: 53 53 44 54 be 01 00 00 01 61 46 53 43 20 20 20 SSDT.....aFSC 0010: 50 53 54 5f 50 52 31 37 00 00 06 00 20 43 53 46 PST_PR17.... CSF 0020: 01 00 00 00 10 49 19 5c 2e 5f 50 52 5f 50 52 31 .....I.\._PR_PR1 0030: 37 08 5f 50 43 54 12 4d 02 02 11 14 0a 11 82 0c 7._PCT.M........ 0040: 00 7f 00 00 00 00 00 00 00 00 00 00 00 79 00 11 .............y.. 0050: 14 0a 11 82 0c 00 7f 00 00 00 00 00 00 00 00 00 ................ 0060: 00 00 79 00 08 5f 50 50 43 0a 00 08 5f 50 53 53 ..y.._PPC..._PSS 0070: 12 4d 14 0a 12 20 06 0c 65 0a 00 00 0c 88 8a 01 .M... ..e....... 0080: 00 0c 32 00 00 00 0c 96 00 00 00 0c 15 00 00 00 ..2............. 0090: 0c 15 00 00 00 12 20 06 0c 64 0a 00 00 0c a0 86 ...... ..d...... 00a0: 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 14 00 00 ...2............ 00b0: 00 0c 14 00 00 00 12 20 06 0c df 09 00 00 0c 18 ....... ........ 00c0: 73 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 13 00 s...2........... 00d0: 00 00 0c 13 00 00 00 12 20 06 0c 5a 09 00 00 0c ........ ..Z.... 00e0: 90 5f 01 00 0c 32 00 00 00 0c 96 00 00 00 0c 12 ._...2.......... 00f0: 00 00 00 0c 12 00 00 00 12 20 06 0c d5 08 00 00 ......... ...... 0100: 0c 08 4c 01 00 0c 32 00 00 00 0c 96 00 00 00 0c ..L...2......... 0110: 11 00 00 00 0c 11 00 00 00 12 20 06 0c 50 08 00 .......... ..P.. 0120: 00 0c 80 38 01 00 0c 32 00 00 00 0c 96 00 00 00 ...8...2........ 0130: 0c 10 00 00 00 0c 10 00 00 00 12 20 06 0c cb 07 ........... .... 0140: 00 00 0c f8 24 01 00 0c 32 00 00 00 0c 96 00 00 ....$...2....... 0150: 00 0c 0f 00 00 00 0c 0f 00 00 00 12 20 06 0c 46 ............ ..F 0160: 07 00 00 0c 70 11 01 00 0c 32 00 00 00 0c 96 00 ....p....2...... 0170: 00 00 0c 0e 00 00 00 0c 0e 00 00 00 12 20 06 0c ............. .. 0180: c1 06 00 00 0c e8 fd 00 00 0c 32 00 00 00 0c 96 ..........2..... 0190: 00 00 00 0c 0d 00 00 00 0c 0d 00 00 00 12 20 06 .............. . 01a0: 0c 3c 06 00 00 0c 60 ea 00 00 0c 32 00 00 00 0c .<....`....2.... 01b0: 96 00 00 00 0c 0c 00 00 00 0c 0c 00 00 00 .............. SPCR @ 0xbf7cacf4 0000: 53 50 43 52 50 00 00 00 01 a4 50 54 4c 54 44 20 SPCRP.....PTLTD 0010: 24 55 43 52 54 42 4c 24 00 00 06 00 50 54 4c 20 $UCRTBL$....PTL 0020: 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ DMAR @ 0xbf7cad44 0000: 44 4d 41 52 e8 00 00 00 01 34 49 6e 74 65 6c 20 DMAR.....4Intel 0010: 4f 45 4d 44 4d 41 52 20 00 00 06 00 4c 4f 48 52 OEMDMAR ....LOHR 0020: 01 00 00 00 26 01 00 00 00 00 00 00 00 00 00 00 ....&........... 0030: 00 00 20 00 01 00 00 00 00 40 d1 fe 00 00 00 00 .. ......@...... 0040: 03 08 00 00 08 f0 1f 07 03 08 00 00 09 00 13 00 ................ 0050: 01 00 58 00 00 00 00 00 00 f0 7d bf 00 00 00 00 ..X.......}..... 0060: ff ef 7e bf 00 00 00 00 01 08 00 00 00 00 1a 00 ..~............. 0070: 01 08 00 00 00 00 1a 01 01 08 00 00 00 00 1a 02 ................ 0080: 01 08 00 00 00 00 1a 07 01 08 00 00 00 00 1d 00 ................ 0090: 01 08 00 00 00 00 1d 01 01 08 00 00 00 00 1d 02 ................ 00a0: 01 08 00 00 00 00 1d 07 02 00 40 00 00 00 00 00 ..........@..... 00b0: 02 08 00 00 00 00 01 00 02 08 00 00 00 00 03 00 ................ 00c0: 02 08 00 00 00 00 05 00 02 08 00 00 00 00 07 00 ................ 00d0: 02 08 00 00 00 00 08 00 02 08 00 00 00 00 09 00 ................ 00e0: 02 08 00 00 00 00 0a 00 ........ MCFG @ 0xbf7cae2c 0000: 4d 43 46 47 3c 00 00 00 01 61 50 54 4c 54 44 20 MCFG<....aPTLTD 0010: 20 20 4d 43 46 47 20 20 00 00 06 00 20 4c 54 50 MCFG .... LTP 0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0 ................ 0030: 00 00 00 00 00 00 00 0a 00 00 00 00 ............ HPET @ 0xbf7cae68 0000: 48 50 45 54 38 00 00 00 01 2c 50 54 4c 54 44 20 HPET8....,PTLTD 0010: 48 50 45 54 54 42 4c 20 00 00 06 00 20 4c 54 50 HPETTBL .... LTP 0020: 01 00 00 00 01 a3 86 80 00 00 00 00 00 00 d0 fe ................ 0030: 00 00 00 00 00 00 00 00 ........ APIC @ 0xbf7caea0 0000: 41 50 49 43 38 01 00 00 01 49 50 54 4c 54 44 20 APIC8....IPTLTD 0010: 09 20 41 50 49 43 20 20 00 00 06 00 20 4c 54 50 . APIC .... LTP 0020: 00 00 00 00 00 00 e0 fe 01 00 00 00 00 08 00 00 ................ 0030: 01 00 00 00 00 08 01 02 01 00 00 00 00 08 02 04 ................ 0040: 01 00 00 00 00 08 03 06 01 00 00 00 00 08 04 10 ................ 0050: 01 00 00 00 00 08 05 12 01 00 00 00 00 08 06 14 ................ 0060: 01 00 00 00 00 08 07 16 01 00 00 00 00 08 08 01 ................ 0070: 01 00 00 00 00 08 09 03 01 00 00 00 00 08 0a 05 ................ 0080: 01 00 00 00 00 08 0b 07 01 00 00 00 00 08 0c 11 ................ 0090: 01 00 00 00 00 08 0d 13 01 00 00 00 00 08 0e 15 ................ 00a0: 01 00 00 00 00 08 0f 17 01 00 00 00 01 0c 08 00 ................ 00b0: 00 00 c0 fe 00 00 00 00 01 0c 09 00 00 00 c8 fe ................ 00c0: 18 00 00 00 04 06 00 05 00 01 04 06 01 05 00 01 ................ 00d0: 04 06 02 05 00 01 04 06 03 05 00 01 04 06 04 05 ................ 00e0: 00 01 04 06 05 05 00 01 04 06 06 05 00 01 04 06 ................ 00f0: 07 05 00 01 04 06 08 05 00 01 04 06 09 05 00 01 ................ 0100: 04 06 0a 05 00 01 04 06 0b 05 00 01 04 06 0c 05 ................ 0110: 00 01 04 06 0d 05 00 01 04 06 0e 05 00 01 04 06 ................ 0120: 0f 05 00 01 02 0a 00 00 02 00 00 00 05 00 02 0a ................ 0130: 00 09 09 00 00 00 0d 00 ........ BOOT @ 0xbf7cafd8 0000: 42 4f 4f 54 28 00 00 00 01 63 50 54 4c 54 44 20 BOOT(....cPTLTD 0010: 24 53 42 46 54 42 4c 24 00 00 06 00 20 4c 54 50 $SBFTBL$.... LTP 0020: 01 00 00 00 7c 00 00 00 ....|... RSDT @ 0xbf7c2d59 0000: 52 53 44 54 e0 00 00 00 01 4c 50 54 4c 54 44 20 RSDT.....LPTLTD 0010: 20 20 52 53 44 54 20 20 00 00 06 00 20 4c 54 50 RSDT .... LTP 0020: 00 00 00 00 79 78 7c bf f1 79 7c bf 23 7a 7c bf ....yx|..y|.#z|. 0030: 53 7a 7c bf 03 7c 7c bf 6b 7e 7c bf 9b 7e 7c bf Sz|..||.k~|..~|. 0040: 7c 7f 7c bf ec 81 7c bf 94 83 7c bf 6c 84 7c bf |.|...|...|.l.|. 0050: 44 85 7c bf 1c 86 7c bf f4 86 7c bf cc 87 7c bf D.|...|...|...|. 0060: a4 88 7c bf 7c 89 7c bf 54 8a 7c bf 2c 8b 7c bf ..|.|.|.T.|.,.|. 0070: 04 8c 7c bf dc 8c 7c bf b4 8d 7c bf 8c 8e 7c bf ..|...|...|...|. 0080: 64 8f 7c bf 3c 90 7c bf 14 91 7c bf d2 92 7c bf d.|.<.|...|...|. 0090: 90 94 7c bf 4e 96 7c bf 0c 98 7c bf ca 99 7c bf ..|.N.|...|...|. 00a0: 88 9b 7c bf 46 9d 7c bf 04 9f 7c bf c2 a0 7c bf ..|.F.|...|...|. 00b0: 80 a2 7c bf 3e a4 7c bf fc a5 7c bf ba a7 7c bf ..|.>.|...|...|. 00c0: 78 a9 7c bf 36 ab 7c bf f4 ac 7c bf 44 ad 7c bf x.|.6.|...|.D.|. 00d0: 2c ae 7c bf 68 ae 7c bf a0 ae 7c bf d8 af 7c bf ,.|.h.|...|...|. RSD PTR @ 0xf80f0 0000: 52 53 44 20 50 54 52 20 76 50 54 4c 54 44 20 02 RSD PTR vPTLTD . 0010: 59 2d 7c bf 24 00 00 00 39 2e 7c bf 00 00 00 00 Y-|.$...9.|..... 0020: 3a 00 00 00 :... From jhb at freebsd.org Thu Jun 4 16:30:54 2009 From: jhb at freebsd.org (John Baldwin) Date: Thu Jun 4 16:31:01 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <4A27D73D.1010703@ts.fujitsu.com> References: <4A24D29A.5030604@ts.fujitsu.com> <200906020811.35082.jhb@freebsd.org> <4A27D73D.1010703@ts.fujitsu.com> Message-ID: <200906041229.54888.jhb@freebsd.org> On Thursday 04 June 2009 10:16:29 am Josef Moellers wrote: > John Baldwin wrote: > > On Tuesday 02 June 2009 3:19:54 am Josef Moellers wrote: > > > >> Hi, > >> > >> (I've posted this to freebsd-questions before. Ian Smith redirected me > >> to this list). > >> > >> I'm trying to install 7.2-RELEASE on a pretty new system (a Fujitsu > >> RX300S5). > >> The first obstacle was the fact that while the system has an > >> AT-Keyboard-Controller, it ist not used (keyboard and mouse are > >> connected via USB) and I have found that I can get past that by specifying > >> > >> set hint.atkbd.0.disabled=1 > >> set hint.atkbdc.0.disabled=1 > >> > >> The install kernel then boots properly and reaches the "Country Selection". > >> At that point, no keyboard input is accepted. An optical mouse is off, > >> so I assume the USB power to be off. > >> > >> I have hooked up a serial connection to log the kernel's output (some > >> 1000+ lines): > >> > >> set boot_serial=1 > >> set boot_verbose=1 > >> set boot_multicons=1 > >> set console="comconsole vidconsole" > >> > >> The following lines make me wonder if the kernel fails to get past PCI > >> bridges and thus can't reach the UHCI controllers: > >> > >> pcib0: on acpi0 > >> pcib0: could not get PCI interrupt routing table for \_SB_.CPU0 - > >> AE_NOT_FOUND > >> : > >> pcib1: on acpi0 > >> pcib1: could not get PCI interrupt routing table for \_SB_.CPU1 - > >> AE_NOT_FOUND > >> : > >> pcib2: port 0xcf8-0xcff on acpi0 > >> pcib2: couldn't find _ADR > >> pcib2: trying bus number 2 > >> pci2: on pcib2 > >> pci2: domain=0, physical bus=2 > >> > >> I talked to the guy who does the BIOS for the machine and he says that > >> it makes no sense for the kernel to try and find the _PRT for \_SB_.CPU0 > >> or \_SB_.CPU1! > >> > > > > Can you get an acpidump? It seems that the BIOS has the wrong _HID for the > > CPU objects and has marked them as Host-PCI bridges instead. Although CPUs > > should be Processor objects and not Device objects anyway. Sounds like a > > very busted BIOS. > > > Does this help? Hmm, not quite. Can you do 'acpidump -d -t > foo' instead? -- John Baldwin From update+a2=690a6 at facebookmail.com Fri Jun 5 07:37:21 2009 From: update+a2=690a6 at facebookmail.com (Facebook) Date: Fri Jun 5 07:37:28 2009 Subject: Reminder: Maitri invited you to join Facebook... Message-ID: ======================================= To sign up for Facebook, follow the link below: http://www.facebook.com/r.php?re=23fdf64870728aaddc4995390f2953eb&mid=92c4b0G3c33d580G3a668fG46 ======================================= Hi Freebsd-acpi, The following person recently invited you to be their friend on Facebook: Maitri Karuna R Other people you may know on Facebook: Satya Hutama Christian Darmawan Yunita Wijaya (Purdue) Riezqy Prabudy (Indonesia) Ivon Christiany Sapatra Ade Adityawarman (Universitas Gadjah Mada) Facebook is a great place to keep in touch with friends, post photos, videos and create events. But first you need to join! Sign up today to create a profile and connect with the people you know. Thanks, The Facebook Team To sign up for Facebook, follow the link below: http://www.facebook.com/r.php?re=23fdf64870728aaddc4995390f2953eb&mid=92c4b0G3c33d580G3a668fG46 ======================================= This message was intended for freebsd-acpi@freebsd.org. If you do not wish to receive this type of email from Facebook in the future, please click on the link below to unsubscribe. http://www.facebook.com/o.php?c&k=282090&u=1010029952&mid=92c4b0G3c33d580G3a668fG46 Facebook's offices are located at 1601 S. California Ave., Palo Alto, CA 94304. From josef.moellers at ts.fujitsu.com Fri Jun 5 09:17:35 2009 From: josef.moellers at ts.fujitsu.com (Josef Moellers) Date: Fri Jun 5 09:17:45 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <200906041229.54888.jhb@freebsd.org> References: <4A24D29A.5030604@ts.fujitsu.com> <200906020811.35082.jhb@freebsd.org> <4A27D73D.1010703@ts.fujitsu.com> <200906041229.54888.jhb@freebsd.org> Message-ID: <4A28E2A5.9030107@ts.fujitsu.com> John Baldwin wrote: > On Thursday 04 June 2009 10:16:29 am Josef Moellers wrote: > >> John Baldwin wrote: >> >>> On Tuesday 02 June 2009 3:19:54 am Josef Moellers wrote: >>> >>> >>>> Hi, >>>> >>>> (I've posted this to freebsd-questions before. Ian Smith redirected me >>>> to this list). >>>> >>>> I'm trying to install 7.2-RELEASE on a pretty new system (a Fujitsu >>>> RX300S5). >>>> The first obstacle was the fact that while the system has an >>>> AT-Keyboard-Controller, it ist not used (keyboard and mouse are >>>> connected via USB) and I have found that I can get past that by >>>> > specifying > >>>> set hint.atkbd.0.disabled=1 >>>> set hint.atkbdc.0.disabled=1 >>>> >>>> The install kernel then boots properly and reaches the "Country >>>> > Selection". > >>>> At that point, no keyboard input is accepted. An optical mouse is off, >>>> so I assume the USB power to be off. >>>> >>>> I have hooked up a serial connection to log the kernel's output (some >>>> 1000+ lines): >>>> >>>> set boot_serial=1 >>>> set boot_verbose=1 >>>> set boot_multicons=1 >>>> set console="comconsole vidconsole" >>>> >>>> The following lines make me wonder if the kernel fails to get past PCI >>>> bridges and thus can't reach the UHCI controllers: >>>> >>>> pcib0: on acpi0 >>>> pcib0: could not get PCI interrupt routing table for \_SB_.CPU0 - >>>> AE_NOT_FOUND >>>> : >>>> pcib1: on acpi0 >>>> pcib1: could not get PCI interrupt routing table for \_SB_.CPU1 - >>>> AE_NOT_FOUND >>>> : >>>> pcib2: port 0xcf8-0xcff on acpi0 >>>> pcib2: couldn't find _ADR >>>> pcib2: trying bus number 2 >>>> pci2: on pcib2 >>>> pci2: domain=0, physical bus=2 >>>> >>>> I talked to the guy who does the BIOS for the machine and he says that >>>> it makes no sense for the kernel to try and find the _PRT for \_SB_.CPU0 >>>> or \_SB_.CPU1! >>>> >>>> >>> Can you get an acpidump? It seems that the BIOS has the wrong _HID for >>> > the > >>> CPU objects and has marked them as Host-PCI bridges instead. Although >>> > CPUs > >>> should be Processor objects and not Device objects anyway. Sounds like a >>> very busted BIOS. >>> >>> >> Does this help? >> > > Hmm, not quite. Can you do 'acpidump -d -t > foo' instead? > Difficult, since I can't boot properly. However, I have managed to get the dsdt using a SuSE Linux and have run that through acpidump -d on a 7.2 running on a XEN virtual machine. Here's the result. -- These are my personal views and not those of Fujitsu Technology Solutions! Josef M?llers (Pinguinpfleger bei FTS) If failure had no penalty success would not be a prize (T. Pratchett) Company Details: http://de.ts.fujitsu.com/imprint.html -------------- next part -------------- /* * Intel ACPI Component Architecture * AML Disassembler version 20070320 * * Disassembly of /tmp/acpidump.tvBS6J, Fri Jun 5 10:49:36 2009 * * * Original Table Header: * Signature "DSDT" * Length 0x000048A4 (18596) * Revision 0x01 * OEM ID "FSC " * OEM Table ID "D2619 " * OEM Revision 0x00060000 (393216) * Creator ID "MSFT" * Creator Revision 0x03000001 (50331649) */ DefinitionBlock ("/tmp/acpidump.aml", "DSDT", 1, "FSC ", "D2619 ", 0x00060000) { External (\_PR_.PR17._PSS) External (\_PR_.PR17._PPC) External (\_PR_.PR16._PSS) External (\_PR_.PR16._PPC) External (\_PR_.PR15._PSS) External (\_PR_.PR15._PPC) External (\_PR_.PR14._PSS) External (\_PR_.PR14._PPC) External (\_PR_.PR13._PSS) External (\_PR_.PR13._PPC) External (\_PR_.PR12._PSS) External (\_PR_.PR12._PPC) External (\_PR_.PR11._PSS) External (\_PR_.PR11._PPC) External (\_PR_.PR10._PSS) External (\_PR_.PR10._PPC) External (\_PR_.PR07._PSS) External (\_PR_.PR07._PPC) External (\_PR_.PR06._PSS) External (\_PR_.PR06._PPC) External (\_PR_.PR05._PSS) External (\_PR_.PR05._PPC) External (\_PR_.PR04._PSS) External (\_PR_.PR04._PPC) External (\_PR_.PR03._PSS) External (\_PR_.PR03._PPC) External (\_PR_.PR02._PSS) External (\_PR_.PR02._PPC) External (\_PR_.PR01._PSS) External (\_PR_.PR01._PPC) External (\_PR_.PR00._PSS) External (\_PR_.PR00._PPC) Scope (\) { Name (SUCA, 0x07) Name (MTYP, 0x00) Name (MARC, 0x00015F90) Name (MSMT, 0x03E8) Name (MINA, 0x07D0) Name (MAXA, 0x0FA0) Name (TPHM, 0xFFFFFFFF) Name (HLIC, Ones) Name (MICL, 0x0007A120) Name (MACL, 0x000AAE60) Name (PMMC, 0x000493E0) Name (HLMT, 0x000AAE60) Name (PAIC, 0x07D0) } Scope (\_SB) { Device (PSD) { Name (_HID, "ACPI0003") Name (_UID, 0x01) Name (_STA, 0x0F) Method (_PSR, 0, NotSerialized) { Return (0x01) } } Device (PMO) { Name (_HID, "ACPI000D") Name (_STA, 0x0F) Method (_PMC, 0, NotSerialized) { Name (PMCD, Package (0x0E) { SUCA, 0x00, MTYP, MARC, MSMT, MINA, MAXA, TPHM, HLIC, MICL, MACL, "Model Number", "Serial Number", "OEM Information" }) Return (PMCD) } Method (_PMD, 0, NotSerialized) { Return (Package (0x01) { "_SB" }) } Method (_PMM, 0, NotSerialized) { Return (PMMC) } Method (_PAI, 1, NotSerialized) { If (LOr (LGreater (Arg0, MAXA), LLess (Arg0, MINA))) { Return (0x01) } Store (Arg0, PAIC) Return (0x00) } Method (_GAI, 0, NotSerialized) { Return (PAIC) } Method (_PTP, 2, NotSerialized) { If (LOr (LGreater (PMMC, Arg0), LLess (PMMC, Arg1))) { Return (0x01) } Return (0x00) } Method (_GHL, 0, NotSerialized) { Return (HLMT) } Method (_SHL, 1, NotSerialized) { If (LOr (LGreater (Arg0, MACL), LLess (Arg0, MICL))) { Return (0x01) } Store (Arg0, HLMT) Return (0x00) } } } Name (C1EN, 0x01) Name (C2EN, 0x01) Name (SLPS, 0x00) Name (OSFL, 0x00) Name (PICM, 0x00) Method (OSCK, 0, NotSerialized) { Store (One, OSFL) Store (Zero, \_SB.PCI0.LPC.AAOF) If (STRC (\_OS, "Microsoft Windows")) { Store (Zero, OSFL) Store (One, \_SB.PCI0.LPC.AAOF) } If (STRC (\_OS, "Microsoft WindowsME: Millennium Edition")) { Store (Zero, OSFL) Store (0x02, \_SB.PCI0.LPC.AAOF) } If (CondRefOf (\_OSI, Local0)) { If (\_OSI ("Windows 2001")) { Store (0x03, \_SB.PCI0.LPC.AAOF) } If (\_OSI ("Windows 2006")) { Store (0x08, \_SB.PCI0.LPC.AAOF) } } } Method (STRC, 2, NotSerialized) { If (LNotEqual (SizeOf (Arg0), SizeOf (Arg1))) { Return (Zero) } Add (SizeOf (Arg0), One, Local0) Name (STR1, Buffer (Local0) {}) Store (Arg0, STR1) Name (STR2, Buffer (Local0) {}) Store (Arg1, STR2) While (Local0) { Decrement (Local0) If (LNotEqual (DerefOf (Index (STR1, Local0)), DerefOf (Index ( STR2, Local0)))) { Return (Zero) } } Return (One) } Method (_PIC, 1, NotSerialized) { Store (Arg0, PICM) } Name (_S0, Package (0x04) { 0x00, 0x00, 0x00, 0x00 }) Name (_S1, Package (0x04) { 0x01, 0x01, 0x00, 0x00 }) Name (_S4, Package (0x04) { 0x06, 0x06, 0x00, 0x00 }) Name (_S5, Package (0x04) { 0x07, 0x07, 0x00, 0x00 }) Method (\_PTS, 1, NotSerialized) { \_SB.PCI0.LPC.SIO2.SLEP (Arg0) If (LEqual (Arg0, 0x05)) { \_SB.PHSR (0x4B, 0x00, 0x00) } Store (Arg0, SLPS) } Method (\_WAK, 1, NotSerialized) { \_SB.PCI0.LPC.SIO2.WAKE (Arg0) Store (Zero, SLPS) If (LEqual (Arg0, 0x04)) { Notify (\_SB.PWRB, 0x02) Notify (\_SB.PCI0.USB1, 0x00) Notify (\_SB.PCI0.USB2, 0x00) Notify (\_SB.PCI0.USB3, 0x00) Notify (\_SB.PCI0.USB4, 0x00) Notify (\_SB.PCI0.USB5, 0x00) Notify (\_SB.PCI0.USB6, 0x00) Notify (\_SB.PCI0.USB7, 0x00) Notify (\_SB.PCI0.USB8, 0x00) } } Scope (\_PR) { Processor (PR00, 0x00, 0x00000000, 0x00) {} Processor (PR01, 0x08, 0x00000000, 0x00) {} Processor (PR02, 0x01, 0x00000000, 0x00) {} Processor (PR03, 0x09, 0x00000000, 0x00) {} Processor (PR04, 0x02, 0x00000000, 0x00) {} Processor (PR05, 0x0A, 0x00000000, 0x00) {} Processor (PR06, 0x03, 0x00000000, 0x00) {} Processor (PR07, 0x0B, 0x00000000, 0x00) {} Processor (PR10, 0x04, 0x00000000, 0x00) {} Processor (PR11, 0x0C, 0x00000000, 0x00) {} Processor (PR12, 0x05, 0x00000000, 0x00) {} Processor (PR13, 0x0D, 0x00000000, 0x00) {} Processor (PR14, 0x06, 0x00000000, 0x00) {} Processor (PR15, 0x0E, 0x00000000, 0x00) {} Processor (PR16, 0x07, 0x00000000, 0x00) {} Processor (PR17, 0x0F, 0x00000000, 0x00) {} } Scope (\_GPE) { Method (_L03, 0, NotSerialized) { Notify (\_SB.PCI0.USB1, 0x02) } Method (_L04, 0, NotSerialized) { Notify (\_SB.PCI0.USB2, 0x02) } Method (_L05, 0, NotSerialized) { Notify (\_SB.PCI0.USB5, 0x02) } Method (_L09, 0, NotSerialized) { While (\_SB.PCI0.PE1A.PS) { Store (One, \_SB.PCI0.PE1A.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE1A.PS)) { Notify (\_SB.PCI0.PE1A, 0x02) } } While (\_SB.PCI0.PE1A.PMCS) { Store (One, \_SB.PCI0.PE1A.PMCS) Sleep (0x0A) } While (\_SB.PCI0.PE1E.PS) { Store (One, \_SB.PCI0.PE1E.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE1E.PS)) { Notify (\_SB.PCI0.PE1E, 0x02) } } While (\_SB.PCI0.PE1E.PMCS) { Store (One, \_SB.PCI0.PE1E.PMCS) Sleep (0x0A) } While (\_SB.PCI0.PE0.PS) { Store (One, \_SB.PCI0.PE0.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE0.PS)) { Notify (\_SB.PCI0.PE0, 0x02) } } While (\_SB.PCI0.PE1.PS) { Store (One, \_SB.PCI0.PE1.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE1.PS)) { Notify (\_SB.PCI0.PE1, 0x02) } } While (\_SB.PCI0.PE3.PS) { Store (One, \_SB.PCI0.PE3.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE3.PS)) { Notify (\_SB.PCI0.PE3, 0x02) } } While (\_SB.PCI0.PE5.PS) { Store (One, \_SB.PCI0.PE5.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE5.PS)) { Notify (\_SB.PCI0.PE5, 0x02) } } While (\_SB.PCI0.PE7.PS) { Store (One, \_SB.PCI0.PE7.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE7.PS)) { Notify (\_SB.PCI0.PE7, 0x02) } } While (\_SB.PCI0.PE8.PS) { Store (One, \_SB.PCI0.PE8.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE8.PS)) { Notify (\_SB.PCI0.PE8, 0x02) } } While (\_SB.PCI0.PE9.PS) { Store (One, \_SB.PCI0.PE9.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE9.PS)) { Notify (\_SB.PCI0.PE9, 0x02) } } While (\_SB.PCI0.PE10.PS) { Store (One, \_SB.PCI0.PE10.PS) Sleep (0x0A) If (LNot (\_SB.PCI0.PE10.PS)) { Notify (\_SB.PCI0.PE10, 0x02) } } } Method (_L0C, 0, NotSerialized) { Notify (\_SB.PCI0.USB3, 0x02) } Method (_L0D, 0, NotSerialized) { Notify (\_SB.PCI0.USB7, 0x02) Notify (\_SB.PCI0.USB8, 0x02) } Method (_L0E, 0, NotSerialized) { Notify (\_SB.PCI0.USB4, 0x02) } Method (_L16, 0, NotSerialized) { \_SB.PCI0.LPC.KCS5.SIRS () } Method (_L18, 0, NotSerialized) { If (LAnd (\_SB.PCI0.LPC.SIO2.RI1S, \_SB.PCI0.LPC.SIO2.RI1E)) { Notify (\_SB.PWRB, 0x02) Notify (\_SB.PCI0.LPC.SIO2.COM1, 0x02) While (\_SB.PCI0.LPC.SIO2.RI1S) { Store (One, \_SB.PCI0.LPC.SIO2.RI1S) } } If (LAnd (\_SB.PCI0.LPC.SIO2.RI2S, \_SB.PCI0.LPC.SIO2.RI2E)) { Notify (\_SB.PWRB, 0x02) Notify (\_SB.PCI0.LPC.SIO2.COM2, 0x02) While (\_SB.PCI0.LPC.SIO2.RI2S) { Store (One, \_SB.PCI0.LPC.SIO2.RI2S) } } } Method (_L20, 0, NotSerialized) { Notify (\_SB.PCI0.USB6, 0x02) } } Scope (\_SI) { Method (_SST, 1, NotSerialized) { If (LEqual (Arg0, 0x01)) { SSIL (0x01, 0x00, 0x01) } If (LEqual (Arg0, 0x03)) { SSIL (0x01, 0x01, 0x01) } } Method (SSIL, 3, NotSerialized) { Store (Arg0, \_SB.PCI0.LPC.SSLE) Store (Arg1, \_SB.PCI0.LPC.SPLB) Store (Arg2, \_SB.PCI0.LPC.SPLE) } } Scope (\_SB) { OperationRegion (SMI0, SystemIO, 0x0000FE00, 0x00000002) Field (SMI0, AnyAcc, NoLock, Preserve) { SMIC, 8 } OperationRegion (SMI1, SystemMemory, 0xBF7CBEBC, 0x00000090) Field (SMI1, AnyAcc, NoLock, Preserve) { BCMD, 8, DID, 32, INFO, 1024 } OperationRegion (TCG1, SystemMemory, 0xBF7CBEB5, 0x0007) Field (TCG1, AnyAcc, NoLock, Preserve) { PPRQ, 8, PPLO, 8, PPRP, 8, PPOR, 8, TPRS, 8, TPMV, 8, MOR, 8 } Method (PHSR, 3, Serialized) { Store (Arg0, BCMD) Store (Arg1, DID) Store (Arg2, INFO) Store (Zero, SMIC) If (LEqual (BCMD, Arg0)) {} Store (Zero, BCMD) Store (Zero, DID) Return (0x00) } OperationRegion (PECF, SystemMemory, 0xE0000000, 0x00100000) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0x188), , 2, PME0, 1, Offset (0x18C), PEI0, 1, Offset (0x8188), , 2, PME1, 1, Offset (0x818C), PEI1, 1, Offset (0x18188), , 2, PME3, 1, Offset (0x1818C), PEI3, 1, Offset (0x28188), , 2, PME5, 1, Offset (0x2818C), PEI5, 1, Offset (0x38188), , 2, PME7, 1, Offset (0x3818C), PEI7, 1, Offset (0x40188), , 2, PME8, 1, Offset (0x4018C), PEI8, 1, Offset (0x48188), , 2, PME9, 1, Offset (0x4818C), PEI9, 1, Offset (0x50188), , 2, PMEA, 1, Offset (0x5018C), PEIA, 1 } Device (MCFG) { Name (_HID, EisaId ("PNP0C02")) Name (_UID, 0x02) Name (CRES, ResourceTemplate () { DWordMemory (ResourceConsumer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, // Granularity 0x00000000, // Range Minimum 0x00000000, // Range Maximum 0x00000000, // Translation Offset 0x00000000, // Length ,, _Y00, AddressRangeMemory, TypeStatic) }) Method (_CRS, 0, NotSerialized) { CreateDWordField (CRES, \_SB.MCFG._Y00._MIN, MINP) CreateDWordField (CRES, \_SB.MCFG._Y00._MAX, MAXP) CreateDWordField (CRES, \_SB.MCFG._Y00._LEN, LENP) If (LEqual (\_SB.CPU0.SAD.VID, 0x8086)) { ShiftLeft (\_SB.CPU0.SAD.CFGA, 0x14, MINP) If (LEqual (\_SB.CPU0.SAD.CFGS, 0x06)) { Store (0x04000000, LENP) } If (LEqual (\_SB.CPU0.SAD.CFGS, 0x07)) { Store (0x08000000, LENP) } If (LEqual (\_SB.CPU0.SAD.CFGS, 0x00)) { Store (0x10000000, LENP) } } Else { ShiftLeft (\_SB.CPU1.SAD.CFGA, 0x14, MINP) If (LEqual (\_SB.CPU1.SAD.CFGS, 0x06)) { Store (0x04000000, LENP) } If (LEqual (\_SB.CPU1.SAD.CFGS, 0x07)) { Store (0x08000000, LENP) } If (LEqual (\_SB.CPU1.SAD.CFGS, 0x00)) { Store (0x10000000, LENP) } } Add (MINP, LENP, MAXP) Decrement (MAXP) Return (CRES) } } Device (PWRB) { Name (_HID, EisaId ("PNP0C0C")) } Device (CPU0) { Name (_HID, EisaId ("PNP0A03")) Name (_UID, 0x01) Name (_BBN, 0xFF) Name (CRES, ResourceTemplate () { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 0x0000, // Granularity 0x00FF, // Range Minimum 0x00FF, // Range Maximum 0x0000, // Translation Offset 0x0001, // Length ,, ) }) Method (_CRS, 0, NotSerialized) { Return (CRES) } Device (SAD) { Name (_ADR, 0x01) Name (_STA, 0x0F) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { VID, 16, Offset (0x40), PAM0, 8, PAM1, 8, PAM2, 8, PAM3, 8, PAM4, 8, PAM5, 8, PAM6, 8, Offset (0x50), CFGE, 1, CFGS, 3, , 16, CFGA, 20 } } } Device (CPU1) { Name (_HID, EisaId ("PNP0A03")) Name (_UID, 0x02) Name (_BBN, 0xFE) Name (CRES, ResourceTemplate () { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 0x0000, // Granularity 0x00FE, // Range Minimum 0x00FE, // Range Maximum 0x0000, // Translation Offset 0x0001, // Length ,, ) }) Method (_CRS, 0, NotSerialized) { Return (CRES) } Device (SAD) { Name (_ADR, 0x01) Name (_STA, 0x0F) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { VID, 16, Offset (0x40), PAM0, 8, PAM1, 8, PAM2, 8, PAM3, 8, PAM4, 8, PAM5, 8, PAM6, 8, Offset (0x50), CFGE, 1, CFGS, 3, , 16, CFGA, 20 } } } Device (PCI0) { Name (_HID, EisaId ("PNP0A08")) Name (_CID, 0x030AD041) Name (_UID, 0x00) Name (_BBN, 0x00) Method (_INI, 0, NotSerialized) { \OSCK () } Name (CRES, ResourceTemplate () { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 0x0000, // Granularity 0x0000, // Range Minimum 0x003D, // Range Maximum 0x0000, // Translation Offset 0x003E, // Length ,, ) WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x0000, // Granularity 0x0000, // Range Minimum 0x0CF7, // Range Maximum 0x0000, // Translation Offset 0x0CF8, // Length ,, , TypeStatic) IO (Decode16, 0x0CF8, // Range Minimum 0x0CF8, // Range Maximum 0x01, // Alignment 0x08, // Length ) WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x0000, // Granularity 0x0D00, // Range Minimum 0xFFFF, // Range Maximum 0x0000, // Translation Offset 0xF300, // Length ,, , TypeStatic) DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, // Granularity 0x000A0000, // Range Minimum 0x000BFFFF, // Range Maximum 0x00000000, // Translation Offset 0x00020000, // Length ,, , AddressRangeMemory, TypeStatic) DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, // Granularity 0x000C8000, // Range Minimum 0x000DFFFF, // Range Maximum 0x00000000, // Translation Offset 0x00018000, // Length ,, , AddressRangeMemory, TypeStatic) DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0x00000000, // Granularity 0x00000000, // Range Minimum 0x00000000, // Range Maximum 0x00000000, // Translation Offset 0x00000000, // Length ,, _Y01, AddressRangeMemory, TypeStatic) DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0x00000000, // Granularity 0xF0000000, // Range Minimum 0xFEBFFFFF, // Range Maximum 0x00000000, // Translation Offset 0x0EC00000, // Length ,, , AddressRangeMemory, TypeStatic) DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0x00000000, // Granularity 0xFED00000, // Range Minimum 0xFEDFFFFF, // Range Maximum 0x00000000, // Translation Offset 0x00100000, // Length ,, , AddressRangeMemory, TypeStatic) DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0x00000000, // Granularity 0xFEF00000, // Range Minimum 0xFFBFFFFF, // Range Maximum 0x00000000, // Translation Offset 0x00D00000, // Length ,, , AddressRangeMemory, TypeStatic) }) Method (_CRS, 0, NotSerialized) { CreateDWordField (CRES, \_SB.PCI0._Y01._MIN, MIN1) CreateDWordField (CRES, \_SB.PCI0._Y01._MAX, MAX1) CreateDWordField (CRES, \_SB.PCI0._Y01._LEN, LEN1) Add (\_SB.PCI0.CORE.TOLM, 0x01, Local0) ShiftLeft (Local0, 0x1A, MIN1) If (LEqual (\_SB.CPU0.SAD.VID, 0x8086)) { ShiftLeft (\_SB.CPU0.SAD.CFGA, 0x14, MAX1) } Else { ShiftLeft (\_SB.CPU1.SAD.CFGA, 0x14, MAX1) } Decrement (MAX1) Subtract (MAX1, MIN1, LEN1) Increment (LEN1) Return (CRES) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x2D) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x0001FFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x0001FFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0x0001FFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x0001FFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x0003FFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x0003FFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0x0003FFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x0003FFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x0005FFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x0005FFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0x0005FFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x0005FFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x0007FFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x0007FFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0x0007FFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x0007FFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x0008FFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x0008FFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0x0008FFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x0008FFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x0009FFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x0009FFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0x0009FFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x0009FFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x000AFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x000AFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0x000AFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x000AFFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x0016FFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x0016FFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0x0016FFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x0016FFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x001AFFFF, 0x00, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x001AFFFF, 0x01, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x001AFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x001CFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x001CFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0x001CFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0x001CFFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 }, Package (0x04) { 0x001DFFFF, 0x00, \_SB.PCI0.LPC.LNKH, 0x00 }, Package (0x04) { 0x001DFFFF, 0x01, \_SB.PCI0.LPC.LNKG, 0x00 }, Package (0x04) { 0x001DFFFF, 0x02, \_SB.PCI0.LPC.LNKF, 0x00 }, Package (0x04) { 0x001FFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0x001FFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 } }) } Else { Return (Package (0x2D) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x2F }, Package (0x04) { 0x0001FFFF, 0x00, 0x00, 0x1C }, Package (0x04) { 0x0001FFFF, 0x01, 0x00, 0x28 }, Package (0x04) { 0x0001FFFF, 0x02, 0x00, 0x29 }, Package (0x04) { 0x0001FFFF, 0x03, 0x00, 0x2F }, Package (0x04) { 0x0003FFFF, 0x00, 0x00, 0x18 }, Package (0x04) { 0x0003FFFF, 0x01, 0x00, 0x22 }, Package (0x04) { 0x0003FFFF, 0x02, 0x00, 0x23 }, Package (0x04) { 0x0003FFFF, 0x03, 0x00, 0x24 }, Package (0x04) { 0x0005FFFF, 0x00, 0x00, 0x1A }, Package (0x04) { 0x0005FFFF, 0x01, 0x00, 0x19 }, Package (0x04) { 0x0005FFFF, 0x02, 0x00, 0x1B }, Package (0x04) { 0x0005FFFF, 0x03, 0x00, 0x1D }, Package (0x04) { 0x0007FFFF, 0x00, 0x00, 0x1E }, Package (0x04) { 0x0007FFFF, 0x01, 0x00, 0x25 }, Package (0x04) { 0x0007FFFF, 0x02, 0x00, 0x27 }, Package (0x04) { 0x0007FFFF, 0x03, 0x00, 0x26 }, Package (0x04) { 0x0008FFFF, 0x00, 0x00, 0x1F }, Package (0x04) { 0x0008FFFF, 0x01, 0x00, 0x27 }, Package (0x04) { 0x0008FFFF, 0x02, 0x00, 0x26 }, Package (0x04) { 0x0008FFFF, 0x03, 0x00, 0x25 }, Package (0x04) { 0x0009FFFF, 0x00, 0x00, 0x20 }, Package (0x04) { 0x0009FFFF, 0x01, 0x00, 0x2A }, Package (0x04) { 0x0009FFFF, 0x02, 0x00, 0x2F }, Package (0x04) { 0x0009FFFF, 0x03, 0x00, 0x29 }, Package (0x04) { 0x000AFFFF, 0x00, 0x00, 0x21 }, Package (0x04) { 0x000AFFFF, 0x01, 0x00, 0x1F }, Package (0x04) { 0x000AFFFF, 0x02, 0x00, 0x2E }, Package (0x04) { 0x000AFFFF, 0x03, 0x00, 0x2D }, Package (0x04) { 0x0016FFFF, 0x00, 0x00, 0x2B }, Package (0x04) { 0x0016FFFF, 0x01, 0x00, 0x2C }, Package (0x04) { 0x0016FFFF, 0x02, 0x00, 0x2D }, Package (0x04) { 0x0016FFFF, 0x03, 0x00, 0x2E }, Package (0x04) { 0x001AFFFF, 0x00, 0x00, 0x13 }, Package (0x04) { 0x001AFFFF, 0x01, 0x00, 0x12 }, Package (0x04) { 0x001AFFFF, 0x02, 0x00, 0x12 }, Package (0x04) { 0x001CFFFF, 0x00, 0x00, 0x10 }, Package (0x04) { 0x001CFFFF, 0x01, 0x00, 0x11 }, Package (0x04) { 0x001CFFFF, 0x02, 0x00, 0x12 }, Package (0x04) { 0x001CFFFF, 0x03, 0x00, 0x13 }, Package (0x04) { 0x001DFFFF, 0x00, 0x00, 0x17 }, Package (0x04) { 0x001DFFFF, 0x01, 0x00, 0x16 }, Package (0x04) { 0x001DFFFF, 0x02, 0x00, 0x15 }, Package (0x04) { 0x001FFFFF, 0x00, 0x00, 0x10 }, Package (0x04) { 0x001FFFFF, 0x01, 0x00, 0x11 } }) } } Device (PE0) { Name (_ADR, 0x00) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0xAC), , 3, PIE, 1, Offset (0xB0), Offset (0xB2), PS, 1 } Method (_INI, 0, NotSerialized) { Store (One, \_SB.PME0) Store (One, \_SB.PEI0) Store (Zero, PIE) } } Device (PE1) { Name (_ADR, 0x00010000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0xAC), , 3, PIE, 1, Offset (0xB0), Offset (0xB2), PS, 1 } Method (_INI, 0, NotSerialized) { Store (One, \_SB.PME1) Store (One, \_SB.PEI1) Store (Zero, PIE) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0xFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0xFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0xFFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 } }) } Else { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x1C }, Package (0x04) { 0xFFFF, 0x01, 0x00, 0x28 }, Package (0x04) { 0xFFFF, 0x02, 0x00, 0x29 }, Package (0x04) { 0xFFFF, 0x03, 0x00, 0x2F } }) } } Device (SLT1) { Name (_ADR, 0xFFFF) Name (_SUN, 0x01) } } Device (PE3) { Name (_ADR, 0x00030000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0xAC), , 3, PIE, 1, Offset (0xB0), Offset (0xB2), PS, 1 } Method (_INI, 0, NotSerialized) { Store (One, \_SB.PME3) Store (One, \_SB.PEI3) Store (Zero, PIE) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0xFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0xFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0xFFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 } }) } Else { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x18 }, Package (0x04) { 0xFFFF, 0x01, 0x00, 0x22 }, Package (0x04) { 0xFFFF, 0x02, 0x00, 0x23 }, Package (0x04) { 0xFFFF, 0x03, 0x00, 0x24 } }) } } Device (SLT7) { Name (_ADR, 0xFFFF) Name (_SUN, 0x07) } } Device (PE5) { Name (_ADR, 0x00050000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0xAC), , 3, PIE, 1, Offset (0xB0), Offset (0xB2), PS, 1 } Method (_INI, 0, NotSerialized) { Store (One, \_SB.PME5) Store (One, \_SB.PEI5) Store (Zero, PIE) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0xFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0xFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0xFFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 } }) } Else { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x1A }, Package (0x04) { 0xFFFF, 0x01, 0x00, 0x19 }, Package (0x04) { 0xFFFF, 0x02, 0x00, 0x1B }, Package (0x04) { 0xFFFF, 0x03, 0x00, 0x1D } }) } } Device (SLT6) { Name (_ADR, 0xFFFF) Name (_SUN, 0x06) } } Device (PE7) { Name (_ADR, 0x00070000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0xAC), , 3, PIE, 1, Offset (0xB0), Offset (0xB2), PS, 1 } Method (_INI, 0, NotSerialized) { Store (One, \_SB.PME7) Store (One, \_SB.PEI7) Store (Zero, PIE) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0xFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0xFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0xFFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 } }) } Else { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x1E }, Package (0x04) { 0xFFFF, 0x01, 0x00, 0x25 }, Package (0x04) { 0xFFFF, 0x02, 0x00, 0x27 }, Package (0x04) { 0xFFFF, 0x03, 0x00, 0x26 } }) } } Device (SLT5) { Name (_ADR, 0xFFFF) Name (_SUN, 0x05) } } Device (PE8) { Name (_ADR, 0x00080000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0xAC), , 3, PIE, 1, Offset (0xB0), Offset (0xB2), PS, 1 } Method (_INI, 0, NotSerialized) { Store (One, \_SB.PME8) Store (One, \_SB.PEI8) Store (Zero, PIE) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0xFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0xFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0xFFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 } }) } Else { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x1F }, Package (0x04) { 0xFFFF, 0x01, 0x00, 0x27 }, Package (0x04) { 0xFFFF, 0x02, 0x00, 0x26 }, Package (0x04) { 0xFFFF, 0x03, 0x00, 0x25 } }) } } Device (SLT4) { Name (_ADR, 0xFFFF) Name (_SUN, 0x04) } } Device (PE9) { Name (_ADR, 0x00090000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0xAC), , 3, PIE, 1, Offset (0xB0), Offset (0xB2), PS, 1 } Method (_INI, 0, NotSerialized) { Store (One, \_SB.PME9) Store (One, \_SB.PEI9) Store (Zero, PIE) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0xFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0xFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0xFFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 } }) } Else { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x20 }, Package (0x04) { 0xFFFF, 0x01, 0x00, 0x2A }, Package (0x04) { 0xFFFF, 0x02, 0x00, 0x2F }, Package (0x04) { 0xFFFF, 0x03, 0x00, 0x29 } }) } } Device (SLT3) { Name (_ADR, 0xFFFF) Name (_SUN, 0x03) } } Device (PE10) { Name (_ADR, 0x000A0000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0xAC), , 3, PIE, 1, Offset (0xB0), Offset (0xB2), PS, 1 } Method (_INI, 0, NotSerialized) { Store (One, \_SB.PMEA) Store (One, \_SB.PEIA) Store (Zero, PIE) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0xFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 }, Package (0x04) { 0xFFFF, 0x02, \_SB.PCI0.LPC.LNKC, 0x00 }, Package (0x04) { 0xFFFF, 0x03, \_SB.PCI0.LPC.LNKD, 0x00 } }) } Else { Return (Package (0x04) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x21 }, Package (0x04) { 0xFFFF, 0x01, 0x00, 0x1F }, Package (0x04) { 0xFFFF, 0x02, 0x00, 0x2E }, Package (0x04) { 0xFFFF, 0x03, 0x00, 0x2D } }) } } Device (SLT2) { Name (_ADR, 0xFFFF) Name (_SUN, 0x02) } } Device (CORE) { Name (_ADR, 0x00140000) Name (_STA, 0x0F) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0xD0), , 26, TOLM, 6 } } Device (PE1A) { Name (_ADR, 0x001C0000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0x5C), , 3, PIE, 1, Offset (0x60), Offset (0x62), PS, 1, Offset (0xD8), , 31, PMCE, 1, , 31, PMCS, 1 } Method (_INI, 0, NotSerialized) { Store (One, PMCE) Store (Zero, PIE) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x02) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 }, Package (0x04) { 0xFFFF, 0x01, \_SB.PCI0.LPC.LNKB, 0x00 } }) } Else { Return (Package (0x02) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x10 }, Package (0x04) { 0xFFFF, 0x01, 0x00, 0x11 } }) } } Device (LAN1) { Name (_ADR, 0x00) Name (_STA, 0x0F) } Device (LAN2) { Name (_ADR, 0x01) Name (_STA, 0x0F) } } Device (PE1E) { Name (_ADR, 0x001C0004) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x09, 0x04 }) OperationRegion (PECF, PCI_Config, 0x00, 0x0100) Field (PECF, DWordAcc, NoLock, Preserve) { Offset (0x5C), , 3, PIE, 1, Offset (0x60), Offset (0x62), PS, 1, Offset (0xD8), , 31, PMCE, 1, , 31, PMCS, 1 } Method (_INI, 0, NotSerialized) { Store (One, PMCE) Store (Zero, PIE) } Method (_PRT, 0, NotSerialized) { If (LEqual (PICM, 0x00)) { Return (Package (0x01) { Package (0x04) { 0xFFFF, 0x00, \_SB.PCI0.LPC.LNKA, 0x00 } }) } Else { Return (Package (0x01) { Package (0x04) { 0xFFFF, 0x00, 0x00, 0x10 } }) } } Device (VGA) { Name (_ADR, 0x00) Name (_STA, 0x0F) } } Device (USB1) { Name (_ADR, 0x001D0000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x03, 0x01 }) OperationRegion (RES1, PCI_Config, 0xC4, 0x01) Field (RES1, AnyAcc, NoLock, Preserve) { P0E1, 1, P1E1, 1 } Method (_PSW, 1, NotSerialized) { Store (Arg0, P0E1) Store (Arg0, P1E1) } } Device (USB2) { Name (_ADR, 0x001D0001) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x04, 0x01 }) OperationRegion (RES1, PCI_Config, 0xC4, 0x01) Field (RES1, AnyAcc, NoLock, Preserve) { P0E1, 1, P1E1, 1 } Method (_PSW, 1, NotSerialized) { Store (Arg0, P0E1) Store (Arg0, P1E1) } } Device (USB3) { Name (_ADR, 0x001D0002) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x0C, 0x01 }) OperationRegion (RES1, PCI_Config, 0xC4, 0x01) Field (RES1, AnyAcc, NoLock, Preserve) { P0E1, 1, P1E1, 1 } Method (_PSW, 1, NotSerialized) { Store (Arg0, P0E1) Store (Arg0, P1E1) } } Device (USB4) { Name (_ADR, 0x001A0000) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x0E, 0x01 }) OperationRegion (RES1, PCI_Config, 0xC4, 0x01) Field (RES1, AnyAcc, NoLock, Preserve) { P0E1, 1, P1E1, 1 } Method (_PSW, 1, NotSerialized) { Store (Arg0, P0E1) Store (Arg0, P1E1) } } Device (USB5) { Name (_ADR, 0x001A0001) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x05, 0x01 }) OperationRegion (RES1, PCI_Config, 0xC4, 0x01) Field (RES1, AnyAcc, NoLock, Preserve) { P0E1, 1, P1E1, 1 } Method (_PSW, 1, NotSerialized) { Store (Arg0, P0E1) Store (Arg0, P1E1) } } Device (USB6) { Name (_ADR, 0x001A0002) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x20, 0x01 }) OperationRegion (RES1, PCI_Config, 0xC4, 0x01) Field (RES1, AnyAcc, NoLock, Preserve) { P0E1, 1, P1E1, 1 } Method (_PSW, 1, NotSerialized) { Store (Arg0, P0E1) Store (Arg0, P1E1) } } Device (USB7) { Name (_ADR, 0x001D0007) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x0D, 0x01 }) } Device (USB8) { Name (_ADR, 0x001A0007) Name (_STA, 0x0F) Name (_PRW, Package (0x02) { 0x0D, 0x01 }) } Device (PCIH) { Name (_ADR, 0x001E0000) Name (_STA, 0x0F) Name (NATA, Package (0x02) { 0x001F0002, 0x001F0005 }) } Device (ATA1) { Name (_ADR, 0x001F0002) Name (_STA, 0x0F) } Device (ATA2) { Name (_ADR, 0x001F0005) Name (_STA, 0x0F) } Device (PM) { Name (_ADR, 0x001F0003) Name (_STA, 0x0F) } Device (LPC) { Name (_ADR, 0x001F0000) Name (_STA, 0x0F) OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C) Field (PIRQ, ByteAcc, NoLock, Preserve) { PIRA, 8, PIRB, 8, PIRC, 8, PIRD, 8, Offset (0x08), PIRE, 8, PIRF, 8, PIRG, 8, PIRH, 8 } OperationRegion (DCOD, PCI_Config, 0x80, 0x10) Field (DCOD, ByteAcc, NoLock, Preserve) { COMA, 3, , 1, COMB, 3, Offset (0x02), CMAE, 1, CMBE, 1, Offset (0x04), GDR1, 16 } OperationRegion (GPIO, SystemIO, 0x1180, 0x80) Field (GPIO, AnyAcc, NoLock, Preserve) { Offset (0x0C), , 14, SSLE, 1, , 4, SPLE, 1, Offset (0x18), , 19, SPLB, 1 } OperationRegion (CMSI, SystemIO, 0x72, 0x02) Field (CMSI, ByteAcc, NoLock, Preserve) { INDX, 8, DATA, 8 } IndexField (INDX, DATA, ByteAcc, NoLock, Preserve) { Offset (0x7E), AAOF, 4 } Method (DCR1, 1, NotSerialized) { Store (GDR1, Local0) Store (Arg0, GDR1) Return (Local0) } Device (TPM) { OperationRegion (TPMC, SystemMemory, 0xFED40000, 0x5000) Field (TPMC, ByteAcc, NoLock, Preserve) { Offset (0xF00), TIID, 32 } Name (_HID, EisaId ("IFX0102")) Method (_STA, 0, NotSerialized) { If (LEqual (TIID, 0x000B15D1)) { Store (0x0F, Local0) } Else { Store (0x00, Local0) } Return (Local0) } Name (_UID, 0x01) Name (_CID, 0x310CD041) Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, 0xFED40000, // Address Base 0x00005000, // Address Length ) }) Method (UCMP, 2, NotSerialized) { If (LNotEqual (0x10, SizeOf (Arg0))) { Return (0x00) } If (LNotEqual (0x10, SizeOf (Arg1))) { Return (0x00) } Store (0x00, Local0) While (LLess (Local0, 0x10)) { If (LNotEqual (DerefOf (Index (Arg0, Local0)), DerefOf (Index ( Arg1, Local0)))) { Return (0x00) } Increment (Local0) } Return (0x01) } Method (_DSM, 4, NotSerialized) { If (LEqual (UCMP (Arg0, Buffer (0x10) { /* 0000 */ 0xA6, 0xFA, 0xDD, 0x3D, 0x1B, 0x36, 0xB4, 0x4E, /* 0008 */ 0xA4, 0x24, 0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53 }), 0x01)) { If (LEqual (Arg2, 0x00)) { Return (Buffer (0x01) { 0x7F }) } If (LEqual (Arg2, 0x01)) { Return (Buffer (0x04) { "1.0" }) } If (LEqual (Arg2, 0x02)) { If (TPRS) { Store (DerefOf (Index (Arg3, 0x00)), PPRQ) If (LOr (LOr (LGreater (PPLO, 0x0E), LEqual (PPLO, 0x0C)), LEqual ( PPLO, 0x0D))) { Store (0x00, PPRQ) Return (0x01) } Return (0x00) } Return (0x01) } If (LEqual (Arg2, 0x03)) { Name (TMP1, Package (0x02) { 0x00, 0xFFFFFFFF }) Store (PPRQ, Index (TMP1, 0x01)) Return (TMP1) } If (LEqual (Arg2, 0x04)) { Return (0x01) } If (LEqual (Arg2, 0x05)) { Name (TMP2, Package (0x03) { 0x00, 0xFFFFFFFF, 0xFFFFFFFF }) Store (PPLO, Index (TMP2, 0x01)) If (LOr (LOr (LGreater (PPLO, 0x0E), LEqual (PPLO, 0x0C)), LEqual ( PPLO, 0x0D))) { Store (0xFFFFFFF1, Index (TMP2, 0x02)) Return (TMP2) } If (LEqual (PPRP, 0xFF)) { Store (0xFFFFFFF1, Index (TMP2, 0x02)) Return (TMP2) } If (PPOR) { Store (0xFFFFFFF0, Index (TMP2, 0x02)) Return (TMP2) } Store (PPRP, Index (TMP2, 0x02)) Return (TMP2) } If (LEqual (Arg2, 0x06)) { Return (0x01) } Return (0x01) } If (LEqual (UCMP (Arg0, Buffer (0x10) { /* 0000 */ 0xED, 0x54, 0x60, 0x37, 0x13, 0xCC, 0x75, 0x46, /* 0008 */ 0x90, 0x1C, 0x47, 0x56, 0xD7, 0xF2, 0xD4, 0x5D }), 0x01)) { If (LEqual (Arg2, 0x00)) { Return (Buffer (0x01) { 0x01 }) } If (LEqual (Arg2, 0x01)) { If (LEqual (DerefOf (Index (Arg3, 0x00)), 0x00)) { Store (0x00, \_SB.MOR) Return (0x00) } If (LEqual (DerefOf (Index (Arg3, 0x00)), 0x01)) { Store (0x01, \_SB.MOR) Return (0x00) } } Return (0x01) } Return (Buffer (0x01) { 0x00 }) } } Device (LNKA) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x01) Method (_STA, 0, NotSerialized) { If (LLess (PIRA, 0x80)) { Return (0x0B) } Else { Return (0x09) } } Name (_PRS, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, ) {3,4,5,6,7,9,10,11,12,14,15} }) Method (_DIS, 0, NotSerialized) { Or (PIRA, 0x80, PIRA) } Method (_CRS, 0, NotSerialized) { Name (BUFF, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, _Y02) {} }) CreateWordField (BUFF, \_SB.PCI0.LPC.LNKA._CRS._Y02._INT, INTA) Store (Zero, INTA) If (LLess (PIRA, 0x80)) { And (PIRA, 0x0F, Local0) ShiftLeft (One, Local0, INTA) } Return (BUFF) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, INTA) FindSetRightBit (INTA, Local0) If (LNotEqual (Local0, Zero)) { Decrement (Local0) } Or (Local0, And (PIRA, 0x70), PIRA) } } Device (LNKB) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x02) Method (_STA, 0, NotSerialized) { If (LLess (PIRB, 0x80)) { Return (0x0B) } Else { Return (0x09) } } Name (_PRS, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, ) {3,4,5,6,7,9,10,11,12,14,15} }) Method (_DIS, 0, NotSerialized) { Or (PIRB, 0x80, PIRB) } Method (_CRS, 0, NotSerialized) { Name (BUFF, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, _Y03) {} }) CreateWordField (BUFF, \_SB.PCI0.LPC.LNKB._CRS._Y03._INT, INTB) Store (Zero, INTB) If (LLess (PIRB, 0x80)) { And (PIRB, 0x0F, Local0) ShiftLeft (One, Local0, INTB) } Return (BUFF) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, INTB) FindSetRightBit (INTB, Local0) If (LNotEqual (Local0, Zero)) { Decrement (Local0) } Or (Local0, And (PIRB, 0x70), PIRB) } } Device (LNKC) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x03) Method (_STA, 0, NotSerialized) { If (LLess (PIRC, 0x80)) { Return (0x0B) } Else { Return (0x09) } } Name (_PRS, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, ) {3,4,5,6,7,9,10,11,12,14,15} }) Method (_DIS, 0, NotSerialized) { Or (PIRC, 0x80, PIRC) } Method (_CRS, 0, NotSerialized) { Name (BUFF, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, _Y04) {} }) CreateWordField (BUFF, \_SB.PCI0.LPC.LNKC._CRS._Y04._INT, INTC) Store (Zero, INTC) If (LLess (PIRC, 0x80)) { And (PIRC, 0x0F, Local0) ShiftLeft (One, Local0, INTC) } Return (BUFF) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, INTC) FindSetRightBit (INTC, Local0) If (LNotEqual (Local0, Zero)) { Decrement (Local0) } Or (Local0, And (PIRC, 0x70), PIRC) } } Device (LNKD) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x04) Method (_STA, 0, NotSerialized) { If (LLess (PIRD, 0x80)) { Return (0x0B) } Else { Return (0x09) } } Name (_PRS, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, ) {3,4,5,6,7,9,10,11,12,14,15} }) Method (_DIS, 0, NotSerialized) { Or (PIRD, 0x80, PIRD) } Method (_CRS, 0, NotSerialized) { Name (BUFF, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, _Y05) {} }) CreateWordField (BUFF, \_SB.PCI0.LPC.LNKD._CRS._Y05._INT, INTD) Store (Zero, INTD) If (LLess (PIRD, 0x80)) { And (PIRD, 0x0F, Local0) ShiftLeft (One, Local0, INTD) } Return (BUFF) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, INTD) FindSetRightBit (INTD, Local0) If (LNotEqual (Local0, Zero)) { Decrement (Local0) } Or (Local0, And (PIRD, 0x70), PIRD) } } Device (LNKE) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x05) Method (_STA, 0, NotSerialized) { If (LLess (PIRE, 0x80)) { Return (0x0B) } Else { Return (0x09) } } Name (_PRS, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, ) {3,4,5,6,7,9,10,11,12,14,15} }) Method (_DIS, 0, NotSerialized) { Or (PIRE, 0x80, PIRE) } Method (_CRS, 0, NotSerialized) { Name (BUFF, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, _Y06) {} }) CreateWordField (BUFF, \_SB.PCI0.LPC.LNKE._CRS._Y06._INT, INTE) Store (Zero, INTE) If (LLess (PIRE, 0x80)) { And (PIRE, 0x0F, Local0) ShiftLeft (One, Local0, INTE) } Return (BUFF) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, INTE) FindSetRightBit (INTE, Local0) If (LNotEqual (Local0, Zero)) { Decrement (Local0) } Or (Local0, And (PIRE, 0x70), PIRE) } } Device (LNKF) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x06) Method (_STA, 0, NotSerialized) { If (LLess (PIRF, 0x80)) { Return (0x0B) } Else { Return (0x09) } } Name (_PRS, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, ) {3,4,5,6,7,9,10,11,12,14,15} }) Method (_DIS, 0, NotSerialized) { Or (PIRF, 0x80, PIRF) } Method (_CRS, 0, NotSerialized) { Name (BUFF, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, _Y07) {} }) CreateWordField (BUFF, \_SB.PCI0.LPC.LNKF._CRS._Y07._INT, INTF) Store (Zero, INTF) If (LLess (PIRF, 0x80)) { And (PIRF, 0x0F, Local0) ShiftLeft (One, Local0, INTF) } Return (BUFF) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, INTF) FindSetRightBit (INTF, Local0) If (LNotEqual (Local0, Zero)) { Decrement (Local0) } Or (Local0, And (PIRF, 0x70), PIRF) } } Device (LNKG) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x07) Method (_STA, 0, NotSerialized) { If (LLess (PIRG, 0x80)) { Return (0x0B) } Else { Return (0x09) } } Name (_PRS, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, ) {3,4,5,6,7,9,10,11,12,14,15} }) Method (_DIS, 0, NotSerialized) { Or (PIRG, 0x80, PIRG) } Method (_CRS, 0, NotSerialized) { Name (BUFF, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, _Y08) {} }) CreateWordField (BUFF, \_SB.PCI0.LPC.LNKG._CRS._Y08._INT, INTG) Store (Zero, INTG) If (LLess (PIRG, 0x80)) { And (PIRG, 0x0F, Local0) ShiftLeft (One, Local0, INTG) } Return (BUFF) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, INTG) FindSetRightBit (INTG, Local0) If (LNotEqual (Local0, Zero)) { Decrement (Local0) } Or (Local0, And (PIRG, 0x70), PIRG) } } Device (LNKH) { Name (_HID, EisaId ("PNP0C0F")) Name (_UID, 0x08) Method (_STA, 0, NotSerialized) { If (LLess (PIRH, 0x80)) { Return (0x0B) } Else { Return (0x09) } } Name (_PRS, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, ) {3,4,5,6,7,9,10,11,12,14,15} }) Method (_DIS, 0, NotSerialized) { Or (PIRH, 0x80, PIRH) } Method (_CRS, 0, NotSerialized) { Name (BUFF, ResourceTemplate () { IRQ (Level, ActiveLow, Shared, _Y09) {} }) CreateWordField (BUFF, \_SB.PCI0.LPC.LNKH._CRS._Y09._INT, INTH) Store (Zero, INTH) If (LLess (PIRH, 0x80)) { And (PIRH, 0x0F, Local0) ShiftLeft (One, Local0, INTH) } Return (BUFF) } Method (_SRS, 1, NotSerialized) { CreateWordField (Arg0, 0x01, INTH) FindSetRightBit (INTH, Local0) If (LNotEqual (Local0, Zero)) { Decrement (Local0) } Or (Local0, And (PIRH, 0x70), PIRH) } } Device (MBRD) { Name (_HID, EisaId ("PNP0C02")) Name (_UID, 0x01) Name (_STA, 0x0F) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0010, // Range Minimum 0x0010, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x0022, // Range Minimum 0x0022, // Range Maximum 0x01, // Alignment 0x0C, // Length ) IO (Decode16, 0x002E, // Range Minimum 0x002E, // Range Maximum 0x01, // Alignment 0x02, // Length ) IO (Decode16, 0x0030, // Range Minimum 0x0030, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x004E, // Range Minimum 0x004E, // Range Maximum 0x01, // Alignment 0x02, // Length ) IO (Decode16, 0x0050, // Range Minimum 0x0050, // Range Maximum 0x01, // Alignment 0x04, // Length ) IO (Decode16, 0x0060, // Range Minimum 0x0060, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x0072, // Range Minimum 0x0072, // Range Maximum 0x01, // Alignment 0x02, // Length ) IO (Decode16, 0x0074, // Range Minimum 0x0074, // Range Maximum 0x01, // Alignment 0x0C, // Length ) IO (Decode16, 0x0090, // Range Minimum 0x0090, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x00A2, // Range Minimum 0x00A2, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x00B2, // Range Minimum 0x00B2, // Range Maximum 0x01, // Alignment 0x02, // Length ) IO (Decode16, 0x00B4, // Range Minimum 0x00B4, // Range Maximum 0x01, // Alignment 0x0C, // Length ) IO (Decode16, 0x00E0, // Range Minimum 0x00E0, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x0200, // Range Minimum 0x0200, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x04D0, // Range Minimum 0x04D0, // Range Maximum 0x01, // Alignment 0x02, // Length ) IO (Decode16, 0x0500, // Range Minimum 0x0500, // Range Maximum 0x01, // Alignment 0x80, // Length ) IO (Decode16, 0x0800, // Range Minimum 0x0800, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x0810, // Range Minimum 0x0810, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x0CA0, // Range Minimum 0x0CA0, // Range Maximum 0x01, // Alignment 0x02, // Length ) IO (Decode16, 0x0CA4, // Range Minimum 0x0CA4, // Range Maximum 0x01, // Alignment 0x04, // Length ) IO (Decode16, 0x0CA8, // Range Minimum 0x0CA8, // Range Maximum 0x01, // Alignment 0x04, // Length ) IO (Decode16, 0x0CAE, // Range Minimum 0x0CAE, // Range Maximum 0x01, // Alignment 0x02, // Length ) IO (Decode16, 0x0E00, // Range Minimum 0x0E00, // Range Maximum 0x01, // Alignment 0x80, // Length ) IO (Decode16, 0x1000, // Range Minimum 0x1000, // Range Maximum 0x01, // Alignment 0x80, // Length ) IO (Decode16, 0x1100, // Range Minimum 0x1100, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x1180, // Range Minimum 0x1180, // Range Maximum 0x01, // Alignment 0x80, // Length ) IO (Decode16, 0xFE00, // Range Minimum 0xFE00, // Range Maximum 0x01, // Alignment 0x01, // Length ) IO (Decode16, 0xFF00, // Range Minimum 0xFF00, // Range Maximum 0x01, // Alignment 0x01, // Length ) Memory32Fixed (ReadOnly, 0xFEC00000, // Address Base 0x00100000, // Address Length ) Memory32Fixed (ReadOnly, 0xFEE00000, // Address Base 0x00100000, // Address Length ) Memory32Fixed (ReadWrite, 0xFED1C000, // Address Base 0x00004000, // Address Length ) }) } Device (DMAC) { Name (_HID, EisaId ("PNP0200")) Name (_STA, 0x0F) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0000, // Range Minimum 0x0000, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x0080, // Range Minimum 0x0080, // Range Maximum 0x01, // Alignment 0x10, // Length ) IO (Decode16, 0x00C0, // Range Minimum 0x00C0, // Range Maximum 0x01, // Alignment 0x20, // Length ) DMA (Compatibility, NotBusMaster, Transfer16, ) {4} }) } Device (PIC) { Name (_HID, EisaId ("PNP0000")) Name (_STA, 0x0F) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0020, // Range Minimum 0x0020, // Range Maximum 0x01, // Alignment 0x02, // Length ) IO (Decode16, 0x00A0, // Range Minimum 0x00A0, // Range Maximum 0x01, // Alignment 0x02, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {2} }) } Device (RTC) { Name (_HID, EisaId ("PNP0B00")) Name (_STA, 0x0F) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0070, // Range Minimum 0x0070, // Range Maximum 0x01, // Alignment 0x02, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {8} }) } Device (TIME) { Name (_HID, EisaId ("PNP0100")) Name (_STA, 0x0F) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0040, // Range Minimum 0x0040, // Range Maximum 0x01, // Alignment 0x04, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {0} }) } Device (MATH) { Name (_HID, EisaId ("PNP0C04")) Name (_STA, 0x0F) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x00F0, // Range Minimum 0x00F0, // Range Maximum 0x01, // Alignment 0x0F, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {13} }) } Device (SPKR) { Name (_HID, EisaId ("PNP0800")) Name (_STA, 0x0F) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0061, // Range Minimum 0x0061, // Range Maximum 0x01, // Alignment 0x01, // Length ) }) } Device (HPET) { Name (_HID, EisaId ("PNP0103")) Method (_STA, 0, NotSerialized) { If (AE) { Store (0x0F, Local0) } Else { Store (0x09, Local0) } Return (Local0) } OperationRegion (RCRB, SystemMemory, 0xFED1C000, 0x3420) Field (RCRB, DWordAcc, NoLock, Preserve) { Offset (0x3404), AS, 2, , 5, AE, 1 } Method (_CRS, 0, NotSerialized) { Name (BUFF, ResourceTemplate () { Memory32Fixed (ReadWrite, 0x00000000, // Address Base 0x00000000, // Address Length _Y0A) }) CreateDWordField (BUFF, \_SB.PCI0.LPC.HPET._CRS._Y0A._LEN, HTML) CreateDWordField (BUFF, \_SB.PCI0.LPC.HPET._CRS._Y0A._BAS, HTMB) If (AE) { Store (0x0400, HTML) ShiftLeft (AS, 0x0C, Local0) Add (0xFED00000, Local0, HTMB) } Return (BUFF) } } Device (SIO2) { Name (_HID, EisaId ("PNP0A05")) Name (_UID, 0x02) Method (_STA, 0, NotSerialized) { ULCK () Store (0x02, FUNC) If (LEqual (FUNC, 0x02)) { Store (0x0F, Local0) } Else { Store (0x08, Local0) } LCK () Return (Local0) } OperationRegion (QLGC, SystemIO, 0x4E, 0x02) Field (QLGC, ByteAcc, NoLock, Preserve) { INDX, 8, DATA, 8 } IndexField (INDX, DATA, ByteAcc, NoLock, Preserve) { Offset (0x07), FUNC, 8, Offset (0x23), , 3, CFGL, 1, Offset (0x30), DEN, 8, Offset (0x60), DADH, 8, DADL, 8, Offset (0x70), DIR, 4 } OperationRegion (GPES, SystemIO, 0x0208, 0x02) Field (GPES, ByteAcc, NoLock, WriteAsZeros) { RI1S, 1, RI2S, 1 } OperationRegion (GPEE, SystemIO, 0x020C, 0x02) Field (GPEE, ByteAcc, NoLock, Preserve) { RI1E, 1, RI2E, 1 } Method (_INI, 0, NotSerialized) { ULCK () Store (0x02, FUNC) Store (DEN, C1EN) Store (0x01, FUNC) Store (DEN, C2EN) LCK () } Method (ULCK, 0, NotSerialized) { Store (0x5A, INDX) } Method (LCK, 0, NotSerialized) { Store (0xA5, INDX) } Method (WAKE, 1, NotSerialized) { SMC (Zero, RefOf (RI1E), RefOf (RI1S)) SMC (Zero, RefOf (RI2E), RefOf (RI2S)) } Method (SLEP, 1, NotSerialized) { If (LEqual (Arg0, 0x01)) { SMC (One, RefOf (RI1E), RefOf (RI1S)) SMC (One, RefOf (RI2E), RefOf (RI2S)) } } Method (SMC, 3, NotSerialized) { If (Arg0) { Store (One, Arg2) Store (One, Arg1) } Else { Store (Zero, Arg1) Store (One, Arg2) } } Device (COM1) { Name (_HID, EisaId ("PNP0501")) Name (_UID, 0x01) Method (_STA, 0, NotSerialized) { ULCK () Store (0x02, FUNC) If (LEqual (C1EN, 0x01)) { If (DEN) { Store (0x0F, Local0) } Else { Store (0x0D, Local0) } } Else { Store (0x08, Local0) } LCK () Return (Local0) } Method (_PRW, 0, NotSerialized) { Return (Package (0x02) { 0x18, 0x01 }) } Method (_PSW, 1, NotSerialized) { Store (Arg0, \_SB.PCI0.LPC.SIO2.RI1E) } Method (_DIS, 0, NotSerialized) { ULCK () Store (0x02, FUNC) Store (Zero, DEN) LCK () } Method (_CRS, 0, NotSerialized) { ULCK () Store (0x02, FUNC) Name (BUFF, ResourceTemplate () { IO (Decode16, 0x0000, // Range Minimum 0x0000, // Range Maximum 0x08, // Alignment 0x08, // Length _Y0B) IRQ (Edge, ActiveHigh, Exclusive, _Y0C) {0} }) CreateByteField (BUFF, \_SB.PCI0.LPC.SIO2.COM1._CRS._Y0B._MIN, AD1L) CreateByteField (BUFF, 0x03, AD1H) CreateByteField (BUFF, \_SB.PCI0.LPC.SIO2.COM1._CRS._Y0B._MAX, AD2L) CreateByteField (BUFF, 0x05, AD2H) Store (DADL, AD1L) Store (DADH, AD1H) Store (DADL, AD2L) Store (DADH, AD2H) CreateWordField (BUFF, \_SB.PCI0.LPC.SIO2.COM1._CRS._Y0C._INT, IRQS) Store (One, Local0) ShiftLeft (Local0, DIR, IRQS) LCK () Return (BUFF) } Name (_PRS, ResourceTemplate () { StartDependentFn (0x00, 0x00) { IO (Decode16, 0x03F8, // Range Minimum 0x03F8, // Range Maximum 0x08, // Alignment 0x08, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {4} } StartDependentFn (0x01, 0x01) { IO (Decode16, 0x03E8, // Range Minimum 0x03E8, // Range Maximum 0x08, // Alignment 0x08, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {4} } StartDependentFn (0x02, 0x02) { IO (Decode16, 0x02F8, // Range Minimum 0x02F8, // Range Maximum 0x08, // Alignment 0x08, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {3} } StartDependentFn (0x02, 0x02) { IO (Decode16, 0x02E8, // Range Minimum 0x02E8, // Range Maximum 0x08, // Alignment 0x08, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {3} } EndDependentFn () }) Name (CM1L, Package (0x04) { 0x03F8, 0x02F8, 0x02E8, 0x03E8 }) Name (CM1C, Package (0x04) { 0x00, 0x01, 0x05, 0x07 }) Method (_SRS, 1, NotSerialized) { ULCK () Store (0x02, FUNC) CreateByteField (Arg0, 0x02, IOSL) CreateByteField (Arg0, 0x03, IOSH) CreateWordField (Arg0, 0x02, IOSA) CreateWordField (Arg0, 0x09, IRQS) Store (IOSL, DADL) Store (IOSH, DADH) Store (DerefOf (Index (CM1C, Match (CM1L, MEQ, IOSA, MTR, 0x00, 0x00))), COMA) FindSetRightBit (IRQS, Local0) If (Local0) { Decrement (Local0) } Store (Local0, DIR) Store (One, DEN) LCK () } } Device (COM2) { Name (_HID, EisaId ("PNP0501")) Name (_UID, 0x02) Method (_STA, 0, NotSerialized) { ULCK () Store (0x01, FUNC) If (LEqual (C2EN, 0x01)) { If (DEN) { Store (0x0F, Local0) } Else { Store (0x0D, Local0) } } Else { Store (0x08, Local0) } LCK () Return (Local0) } Method (_PRW, 0, NotSerialized) { Return (Package (0x02) { 0x18, 0x01 }) } Method (_PSW, 1, NotSerialized) { Store (Arg0, \_SB.PCI0.LPC.SIO2.RI2E) } Method (_DIS, 0, NotSerialized) { ULCK () Store (0x01, FUNC) Store (Zero, DEN) LCK () } Method (_CRS, 0, NotSerialized) { ULCK () Store (0x01, FUNC) Name (BUFF, ResourceTemplate () { IO (Decode16, 0x0000, // Range Minimum 0x0000, // Range Maximum 0x08, // Alignment 0x08, // Length _Y0D) IRQ (Edge, ActiveHigh, Exclusive, _Y0E) {0} }) CreateByteField (BUFF, \_SB.PCI0.LPC.SIO2.COM2._CRS._Y0D._MIN, AD1L) CreateByteField (BUFF, 0x03, AD1H) CreateByteField (BUFF, \_SB.PCI0.LPC.SIO2.COM2._CRS._Y0D._MAX, AD2L) CreateByteField (BUFF, 0x05, AD2H) Store (DADL, AD1L) Store (DADH, AD1H) Store (DADL, AD2L) Store (DADH, AD2H) CreateWordField (BUFF, \_SB.PCI0.LPC.SIO2.COM2._CRS._Y0E._INT, IRQS) Store (One, Local0) ShiftLeft (Local0, DIR, IRQS) LCK () Return (BUFF) } Name (_PRS, ResourceTemplate () { StartDependentFn (0x00, 0x00) { IO (Decode16, 0x02F8, // Range Minimum 0x02F8, // Range Maximum 0x08, // Alignment 0x08, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {3} } StartDependentFn (0x01, 0x01) { IO (Decode16, 0x02E8, // Range Minimum 0x02E8, // Range Maximum 0x08, // Alignment 0x08, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {3} } StartDependentFn (0x02, 0x02) { IO (Decode16, 0x03F8, // Range Minimum 0x03F8, // Range Maximum 0x08, // Alignment 0x08, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {4} } StartDependentFn (0x02, 0x02) { IO (Decode16, 0x03E8, // Range Minimum 0x03E8, // Range Maximum 0x08, // Alignment 0x08, // Length ) IRQ (Edge, ActiveHigh, Exclusive, ) {4} } EndDependentFn () }) Name (CM2L, Package (0x04) { 0x03F8, 0x02F8, 0x02E8, 0x03E8 }) Name (CM2C, Package (0x04) { 0x00, 0x01, 0x05, 0x07 }) Method (_SRS, 1, NotSerialized) { ULCK () Store (0x01, FUNC) CreateByteField (Arg0, 0x02, IOSL) CreateByteField (Arg0, 0x03, IOSH) CreateWordField (Arg0, 0x02, IOSA) CreateWordField (Arg0, 0x09, IRQS) Store (IOSL, DADL) Store (IOSH, DADH) Store (DerefOf (Index (CM2C, Match (CM2L, MEQ, IOSA, MTR, 0x00, 0x00))), COMB) FindSetRightBit (IRQS, Local0) If (Local0) { Decrement (Local0) } Store (Local0, DIR) Store (One, DEN) LCK () } } } Device (MI0) { Name (_HID, EisaId ("IPI0001")) Method (_STA, 0, NotSerialized) { If (LLess (\_SB.PCI0.LPC.AAOF, 0x08)) { Return (0x08) } Else { Return (0x0F) } } Name (_UID, 0x00) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0CA2, // Range Minimum 0x0CA2, // Range Maximum 0x01, // Alignment 0x02, // Length ) }) Method (_IFT, 0, NotSerialized) { Return (0x01) } Method (_SRV, 0, NotSerialized) { Return (0x0200) } } Device (KCS1) { Name (_HID, EisaId ("PNP0C02")) Name (_UID, 0x04) Method (_STA, 0, NotSerialized) { If (LLess (\_SB.PCI0.LPC.AAOF, 0x08)) { Return (0x0F) } Else { Return (0x08) } } Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0CA2, // Range Minimum 0x0CA2, // Range Maximum 0x01, // Alignment 0x02, // Length ) }) } Device (KCS5) { Name (_HID, EisaId ("PNP0A05")) Name (_UID, 0x03) Name (_STA, 0x0F) OperationRegion (KCSR, SystemIO, 0x0CA4, 0x04) Field (KCSR, ByteAcc, NoLock, Preserve) { D_OU, 8, OBF, 1, IBF, 1, SMS, 1, CD, 1, OEM1, 1, OEM2, 1, S0, 1, S1, 1 } OperationRegion (KCSW, SystemIO, 0x0CA4, 0x04) Field (KCSW, ByteAcc, NoLock, Preserve) { D_IN, 8, CMD, 8 } Name (_S1D, 0x03) Name (_S2D, 0x03) Name (_S3D, 0x03) Name (_S4D, 0x03) Name (_PSC, 0x00) Method (_INI, 0, NotSerialized) { WAKE () } Method (WAKE, 0, NotSerialized) { Store (0x00, _PSC) Name (BUFG, Buffer (0x06) { 0xB8, 0xF1, 0x80, 0x28, 0x00, 0x29 }) Name (RET1, Buffer (0x0101) { 0x00 }) If (LNot (SEND (BUFG, RET1))) { If (DerefOf (Index (RET1, 0x00))) { If (LNot (DerefOf (Index (RET1, 0x03)))) { Name (BUFS, Buffer (0x0A) { /* 0000 */ 0xB8, 0xF1, 0x80, 0x28, 0x00, 0x28, 0x01, 0x80, /* 0008 */ 0x00, 0x00 }) Or (DerefOf (Index (BUFS, 0x06)), DerefOf (Index (RET1, 0x07 )), Index (BUFS, 0x06)) Or (DerefOf (Index (BUFS, 0x07)), DerefOf (Index (RET1, 0x08 )), Index (BUFS, 0x07)) Store (DerefOf (Index (RET1, 0x09)), Index (BUFS, 0x08)) Store (DerefOf (Index (RET1, 0x0A)), Index (BUFS, 0x09)) Name (RET2, Buffer (0x0101) { 0x00 }) If (LNot (SEND (BUFS, RET2))) { If (DerefOf (Index (RET2, 0x00))) { If (LNot (DerefOf (Index (RET2, 0x03)))) { Name (SMIP, Buffer (0x08) { /* 0000 */ 0xB8, 0xF1, 0x80, 0x28, 0x00, 0x32, 0x00, 0x00 }) Name (RET3, Buffer (0x0101) { 0x00 }) If (CondRefOf (\_PR.PR00._PPC, Local0)) { Store (SizeOf (\_PR.PR00._PSS), Index (SMIP, 0x06)) } SEND (SMIP, RET3) } } } } } } } Method (SLEP, 0, NotSerialized) { Store (0x03, _PSC) Name (SMIP, Buffer (0x08) { /* 0000 */ 0xB8, 0xF1, 0x80, 0x28, 0x00, 0x32, 0x00, 0x00 }) Name (RET0, Buffer (0x0101) { 0x00 }) If (LNot (SEND (SMIP, RET0))) { If (DerefOf (Index (RET0, 0x00))) { If (LNot (DerefOf (Index (RET0, 0x03)))) { Name (BUFG, Buffer (0x06) { 0xB8, 0xF1, 0x80, 0x28, 0x00, 0x29 }) Name (RET1, Buffer (0x0101) { 0x00 }) If (LNot (SEND (BUFG, RET1))) { If (DerefOf (Index (RET1, 0x00))) { If (LNot (DerefOf (Index (RET1, 0x03)))) { Name (BUFS, Buffer (0x0A) { /* 0000 */ 0xB8, 0xF1, 0x80, 0x28, 0x00, 0x28, 0xFE, 0x00, /* 0008 */ 0x00, 0x00 }) And (DerefOf (Index (BUFS, 0x06)), DerefOf (Index (RET1, 0x07 )), Index (BUFS, 0x06)) Store (DerefOf (Index (RET1, 0x09)), Index (BUFS, 0x08)) Store (DerefOf (Index (RET1, 0x0A)), Index (BUFS, 0x09)) Name (RET2, Buffer (0x0101) { 0x00 }) SEND (BUFS, RET2) } } } } } } } Method (SIRS, 0, NotSerialized) { Name (SMIS, Buffer (0x06) { 0xB8, 0xF1, 0x80, 0x28, 0x00, 0x2A }) Name (RETS, Buffer (0x0101) { 0x00 }) If (LNot (\_SB.PCI0.LPC.KCS5.SEND (SMIS, RETS))) { If (DerefOf (Index (RETS, 0x00))) { If (LNot (DerefOf (Index (RETS, 0x03)))) { If (And (DerefOf (Index (RETS, 0x07)), 0x01)) { If (And (DerefOf (Index (RETS, 0x08)), 0x80)) { Name (SMIR, Buffer (0x0A) { /* 0000 */ 0xB8, 0xF1, 0x80, 0x28, 0x00, 0x2B, 0x01, 0x80, /* 0008 */ 0x00, 0x00 }) Name (RETR, Buffer (0x0101) { 0x00 }) \_SB.PCI0.LPC.KCS5.SEND (SMIR, RETR) Store (0x10, Local0) While (Local0) { CSPS (And (DerefOf (Index (RETS, 0x08)), 0x0F), Local0) Decrement (Local0) } } } } } } } Method (CSPS, 2, NotSerialized) { While (One) { Name (_T_0, 0x00) Store (Arg1, _T_0) If (LEqual (_T_0, 0x01)) { If (CondRefOf (\_PR.PR00._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR00._PSS))) { Subtract (SizeOf (\_PR.PR00._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR00._PPC) Notify (\_PR.PR00, 0x80) } } Else { If (LEqual (_T_0, 0x02)) { If (CondRefOf (\_PR.PR01._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR01._PSS))) { Subtract (SizeOf (\_PR.PR01._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR01._PPC) Notify (\_PR.PR01, 0x80) } } Else { If (LEqual (_T_0, 0x03)) { If (CondRefOf (\_PR.PR02._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR02._PSS))) { Subtract (SizeOf (\_PR.PR02._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR02._PPC) Notify (\_PR.PR02, 0x80) } } Else { If (LEqual (_T_0, 0x04)) { If (CondRefOf (\_PR.PR03._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR03._PSS))) { Subtract (SizeOf (\_PR.PR03._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR03._PPC) Notify (\_PR.PR03, 0x80) } } Else { If (LEqual (_T_0, 0x05)) { If (CondRefOf (\_PR.PR04._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR04._PSS))) { Subtract (SizeOf (\_PR.PR04._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR04._PPC) Notify (\_PR.PR04, 0x80) } } Else { If (LEqual (_T_0, 0x06)) { If (CondRefOf (\_PR.PR05._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR05._PSS))) { Subtract (SizeOf (\_PR.PR05._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR05._PPC) Notify (\_PR.PR05, 0x80) } } Else { If (LEqual (_T_0, 0x07)) { If (CondRefOf (\_PR.PR06._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR06._PSS))) { Subtract (SizeOf (\_PR.PR06._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR06._PPC) Notify (\_PR.PR06, 0x80) } } Else { If (LEqual (_T_0, 0x08)) { If (CondRefOf (\_PR.PR07._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR07._PSS))) { Subtract (SizeOf (\_PR.PR07._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR07._PPC) Notify (\_PR.PR07, 0x80) } } Else { If (LEqual (_T_0, 0x09)) { If (CondRefOf (\_PR.PR10._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR10._PSS))) { Subtract (SizeOf (\_PR.PR10._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR10._PPC) Notify (\_PR.PR10, 0x80) } } Else { If (LEqual (_T_0, 0x0A)) { If (CondRefOf (\_PR.PR11._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR11._PSS))) { Subtract (SizeOf (\_PR.PR11._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR11._PPC) Notify (\_PR.PR11, 0x80) } } Else { If (LEqual (_T_0, 0x0B)) { If (CondRefOf (\_PR.PR12._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR12._PSS))) { Subtract (SizeOf (\_PR.PR12._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR12._PPC) Notify (\_PR.PR12, 0x80) } } Else { If (LEqual (_T_0, 0x0C)) { If (CondRefOf (\_PR.PR13._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR13._PSS))) { Subtract (SizeOf (\_PR.PR13._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR13._PPC) Notify (\_PR.PR13, 0x80) } } Else { If (LEqual (_T_0, 0x0D)) { If (CondRefOf (\_PR.PR14._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR14._PSS))) { Subtract (SizeOf (\_PR.PR14._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR14._PPC) Notify (\_PR.PR14, 0x80) } } Else { If (LEqual (_T_0, 0x0E)) { If (CondRefOf (\_PR.PR15._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR15._PSS))) { Subtract (SizeOf (\_PR.PR15._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR15._PPC) Notify (\_PR.PR15, 0x80) } } Else { If (LEqual (_T_0, 0x0F)) { If (CondRefOf (\_PR.PR16._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR16._PSS))) { Subtract (SizeOf (\_PR.PR16._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR16._PPC) Notify (\_PR.PR16, 0x80) } } Else { If (LEqual (_T_0, 0x10)) { If (CondRefOf (\_PR.PR17._PPC, Local0)) { If (LGreaterEqual (Arg0, SizeOf (\_PR.PR17._PSS))) { Subtract (SizeOf (\_PR.PR17._PSS), 0x01, Arg0) } Store (Arg0, \_PR.PR17._PPC) Notify (\_PR.PR17, 0x80) } } } } } } } } } } } } } } } } } Break } } Method (SEND, 2, NotSerialized) { Name (WRST, 0x61) Name (WREN, 0x62) If (WIBF ()) { Return (0x03) } If (COBF ()) { Return (0x04) } Store (WRST, CMD) If (WIBF ()) { Return (0x03) } If (LNotEqual (CHKW (), Zero)) { Return (EREX ()) } If (COBF ()) { Return (0x04) } Store (0x00, Local0) Store (SizeOf (Arg0), Local1) Decrement (Local1) While (LNotEqual (Local0, Local1)) { Store (DerefOf (Index (Arg0, Local0)), D_IN) If (WIBF ()) { Return (0x03) } If (LNotEqual (CHKW (), Zero)) { Return (EREX ()) } If (COBF ()) { Return (0x04) } Increment (Local0) } Store (WREN, CMD) If (WIBF ()) { Return (0x03) } If (LNotEqual (CHKW (), Zero)) { Return (0x01) } If (COBF ()) { Return (0x04) } Store (DerefOf (Index (Arg0, Local0)), D_IN) Name (REAB, 0x68) If (WIBF ()) { Return (0x03) } Store (0x01, Local0) While (LEqual (CHKR (), Zero)) { If (WOBF ()) { Return (0x03) } Store (D_OU, Index (Arg1, Local0)) Store (REAB, D_IN) If (WIBF ()) { Return (0x03) } Increment (Local0) } Decrement (Local0) Store (Local0, Index (Arg1, 0x00)) If (LNotEqual (CHKI (), Zero)) { Return (EREX ()) } If (WOBF ()) { Return (0x03) } Store (D_OU, Local0) Return (0x00) } Method (EREX, 0, NotSerialized) { Store (0x00, Local0) While (LLess (Local0, 0x0A)) { If (LEqual (ERCH (), Zero)) { Return (0x01) } Increment (Local0) } Return (0x02) } Method (ERCH, 0, NotSerialized) { Name (GSAB, 0x60) Name (REAB, 0x68) If (WIBF ()) { Return (0x03) } Store (GSAB, CMD) If (WIBF ()) { Return (0x03) } If (COBF ()) { Return (0x04) } Store (0x00, D_IN) If (WIBF ()) { Return (0x03) } If (LNotEqual (CHKR (), Zero)) { Return (0x01) } If (WOBF ()) { Return (0x03) } Store (D_OU, Local0) Store (REAB, D_IN) If (WIBF ()) { Return (0x03) } If (LNotEqual (CHKI (), Zero)) { Return (0x01) } If (WOBF ()) { Return (0x03) } If (COBF ()) { Return (0x04) } Return (0x00) } Method (CHKW, 0, NotSerialized) { Store (S0, Local0) Store (S1, Local1) If (LNotEqual (Local0, Zero)) { Return (0x01) } If (LEqual (Local1, Zero)) { Return (0x01) } Return (0x00) } Method (CHKR, 0, NotSerialized) { Store (S0, Local0) Store (S1, Local1) If (LEqual (Local0, Zero)) { Return (0x01) } If (LNotEqual (Local1, Zero)) { Return (0x01) } Return (0x00) } Method (CHKI, 0, NotSerialized) { Store (S0, Local0) Store (S1, Local1) If (LNotEqual (Local0, Zero)) { Return (0x01) } If (LNotEqual (Local1, Zero)) { Return (0x01) } Return (0x00) } Method (WOBF, 0, NotSerialized) { Store (0x1388, Local2) While (LGreater (Local2, Zero)) { Store (OBF, Local1) If (Local1) { Return (0x00) } Sleep (0x0A) Subtract (Local2, 0x0A, Local2) } Return (0x01) } Method (WIBF, 0, NotSerialized) { Store (0x1388, Local2) While (LGreater (Local2, Zero)) { Store (IBF, Local1) If (LNot (Local1)) { Return (0x00) } Sleep (0x0A) Subtract (Local2, 0x0A, Local2) } Return (0x01) } Method (COBF, 0, NotSerialized) { Store (0x03E8, Local0) While (LGreater (Local0, Zero)) { Store (OBF, Local1) If (Local1) { Store (D_OU, Local1) Decrement (Local0) } Else { Return (0x00) } } } } } } } } From jhb at freebsd.org Fri Jun 5 14:35:13 2009 From: jhb at freebsd.org (John Baldwin) Date: Fri Jun 5 14:35:20 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <4A28E2A5.9030107@ts.fujitsu.com> References: <4A24D29A.5030604@ts.fujitsu.com> <200906041229.54888.jhb@freebsd.org> <4A28E2A5.9030107@ts.fujitsu.com> Message-ID: <200906051030.30236.jhb@freebsd.org> On Friday 05 June 2009 5:17:25 am Josef Moellers wrote: > Difficult, since I can't boot properly. > However, I have managed to get the dsdt using a SuSE Linux and have run > that through acpidump -d on a 7.2 running on a XEN virtual machine. > Here's the result. Hmm, your BIOS is certainly hosed. First, it does have separate processor objects: Scope (\_PR) { Processor (PR00, 0x00, 0x00000000, 0x00) {} Processor (PR01, 0x08, 0x00000000, 0x00) {} Processor (PR02, 0x01, 0x00000000, 0x00) {} Processor (PR03, 0x09, 0x00000000, 0x00) {} Processor (PR04, 0x02, 0x00000000, 0x00) {} Processor (PR05, 0x0A, 0x00000000, 0x00) {} Processor (PR06, 0x03, 0x00000000, 0x00) {} Processor (PR07, 0x0B, 0x00000000, 0x00) {} Processor (PR10, 0x04, 0x00000000, 0x00) {} Processor (PR11, 0x0C, 0x00000000, 0x00) {} Processor (PR12, 0x05, 0x00000000, 0x00) {} Processor (PR13, 0x0D, 0x00000000, 0x00) {} Processor (PR14, 0x06, 0x00000000, 0x00) {} Processor (PR15, 0x0E, 0x00000000, 0x00) {} Processor (PR16, 0x07, 0x00000000, 0x00) {} Processor (PR17, 0x0F, 0x00000000, 0x00) {} } However, \_SB_.CPU0 and \_SB_.CPU1 are listed as Host-PCI bridge devices, not CPUs (CPUs are enumerated in ACPI as Processor() objects, not Device()'s, and certainly not with the _HID == Host-PCI bridge): Device (CPU0) { Name (_HID, EisaId ("PNP0A03")) Name (_UID, 0x01) Name (_BBN, 0xFF) ... Device (CPU1) { Name (_HID, EisaId ("PNP0A03")) Name (_UID, 0x02) Name (_BBN, 0xFE) ... Device (PCI0) { Name (_HID, EisaId ("PNP0A08")) Name (_CID, 0x030AD041) Name (_UID, 0x00) Name (_BBN, 0x00) Method (_INI, 0, NotSerialized) { \OSCK () } Hmm, it does have a valid _BBN value for your actual PCI bus. Not sure why it is using a bus number of 2. Ahh, ok. Hmm, so some machines with multipe busses would set _BBN to 0 for all busses, so we don't trust a _BBN of 0 for non-pcib0. However, I think what we want to do is not trust a _BBN of 0 if we already have a PCI bus 0 (in your case, pcib0 has PCI bus 255, pcib1 has PCI bus 254, and pcib2 has PCI bus 0). Try this: --- //depot/vendor/freebsd/src/sys/dev/acpica/acpi_pcib_acpi.c 2009/02/05 18:45:20 +++ //depot/user/jhb/acpipci/dev/acpica/acpi_pcib_acpi.c 2009/06/05 14:28:27 @@ -146,6 +146,7 @@ { struct acpi_hpcib_softc *sc; ACPI_STATUS status; + static int bus0_seen = 0; u_int addr, slot, func, busok; uint8_t busno; @@ -156,6 +157,21 @@ sc->ap_handle = acpi_get_handle(dev); /* + * Get our segment number by evaluating _SEG + * It's OK for this to not exist. + */ + status = acpi_GetInteger(sc->ap_handle, "_SEG", &sc->ap_segment); + if (ACPI_FAILURE(status)) { + if (status != AE_NOT_FOUND) { + device_printf(dev, "could not evaluate _SEG - %s\n", + AcpiFormatException(status)); + return_VALUE (ENXIO); + } + /* If it's not found, assume 0. */ + sc->ap_segment = 0; + } + + /* * Get our base bus number by evaluating _BBN. * If this doesn't work, we assume we're bus number 0. * @@ -169,8 +185,10 @@ * XXX invoke _REG on this for the PCI config space address space? * XXX It seems many BIOS's with multiple Host-PCI bridges do not set * _BBN correctly. They set _BBN to zero for all bridges. Thus, - * if _BBN is zero and pcib0 already exists, we try to read our + * if _BBN is zero and PCI bus 0 already exists, we try to read our * bus number from the configuration registers at address _ADR. + * We only do this for domain/segment 0 in the hopes that this is + * only needed for old single-domain machines. */ status = acpi_GetInteger(sc->ap_handle, "_BBN", &sc->ap_bus); if (ACPI_FAILURE(status)) { @@ -185,11 +203,11 @@ } /* - * If the bus is zero and pcib0 already exists, read the bus number - * via PCI config space. + * If this is segment 0, the bus is zero, and PCI bus 0 already + * exists, read the bus number via PCI config space. */ busok = 1; - if (sc->ap_bus == 0 && devclass_get_device(pcib_devclass, 0) != dev) { + if (sc->ap_segment == 0 && sc->ap_bus == 0 && bus0_seen) { busok = 0; status = acpi_GetInteger(sc->ap_handle, "_ADR", &addr); if (ACPI_FAILURE(status)) { @@ -226,20 +244,9 @@ device_printf(dev, "trying bus number %d\n", sc->ap_bus); } - /* - * Get our segment number by evaluating _SEG - * It's OK for this to not exist. - */ - status = acpi_GetInteger(sc->ap_handle, "_SEG", &sc->ap_segment); - if (ACPI_FAILURE(status)) { - if (status != AE_NOT_FOUND) { - device_printf(dev, "could not evaluate _SEG - %s\n", - AcpiFormatException(status)); - return_VALUE (ENXIO); - } - /* If it's not found, assume 0. */ - sc->ap_segment = 0; - } + /* If this is bus 0 on segment 0, note that it has been seen already. */ + if (sc->ap_segment == 0 && sc->ap_bus == 0) + bus0_seen = 1; return (acpi_pcib_attach(dev, &sc->ap_prt, sc->ap_bus)); } -- John Baldwin From josef.moellers at ts.fujitsu.com Fri Jun 5 14:51:46 2009 From: josef.moellers at ts.fujitsu.com (Josef Moellers) Date: Fri Jun 5 14:51:53 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <200906051030.30236.jhb@freebsd.org> References: <4A24D29A.5030604@ts.fujitsu.com> <200906041229.54888.jhb@freebsd.org> <4A28E2A5.9030107@ts.fujitsu.com> <200906051030.30236.jhb@freebsd.org> Message-ID: <4A293100.7030203@ts.fujitsu.com> Hello, Thanks for the help! John Baldwin wrote: > On Friday 05 June 2009 5:17:25 am Josef Moellers wrote: > >> Difficult, since I can't boot properly. >> However, I have managed to get the dsdt using a SuSE Linux and have run >> that through acpidump -d on a 7.2 running on a XEN virtual machine. >> Here's the result. >> > > Hmm, your BIOS is certainly hosed. First, it does have separate processor > objects: [...] I'll show this to our BIOS people. When I talked to them before, they claimed that everything were OK, since the OSes we support do come up properly. > PCI bus 254, and pcib2 has PCI bus 0). Try this: > [...] That will be difficult, because I'd have to rebuild the installation CD from scratch. But I guess fixing the problem is better that building a work-around for it. Have a nice weekend, Josef -- These are my personal views and not those of Fujitsu Technology Solutions! Josef M?llers (Pinguinpfleger bei FTS) If failure had no penalty success would not be a prize (T. Pratchett) Company Details: http://de.ts.fujitsu.com/imprint.html From jhb at freebsd.org Fri Jun 5 16:59:07 2009 From: jhb at freebsd.org (John Baldwin) Date: Fri Jun 5 16:59:39 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <4A293100.7030203@ts.fujitsu.com> References: <4A24D29A.5030604@ts.fujitsu.com> <200906051030.30236.jhb@freebsd.org> <4A293100.7030203@ts.fujitsu.com> Message-ID: <200906051152.24609.jhb@freebsd.org> On Friday 05 June 2009 10:51:44 am Josef Moellers wrote: > Hello, > > Thanks for the help! > > John Baldwin wrote: > > On Friday 05 June 2009 5:17:25 am Josef Moellers wrote: > > > >> Difficult, since I can't boot properly. > >> However, I have managed to get the dsdt using a SuSE Linux and have run > >> that through acpidump -d on a 7.2 running on a XEN virtual machine. > >> Here's the result. > >> > > > > Hmm, your BIOS is certainly hosed. First, it does have separate processor > > objects: > [...] > > I'll show this to our BIOS people. When I talked to them before, they > claimed that everything were OK, since the OSes we support do come up > properly. I think your BIOS is actually ok, sorry my e-mail was a bit of a stream of conciousness. > > PCI bus 254, and pcib2 has PCI bus 0). Try this: > > > [...] > That will be difficult, because I'd have to rebuild the installation CD > from scratch. > But I guess fixing the problem is better that building a work-around for it. Ah, if you have a working machine where you can build a kernel, you can build an new CD using an existing ISO as a template. Simply build a GENERIC kernel and install it into some DESTDIR=/foo and mount the ISO image using mdconfig to /dist. Then do something like 'mkisofs -o new.iso -r -J -b boot/cdboot -no-emul-boot -x /dist/boot/kernel /dist /foo'. If that complains about duplicate 'boot/kernel' then you may need to copy all of /dist/boot to /foo/boot, install the new kernel into /foo, and use '-x /dist/boot /dist /foo'. Also, if this machine supports PXE boot at all, that can be a way to boot a test kernel as well. -- John Baldwin From ws at au.dyndns.ws Fri Jun 5 18:00:02 2009 From: ws at au.dyndns.ws (Wayne Sierke) Date: Fri Jun 5 18:00:09 2009 Subject: powerd on multi-core cpus Message-ID: <1244223882.24951.3369.camel@predator-ii.buffyverse> Hi, I recently tried powerd for the first time and I'm wondering whether a couple of aspects of its behaviour are considered usual. First is that the load value displayed by powerd ranges to a maximum of #cpus x 100%, e.g. 200% on a dual-core opteron and 400% on a dual-core atom with Hyper-threading. Second is that in the default adaptive mode, the 'wanted freq' ranges to a maximum of #cores x max-freq, e.g. 3618MHz on a dual-core opteron with a max-freq of 1809MHz, and 3236MHz on a dual-core atom with a max-freq of 1618MHz. These were seen with 7.2-STABLE i386. I found it somewhat counter-intuitive since powerd rejects configuration settings for load thresholds of more than 100%, e.g.: # powerd -v -r 125 powerd: 125 is not a valid percent Is this how powerd is expected to behave or is there something amiss with my setups? Thanks, Wayne From jkim at FreeBSD.org Fri Jun 5 18:59:18 2009 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Fri Jun 5 18:59:30 2009 Subject: [HEADSUP] ACPICA 20090521 imported on head Message-ID: <200906051459.05242.jkim@FreeBSD.org> I just committed ACPICA 20090521 on head. If you experience any regression after the commit, please let me know. Note it is little different from my usual patchsets, i.e., it does not include any enhancements. When everything is settled, I am going to commit the remaining patches as well. Cheers, Jung-uk Kim From ivakras1 at gmail.com Fri Jun 5 19:24:16 2009 From: ivakras1 at gmail.com (Dmitry Kolosov) Date: Fri Jun 5 19:24:23 2009 Subject: [HEADSUP] ACPICA 20090521 imported on head In-Reply-To: <200906051459.05242.jkim@FreeBSD.org> References: <200906051459.05242.jkim@FreeBSD.org> Message-ID: <200906052324.11356.ivakras1@gmail.com> ??????? 05 ???? 2009 22:59:03 Jung-uk Kim ??????: > I just committed ACPICA 20090521 on head. If you experience any > regression after the commit, please let me know. Note it is little > different from my usual patchsets, i.e., it does not include any > enhancements. When everything is settled, I am going to commit the > remaining patches as well. > > Cheers, > > Jung-uk Kim > _______________________________________________ > 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" > Are any commits to 7-stable planned? 7.2-stable has acpica revision 20070320... acpi event on buttons and sliders are not working, battery rate and remaining time is unknown on hp dv6840er laptop? and many other inconveniences.. From jkim at FreeBSD.org Fri Jun 5 20:07:58 2009 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Fri Jun 5 20:08:04 2009 Subject: [HEADSUP] ACPICA 20090521 imported on head In-Reply-To: <200906052324.11356.ivakras1@gmail.com> References: <200906051459.05242.jkim@FreeBSD.org> <200906052324.11356.ivakras1@gmail.com> Message-ID: <200906051607.48747.jkim@FreeBSD.org> On Friday 05 June 2009 03:24 pm, Dmitry Kolosov wrote: > Are any commits to 7-stable planned? 7.2-stable has acpica revision > 20070320... acpi event on buttons and sliders are not working, > battery rate and remaining time is unknown on hp dv6840er laptop? > and many other inconveniences.. Sorry, maybe after 8.0-RELEASE... Jung-uk Kim From ivakras1 at gmail.com Fri Jun 5 20:24:04 2009 From: ivakras1 at gmail.com (Dmitry Kolosov) Date: Fri Jun 5 20:24:11 2009 Subject: [HEADSUP] ACPICA 20090521 imported on head In-Reply-To: <200906051607.48747.jkim@FreeBSD.org> References: <200906051459.05242.jkim@FreeBSD.org> <200906052324.11356.ivakras1@gmail.com> <200906051607.48747.jkim@FreeBSD.org> Message-ID: <200906060023.56704.ivakras1@gmail.com> ??????? 06 ???? 2009 00:07:46 Jung-uk Kim ??????: > On Friday 05 June 2009 03:24 pm, Dmitry Kolosov wrote: > > Are any commits to 7-stable planned? 7.2-stable has acpica revision > > 20070320... acpi event on buttons and sliders are not working, > > battery rate and remaining time is unknown on hp dv6840er laptop? > > and many other inconveniences.. > > Sorry, maybe after 8.0-RELEASE... > > Jung-uk Kim > After 8-RELEASE i will go forward to and will start the upgrade proccess, so commiting acpica to 7.* after 8-R is useless for me. Anyway, thanks a lot for a big work, i will wait for 8-R! From wampir at wampir.org Sat Jun 6 10:08:04 2009 From: wampir at wampir.org (Wampir) Date: Sat Jun 6 10:08:13 2009 Subject: ACPI problem with new acer aspire 6930G In-Reply-To: <98572550906060250i3f08dbd5k8603f15479cfa55@mail.gmail.com> References: <98572550906060250i3f08dbd5k8603f15479cfa55@mail.gmail.com> Message-ID: <98572550906060308h31d7eb5ej13069dc4e7c2825c@mail.gmail.com> Hi. I have a problem with ale support on 7.2-RELEASE and 8.0-CURRENT. I get on dmesg: ale0: irq 17 at device 0.0 on pci9 ale0: 0x40000 bytes of rid 0x10 res 3 failed (0, 0xffffffff). ale0: cannot allocate memory resources. device_attach: ale0 attach returned 6 When i boot freebsd in safe mode ale starts correctly (but gets no link), but i get all the time: "interrupt storm detected on "irq10:"; throttling interrupt source" errors. Can anyone help solve the issue? -- Pozdrawiam W. http://porscheracing.pl From wampir at wampir.org Sat Jun 6 10:18:23 2009 From: wampir at wampir.org (Wampir) Date: Sat Jun 6 10:18:30 2009 Subject: ACPI problem with new acer aspire 6930G Message-ID: <98572550906060250i3f08dbd5k8603f15479cfa55@mail.gmail.com> Hi. I have a problem with ale support on 7.2-RELEASE and 8.0-CURRENT. I get on dmesg: ale0: irq 17 at device 0.0 on pci9 ale0: 0x40000 bytes of rid 0x10 res 3 failed (0, 0xffffffff). ale0: cannot allocate memory resources. device_attach: ale0 attach returned 6 When i boot freebsd in safe mode ale starts correctly (but gets no link), but i get all the time: "interrupt storm detected on "irq10:"; throttling interrupt source" errors. Can anyone help solve the issue? From freebsd at abv.bg Sat Jun 6 16:37:31 2009 From: freebsd at abv.bg (Mario Pavlov) Date: Sat Jun 6 16:37:39 2009 Subject: ACPI problem with new acer aspire 6930G Message-ID: <1823042729.128315.1244306247806.JavaMail.apache@mail52.abv.bg> Hi, this is a known issue there is an open PR about it: http://www.freebsd.org/cgi/query-pr.cgi?pr=135070 regards, Mario >Hi. >I have a problem with ale support on 7.2-RELEASE and 8.0-CURRENT. >I get on dmesg: > >ale0: irq 17 at device 0.0 on pci9 >ale0: 0x40000 bytes of rid 0x10 res 3 failed (0, 0xffffffff). >ale0: cannot allocate memory resources. >device_attach: ale0 attach returned 6 > >When i boot freebsd in safe mode ale starts correctly (but gets no >link), but i get all the time: >"interrupt storm detected on "irq10:"; throttling interrupt source" errors. > >Can anyone help solve the issue? >_______________________________________________ >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" > From rea-fbsd at codelabs.ru Mon Jun 8 05:12:16 2009 From: rea-fbsd at codelabs.ru (Eygene Ryabinkin) Date: Mon Jun 8 05:12:23 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code Message-ID: It is not uncommon when some chunks of the AML code are loaded by DSDT from the memory locations that aren't part of the DSDT itself, but one wants to see what's inside. It can be achieved with 'dd' and 'iasl', but it is better to implement this machinery inside acpidump to ease the life of both users and develepers that needs to see the full picture of the ACPI stuff from foreign machines. This commit also have some small fixes: - verbose output (going to stderr) isn't mixed with normal output that goes to stdout -- the latter is made unbuffered; - we're using IASL's logics to get the name of the output file and, moreover, we prevent two simultaneous invocations of acpidump to hose other's output; - IASL exit code is checked and if disassembler exited abnormally or was failed to do its job, the warning is produced to give the reader an idea on what's going on. Signed-off-by: Eygene Ryabinkin --- usr.sbin/acpi/acpidump/acpi.c | 165 ++++++++++++++++++++++++++++++++----- usr.sbin/acpi/acpidump/acpidump.8 | 5 + usr.sbin/acpi/acpidump/acpidump.c | 97 +++++++++++++++++++++- usr.sbin/acpi/acpidump/acpidump.h | 2 + 4 files changed, 244 insertions(+), 25 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index fed0fb2..321f894 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -1,6 +1,7 @@ /*- * Copyright (c) 1998 Doug Rabson * Copyright (c) 2000 Mitsuru IWASAKI + * Copyright (c) 2009 Eygene Ryabinkin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,10 +32,13 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include @@ -800,47 +804,166 @@ dsdt_save_file(char *outfile, struct ACPIsdt *rsdt, struct ACPIsdt *dsdp) close(fd); } -void -aml_disassemble(struct ACPIsdt *rsdt, struct ACPIsdt *dsdp) -{ - char tmpstr[32], buf[256]; - FILE *fp; - int fd, len; +#define TMPIN "/tmp/acpidump.XXXXXX.aml" +#define TMPSLEN 4 - strcpy(tmpstr, "/tmp/acpidump.XXXXXX"); - fd = mkstemp(tmpstr); - if (fd < 0) { - perror("iasl tmp file"); +/* + * Disassembles contents of a given file and dumps them to the + * specified file descriptor. + */ +static void +invoke_iasl(char *infile, FILE *outfp) +{ + char buf[256], *outfile; + int len, status; + FILE *fp; + pid_t child; + + if (strlen(infile) <= TMPSLEN) { + warnx("bad input file name '%s', should be longer " + "than " ##TMPSLEN " characters", infile); return; } - write_dsdt(fd, rsdt, dsdp); - close(fd); + if (strcmp(infile + strlen(infile) - TMPSLEN, ".aml")) { + warnx("bad input file name '%s', should end on '.aml'", + infile); + return; + } + outfile = strdup(infile); + if (outfile == NULL) { + perror("ASL tmp file"); + return; + } + strcpy(outfile + strlen(outfile) - TMPSLEN, ".dsl"); - /* Run iasl -d on the temp file */ - if (fork() == 0) { + /* Run iasl -d on the input file */ + child = fork(); + if (child == -1) { + warn("fork"); + free(outfile); + return; + } + if (child == 0) { close(STDOUT_FILENO); if (vflag == 0) close(STDERR_FILENO); - execl("/usr/sbin/iasl", "iasl", "-d", tmpstr, (char *) 0); + execl("/usr/sbin/iasl", "iasl", "-d", "-p", outfile, + infile, (char *) 0); err(1, "exec"); } - wait(NULL); - unlink(tmpstr); + if (waitpid(child, &status, 0) != child) { + warn("waitpid(%lu)", (unsigned long)child); + unlink(outfile); + free(outfile); + return; + } + + if (!WIFEXITED(status)) { + warnx("IASL exited abnormally: status = %d", status); + unlink(outfile); + free(outfile); + return; + } + + if (WEXITSTATUS(status) != 0) { + warnx("IASL was not able to disassemble the passed AML code"); + unlink(outfile); + free(outfile); + return; + } /* Dump iasl's output to stdout */ - fp = fopen("acpidump.dsl", "r"); - unlink("acpidump.dsl"); + fp = fopen(outfile, "r"); + unlink(outfile); + free(outfile); if (fp == NULL) { - perror("iasl tmp file (read)"); + perror("ASL tmp file (read)"); return; } while ((len = fread(buf, 1, sizeof(buf), fp)) > 0) - fwrite(buf, 1, len, stdout); + fwrite(buf, 1, len, outfp); fclose(fp); } void +mem_disassemble(size_t dumpaddr, size_t dumplen) +{ + char tmpstr[sizeof(TMPIN)]; + char buf[256]; + int fd, memfd, toread, towrite; + + strcpy(tmpstr, TMPIN); + fd = mkstemps(tmpstr, TMPSLEN); + if (fd < 0) { + perror("AML tmp file"); + return; + } + memfd = open("/dev/mem", O_RDONLY); + if (memfd == -1) { + perror("open /dev/mem"); + close(fd); + unlink(tmpstr); + return; + } + if (lseek(memfd, dumpaddr, SEEK_SET) == -1) { + perror("seeking /dev/mem"); + close(fd); + close(memfd); + unlink(tmpstr); + return; + } + + while (dumplen > 0) { + toread = (dumplen > sizeof(buf) ? sizeof(buf) : dumplen); + towrite = read(memfd, buf, toread); + if (towrite == -1) { + perror("reading /dev/mem"); + close(fd); + close(memfd); + unlink(tmpstr); + return; + } + if (write(fd, buf, towrite) != towrite) { + perror("writing to AML tmp file"); + close(fd); + close(memfd); + unlink(tmpstr); + return; + } + dumplen -= towrite; + } + + close(fd); + close(memfd); + + invoke_iasl(tmpstr, stdout); + unlink(tmpstr); +} + +void +aml_disassemble(struct ACPIsdt *rsdt, struct ACPIsdt *dsdp) +{ + char tmpstr[sizeof(TMPIN)]; + int fd; + + strcpy(tmpstr, TMPIN); + fd = mkstemps(tmpstr, TMPSLEN); + if (fd < 0) { + perror("AML tmp file"); + return; + } + write_dsdt(fd, rsdt, dsdp); + close(fd); + + invoke_iasl(tmpstr, stdout); + unlink(tmpstr); +} + +#undef TMPIN +#undef TMPSLEN + +void sdt_print_all(struct ACPIsdt *rsdp) { acpi_handle_rsdt(rsdp); diff --git a/usr.sbin/acpi/acpidump/acpidump.8 b/usr.sbin/acpi/acpidump/acpidump.8 index 1401e38..ec16e4b 100644 --- a/usr.sbin/acpi/acpidump/acpidump.8 +++ b/usr.sbin/acpi/acpidump/acpidump.8 @@ -4,6 +4,7 @@ .\" Copyright (c) 2000 Mitsuru IWASAKI .\" Copyright (c) 2000 Yasuo YOKOYAMA .\" Copyright (c) 2000 Hiroki Sato +.\" Copyright (c) 2009 Eygene Ryabinkin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -43,6 +44,7 @@ .Op Fl v .Op Fl f Ar dsdt_input .Op Fl o Ar dsdt_output +.Op Fl a Ar address:length .Sh DESCRIPTION The .Nm @@ -122,6 +124,9 @@ the DSDT consists of free-formatted AML data. The following options are supported by .Nm : .Bl -tag -width indent +.It Fl d Ar address:length +Disassemble the given block of physical memory to the standard output. +This flag can be repeated: multiple blocks will be disassembled. .It Fl d Disassemble the DSDT into ASL using .Xr iasl 8 diff --git a/usr.sbin/acpi/acpidump/acpidump.c b/usr.sbin/acpi/acpidump/acpidump.c index a601ac2..b10527a 100644 --- a/usr.sbin/acpi/acpidump/acpidump.c +++ b/usr.sbin/acpi/acpidump/acpidump.c @@ -1,5 +1,6 @@ /*- * Copyright (c) 2000 Mitsuru IWASAKI + * Copyright (c) 2009 Eygene Ryabinkin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,6 +33,7 @@ #include #include #include +#include #include #include "acpidump.h" @@ -40,23 +42,78 @@ int dflag; /* Disassemble AML using iasl(8) */ int tflag; /* Dump contents of SDT tables */ int vflag; /* Use verbose messages */ +struct aflag { + size_t addr; + size_t size; + struct aflag *next; +}; + static void usage(const char *progname) { - fprintf(stderr, "usage: %s [-d] [-t] [-h] [-v] [-f dsdt_input] " + fprintf(stderr, "usage: %s [-a addr:len] [-d] [-t] [-h] [-v] [-f dsdt_input] " "[-o dsdt_output]\n", progname); fprintf(stderr, "To send ASL:\n\t%s -dt | gzip -c9 > foo.asl.gz\n", progname); exit(1); } +/* + * Parses pair of address:length from the given string. + * Both numbers can be hexadecimal (prefixed by 0[xX]) + * or plain decimal. + * + * Returns 0 for success, != 0 otherwise. + */ +static int +parse_addr(const char *arg, size_t *addr, size_t *len) +{ + char *c1, *c2, *a, *l; + + c1 = strchr(arg, ':'); + c2 = strrchr(arg, ':'); + if (c1 != c2 || c1 == NULL) { + warnx ("argument to '-a' should have form 'addr:len'"); + return 1; + } + + l = c1 + 1; + a = strndup(arg, l - arg); + if (a == NULL) + err(EX_OSERR, "can't parse address:size tuple"); + + if (sscanf(a, "%zi", addr) != 1) { + warnx("Unable to parse address from argument to '-a'"); + free(a); + return 1; + } + if (sscanf(l, "%zi", len) != 1) { + warnx("Unable to parse length from argument to '-a'"); + free(a); + return 1; + } + + free(a); + return 0; +} + int main(int argc, char *argv[]) { char c, *progname; - char *dsdt_input_file, *dsdt_output_file; - struct ACPIsdt *rsdt, *sdt; + char *dsdt_input_file = NULL, *dsdt_output_file = NULL; + struct ACPIsdt *rsdt = NULL, *sdt = NULL; + struct aflag *aroot = NULL, *atmp; + + /* + * When stdin/stdout are sent to the same file, stdout shouldn't + * be buffered to prevent mixing two outputs. We won't try to + * check it stdin/stdout are the same files, but will just + * make stdout unbuffered unconditionally. This is most + * useful when we're running in verbose mode. + */ + setbuf(stdout, NULL); dsdt_input_file = dsdt_output_file = NULL; progname = argv[0]; @@ -64,8 +121,17 @@ main(int argc, char *argv[]) if (argc < 2) usage(progname); - while ((c = getopt(argc, argv, "dhtvf:o:")) != -1) { + while ((c = getopt(argc, argv, "a:dhtvf:o:")) != -1) { switch (c) { + case 'a': + atmp = (struct aflag *)malloc(sizeof(*atmp)); + if (atmp == NULL) + errx(EX_OSERR, "parsing arguments to '-a'"); + if (parse_addr(optarg, &atmp->addr, &atmp->size)) + usage(progname); + atmp->next = aroot; + aroot = atmp; + break; case 'd': dflag = 1; break; @@ -140,5 +206,28 @@ main(int argc, char *argv[]) warnx("iasl processing complete"); } + if (aroot != NULL) { + struct aflag *nroot = NULL; + /* Reverse list and disassemble each memory location */ + while (aroot != NULL) { + atmp = aroot->next; + aroot->next = nroot; + nroot = aroot; + aroot = atmp; + } + while (nroot != NULL) { + if (vflag) { + warnx("disassembling memory at 0x%zx, " + "0x%zx bytes", nroot->addr, nroot->size); + } + mem_disassemble(nroot->addr, nroot->size); + if (vflag) + warnx("finished disassembling"); + atmp = nroot; + nroot = nroot->next; + free(atmp); + } + } + exit(0); } diff --git a/usr.sbin/acpi/acpidump/acpidump.h b/usr.sbin/acpi/acpidump/acpidump.h index 8d79168..8428b58 100644 --- a/usr.sbin/acpi/acpidump/acpidump.h +++ b/usr.sbin/acpi/acpidump/acpidump.h @@ -332,6 +332,8 @@ void sdt_print_all(struct ACPIsdt *); /* Disassemble the AML in the DSDT */ void aml_disassemble(struct ACPIsdt *, struct ACPIsdt *); +/* Disassemble arbitrary memory chunk */ +void mem_disassemble(size_t dumpaddr, size_t dumplen); /* Routines for accessing tables in physical memory */ struct ACPIrsdp *acpi_find_rsd_ptr(void); -- 1.6.3.1 -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From rea-fbsd at codelabs.ru Mon Jun 8 05:46:22 2009 From: rea-fbsd at codelabs.ru (Eygene Ryabinkin) Date: Mon Jun 8 05:46:29 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: References: Message-ID: Mon, Jun 08, 2009 at 09:12:12AM +0400, Eygene Ryabinkin wrote: > It is not uncommon when some chunks of the AML code are loaded by DSDT > from the memory locations that aren't part of the DSDT itself, but one > wants to see what's inside. It can be achieved with 'dd' and 'iasl', > but it is better to implement this machinery inside acpidump to ease the > life of both users and develepers that needs to see the full picture > of the ACPI stuff from foreign machines. [...] Hmm, seems like the patch was a bit corrupted, so attaching it instead of making inline. I had also submitted PR for this stuff: http://www.freebsd.org/cgi/query-pr.cgi?pr=135349 -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From josef.moellers at ts.fujitsu.com Mon Jun 8 08:09:10 2009 From: josef.moellers at ts.fujitsu.com (Josef Moellers) Date: Mon Jun 8 08:09:17 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <200906051152.24609.jhb@freebsd.org> References: <4A24D29A.5030604@ts.fujitsu.com> <200906051030.30236.jhb@freebsd.org> <4A293100.7030203@ts.fujitsu.com> <200906051152.24609.jhb@freebsd.org> Message-ID: <4A2CC727.50806@ts.fujitsu.com> 'morning, John Baldwin wrote: > On Friday 05 June 2009 10:51:44 am Josef Moellers wrote: > >> Hello, >> >> Thanks for the help! >> >> John Baldwin wrote: >> >>> On Friday 05 June 2009 5:17:25 am Josef Moellers wrote: >>> >>> >>>> Difficult, since I can't boot properly. >>>> However, I have managed to get the dsdt using a SuSE Linux and have run >>>> that through acpidump -d on a 7.2 running on a XEN virtual machine. >>>> Here's the result. >>>> >>>> >>> Hmm, your BIOS is certainly hosed. First, it does have separate processor >>> objects: >>> >> [...] >> >> I'll show this to our BIOS people. When I talked to them before, they >> claimed that everything were OK, since the OSes we support do come up >> properly. >> > > I think your BIOS is actually ok, sorry my e-mail was a bit of a stream of > conciousness. > That's what my colleague confirmed ;-) However, being the nice guy that he is, he provided me with a preliminary extra special test version (he was on the brink of going on holiday!), which presents the bridges in their numerical order (0, 1, 2, 0xfe, 0xff). With that BIOS, I finally got access to the keyboard and RAID controller and all and I'm installing FBSD as I'm writing this. So, maybe the algorithm shouldn't be "if we find a bridge with number 0 which is not the first one, give it another number" shouldn't this be "if we find *a* *second* bridge with number 0, give it another number"? > >>> PCI bus 254, and pcib2 has PCI bus 0). Try this: >>> >>> >> [...] >> That will be difficult, because I'd have to rebuild the installation CD >> from scratch. >> But I guess fixing the problem is better that building a work-around for it. >> > > Ah, if you have a working machine where you can build a kernel, you can build > an new CD using an existing ISO as a template. Simply build a GENERIC kernel > and install it into some DESTDIR=/foo and mount the ISO image using mdconfig > to /dist. Then do something like 'mkisofs -o new.iso -r -J -b > boot/cdboot -no-emul-boot -x /dist/boot/kernel /dist /foo'. If that > complains about duplicate 'boot/kernel' then you may need to copy all > of /dist/boot to /foo/boot, install the new kernel into /foo, and > use '-x /dist/boot /dist /foo'. > > Also, if this machine supports PXE boot at all, that can be a way to boot a > test kernel as well. Maybe that's what we'll have to do after all. Thanks for the support, Josef -- These are my personal views and not those of Fujitsu Technology Solutions! Josef M?llers (Pinguinpfleger bei FTS) If failure had no penalty success would not be a prize (T. Pratchett) Company Details: http://de.ts.fujitsu.com/imprint.html From naylor.b.david at gmail.com Mon Jun 8 08:30:07 2009 From: naylor.b.david at gmail.com (David Naylor) Date: Mon Jun 8 08:30:15 2009 Subject: Lenovo S10 and ACPI problems Message-ID: <200906081002.37853.naylor.b.david@gmail.com> Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: This is a digitally signed message part. Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090608/2c04ff59/attachment.pgp From bugmaster at FreeBSD.org Mon Jun 8 11:06:47 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 8 11:07:18 2009 Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org Message-ID: <200906081106.n58B6kpP020517@freefall.freebsd.org> 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/135070 acpi [acpi] [patch] BIOS resource allocation and FreeBSD AC 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 47 problems total. From jhb at freebsd.org Mon Jun 8 15:33:57 2009 From: jhb at freebsd.org (John Baldwin) Date: Mon Jun 8 15:34:21 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <4A2CC727.50806@ts.fujitsu.com> References: <4A24D29A.5030604@ts.fujitsu.com> <200906051152.24609.jhb@freebsd.org> <4A2CC727.50806@ts.fujitsu.com> Message-ID: <200906081047.17487.jhb@freebsd.org> On Monday 08 June 2009 4:09:11 am Josef Moellers wrote: > 'morning, > > John Baldwin wrote: > > On Friday 05 June 2009 10:51:44 am Josef Moellers wrote: > > > >> Hello, > >> > >> Thanks for the help! > >> > >> John Baldwin wrote: > >> > >>> On Friday 05 June 2009 5:17:25 am Josef Moellers wrote: > >>> > >>> > >>>> Difficult, since I can't boot properly. > >>>> However, I have managed to get the dsdt using a SuSE Linux and have run > >>>> that through acpidump -d on a 7.2 running on a XEN virtual machine. > >>>> Here's the result. > >>>> > >>>> > >>> Hmm, your BIOS is certainly hosed. First, it does have separate processor > >>> objects: > >>> > >> [...] > >> > >> I'll show this to our BIOS people. When I talked to them before, they > >> claimed that everything were OK, since the OSes we support do come up > >> properly. > >> > > > > I think your BIOS is actually ok, sorry my e-mail was a bit of a stream of > > conciousness. > > > That's what my colleague confirmed ;-) > However, being the nice guy that he is, he provided me with a > preliminary extra special test version (he was on the brink of going on > holiday!), which presents the bridges in their numerical order (0, 1, 2, > 0xfe, 0xff). With that BIOS, I finally got access to the keyboard and > RAID controller and all and I'm installing FBSD as I'm writing this. > > So, maybe the algorithm shouldn't be "if we find a bridge with number 0 > which is not the first one, give it another number" shouldn't this be > "if we find *a* *second* bridge with number 0, give it another number"? Yes, that's bascially what my patch does. > > Ah, if you have a working machine where you can build a kernel, you can build > > an new CD using an existing ISO as a template. Simply build a GENERIC kernel > > and install it into some DESTDIR=/foo and mount the ISO image using mdconfig > > to /dist. Then do something like 'mkisofs -o new.iso -r -J -b > > boot/cdboot -no-emul-boot -x /dist/boot/kernel /dist /foo'. If that > > complains about duplicate 'boot/kernel' then you may need to copy all > > of /dist/boot to /foo/boot, install the new kernel into /foo, and > > use '-x /dist/boot /dist /foo'. > > > > Also, if this machine supports PXE boot at all, that can be a way to boot a > > test kernel as well. > Maybe that's what we'll have to do after all. Ok, let me know if it works. Thanks. -- John Baldwin From ivakras1 at gmail.com Mon Jun 8 18:21:28 2009 From: ivakras1 at gmail.com (Dmitry Kolosov) Date: Mon Jun 8 18:21:35 2009 Subject: Lenovo S10 and ACPI problems In-Reply-To: <200906081002.37853.naylor.b.david@gmail.com> References: <200906081002.37853.naylor.b.david@gmail.com> Message-ID: <200906082221.21912.ivakras1@gmail.com> ??????????? 08 ???? 2009 12:02:35 David Naylor ??????: > Hi, > > I'm getting ACPI related problems with a Lenovo S10e. The battery status will > not update (and I assume temperature). Sometimes this even results in a > power off (shutdown -p) not powering off the netbook (in this case it looks > as if ACPI got disabled). > > Disabling EC stops dmesg from being flooded with error messages from ACPI. > I've tried debug.acpi.ec.polled=1 and debug.acpi.ec.burst=1 in various > combinations without success (no change in behaviour). > > A recompile of the DSDT shows only a few warnings and one remark. I don't > think the warnings are related to this (not that I know anything about DSDT). > If anyone would like the DSDT just let me know and I'll mail it to you. > > Windows (XP and Vista) obviously work, didn't find any reference to this > problem with Linux (via Google). > > The following is from -Current (after recent ACPI import) with verbose boot. > Had the same problem with old ACPI implementation. (The latest BIOS is used) > > # grep -i acpi /var/run/dmesg.boot > [ See attached ] > > Any help will be appreciated. > > Regards, > > David > > Extracted some error messages: > ACPI Exception: AE_NO_HARDWARE_RESPONSE, Returned by Handler for > [EmbeddedControl] 20090521 evregion-531 > ACPI Error (psparse-0633): Method parse/execution failed > [\\_SB_.PCI0.LPCB.EC0_.GBAS] (Node 0xc3e58e00), AE_NO_HARDWARE_RESPONSE > ACPI Error (psparse-0633): Method parse/execution failed > [\\_SB_.PCI0.LPCB.EC0_._Q2E] (Node 0xc3e5b000), AE_NO_HARDWARE_RESPONSE > acpi_ec0: evaluation of query method _Q2E failed: AE_NO_HARDWARE_RESPONSE > > acpi_ec0: EcRead: failed waiting to get data > ACPI Exception: AE_NO_HARDWARE_RESPONSE, Returned by Handler for > [EmbeddedControl] 20090521 evregion-531 > ACPI Error (psparse-0633): Method parse/execution failed [\\_SB_.ACAD._PSR] > (Node 0xc3e54240), AE_NO_HARDWARE_RESPONSE > > acpi_ec0: EcRead: failed waiting to get data > ACPI Exception: AE_NO_HARDWARE_RESPONSE, Returned by Handler for > [EmbeddedControl] 20090521 evregion-531 > ACPI Error (psparse-0633): Method parse/execution failed [\\_TZ_.TZ00._TMP] > (Node 0xc3d4a280), AE_NO_HARDWARE_RESPONSE > acpi_tz0: error fetching current temperature -- AE_NO_HARDWARE_RESPONSE > > acpi_ec0: EcRead: failed waiting to get data > ACPI Exception: AE_NO_HARDWARE_RESPONSE, Returned by Handler for > [EmbeddedControl] 20090521 evregion-531 > ACPI Error (psparse-0633): Method parse/execution failed [\\_SB_.BAT0._STA] > (Node 0xc3e53e00), AE_NO_HARDWARE_RESPONSE > ACPI Error (uteval-0329): Method execution failed [\\_SB_.BAT0._STA] (Node > 0xc3e53e00), AE_NO_HARDWARE_RESPONSE > acpi_ec0: EcRead: failed waiting to get data > ACPI Exception: AE_NO_HARDWARE_RESPONSE, Returned by Handler for > [EmbeddedControl] 20090521 evregion-531 > ACPI Error (psparse-0633): Method parse/execution failed [\\_SB_.BAT0._BST] > (Node 0xc3e53dc0), AE_NO_HARDWARE_RESPONSE > Same problem with 7.2-STABLE on ACER Aspire 5720. From josef.moellers at ts.fujitsu.com Tue Jun 9 08:15:47 2009 From: josef.moellers at ts.fujitsu.com (Josef Moellers) Date: Tue Jun 9 08:15:55 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <200906081047.17487.jhb@freebsd.org> References: <4A24D29A.5030604@ts.fujitsu.com> <200906051152.24609.jhb@freebsd.org> <4A2CC727.50806@ts.fujitsu.com> <200906081047.17487.jhb@freebsd.org> Message-ID: <4A2E1A34.2010405@ts.fujitsu.com> John Baldwin wrote: > On Monday 08 June 2009 4:09:11 am Josef Moellers wrote: > >> 'morning, >> >> John Baldwin wrote: >> >>> On Friday 05 June 2009 10:51:44 am Josef Moellers wrote: >>> >>> >>>> Hello, >>>> >>>> Thanks for the help! >>>> >>>> John Baldwin wrote: >>>> >>>> >>>>> On Friday 05 June 2009 5:17:25 am Josef Moellers wrote: >>>>> >>>>> >>>>> >>>>>> Difficult, since I can't boot properly. >>>>>> However, I have managed to get the dsdt using a SuSE Linux and have run >>>>>> that through acpidump -d on a 7.2 running on a XEN virtual machine. >>>>>> Here's the result. >>>>>> >>>>>> >>>>>> >>>>> Hmm, your BIOS is certainly hosed. First, it does have separate >>>>> > processor > >>>>> objects: >>>>> >>>>> >>>> [...] >>>> >>>> I'll show this to our BIOS people. When I talked to them before, they >>>> claimed that everything were OK, since the OSes we support do come up >>>> properly. >>>> >>>> >>> I think your BIOS is actually ok, sorry my e-mail was a bit of a stream of >>> conciousness. >>> >>> >> That's what my colleague confirmed ;-) >> However, being the nice guy that he is, he provided me with a >> preliminary extra special test version (he was on the brink of going on >> holiday!), which presents the bridges in their numerical order (0, 1, 2, >> 0xfe, 0xff). With that BIOS, I finally got access to the keyboard and >> RAID controller and all and I'm installing FBSD as I'm writing this. >> >> So, maybe the algorithm shouldn't be "if we find a bridge with number 0 >> which is not the first one, give it another number" shouldn't this be >> "if we find *a* *second* bridge with number 0, give it another number"? >> > > Yes, that's bascially what my patch does. > I promise to do my best to read mails in the future ;-) Yes, you're obviously right. Shame on me. > >>> Ah, if you have a working machine where you can build a kernel, you can >>> > build > >>> an new CD using an existing ISO as a template. Simply build a GENERIC >>> > kernel > >>> and install it into some DESTDIR=/foo and mount the ISO image using >>> > mdconfig > >>> to /dist. Then do something like 'mkisofs -o new.iso -r -J -b >>> boot/cdboot -no-emul-boot -x /dist/boot/kernel /dist /foo'. If that >>> complains about duplicate 'boot/kernel' then you may need to copy all >>> of /dist/boot to /foo/boot, install the new kernel into /foo, and >>> use '-x /dist/boot /dist /foo'. >>> >>> Also, if this machine supports PXE boot at all, that can be a way to boot >>> > a > >>> test kernel as well. >>> >> Maybe that's what we'll have to do after all. >> > > Ok, let me know if it works. Thanks. Yepp! Works like a charm. I had been able to boot the original kernel with the modified BIOS and apply your patch. Then I rebooted with that kernel (on the modified BIOS, i.e. the one with the 0 254 255 bus numbers) and it booted OK. Then I flashed the BIOS back to a release version (i.e. one with 255 254 0 bus numbers) and the patched kernel booted OK and the non-patched kernel (kernel.old) crashed because it did not find its root FS. BTW As I understand it, the 254 and 255 busses are on-chip Nehalem busses which provide access to certain chip registers. Will this make its way into a future release? 8.0? Josef -- These are my personal views and not those of Fujitsu Technology Solutions! Josef M?llers (Pinguinpfleger bei FTS) If failure had no penalty success would not be a prize (T. Pratchett) Company Details: http://de.ts.fujitsu.com/imprint.html From jhb at freebsd.org Tue Jun 9 13:49:42 2009 From: jhb at freebsd.org (John Baldwin) Date: Tue Jun 9 13:49:53 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <4A2E1A34.2010405@ts.fujitsu.com> References: <4A24D29A.5030604@ts.fujitsu.com> <200906081047.17487.jhb@freebsd.org> <4A2E1A34.2010405@ts.fujitsu.com> Message-ID: <200906090939.34827.jhb@freebsd.org> On Tuesday 09 June 2009 4:15:48 am Josef Moellers wrote: > > Ok, let me know if it works. Thanks. > Yepp! Works like a charm. I had been able to boot the original kernel > with the modified BIOS and apply your patch. > Then I rebooted with that kernel (on the modified BIOS, i.e. the one > with the 0 254 255 bus numbers) and it booted OK. Then I flashed the > BIOS back to a release version (i.e. one with 255 254 0 bus numbers) and > the patched kernel booted OK and the non-patched kernel (kernel.old) > crashed because it did not find its root FS. Woo, thanks for testing. > BTW As I understand it, the 254 and 255 busses are on-chip Nehalem > busses which provide access to certain chip registers. > > Will this make its way into a future release? 8.0? Yes, it will be in 8.0 and 7.3. -- John Baldwin From josef.moellers at ts.fujitsu.com Tue Jun 9 13:51:35 2009 From: josef.moellers at ts.fujitsu.com (Josef Moellers) Date: Tue Jun 9 13:51:41 2009 Subject: Failure to get past a PCI bridge In-Reply-To: <200906090939.34827.jhb@freebsd.org> References: <4A24D29A.5030604@ts.fujitsu.com> <200906081047.17487.jhb@freebsd.org> <4A2E1A34.2010405@ts.fujitsu.com> <200906090939.34827.jhb@freebsd.org> Message-ID: <4A2E68E7.50907@ts.fujitsu.com> John Baldwin wrote: > On Tuesday 09 June 2009 4:15:48 am Josef Moellers wrote: > >>> Ok, let me know if it works. Thanks. >>> >> Yepp! Works like a charm. I had been able to boot the original kernel >> with the modified BIOS and apply your patch. >> Then I rebooted with that kernel (on the modified BIOS, i.e. the one >> with the 0 254 255 bus numbers) and it booted OK. Then I flashed the >> BIOS back to a release version (i.e. one with 255 254 0 bus numbers) and >> the patched kernel booted OK and the non-patched kernel (kernel.old) >> crashed because it did not find its root FS. >> > > Woo, thanks for testing. > No problem! Thanks for helping. > >> BTW As I understand it, the 254 and 255 busses are on-chip Nehalem >> busses which provide access to certain chip registers. >> >> Will this make its way into a future release? 8.0? >> > > Yes, it will be in 8.0 and 7.3. Great news, especially the "7.3". Keep up the good work, Josef -- These are my personal views and not those of Fujitsu Technology Solutions! Josef M?llers (Pinguinpfleger bei FTS) If failure had no penalty success would not be a prize (T. Pratchett) Company Details: http://de.ts.fujitsu.com/imprint.html From dan at dburkland.com Tue Jun 9 15:26:20 2009 From: dan at dburkland.com (Daniel Burkland) Date: Tue Jun 9 15:26:26 2009 Subject: Lenovo S10 and ACPI problems Message-ID: <9BF0E9EFFF8AD245AAB6AAB1542D95967AAF0281@mail> I also am experiencing similars error messages when I use shutdown -p on my Vostro 1310. I made a post on the FreeBSD forums which you can find here: http://forums.freebsd.org/showthread.php?t=3513&highlight=vostro+1310 I can run Linux on the machine with no problems but as I am no developer I would have no idea on how to fix this issue. Dan From freebsd-bugs2 at wesha.name Wed Jun 10 17:00:13 2009 From: freebsd-bugs2 at wesha.name (Wesha) Date: Wed Jun 10 17:00:20 2009 Subject: kern/132602: [acpi] ACPI Problem with Intel SS4200: System does not power off Message-ID: <200906101700.n5AH0CX5021912@freefall.freebsd.org> The following reply was made to PR kern/132602; it has been noted by GNATS. From: Wesha To: bug-followup@FreeBSD.org, MasterOne@o0l0o.org Cc: Subject: Re: kern/132602: [acpi] ACPI Problem with Intel SS4200: System does not power off Date: Wed, 10 Jun 2009 11:40:17 -0500 ------------25741E13756C1AC Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Hello Bug-followup, It turns out that it powers off just fine if USB controller is disabled in SS4200 BIOS. Hope it would give some leads. See screenshot @ http://ss4200.pbworks.com/FreeNAS-0_70 --=20 Best regards, Wesha mailto:freebsd-bugs2@wesha.name ------------25741E13756C1AC Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: 2.6 iQEVAwUASi/h8LY28H2PPbCpAQEsugf9EUwJPNnywPisPAVbLzDB+S6ml9yPLUmY jGCo5XTLgr5rkQUxJ4RJOB66DMMuZtKDvyxZHiZWjBpInbP5uiujolDFeSG/EogK AVMnm7vUdILULQXzrnGW+/3hSgCPiN0J8Llsi54z3C6T+u8wKtNarxVDqee329mo fDGjdj7yIazIngaJGslR7AeVRgEZvA5nnrsFGcAzoRVE874SbAhqiV4YS0txzDX2 5RI7MscZ756uWzflwDIjeOeMHk4L4lY6T6ZX7FaA3BH3yobl7wPn61kPyYLg1poH s7N3NIV2D2nWxiBYVw00eQqXAHX4UvFOSFUhpS2d6eMIwnrMuE90ng== =6bkl -----END PGP MESSAGE----- ------------25741E13756C1AC-- From naylor.b.david at gmail.com Wed Jun 10 20:18:07 2009 From: naylor.b.david at gmail.com (David Naylor) Date: Wed Jun 10 20:18:14 2009 Subject: Missing hw.acpi.poll_timeout (and other tunable) Message-ID: <200906102219.13050.naylor.b.david@gmail.com> Hi, While trying to debug my misbehaving ACPI I tried using hw.acpi.poll_timeout. When trying to find the default value I couldn't find any reference to it in the source codes: # find /usr/src -type f | xargs -i poll_timeout | grep ./share/man/man4/acpi.4:.It Va hw.acpi.ec.poll_timeout This tunable is documented in acpi(4). Is there a reason for this being removed. Also there are other tunables that may be useful for diagnostics (although they didn't work for me) that are not mentioned in the man pages. These are debug.acpi.ec.burst, debug.acpi.ec.polled, debug.acpi.ec.timeout (may be the above tunable renamed?) [although I got the impression that these tunables where 'temporary', if so please ignore]. My apologies if I've preempted pending commits for acpi. Regards, David P.S. Not on mailing-list -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: This is a digitally signed message part. Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090610/bda2b92c/attachment.pgp From nate at root.org Fri Jun 12 21:48:01 2009 From: nate at root.org (Nate Lawson) Date: Fri Jun 12 21:48:07 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: References: Message-ID: <4A32CA38.4020806@root.org> Eygene Ryabinkin wrote: > It is not uncommon when some chunks of the AML code are loaded by DSDT > from the memory locations that aren't part of the DSDT itself, but one > wants to see what's inside. It can be achieved with 'dd' and 'iasl', > but it is better to implement this machinery inside acpidump to ease the > life of both users and develepers that needs to see the full picture > of the ACPI stuff from foreign machines. > > This commit also have some small fixes: > > - verbose output (going to stderr) isn't mixed with normal output > that goes to stdout -- the latter is made unbuffered; > > - we're using IASL's logics to get the name of the output file and, > moreover, we prevent two simultaneous invocations of acpidump > to hose other's output; > > - IASL exit code is checked and if disassembler exited abnormally > or was failed to do its job, the warning is produced to give > the reader an idea on what's going on. > > Signed-off-by: Eygene Ryabinkin I appreciate your work. What we need to do though is remove acpidump(8) from the system and import Intel's acpidmp utility. It's included in the ACPI-CA distribution and is functional enough that we can use it. Any functions we need that it doesn't yet have can be submitted to Intel to merge. Thanks, -- Nate From robert.moore at intel.com Fri Jun 12 22:02:38 2009 From: robert.moore at intel.com (Moore, Robert) Date: Fri Jun 12 22:02:45 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4A32CA38.4020806@root.org> References: <4A32CA38.4020806@root.org> Message-ID: <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> Actually, we don't distribute an acpidump (yet) in ACPICA. The Linux version is part of the "pmtools" package. It is of course, linux-specific. I won't distribute it with ACPICA until we have an OS-independent version. It is on our list of things to-do. The formatting code is rather simple, but it would be best to have one instance of the code, part of acpica. It would go like this: Get rsdt/xsdt -> call to OSL For all tables: Get acpi table -> call to OSL Dump the table >-----Original Message----- >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >acpi@freebsd.org] On Behalf Of Nate Lawson >Sent: Friday, June 12, 2009 2:36 PM >To: Eygene Ryabinkin >Cc: freebsd-acpi@freebsd.org >Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary memory >locations as AML code > >Eygene Ryabinkin wrote: >> It is not uncommon when some chunks of the AML code are loaded by DSDT >> from the memory locations that aren't part of the DSDT itself, but one >> wants to see what's inside. It can be achieved with 'dd' and 'iasl', >> but it is better to implement this machinery inside acpidump to ease the >> life of both users and develepers that needs to see the full picture >> of the ACPI stuff from foreign machines. >> >> This commit also have some small fixes: >> >> - verbose output (going to stderr) isn't mixed with normal output >> that goes to stdout -- the latter is made unbuffered; >> >> - we're using IASL's logics to get the name of the output file and, >> moreover, we prevent two simultaneous invocations of acpidump >> to hose other's output; >> >> - IASL exit code is checked and if disassembler exited abnormally >> or was failed to do its job, the warning is produced to give >> the reader an idea on what's going on. >> >> Signed-off-by: Eygene Ryabinkin > >I appreciate your work. What we need to do though is remove acpidump(8) >from the system and import Intel's acpidmp utility. It's included in the >ACPI-CA distribution and is functional enough that we can use it. > >Any functions we need that it doesn't yet have can be submitted to Intel >to merge. > >Thanks, >-- >Nate >_______________________________________________ >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" From jkim at FreeBSD.org Fri Jun 12 22:34:38 2009 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Fri Jun 12 22:34:45 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> Message-ID: <200906121834.30294.jkim@FreeBSD.org> On Friday 12 June 2009 06:02 pm, Moore, Robert wrote: > Actually, we don't distribute an acpidump (yet) in ACPICA. The > Linux version is part of the "pmtools" package. > > It is of course, linux-specific. I won't distribute it with ACPICA > until we have an OS-independent version. It is on our list of > things to-do. FYI, it won't be terribly hard to port it because we also use /dev/mem. However, the source is acpisrc'ified and we cannot undo it to make it compile on FreeBSD. :-( Jung-uk Kim > The formatting code is rather simple, but it would be best to have > one instance of the code, part of acpica. > > It would go like this: > > Get rsdt/xsdt -> call to OSL > For all tables: > Get acpi table -> call to OSL > Dump the table > > >-----Original Message----- > >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- > >acpi@freebsd.org] On Behalf Of Nate Lawson > >Sent: Friday, June 12, 2009 2:36 PM > >To: Eygene Ryabinkin > >Cc: freebsd-acpi@freebsd.org > >Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary > > memory locations as AML code > > > >Eygene Ryabinkin wrote: > >> It is not uncommon when some chunks of the AML code are loaded > >> by DSDT from the memory locations that aren't part of the DSDT > >> itself, but one wants to see what's inside. It can be achieved > >> with 'dd' and 'iasl', but it is better to implement this > >> machinery inside acpidump to ease the life of both users and > >> develepers that needs to see the full picture of the ACPI stuff > >> from foreign machines. > >> > >> This commit also have some small fixes: > >> > >> - verbose output (going to stderr) isn't mixed with normal > >> output that goes to stdout -- the latter is made unbuffered; > >> > >> - we're using IASL's logics to get the name of the output file > >> and, moreover, we prevent two simultaneous invocations of > >> acpidump to hose other's output; > >> > >> - IASL exit code is checked and if disassembler exited > >> abnormally or was failed to do its job, the warning is produced > >> to give the reader an idea on what's going on. > >> > >> Signed-off-by: Eygene Ryabinkin > > > >I appreciate your work. What we need to do though is remove > > acpidump(8) from the system and import Intel's acpidmp utility. > > It's included in the ACPI-CA distribution and is functional > > enough that we can use it. > > > >Any functions we need that it doesn't yet have can be submitted to > > Intel to merge. > > > >Thanks, > >-- > >Nate > >_______________________________________________ > >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" > > _______________________________________________ > 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" From peter.piggybox at virgin.net Sat Jun 13 09:18:52 2009 From: peter.piggybox at virgin.net (Peter Harrison) Date: Sat Jun 13 09:18:59 2009 Subject: ACPI problems with lenovo s10e Message-ID: <20090613080039.GA1934@ideapad.piggybox> I'm having some acpi problems with a lenovo s10e netbook. The machine boots and runs basically OK, but it doesn't poweroff on shutdown -p and it seems to have a problem querying the battery's status. It will sometimes continually spam this to /var/log/messages: 175a176,212 > acpi_ec0: wait timed out (no response), forcing polled mode > acpi_ec0: EcRead: failed waiting to get data > ACPI Exception (evregion-0529): AE_NO_HARDWARE_RESPONSE, Returned by Handler for [EmbeddedControl] [20070320] > ACPI Error (psparse-0626): Method parse/execution failed [\\_SB_.BAT0.UPBS] (Node 0xc45bfac0), AE_NO_HARDWARE_RESPONSE over and over again. It doesn't happen on every boot, but on some it's so bad that the system will become sporadically unresponsive for a second or two at a time throughout use. I've been scanning through the acpi man page and wondered whether turning off part of the acpi system would help - if so which bit? Would upgrading to CURRENT help? Any thoughts or help really appreciated. Please cc me as I'm not subscribed. Thanks, Peter Harrison. This is on: FreeBSD ideapad.piggybox 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 UTC 2009 root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 and here's a dmesg from a 'good' boot: Copyright (c) 1992-2009 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 UTC 2009 root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (1596.01-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x106c2 Stepping = 2 Features=0xbfe9fbff Features2=0x40c39d> AMD Features=0x100000 AMD Features2=0x1 Logical CPUs per core: 2 real memory = 1064108032 (1014 MB) avail memory = 1023393792 (975 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP/HT): APIC ID: 1 ioapic0: Changing APIC ID to 1 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) Timecounter "HPET" frequency 14318180 Hz quality 900 Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 acpi_button0: on acpi0 acpi_button1: on acpi0 acpi_acad0: on acpi0 battery0: on acpi0 acpi_lid0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 vgapci0: port 0x1800-0x1807 mem 0xf0500000-0xf057ffff,0xd0000000-0xdfffffff,0xf0600000-0xf063ffff irq 16 at device 2.0 on pci0 agp0: on vgapci0 agp0: detected 7932k stolen memory agp0: aperture size is 256M vgapci1: mem 0xf0580000-0xf05fffff at device 2.1 on pci0 hdac0: mem 0xf0640000-0xf0643fff irq 22 at device 27.0 on pci0 hdac0: HDA Driver Revision: 20090329_0131 hdac0: [ITHREAD] pcib1: irq 17 at device 28.0 on pci0 pci2: on pcib1 bge0: mem 0xf0200000-0xf020ffff irq 16 at device 0.0 on pci2 miibus0: on bge0 brgphy0: PHY 1 on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto bge0: Ethernet address: 00:23:8b:34:79:8a bge0: [ITHREAD] pcib2: irq 16 at device 28.1 on pci0 pci3: on pcib2 pcib3: irq 18 at device 28.2 on pci0 pci5: on pcib3 ndis0: mem 0xf0400000-0xf0403fff irq 18 at device 0.0 on pci5 ndis0: [ITHREAD] ndis0: NDIS API version: 5.1 ndis0: WARNING: using obsoleted if_watchdog interface ndis0: Ethernet address: 00:23:4e:93:a4:de uhci0: port 0x1820-0x183f irq 23 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] uhci0: [ITHREAD] usb0: on uhci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x1840-0x185f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] uhci1: [ITHREAD] usb1: on uhci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0x1860-0x187f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] uhci2: [ITHREAD] usb2: on uhci2 usb2: USB revision 1.0 uhub2: on usb2 uhub2: 2 ports with 2 removable, self powered uhci3: port 0x1880-0x189f irq 16 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] uhci3: [ITHREAD] usb3: on uhci3 usb3: USB revision 1.0 uhub3: on usb3 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xf0844000-0xf08443ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: on usb4 uhub4: 8 ports with 8 removable, self powered ugen0: on uhub4 umass0: on uhub4 pcib4: at device 30.0 on pci0 pci6: on pcib4 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1810-0x181f at device 31.1 on pci0 ata0: on atapci0 ata0: [ITHREAD] atapci1: port 0x18c8-0x18cf,0x18c0-0x18c3,0x18a8-0x18af,0x180c-0x180f,0x18b0-0x18bf mem 0xf0844400-0xf08447ff irq 19 at device 31.2 on pci0 atapci1: [ITHREAD] atapci1: AHCI called from vendor specific driver atapci1: AHCI Version 01.10 controller with 4 ports detected ata2: on atapci1 ata2: [ITHREAD] ata3: on atapci1 ata3: port not implemented ata3: [ITHREAD] ata4: on atapci1 ata4: [ITHREAD] ata5: on atapci1 ata5: port not implemented ata5: [ITHREAD] pci0: at device 31.3 (no driver attached) acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model Generic PS/2 mouse, device ID 0 cpu0: on acpi0 est0: on cpu0 p4tcc0: on cpu0 cpu1: on acpi0 est1: on cpu1 p4tcc1: on cpu1 pmtimer0 on isa0 orm0: at iomem 0xdf000-0xdf7ff,0xe0000-0xe17ff pnpid ORM0000 on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 8250 or not responding sio0: [FILTER] sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ugen1: on uhub1 Timecounters tick every 1.000 msec ad4: 76319MB at ata2-master SATA150 hdac0: HDA Codec #0: Realtek ALC269 pcm0: at cad 0 nid 1 on hdac0 GEOM_LABEL: Label for provider ad4s1a is ufsid/4a20f9c76d1ce80d. GEOM_LABEL: Label for provider ad4s1d is ufsid/4a20f9cb4eb76445. GEOM_LABEL: Label for provider ad4s1e is ufsid/4a20f9c7c991bdb8. GEOM_LABEL: Label for provider ad4s1f is ufsid/4a20f9c769a0ccbb. (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition (probe0:umass-sim0:0:0:0): NOT READY asc:3a,0 (probe0:umass-sim0:0:0:0): Medium not present (probe0:umass-sim0:0:0:0): Unretryable error SMP: AP CPU #1 Launched! da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present Trying to mount root from ufs:/dev/ad4s1a GEOM_LABEL: Label ufsid/4a20f9c76d1ce80d removed. GEOM_LABEL: Label for provider ad4s1a is ufsid/4a20f9c76d1ce80d. GEOM_LABEL: Label ufsid/4a20f9c7c991bdb8 removed. GEOM_LABEL: Label for provider ad4s1e is ufsid/4a20f9c7c991bdb8. GEOM_LABEL: Label ufsid/4a20f9c769a0ccbb removed. GEOM_LABEL: Label for provider ad4s1f is ufsid/4a20f9c769a0ccbb. GEOM_LABEL: Label ufsid/4a20f9cb4eb76445 removed. GEOM_LABEL: Label for provider ad4s1d is ufsid/4a20f9cb4eb76445. GEOM_LABEL: Label ufsid/4a20f9c76d1ce80d removed. GEOM_LABEL: Label ufsid/4a20f9c7c991bdb8 removed. GEOM_LABEL: Label ufsid/4a20f9c769a0ccbb removed. GEOM_LABEL: Label ufsid/4a20f9cb4eb76445 removed. drm0: on vgapci0 vgapci0: child drm0 requested pci_enable_busmaster info: [drm] AGP at 0xd0000000 256MB info: [drm] Initialized i915 1.6.0 20080730 drm0: [ITHREAD] From peter.piggybox at virgin.net Sat Jun 13 15:14:21 2009 From: peter.piggybox at virgin.net (Peter Harrison) Date: Sat Jun 13 15:14:28 2009 Subject: ACPI problems with lenovo s10e In-Reply-To: References: <20090613080039.GA1934@ideapad.piggybox> Message-ID: <20090613141318.GA1090@ideapad.piggybox> Saturday, 13 June 2009 at 17:38:16 +0400, Nikolay Tychina said: > try to disable "ec" Do I do that with debug.acpi.disable=ec in loader.conf? What functionality will I lose by setting that? Thanks for your help. Peter Harrison. > > > 2009/6/13 Peter Harrison > > > I'm having some acpi problems with a lenovo s10e netbook. > > > > The machine boots and runs basically OK, but it doesn't poweroff on > > shutdown -p and it seems to have a problem querying the battery's status. It > > will sometimes continually spam this to /var/log/messages: > > > > 175a176,212 > > > acpi_ec0: wait timed out (no response), forcing polled mode > > > acpi_ec0: EcRead: failed waiting to get data > > > ACPI Exception (evregion-0529): AE_NO_HARDWARE_RESPONSE, Returned by > > Handler for [EmbeddedControl] [20070320] > > > ACPI Error (psparse-0626): Method parse/execution failed > > [\\_SB_.BAT0.UPBS] (Node 0xc45bfac0), AE_NO_HARDWARE_RESPONSE > > > > over and over again. > > > > It doesn't happen on every boot, but on some it's so bad that the system > > will become sporadically unresponsive for a second or two at a time > > throughout use. > > > > I've been scanning through the acpi man page and wondered whether turning > > off part of the acpi system would help - if so which bit? Would upgrading to > > CURRENT help? Any thoughts or help really appreciated. > > > > Please cc me as I'm not subscribed. Thanks, > > > > > > Peter Harrison. > > > > > > > > This is on: > > > > FreeBSD ideapad.piggybox 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 > > 08:49:13 UTC 2009 root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > > i386 > > > > and here's a dmesg from a 'good' boot: > > > > Copyright (c) 1992-2009 The FreeBSD Project. > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > > The Regents of the University of California. All rights reserved. > > FreeBSD is a registered trademark of The FreeBSD Foundation. > > FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 UTC 2009 > > root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > > Timecounter "i8254" frequency 1193182 Hz quality 0 > > CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (1596.01-MHz 686-class CPU) > > Origin = "GenuineIntel" Id = 0x106c2 Stepping = 2 > > > > Features=0xbfe9fbff > > Features2=0x40c39d> > > AMD Features=0x100000 > > AMD Features2=0x1 > > Logical CPUs per core: 2 > > real memory = 1064108032 (1014 MB) > > avail memory = 1023393792 (975 MB) > > ACPI APIC Table: > > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs > > cpu0 (BSP): APIC ID: 0 > > cpu1 (AP/HT): APIC ID: 1 > > ioapic0: Changing APIC ID to 1 > > ioapic0 irqs 0-23 on motherboard > > kbd1 at kbdmux0 > > acpi0: on motherboard > > acpi0: [ITHREAD] > > acpi0: Power Button (fixed) > > Timecounter "HPET" frequency 14318180 Hz quality 900 > > Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 > > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 > > acpi_ec0: port 0x62,0x66 on acpi0 > > acpi_button0: on acpi0 > > acpi_button1: on acpi0 > > acpi_acad0: on acpi0 > > battery0: on acpi0 > > acpi_lid0: on acpi0 > > pcib0: port 0xcf8-0xcff on acpi0 > > pci0: on pcib0 > > vgapci0: port 0x1800-0x1807 mem > > 0xf0500000-0xf057ffff,0xd0000000-0xdfffffff,0xf0600000-0xf063ffff irq 16 at > > device 2.0 on pci0 > > agp0: on vgapci0 > > agp0: detected 7932k stolen memory > > agp0: aperture size is 256M > > vgapci1: mem 0xf0580000-0xf05fffff at device 2.1 > > on pci0 > > hdac0: mem > > 0xf0640000-0xf0643fff irq 22 at device 27.0 on pci0 > > hdac0: HDA Driver Revision: 20090329_0131 > > hdac0: [ITHREAD] > > pcib1: irq 17 at device 28.0 on pci0 > > pci2: on pcib1 > > bge0: mem 0xf0200000-0xf020ffff irq > > 16 at device 0.0 on pci2 > > miibus0: on bge0 > > brgphy0: PHY 1 on miibus0 > > brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > > bge0: Ethernet address: 00:23:8b:34:79:8a > > bge0: [ITHREAD] > > pcib2: irq 16 at device 28.1 on pci0 > > pci3: on pcib2 > > pcib3: irq 18 at device 28.2 on pci0 > > pci5: on pcib3 > > ndis0: mem 0xf0400000-0xf0403fff irq 18 > > at device 0.0 on pci5 > > ndis0: [ITHREAD] > > ndis0: NDIS API version: 5.1 > > ndis0: WARNING: using obsoleted if_watchdog interface > > ndis0: Ethernet address: 00:23:4e:93:a4:de > > uhci0: port 0x1820-0x183f irq 23 at device > > 29.0 on pci0 > > uhci0: [GIANT-LOCKED] > > uhci0: [ITHREAD] > > usb0: on uhci0 > > usb0: USB revision 1.0 > > uhub0: on usb0 > > uhub0: 2 ports with 2 removable, self powered > > uhci1: port 0x1840-0x185f irq 19 at device > > 29.1 on pci0 > > uhci1: [GIANT-LOCKED] > > uhci1: [ITHREAD] > > usb1: on uhci1 > > usb1: USB revision 1.0 > > uhub1: on usb1 > > uhub1: 2 ports with 2 removable, self powered > > uhci2: port 0x1860-0x187f irq 18 at device > > 29.2 on pci0 > > uhci2: [GIANT-LOCKED] > > uhci2: [ITHREAD] > > usb2: on uhci2 > > usb2: USB revision 1.0 > > uhub2: on usb2 > > uhub2: 2 ports with 2 removable, self powered > > uhci3: port 0x1880-0x189f irq 16 at device > > 29.3 on pci0 > > uhci3: [GIANT-LOCKED] > > uhci3: [ITHREAD] > > usb3: on uhci3 > > usb3: USB revision 1.0 > > uhub3: on usb3 > > uhub3: 2 ports with 2 removable, self powered > > ehci0: mem > > 0xf0844000-0xf08443ff irq 23 at device 29.7 on pci0 > > ehci0: [GIANT-LOCKED] > > ehci0: [ITHREAD] > > usb4: EHCI version 1.0 > > usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 > > usb4: on ehci0 > > usb4: USB revision 2.0 > > uhub4: on usb4 > > uhub4: 8 ports with 8 removable, self powered > > ugen0: > addr 2> on uhub4 > > umass0: on uhub4 > > pcib4: at device 30.0 on pci0 > > pci6: on pcib4 > > isab0: at device 31.0 on pci0 > > isa0: on isab0 > > atapci0: port > > 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1810-0x181f at device 31.1 on pci0 > > ata0: on atapci0 > > ata0: [ITHREAD] > > atapci1: port > > 0x18c8-0x18cf,0x18c0-0x18c3,0x18a8-0x18af,0x180c-0x180f,0x18b0-0x18bf mem > > 0xf0844400-0xf08447ff irq 19 at device 31.2 on pci0 > > atapci1: [ITHREAD] > > atapci1: AHCI called from vendor specific driver > > atapci1: AHCI Version 01.10 controller with 4 ports detected > > ata2: on atapci1 > > ata2: [ITHREAD] > > ata3: on atapci1 > > ata3: port not implemented > > ata3: [ITHREAD] > > ata4: on atapci1 > > ata4: [ITHREAD] > > ata5: on atapci1 > > ata5: port not implemented > > ata5: [ITHREAD] > > pci0: at device 31.3 (no driver attached) > > acpi_tz0: on acpi0 > > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > > atkbd0: irq 1 on atkbdc0 > > kbd0 at atkbd0 > > atkbd0: [GIANT-LOCKED] > > atkbd0: [ITHREAD] > > psm0: irq 12 on atkbdc0 > > psm0: [GIANT-LOCKED] > > psm0: [ITHREAD] > > psm0: model Generic PS/2 mouse, device ID 0 > > cpu0: on acpi0 > > est0: on cpu0 > > p4tcc0: on cpu0 > > cpu1: on acpi0 > > est1: on cpu1 > > p4tcc1: on cpu1 > > pmtimer0 on isa0 > > orm0: at iomem 0xdf000-0xdf7ff,0xe0000-0xe17ff pnpid > > ORM0000 on isa0 > > ppc0: parallel port not found. > > sc0: at flags 0x100 on isa0 > > sc0: VGA <16 virtual consoles, flags=0x300> > > sio0: configured irq 4 not in bitmap of probed irqs 0 > > sio0: port may not be enabled > > sio0: configured irq 4 not in bitmap of probed irqs 0 > > sio0: port may not be enabled > > sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 > > sio0: type 8250 or not responding > > sio0: [FILTER] > > sio1: configured irq 3 not in bitmap of probed irqs 0 > > sio1: port may not be enabled > > vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 > > ugen1: > addr 2> on uhub1 > > Timecounters tick every 1.000 msec > > ad4: 76319MB at ata2-master SATA150 > > hdac0: HDA Codec #0: Realtek ALC269 > > pcm0: at cad 0 nid 1 on hdac0 > > GEOM_LABEL: Label for provider ad4s1a is ufsid/4a20f9c76d1ce80d. > > GEOM_LABEL: Label for provider ad4s1d is ufsid/4a20f9cb4eb76445. > > GEOM_LABEL: Label for provider ad4s1e is ufsid/4a20f9c7c991bdb8. > > GEOM_LABEL: Label for provider ad4s1f is ufsid/4a20f9c769a0ccbb. > > (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 > > (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error > > (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition > > (probe0:umass-sim0:0:0:0): NOT READY asc:3a,0 > > (probe0:umass-sim0:0:0:0): Medium not present > > (probe0:umass-sim0:0:0:0): Unretryable error > > SMP: AP CPU #1 Launched! > > da0 at umass-sim0 bus 0 target 0 lun 0 > > da0: Removable Direct Access SCSI-0 device > > da0: 40.000MB/s transfers > > da0: Attempt to query device size failed: NOT READY, Medium not present > > Trying to mount root from ufs:/dev/ad4s1a > > GEOM_LABEL: Label ufsid/4a20f9c76d1ce80d removed. > > GEOM_LABEL: Label for provider ad4s1a is ufsid/4a20f9c76d1ce80d. > > GEOM_LABEL: Label ufsid/4a20f9c7c991bdb8 removed. > > GEOM_LABEL: Label for provider ad4s1e is ufsid/4a20f9c7c991bdb8. > > GEOM_LABEL: Label ufsid/4a20f9c769a0ccbb removed. > > GEOM_LABEL: Label for provider ad4s1f is ufsid/4a20f9c769a0ccbb. > > GEOM_LABEL: Label ufsid/4a20f9cb4eb76445 removed. > > GEOM_LABEL: Label for provider ad4s1d is ufsid/4a20f9cb4eb76445. > > GEOM_LABEL: Label ufsid/4a20f9c76d1ce80d removed. > > GEOM_LABEL: Label ufsid/4a20f9c7c991bdb8 removed. > > GEOM_LABEL: Label ufsid/4a20f9c769a0ccbb removed. > > GEOM_LABEL: Label ufsid/4a20f9cb4eb76445 removed. > > drm0: on vgapci0 > > vgapci0: child drm0 requested pci_enable_busmaster > > info: [drm] AGP at 0xd0000000 256MB > > info: [drm] Initialized i915 1.6.0 20080730 > > drm0: [ITHREAD] > > _______________________________________________ > > 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" > > From kris at FreeBSD.org Sun Jun 14 12:39:40 2009 From: kris at FreeBSD.org (Kris Kennaway) Date: Sun Jun 14 12:39:47 2009 Subject: ACPI-fast default timecounter, but HPET 83% faster In-Reply-To: <200904300846.41576.jhb@freebsd.org> References: <200904270150.31912.pieter@degoeje.nl> <7d6fde3d0904261927s1a67cf85jc982c1a68e30e081@mail.gmail.com> <200904300846.41576.jhb@freebsd.org> Message-ID: <4A34EF89.10107@FreeBSD.org> John Baldwin wrote: > 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". > From memory, HPET was massively slower on some of the AMD test hardware I was using. There was a thread about it on one of the mailing lists, but I can't find it right now. Kris From kris at FreeBSD.org Sun Jun 14 12:39:41 2009 From: kris at FreeBSD.org (Kris Kennaway) Date: Sun Jun 14 12:39:58 2009 Subject: ACPI-fast default timecounter, but HPET 83% faster In-Reply-To: <200904300846.41576.jhb@freebsd.org> References: <200904270150.31912.pieter@degoeje.nl> <7d6fde3d0904261927s1a67cf85jc982c1a68e30e081@mail.gmail.com> <200904300846.41576.jhb@freebsd.org> Message-ID: <4A34EF89.10107@FreeBSD.org> John Baldwin wrote: > 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". > From memory, HPET was massively slower on some of the AMD test hardware I was using. There was a thread about it on one of the mailing lists, but I can't find it right now. Kris From peter.piggybox at virgin.net Sun Jun 14 20:32:29 2009 From: peter.piggybox at virgin.net (Peter Harrison) Date: Sun Jun 14 20:32:36 2009 Subject: ACPI problems with lenovo s10e In-Reply-To: References: <20090613080039.GA1934@ideapad.piggybox> <20090613141318.GA1090@ideapad.piggybox> Message-ID: <20090614193117.GA1016@ideapad.piggybox> Sunday, 14 June 2009 at 0:13:54 +0400, Nikolay Tychina said: > debug.acpi.disabled="ec" > right, in /boot/loader.conf > > you will miss.. uh, i don't know > I lost battery (but it didn't work for me anyway) OK, I'll give that a go. Thanks for the advice. I guess you just mean battery info, and I can probably live without that since it's a bit flaky anyway and is effecting system stability. I have managed to mitigate the impact by reducing debug.acpi.ec.timeout to about 100. Thanks again. Peter Harrison. > > > 2009/6/13 Peter Harrison > > > Saturday, 13 June 2009 at 17:38:16 +0400, Nikolay Tychina said: > > > try to disable "ec" > > > > Do I do that with debug.acpi.disable=ec in loader.conf? > > > > What functionality will I lose by setting that? > > > > Thanks for your help. > > > > > > Peter Harrison. > > > > > > > > > > > > > > > 2009/6/13 Peter Harrison > > > > > > > I'm having some acpi problems with a lenovo s10e netbook. > > > > > > > > The machine boots and runs basically OK, but it doesn't poweroff on > > > > shutdown -p and it seems to have a problem querying the battery's > > status. It > > > > will sometimes continually spam this to /var/log/messages: > > > > > > > > 175a176,212 > > > > > acpi_ec0: wait timed out (no response), forcing polled mode > > > > > acpi_ec0: EcRead: failed waiting to get data > > > > > ACPI Exception (evregion-0529): AE_NO_HARDWARE_RESPONSE, Returned by > > > > Handler for [EmbeddedControl] [20070320] > > > > > ACPI Error (psparse-0626): Method parse/execution failed > > > > [\\_SB_.BAT0.UPBS] (Node 0xc45bfac0), AE_NO_HARDWARE_RESPONSE > > > > > > > > over and over again. > > > > > > > > It doesn't happen on every boot, but on some it's so bad that the > > system > > > > will become sporadically unresponsive for a second or two at a time > > > > throughout use. > > > > > > > > I've been scanning through the acpi man page and wondered whether > > turning > > > > off part of the acpi system would help - if so which bit? Would > > upgrading to > > > > CURRENT help? Any thoughts or help really appreciated. > > > > > > > > Please cc me as I'm not subscribed. Thanks, > > > > > > > > > > > > Peter Harrison. > > > > > > > > > > > > > > > > This is on: > > > > > > > > FreeBSD ideapad.piggybox 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 > > > > 08:49:13 UTC 2009 root@walker.cse.buffalo.edu: > > /usr/obj/usr/src/sys/GENERIC > > > > i386 > > > > > > > > and here's a dmesg from a 'good' boot: > > > > > > > > Copyright (c) 1992-2009 The FreeBSD Project. > > > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, > > 1994 > > > > The Regents of the University of California. All rights > > reserved. > > > > FreeBSD is a registered trademark of The FreeBSD Foundation. > > > > FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 UTC 2009 > > > > root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > > > > Timecounter "i8254" frequency 1193182 Hz quality 0 > > > > CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (1596.01-MHz 686-class CPU) > > > > Origin = "GenuineIntel" Id = 0x106c2 Stepping = 2 > > > > > > > > > > Features=0xbfe9fbff > > > > > > Features2=0x40c39d> > > > > AMD Features=0x100000 > > > > AMD Features2=0x1 > > > > Logical CPUs per core: 2 > > > > real memory = 1064108032 (1014 MB) > > > > avail memory = 1023393792 (975 MB) > > > > ACPI APIC Table: > > > > FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs > > > > cpu0 (BSP): APIC ID: 0 > > > > cpu1 (AP/HT): APIC ID: 1 > > > > ioapic0: Changing APIC ID to 1 > > > > ioapic0 irqs 0-23 on motherboard > > > > kbd1 at kbdmux0 > > > > acpi0: on motherboard > > > > acpi0: [ITHREAD] > > > > acpi0: Power Button (fixed) > > > > Timecounter "HPET" frequency 14318180 Hz quality 900 > > > > Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 > > > > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 > > > > acpi_ec0: port 0x62,0x66 on acpi0 > > > > acpi_button0: on acpi0 > > > > acpi_button1: on acpi0 > > > > acpi_acad0: on acpi0 > > > > battery0: on acpi0 > > > > acpi_lid0: on acpi0 > > > > pcib0: port 0xcf8-0xcff on acpi0 > > > > pci0: on pcib0 > > > > vgapci0: port 0x1800-0x1807 mem > > > > 0xf0500000-0xf057ffff,0xd0000000-0xdfffffff,0xf0600000-0xf063ffff irq > > 16 at > > > > device 2.0 on pci0 > > > > agp0: on vgapci0 > > > > agp0: detected 7932k stolen memory > > > > agp0: aperture size is 256M > > > > vgapci1: mem 0xf0580000-0xf05fffff at device > > 2.1 > > > > on pci0 > > > > hdac0: mem > > > > 0xf0640000-0xf0643fff irq 22 at device 27.0 on pci0 > > > > hdac0: HDA Driver Revision: 20090329_0131 > > > > hdac0: [ITHREAD] > > > > pcib1: irq 17 at device 28.0 on pci0 > > > > pci2: on pcib1 > > > > bge0: mem 0xf0200000-0xf020ffff > > irq > > > > 16 at device 0.0 on pci2 > > > > miibus0: on bge0 > > > > brgphy0: PHY 1 on miibus0 > > > > brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto > > > > bge0: Ethernet address: 00:23:8b:34:79:8a > > > > bge0: [ITHREAD] > > > > pcib2: irq 16 at device 28.1 on pci0 > > > > pci3: on pcib2 > > > > pcib3: irq 18 at device 28.2 on pci0 > > > > pci5: on pcib3 > > > > ndis0: mem 0xf0400000-0xf0403fff irq > > 18 > > > > at device 0.0 on pci5 > > > > ndis0: [ITHREAD] > > > > ndis0: NDIS API version: 5.1 > > > > ndis0: WARNING: using obsoleted if_watchdog interface > > > > ndis0: Ethernet address: 00:23:4e:93:a4:de > > > > uhci0: port 0x1820-0x183f irq 23 at > > device > > > > 29.0 on pci0 > > > > uhci0: [GIANT-LOCKED] > > > > uhci0: [ITHREAD] > > > > usb0: on uhci0 > > > > usb0: USB revision 1.0 > > > > uhub0: on usb0 > > > > uhub0: 2 ports with 2 removable, self powered > > > > uhci1: port 0x1840-0x185f irq 19 at > > device > > > > 29.1 on pci0 > > > > uhci1: [GIANT-LOCKED] > > > > uhci1: [ITHREAD] > > > > usb1: on uhci1 > > > > usb1: USB revision 1.0 > > > > uhub1: on usb1 > > > > uhub1: 2 ports with 2 removable, self powered > > > > uhci2: port 0x1860-0x187f irq 18 at > > device > > > > 29.2 on pci0 > > > > uhci2: [GIANT-LOCKED] > > > > uhci2: [ITHREAD] > > > > usb2: on uhci2 > > > > usb2: USB revision 1.0 > > > > uhub2: on usb2 > > > > uhub2: 2 ports with 2 removable, self powered > > > > uhci3: port 0x1880-0x189f irq 16 at > > device > > > > 29.3 on pci0 > > > > uhci3: [GIANT-LOCKED] > > > > uhci3: [ITHREAD] > > > > usb3: on uhci3 > > > > usb3: USB revision 1.0 > > > > uhub3: on usb3 > > > > uhub3: 2 ports with 2 removable, self powered > > > > ehci0: mem > > > > 0xf0844000-0xf08443ff irq 23 at device 29.7 on pci0 > > > > ehci0: [GIANT-LOCKED] > > > > ehci0: [ITHREAD] > > > > usb4: EHCI version 1.0 > > > > usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 > > > > usb4: on ehci0 > > > > usb4: USB revision 2.0 > > > > uhub4: on usb4 > > > > uhub4: 8 ports with 8 removable, self powered > > > > ugen0: > 2.00/14.04, > > > > addr 2> on uhub4 > > > > umass0: on > > uhub4 > > > > pcib4: at device 30.0 on pci0 > > > > pci6: on pcib4 > > > > isab0: at device 31.0 on pci0 > > > > isa0: on isab0 > > > > atapci0: port > > > > 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1810-0x181f at device 31.1 on > > pci0 > > > > ata0: on atapci0 > > > > ata0: [ITHREAD] > > > > atapci1: port > > > > 0x18c8-0x18cf,0x18c0-0x18c3,0x18a8-0x18af,0x180c-0x180f,0x18b0-0x18bf > > mem > > > > 0xf0844400-0xf08447ff irq 19 at device 31.2 on pci0 > > > > atapci1: [ITHREAD] > > > > atapci1: AHCI called from vendor specific driver > > > > atapci1: AHCI Version 01.10 controller with 4 ports detected > > > > ata2: on atapci1 > > > > ata2: [ITHREAD] > > > > ata3: on atapci1 > > > > ata3: port not implemented > > > > ata3: [ITHREAD] > > > > ata4: on atapci1 > > > > ata4: [ITHREAD] > > > > ata5: on atapci1 > > > > ata5: port not implemented > > > > ata5: [ITHREAD] > > > > pci0: at device 31.3 (no driver attached) > > > > acpi_tz0: on acpi0 > > > > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > > > > atkbd0: irq 1 on atkbdc0 > > > > kbd0 at atkbd0 > > > > atkbd0: [GIANT-LOCKED] > > > > atkbd0: [ITHREAD] > > > > psm0: irq 12 on atkbdc0 > > > > psm0: [GIANT-LOCKED] > > > > psm0: [ITHREAD] > > > > psm0: model Generic PS/2 mouse, device ID 0 > > > > cpu0: on acpi0 > > > > est0: on cpu0 > > > > p4tcc0: on cpu0 > > > > cpu1: on acpi0 > > > > est1: on cpu1 > > > > p4tcc1: on cpu1 > > > > pmtimer0 on isa0 > > > > orm0: at iomem 0xdf000-0xdf7ff,0xe0000-0xe17ff pnpid > > > > ORM0000 on isa0 > > > > ppc0: parallel port not found. > > > > sc0: at flags 0x100 on isa0 > > > > sc0: VGA <16 virtual consoles, flags=0x300> > > > > sio0: configured irq 4 not in bitmap of probed irqs 0 > > > > sio0: port may not be enabled > > > > sio0: configured irq 4 not in bitmap of probed irqs 0 > > > > sio0: port may not be enabled > > > > sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 > > > > sio0: type 8250 or not responding > > > > sio0: [FILTER] > > > > sio1: configured irq 3 not in bitmap of probed irqs 0 > > > > sio1: port may not be enabled > > > > vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on > > isa0 > > > > ugen1: > 2.00/6.01, > > > > addr 2> on uhub1 > > > > Timecounters tick every 1.000 msec > > > > ad4: 76319MB at ata2-master SATA150 > > > > hdac0: HDA Codec #0: Realtek ALC269 > > > > pcm0: at cad 0 nid 1 on hdac0 > > > > GEOM_LABEL: Label for provider ad4s1a is ufsid/4a20f9c76d1ce80d. > > > > GEOM_LABEL: Label for provider ad4s1d is ufsid/4a20f9cb4eb76445. > > > > GEOM_LABEL: Label for provider ad4s1e is ufsid/4a20f9c7c991bdb8. > > > > GEOM_LABEL: Label for provider ad4s1f is ufsid/4a20f9c769a0ccbb. > > > > (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 > > > > (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error > > > > (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition > > > > (probe0:umass-sim0:0:0:0): NOT READY asc:3a,0 > > > > (probe0:umass-sim0:0:0:0): Medium not present > > > > (probe0:umass-sim0:0:0:0): Unretryable error > > > > SMP: AP CPU #1 Launched! > > > > da0 at umass-sim0 bus 0 target 0 lun 0 > > > > da0: Removable Direct Access SCSI-0 device > > > > da0: 40.000MB/s transfers > > > > da0: Attempt to query device size failed: NOT READY, Medium not present > > > > Trying to mount root from ufs:/dev/ad4s1a > > > > GEOM_LABEL: Label ufsid/4a20f9c76d1ce80d removed. > > > > GEOM_LABEL: Label for provider ad4s1a is ufsid/4a20f9c76d1ce80d. > > > > GEOM_LABEL: Label ufsid/4a20f9c7c991bdb8 removed. > > > > GEOM_LABEL: Label for provider ad4s1e is ufsid/4a20f9c7c991bdb8. > > > > GEOM_LABEL: Label ufsid/4a20f9c769a0ccbb removed. > > > > GEOM_LABEL: Label for provider ad4s1f is ufsid/4a20f9c769a0ccbb. > > > > GEOM_LABEL: Label ufsid/4a20f9cb4eb76445 removed. > > > > GEOM_LABEL: Label for provider ad4s1d is ufsid/4a20f9cb4eb76445. > > > > GEOM_LABEL: Label ufsid/4a20f9c76d1ce80d removed. > > > > GEOM_LABEL: Label ufsid/4a20f9c7c991bdb8 removed. > > > > GEOM_LABEL: Label ufsid/4a20f9c769a0ccbb removed. > > > > GEOM_LABEL: Label ufsid/4a20f9cb4eb76445 removed. > > > > drm0: on vgapci0 > > > > vgapci0: child drm0 requested pci_enable_busmaster > > > > info: [drm] AGP at 0xd0000000 256MB > > > > info: [drm] Initialized i915 1.6.0 20080730 > > > > drm0: [ITHREAD] > > > > _______________________________________________ > > > > 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 > > " > > > > > > From bugmaster at FreeBSD.org Mon Jun 15 11:06:48 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 15 11:07:09 2009 Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org Message-ID: <200906151106.n5FB6l95076790@freefall.freebsd.org> 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/135070 acpi [acpi] [patch] BIOS resource allocation and FreeBSD AC 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 47 problems total. From ivakras1 at gmail.com Mon Jun 15 17:43:32 2009 From: ivakras1 at gmail.com (Dmitry Kolosov) Date: Mon Jun 15 17:43:38 2009 Subject: ACPI problems with lenovo s10e In-Reply-To: <20090613141318.GA1090@ideapad.piggybox> References: <20090613080039.GA1934@ideapad.piggybox> <20090613141318.GA1090@ideapad.piggybox> Message-ID: <200906152143.24535.ivakras1@gmail.com> ??????? 13 ???? 2009 18:13:18 Peter Harrison ??????: > debug.acpi.disable=ec Yeah, that helps to me. So, i can live without battery status,rate and stuff. From vwe at FreeBSD.org Tue Jun 16 21:33:50 2009 From: vwe at FreeBSD.org (vwe@FreeBSD.org) Date: Tue Jun 16 21:34:02 2009 Subject: bin/135349: [patch] teach acpidump(8) to disassemble arbitrary memory locations Message-ID: <200906162133.n5GLXmvS024834@freefall.freebsd.org> Synopsis: [patch] teach acpidump(8) to disassemble arbitrary memory locations Responsible-Changed-From-To: freebsd-bugs->freebsd-acpi Responsible-Changed-By: vwe Responsible-Changed-When: Tue Jun 16 21:33:35 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=135349 From rea-fbsd at codelabs.ru Wed Jun 17 06:11:02 2009 From: rea-fbsd at codelabs.ru (Eygene Ryabinkin) Date: Wed Jun 17 06:11:09 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4A32CA38.4020806@root.org> References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> <200906121834.30294.jkim@FreeBSD.org> <4A32CA38.4020806@root.org> Message-ID: Nate, Jung-uk, good day. Fri, Jun 12, 2009 at 02:35:52PM -0700, Nate Lawson wrote: > I appreciate your work. What we need to do though is remove acpidump(8) > from the system and import Intel's acpidmp utility. It's included in the > ACPI-CA distribution and is functional enough that we can use it. OK, I'll try to take a look at it. But this is a future work; meanwhile, can we still extend acpidump in a way I propose. I have the updated patch that applies on top of the -CURRENT tree after the recent ACPICA import, but I have some troubles with 'make depend' inside usr.sbin/acpi/acpidb, so once I'll resolve them and test the stuff with full buildworld -- I'll post the patch as an update. Fri, Jun 12, 2009 at 06:34:27PM -0400, Jung-uk Kim wrote: > On Friday 12 June 2009 06:02 pm, Moore, Robert wrote: > > Actually, we don't distribute an acpidump (yet) in ACPICA. The > > Linux version is part of the "pmtools" package. > > > > It is of course, linux-specific. I won't distribute it with ACPICA > > until we have an OS-independent version. It is on our list of > > things to-do. > > FYI, it won't be terribly hard to port it because we also use > /dev/mem. However, the source is acpisrc'ified and we cannot undo it > to make it compile on FreeBSD. :-( Haven't looked at the source yet, so probably the question is very dumb, but nevertheless: what do you mean by "acpisrc'ified"? And a general question: is there a VCS repository for the pmtools, or at least the download location with snapshots/releases? My Google-fu fails on this and moblin.org doesn't seem to have this stuff available. Thanks! -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From robert.moore at intel.com Wed Jun 17 17:06:22 2009 From: robert.moore at intel.com (Moore, Robert) Date: Wed Jun 17 17:06:28 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> <200906121834.30294.jkim@FreeBSD.org> <4A32CA38.4020806@root.org> Message-ID: <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> The raw ACPICA source code is run through a converter (acpisrc) to "linuxize" the code before it is integrated into Linux. >-----Original Message----- >From: rea-fbsd@codelabs.ru [mailto:rea-fbsd@codelabs.ru] >Sent: Tuesday, June 16, 2009 11:11 PM >To: Nate Lawson; Jung-uk Kim >Cc: freebsd-acpi@freebsd.org; Moore, Robert >Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary memory >locations as AML code > >Nate, Jung-uk, good day. > >Fri, Jun 12, 2009 at 02:35:52PM -0700, Nate Lawson wrote: >> I appreciate your work. What we need to do though is remove acpidump(8) >> from the system and import Intel's acpidmp utility. It's included in the >> ACPI-CA distribution and is functional enough that we can use it. > >OK, I'll try to take a look at it. But this is a future work; >meanwhile, can we still extend acpidump in a way I propose. I have the >updated patch that applies on top of the -CURRENT tree after the recent >ACPICA import, but I have some troubles with 'make depend' inside >usr.sbin/acpi/acpidb, so once I'll resolve them and test the stuff with >full buildworld -- I'll post the patch as an update. > >Fri, Jun 12, 2009 at 06:34:27PM -0400, Jung-uk Kim wrote: >> On Friday 12 June 2009 06:02 pm, Moore, Robert wrote: >> > Actually, we don't distribute an acpidump (yet) in ACPICA. The >> > Linux version is part of the "pmtools" package. >> > >> > It is of course, linux-specific. I won't distribute it with ACPICA >> > until we have an OS-independent version. It is on our list of >> > things to-do. >> >> FYI, it won't be terribly hard to port it because we also use >> /dev/mem. However, the source is acpisrc'ified and we cannot undo it >> to make it compile on FreeBSD. :-( > >Haven't looked at the source yet, so probably the question is very dumb, >but nevertheless: what do you mean by "acpisrc'ified"? > >And a general question: is there a VCS repository for the pmtools, or at >least the download location with snapshots/releases? My Google-fu fails >on this and moblin.org doesn't seem to have this stuff available. > >Thanks! >-- >Eygene > _ ___ _.--. # > \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard > / ' ` , __.--' # to read the on-line manual > )/' _/ \ `-_, / # while single-stepping the kernel. > `-'" `"\_ ,_.-;_.-\_ ', fsc/as # > _.-'_./ {_.' ; / # -- FreeBSD Developers handbook > {_.-``-' {_/ # From robert.moore at intel.com Wed Jun 17 18:09:24 2009 From: robert.moore at intel.com (Moore, Robert) Date: Wed Jun 17 18:09:31 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> <200906121834.30294.jkim@FreeBSD.org> <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> Message-ID: <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> I should point out that acpidump was never "linuxed", it was simply written as native Linux code. >-----Original Message----- >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >acpi@freebsd.org] On Behalf Of Moore, Robert >Sent: Wednesday, June 17, 2009 10:06 AM >To: rea-fbsd@codelabs.ru; Nate Lawson; Jung-uk Kim >Cc: freebsd-acpi@freebsd.org >Subject: RE: [PATCH] acpidump: teach to disassemble arbitrary memory >locations as AML code > >The raw ACPICA source code is run through a converter (acpisrc) to >"linuxize" the code before it is integrated into Linux. > > >>-----Original Message----- >>From: rea-fbsd@codelabs.ru [mailto:rea-fbsd@codelabs.ru] >>Sent: Tuesday, June 16, 2009 11:11 PM >>To: Nate Lawson; Jung-uk Kim >>Cc: freebsd-acpi@freebsd.org; Moore, Robert >>Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary memory >>locations as AML code >> >>Nate, Jung-uk, good day. >> >>Fri, Jun 12, 2009 at 02:35:52PM -0700, Nate Lawson wrote: >>> I appreciate your work. What we need to do though is remove acpidump(8) >>> from the system and import Intel's acpidmp utility. It's included in the >>> ACPI-CA distribution and is functional enough that we can use it. >> >>OK, I'll try to take a look at it. But this is a future work; >>meanwhile, can we still extend acpidump in a way I propose. I have the >>updated patch that applies on top of the -CURRENT tree after the recent >>ACPICA import, but I have some troubles with 'make depend' inside >>usr.sbin/acpi/acpidb, so once I'll resolve them and test the stuff with >>full buildworld -- I'll post the patch as an update. >> >>Fri, Jun 12, 2009 at 06:34:27PM -0400, Jung-uk Kim wrote: >>> On Friday 12 June 2009 06:02 pm, Moore, Robert wrote: >>> > Actually, we don't distribute an acpidump (yet) in ACPICA. The >>> > Linux version is part of the "pmtools" package. >>> > >>> > It is of course, linux-specific. I won't distribute it with ACPICA >>> > until we have an OS-independent version. It is on our list of >>> > things to-do. >>> >>> FYI, it won't be terribly hard to port it because we also use >>> /dev/mem. However, the source is acpisrc'ified and we cannot undo it >>> to make it compile on FreeBSD. :-( >> >>Haven't looked at the source yet, so probably the question is very dumb, >>but nevertheless: what do you mean by "acpisrc'ified"? >> >>And a general question: is there a VCS repository for the pmtools, or at >>least the download location with snapshots/releases? My Google-fu fails >>on this and moblin.org doesn't seem to have this stuff available. >> >>Thanks! >>-- >>Eygene >> _ ___ _.--. # >> \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard >> / ' ` , __.--' # to read the on-line manual >> )/' _/ \ `-_, / # while single-stepping the kernel. >> `-'" `"\_ ,_.-;_.-\_ ', fsc/as # >> _.-'_./ {_.' ; / # -- FreeBSD Developers handbook >> {_.-``-' {_/ # >_______________________________________________ >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" From jkim at FreeBSD.org Wed Jun 17 18:42:51 2009 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Wed Jun 17 18:42:58 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> References: <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> Message-ID: <200906171442.34101.jkim@FreeBSD.org> On Wednesday 17 June 2009 02:09 pm, Moore, Robert wrote: > I should point out that acpidump was never "linuxed", it was simply > written as native Linux code. I was afraid of that. :-( IIRC, you once said (on ACPICA devel ML), you may include it in the ACPICA distribution if "read foo table from memory" code moves to OSL interface. AFAICT, the OSL interface already exists, i.e., AcpiOsReadMemory(). Last time I checked, acpidump from pmtools was just reading it via /dev/mem instead of using the OSL interface, though. FYI... Jung-uk Kim > >-----Original Message----- > >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- > >acpi@freebsd.org] On Behalf Of Moore, Robert > >Sent: Wednesday, June 17, 2009 10:06 AM > >To: rea-fbsd@codelabs.ru; Nate Lawson; Jung-uk Kim > >Cc: freebsd-acpi@freebsd.org > >Subject: RE: [PATCH] acpidump: teach to disassemble arbitrary > > memory locations as AML code > > > >The raw ACPICA source code is run through a converter (acpisrc) to > >"linuxize" the code before it is integrated into Linux. > > > >>-----Original Message----- > >>From: rea-fbsd@codelabs.ru [mailto:rea-fbsd@codelabs.ru] > >>Sent: Tuesday, June 16, 2009 11:11 PM > >>To: Nate Lawson; Jung-uk Kim > >>Cc: freebsd-acpi@freebsd.org; Moore, Robert > >>Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary > >> memory locations as AML code > >> > >>Nate, Jung-uk, good day. > >> > >>Fri, Jun 12, 2009 at 02:35:52PM -0700, Nate Lawson wrote: > >>> I appreciate your work. What we need to do though is remove > >>> acpidump(8) from the system and import Intel's acpidmp utility. > >>> It's included in the ACPI-CA distribution and is functional > >>> enough that we can use it. > >> > >>OK, I'll try to take a look at it. But this is a future work; > >>meanwhile, can we still extend acpidump in a way I propose. I > >> have the updated patch that applies on top of the -CURRENT tree > >> after the recent ACPICA import, but I have some troubles with > >> 'make depend' inside usr.sbin/acpi/acpidb, so once I'll resolve > >> them and test the stuff with full buildworld -- I'll post the > >> patch as an update. > >> > >>Fri, Jun 12, 2009 at 06:34:27PM -0400, Jung-uk Kim wrote: > >>> On Friday 12 June 2009 06:02 pm, Moore, Robert wrote: > >>> > Actually, we don't distribute an acpidump (yet) in ACPICA. > >>> > The Linux version is part of the "pmtools" package. > >>> > > >>> > It is of course, linux-specific. I won't distribute it with > >>> > ACPICA until we have an OS-independent version. It is on our > >>> > list of things to-do. > >>> > >>> FYI, it won't be terribly hard to port it because we also use > >>> /dev/mem. However, the source is acpisrc'ified and we cannot > >>> undo it to make it compile on FreeBSD. :-( > >> > >>Haven't looked at the source yet, so probably the question is > >> very dumb, but nevertheless: what do you mean by > >> "acpisrc'ified"? > >> > >>And a general question: is there a VCS repository for the > >> pmtools, or at least the download location with > >> snapshots/releases? My Google-fu fails on this and moblin.org > >> doesn't seem to have this stuff available. > >> > >>Thanks! > >>-- > >>Eygene > >> _ ___ _.--. # > >> \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard > >> / ' ` , __.--' # to read the on-line manual > >> )/' _/ \ `-_, / # while single-stepping the > >> kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # > >> _.-'_./ {_.' ; / # -- FreeBSD Developers > >> handbook {_.-``-' {_/ # > > > >_______________________________________________ > >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" From robert.moore at intel.com Wed Jun 17 19:52:19 2009 From: robert.moore at intel.com (Moore, Robert) Date: Wed Jun 17 19:52:25 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <200906171442.34101.jkim@FreeBSD.org> References: <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> <200906171442.34101.jkim@FreeBSD.org> Message-ID: <4911F71203A09E4D9981D27F9D8308582E76D616@orsmsx503.amr.corp.intel.com> I think that I was thinking that the ReadMemory interface was too low-level. Basically, I wanted an interface to "get me table XXXX, I don't care where you got it from." This might be useful on systems where something like /dev/mem is not available, and the ACPI tables are available via some other mechanism. >-----Original Message----- >From: Jung-uk Kim [mailto:jkim@FreeBSD.org] >Sent: Wednesday, June 17, 2009 11:43 AM >To: Moore, Robert >Cc: rea-fbsd@codelabs.ru; Nate Lawson; freebsd-acpi@FreeBSD.org >Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary memory >locations as AML code > >On Wednesday 17 June 2009 02:09 pm, Moore, Robert wrote: >> I should point out that acpidump was never "linuxed", it was simply >> written as native Linux code. > >I was afraid of that. :-( > >IIRC, you once said (on ACPICA devel ML), you may include it in the >ACPICA distribution if "read foo table from memory" code moves to OSL >interface. AFAICT, the OSL interface already exists, i.e., >AcpiOsReadMemory(). Last time I checked, acpidump from pmtools was >just reading it via /dev/mem instead of using the OSL interface, >though. > >FYI... > >Jung-uk Kim > >> >-----Original Message----- >> >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >> >acpi@freebsd.org] On Behalf Of Moore, Robert >> >Sent: Wednesday, June 17, 2009 10:06 AM >> >To: rea-fbsd@codelabs.ru; Nate Lawson; Jung-uk Kim >> >Cc: freebsd-acpi@freebsd.org >> >Subject: RE: [PATCH] acpidump: teach to disassemble arbitrary >> > memory locations as AML code >> > >> >The raw ACPICA source code is run through a converter (acpisrc) to >> >"linuxize" the code before it is integrated into Linux. >> > >> >>-----Original Message----- >> >>From: rea-fbsd@codelabs.ru [mailto:rea-fbsd@codelabs.ru] >> >>Sent: Tuesday, June 16, 2009 11:11 PM >> >>To: Nate Lawson; Jung-uk Kim >> >>Cc: freebsd-acpi@freebsd.org; Moore, Robert >> >>Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary >> >> memory locations as AML code >> >> >> >>Nate, Jung-uk, good day. >> >> >> >>Fri, Jun 12, 2009 at 02:35:52PM -0700, Nate Lawson wrote: >> >>> I appreciate your work. What we need to do though is remove >> >>> acpidump(8) from the system and import Intel's acpidmp utility. >> >>> It's included in the ACPI-CA distribution and is functional >> >>> enough that we can use it. >> >> >> >>OK, I'll try to take a look at it. But this is a future work; >> >>meanwhile, can we still extend acpidump in a way I propose. I >> >> have the updated patch that applies on top of the -CURRENT tree >> >> after the recent ACPICA import, but I have some troubles with >> >> 'make depend' inside usr.sbin/acpi/acpidb, so once I'll resolve >> >> them and test the stuff with full buildworld -- I'll post the >> >> patch as an update. >> >> >> >>Fri, Jun 12, 2009 at 06:34:27PM -0400, Jung-uk Kim wrote: >> >>> On Friday 12 June 2009 06:02 pm, Moore, Robert wrote: >> >>> > Actually, we don't distribute an acpidump (yet) in ACPICA. >> >>> > The Linux version is part of the "pmtools" package. >> >>> > >> >>> > It is of course, linux-specific. I won't distribute it with >> >>> > ACPICA until we have an OS-independent version. It is on our >> >>> > list of things to-do. >> >>> >> >>> FYI, it won't be terribly hard to port it because we also use >> >>> /dev/mem. However, the source is acpisrc'ified and we cannot >> >>> undo it to make it compile on FreeBSD. :-( >> >> >> >>Haven't looked at the source yet, so probably the question is >> >> very dumb, but nevertheless: what do you mean by >> >> "acpisrc'ified"? >> >> >> >>And a general question: is there a VCS repository for the >> >> pmtools, or at least the download location with >> >> snapshots/releases? My Google-fu fails on this and moblin.org >> >> doesn't seem to have this stuff available. >> >> >> >>Thanks! >> >>-- >> >>Eygene >> >> _ ___ _.--. # >> >> \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard >> >> / ' ` , __.--' # to read the on-line manual >> >> )/' _/ \ `-_, / # while single-stepping the >> >> kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # >> >> _.-'_./ {_.' ; / # -- FreeBSD Developers >> >> handbook {_.-``-' {_/ # >> > >> >_______________________________________________ >> >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" From jkim at FreeBSD.org Wed Jun 17 20:21:31 2009 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Wed Jun 17 20:21:38 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4911F71203A09E4D9981D27F9D8308582E76D616@orsmsx503.amr.corp.intel.com> References: <200906171442.34101.jkim@FreeBSD.org> <4911F71203A09E4D9981D27F9D8308582E76D616@orsmsx503.amr.corp.intel.com> Message-ID: <200906171621.13512.jkim@FreeBSD.org> On Wednesday 17 June 2009 03:52 pm, Moore, Robert wrote: > I think that I was thinking that the ReadMemory interface was too > low-level. Basically, I wanted an interface to "get me table XXXX, > I don't care where you got it from." AFAICT, that interface will cover "--table (-t )" option but we also need to support "--addr (-a )". Actually, that's where we started. :-) > This might be useful on systems where something like /dev/mem is > not available, and the ACPI tables are available via some other > mechanism. So, you want AcpiTbFindTable()-like OSL interface, correct? Jung-uk Kim > >-----Original Message----- > >From: Jung-uk Kim [mailto:jkim@FreeBSD.org] > >Sent: Wednesday, June 17, 2009 11:43 AM > >To: Moore, Robert > >Cc: rea-fbsd@codelabs.ru; Nate Lawson; freebsd-acpi@FreeBSD.org > >Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary > > memory locations as AML code > > > >On Wednesday 17 June 2009 02:09 pm, Moore, Robert wrote: > >> I should point out that acpidump was never "linuxed", it was > >> simply written as native Linux code. > > > >I was afraid of that. :-( > > > >IIRC, you once said (on ACPICA devel ML), you may include it in > > the ACPICA distribution if "read foo table from memory" code > > moves to OSL interface. AFAICT, the OSL interface already > > exists, i.e., AcpiOsReadMemory(). Last time I checked, acpidump > > from pmtools was just reading it via /dev/mem instead of using > > the OSL interface, though. > > > >FYI... > > > >Jung-uk Kim > > > >> >-----Original Message----- > >> >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- > >> >acpi@freebsd.org] On Behalf Of Moore, Robert > >> >Sent: Wednesday, June 17, 2009 10:06 AM > >> >To: rea-fbsd@codelabs.ru; Nate Lawson; Jung-uk Kim > >> >Cc: freebsd-acpi@freebsd.org > >> >Subject: RE: [PATCH] acpidump: teach to disassemble arbitrary > >> > memory locations as AML code > >> > > >> >The raw ACPICA source code is run through a converter (acpisrc) > >> > to "linuxize" the code before it is integrated into Linux. > >> > > >> >>-----Original Message----- > >> >>From: rea-fbsd@codelabs.ru [mailto:rea-fbsd@codelabs.ru] > >> >>Sent: Tuesday, June 16, 2009 11:11 PM > >> >>To: Nate Lawson; Jung-uk Kim > >> >>Cc: freebsd-acpi@freebsd.org; Moore, Robert > >> >>Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary > >> >> memory locations as AML code > >> >> > >> >>Nate, Jung-uk, good day. > >> >> > >> >>Fri, Jun 12, 2009 at 02:35:52PM -0700, Nate Lawson wrote: > >> >>> I appreciate your work. What we need to do though is remove > >> >>> acpidump(8) from the system and import Intel's acpidmp > >> >>> utility. It's included in the ACPI-CA distribution and is > >> >>> functional enough that we can use it. > >> >> > >> >>OK, I'll try to take a look at it. But this is a future work; > >> >>meanwhile, can we still extend acpidump in a way I propose. I > >> >> have the updated patch that applies on top of the -CURRENT > >> >> tree after the recent ACPICA import, but I have some troubles > >> >> with 'make depend' inside usr.sbin/acpi/acpidb, so once I'll > >> >> resolve them and test the stuff with full buildworld -- I'll > >> >> post the patch as an update. > >> >> > >> >>Fri, Jun 12, 2009 at 06:34:27PM -0400, Jung-uk Kim wrote: > >> >>> On Friday 12 June 2009 06:02 pm, Moore, Robert wrote: > >> >>> > Actually, we don't distribute an acpidump (yet) in ACPICA. > >> >>> > The Linux version is part of the "pmtools" package. > >> >>> > > >> >>> > It is of course, linux-specific. I won't distribute it > >> >>> > with ACPICA until we have an OS-independent version. It is > >> >>> > on our list of things to-do. > >> >>> > >> >>> FYI, it won't be terribly hard to port it because we also > >> >>> use /dev/mem. However, the source is acpisrc'ified and we > >> >>> cannot undo it to make it compile on FreeBSD. :-( > >> >> > >> >>Haven't looked at the source yet, so probably the question is > >> >> very dumb, but nevertheless: what do you mean by > >> >> "acpisrc'ified"? > >> >> > >> >>And a general question: is there a VCS repository for the > >> >> pmtools, or at least the download location with > >> >> snapshots/releases? My Google-fu fails on this and > >> >> moblin.org doesn't seem to have this stuff available. > >> >> > >> >>Thanks! > >> >>-- > >> >>Eygene > >> >> _ ___ _.--. # > >> >> \`.|\..----...-'` `-._.-'_.-'` # Remember that it is > >> >> hard / ' ` , __.--' # to read the > >> >> on-line manual )/' _/ \ `-_, / # while > >> >> single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as > >> >> # > >> >> _.-'_./ {_.' ; / # -- FreeBSD Developers > >> >> handbook {_.-``-' {_/ # > >> > > >> >_______________________________________________ > >> >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" From robert.moore at intel.com Wed Jun 17 21:47:24 2009 From: robert.moore at intel.com (Moore, Robert) Date: Wed Jun 17 21:47:30 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <200906171621.13512.jkim@FreeBSD.org> References: <200906171442.34101.jkim@FreeBSD.org> <4911F71203A09E4D9981D27F9D8308582E76D616@orsmsx503.amr.corp.intel.com> <200906171621.13512.jkim@FreeBSD.org> Message-ID: <4911F71203A09E4D9981D27F9D8308582E76D7BA@orsmsx503.amr.corp.intel.com> >-----Original Message----- >From: Jung-uk Kim [mailto:jkim@FreeBSD.org] >Sent: Wednesday, June 17, 2009 1:21 PM >To: Moore, Robert >Cc: rea-fbsd@codelabs.ru; Nate Lawson; freebsd-acpi@FreeBSD.org >Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary memory >locations as AML code > >On Wednesday 17 June 2009 03:52 pm, Moore, Robert wrote: >> I think that I was thinking that the ReadMemory interface was too >> low-level. Basically, I wanted an interface to "get me table XXXX, >> I don't care where you got it from." > >AFAICT, that interface will cover "--table (-t )" option >but we also need to support "--addr (-a )". Actually, >that's where we started. :-) > Yes. Obtaining a table at an arbitrary address is not possible on all systems. >> This might be useful on systems where something like /dev/mem is >> not available, and the ACPI tables are available via some other >> mechanism. > >So, you want AcpiTbFindTable()-like OSL interface, correct? > >Jung-uk Kim Yes, it would be a user-space-only OSL function. > >> >-----Original Message----- >> >From: Jung-uk Kim [mailto:jkim@FreeBSD.org] >> >Sent: Wednesday, June 17, 2009 11:43 AM >> >To: Moore, Robert >> >Cc: rea-fbsd@codelabs.ru; Nate Lawson; freebsd-acpi@FreeBSD.org >> >Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary >> > memory locations as AML code >> > >> >On Wednesday 17 June 2009 02:09 pm, Moore, Robert wrote: >> >> I should point out that acpidump was never "linuxed", it was >> >> simply written as native Linux code. >> > >> >I was afraid of that. :-( >> > >> >IIRC, you once said (on ACPICA devel ML), you may include it in >> > the ACPICA distribution if "read foo table from memory" code >> > moves to OSL interface. AFAICT, the OSL interface already >> > exists, i.e., AcpiOsReadMemory(). Last time I checked, acpidump >> > from pmtools was just reading it via /dev/mem instead of using >> > the OSL interface, though. >> > >> >FYI... >> > >> >Jung-uk Kim >> > >> >> >-----Original Message----- >> >> >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >> >> >acpi@freebsd.org] On Behalf Of Moore, Robert >> >> >Sent: Wednesday, June 17, 2009 10:06 AM >> >> >To: rea-fbsd@codelabs.ru; Nate Lawson; Jung-uk Kim >> >> >Cc: freebsd-acpi@freebsd.org >> >> >Subject: RE: [PATCH] acpidump: teach to disassemble arbitrary >> >> > memory locations as AML code >> >> > >> >> >The raw ACPICA source code is run through a converter (acpisrc) >> >> > to "linuxize" the code before it is integrated into Linux. >> >> > >> >> >>-----Original Message----- >> >> >>From: rea-fbsd@codelabs.ru [mailto:rea-fbsd@codelabs.ru] >> >> >>Sent: Tuesday, June 16, 2009 11:11 PM >> >> >>To: Nate Lawson; Jung-uk Kim >> >> >>Cc: freebsd-acpi@freebsd.org; Moore, Robert >> >> >>Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary >> >> >> memory locations as AML code >> >> >> >> >> >>Nate, Jung-uk, good day. >> >> >> >> >> >>Fri, Jun 12, 2009 at 02:35:52PM -0700, Nate Lawson wrote: >> >> >>> I appreciate your work. What we need to do though is remove >> >> >>> acpidump(8) from the system and import Intel's acpidmp >> >> >>> utility. It's included in the ACPI-CA distribution and is >> >> >>> functional enough that we can use it. >> >> >> >> >> >>OK, I'll try to take a look at it. But this is a future work; >> >> >>meanwhile, can we still extend acpidump in a way I propose. I >> >> >> have the updated patch that applies on top of the -CURRENT >> >> >> tree after the recent ACPICA import, but I have some troubles >> >> >> with 'make depend' inside usr.sbin/acpi/acpidb, so once I'll >> >> >> resolve them and test the stuff with full buildworld -- I'll >> >> >> post the patch as an update. >> >> >> >> >> >>Fri, Jun 12, 2009 at 06:34:27PM -0400, Jung-uk Kim wrote: >> >> >>> On Friday 12 June 2009 06:02 pm, Moore, Robert wrote: >> >> >>> > Actually, we don't distribute an acpidump (yet) in ACPICA. >> >> >>> > The Linux version is part of the "pmtools" package. >> >> >>> > >> >> >>> > It is of course, linux-specific. I won't distribute it >> >> >>> > with ACPICA until we have an OS-independent version. It is >> >> >>> > on our list of things to-do. >> >> >>> >> >> >>> FYI, it won't be terribly hard to port it because we also >> >> >>> use /dev/mem. However, the source is acpisrc'ified and we >> >> >>> cannot undo it to make it compile on FreeBSD. :-( >> >> >> >> >> >>Haven't looked at the source yet, so probably the question is >> >> >> very dumb, but nevertheless: what do you mean by >> >> >> "acpisrc'ified"? >> >> >> >> >> >>And a general question: is there a VCS repository for the >> >> >> pmtools, or at least the download location with >> >> >> snapshots/releases? My Google-fu fails on this and >> >> >> moblin.org doesn't seem to have this stuff available. >> >> >> >> >> >>Thanks! >> >> >>-- >> >> >>Eygene >> >> >> _ ___ _.--. # >> >> >> \`.|\..----...-'` `-._.-'_.-'` # Remember that it is >> >> >> hard / ' ` , __.--' # to read the >> >> >> on-line manual )/' _/ \ `-_, / # while >> >> >> single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as >> >> >> # >> >> >> _.-'_./ {_.' ; / # -- FreeBSD Developers >> >> >> handbook {_.-``-' {_/ # >> >> > >> >> >_______________________________________________ >> >> >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" From callsys at medsecurity.se Thu Jun 18 09:13:02 2009 From: callsys at medsecurity.se (Callsys) Date: Thu Jun 18 09:13:15 2009 Subject: Janne ( Restaurant&Cafe) Guest Paging Systems Message-ID: <20090618085355.4845B2413C86@csmtp3.one.com> Callsys Restaurant Waiter Call System for Table - Function Overview Waiter Call System for Table - Function Overview was designed to help restaurants manage incoming customers efficiently and distinctively. Customers receive instant notification when their table is ready, making them feel special and welcome. Freed from long lines, your restaurant looks more inviting to people walking in, Customers are encouraged to wait without fears of missing their table, resulting in higher traffic, while overall restaurant traffic flows more smoothly, leading to faster table turns. Waiter Call System for Table - Function Overview If you are opening this kind of business, there are many customers, sometimes, you will need service like ordering food or drinks. However, you don't want to hire many waiters to serve them. Your needs is very simple. You just want to be informed once your customer need service. Usually, your customer might need at the same time, then you will need remember their table numbers and go to serve them one by one. Waiter Call System for Table is very suitable for your business. This system is very easy to operate and will not cost much money. Waiter Call System for Table can hold up to 250 waiter call buttons. It also has memory chipset. When there are several customers calling services together, Waiter Call System for Table will store their numbers into memory and display them one by one. It can store up to 15 calling numbers in the memory. You can use the controller to check the calling number in the memory. This system is modulated by frequency. The signal can be received over several floors or partitions. It can be transferred in 300M in the open area. It also can cycle display the calling numbers in the memory. You do not need to check them manually. For the served calling numbers, it can be deleted with the controller. Waiter Call System for Table is a wireless system which can be set up easily. For more information about our products in any language, please contact us with this numbers; Stockholm: 076-02 69 010 Other areas in Sweden: 076-01 79 010 info@callsys.se www.callsys.se MSN: janne@medsecurity.se 7/24 2009 - Media Security Sweden - From naylor.b.david at gmail.com Thu Jun 18 12:06:08 2009 From: naylor.b.david at gmail.com (David Naylor) Date: Thu Jun 18 12:06:16 2009 Subject: [PATCH] Lenovo S10(e) ACPI Message-ID: <200906181407.11607.naylor.b.david@gmail.com> Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: This is a digitally signed message part. Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090618/7f327ef6/attachment.pgp From naylor.b.david at gmail.com Thu Jun 18 18:58:59 2009 From: naylor.b.david at gmail.com (David Naylor) Date: Thu Jun 18 18:59:06 2009 Subject: [PATCH] Lenovo S10(e) ACPI In-Reply-To: <20090618174028.GA1023@ideapad.piggybox> References: <200906181407.11607.naylor.b.david@gmail.com> <20090618174028.GA1023@ideapad.piggybox> Message-ID: <200906182100.15817.naylor.b.david@gmail.com> On Thursday 18 June 2009 19:40:28 Peter Harrison wrote: > Thursday, 18 June 2009 at 14:07:07 +0200, David Naylor said: > > Hi, > > > > ((Short version: apply patch and add 'debug.acpi.ec.gpe=1' > > and 'debug.acpi.ec.timeout=100' to loader.conf and EC (battery, > > thermal) ?should? work)) > > > > After lots of struggling I believe I have found a suitable workaround for > > this problem. First, an overview of the problem: > > > > 1) Sometimes apci_ec0 doesn't attach properly because of EcRead timeout > > (patch should fix this). > > 2) Manytimes GPE (interrupt) mode timeout and switches to polling. This > > causes the Embedded Control to get very upset, making ACPI go back to GPE > > mode (sysctl debug.acpi.ec.polling=0) fixes the problem until the next > > time GPE times out. (patch provides workaround). > > > > On the latter point, the patch seems to fixes the problem if > > device_printf is called after each success. This ends up spamming syslog > > (~3 per second). This, I'm guessing, has something to do with locking and > > providing a delay until the next call to the EC. > > > > This patch has not been tested with burst mode (which never worked) but > > does work with debug.acpi.ec.max_threads=1 (or 3). > > > > Next, how it works: > > 1) Apply patch and rebuild > > 2) Add 'debug.acpi.ec.gpe=1' to loader.conf (for the workaround for 2) > > 3) Add 'debug.acpi.ec.timeout=100' (or even 50) to loader.conf (to > > minimise impact of GPE timeout). > > > > This should allow EC to work (does on my Lenovo S10e), which means > > battery and temperature status and poweroff should work as expected > > (besides a few error messages on syslog). > > > > WARNING: Beware, slippery when wet, may eat babies (or baby computers), > > use at your own risk (but it does work for me). > > > > Regards, > > > > David > > > > P.S. If this doesn't work please include details (and dmesg output) and > > I'll try to help. > > David, > > Thanks for this. I'll try the patch and report back. I'm running > 7.2-RELEASE at the moment, do you expect it to work on this, or should I > move up to STABLE (or CURRENT)? That patch should apply cleanly to 7.2 (with some minor offsetting). I don't think anything should have changed since then that would stop this from working. This patch seems to be more of a workaround than a fix. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: This is a digitally signed message part. Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090618/9d88b477/attachment.pgp From peter.piggybox at virgin.net Thu Jun 18 19:00:32 2009 From: peter.piggybox at virgin.net (Peter Harrison) Date: Thu Jun 18 19:00:38 2009 Subject: [PATCH] Lenovo S10(e) ACPI In-Reply-To: <200906181407.11607.naylor.b.david@gmail.com> References: <200906181407.11607.naylor.b.david@gmail.com> Message-ID: <20090618174028.GA1023@ideapad.piggybox> Thursday, 18 June 2009 at 14:07:07 +0200, David Naylor said: > Hi, > > ((Short version: apply patch and add 'debug.acpi.ec.gpe=1' > and 'debug.acpi.ec.timeout=100' to loader.conf and EC (battery, > thermal) ?should? work)) > > After lots of struggling I believe I have found a suitable workaround for this > problem. First, an overview of the problem: > > 1) Sometimes apci_ec0 doesn't attach properly because of EcRead timeout (patch > should fix this). > 2) Manytimes GPE (interrupt) mode timeout and switches to polling. This > causes the Embedded Control to get very upset, making ACPI go back to GPE > mode (sysctl debug.acpi.ec.polling=0) fixes the problem until the next time > GPE times out. (patch provides workaround). > > On the latter point, the patch seems to fixes the problem if device_printf is > called after each success. This ends up spamming syslog (~3 per second). > This, I'm guessing, has something to do with locking and providing a delay > until the next call to the EC. > > This patch has not been tested with burst mode (which never worked) but does > work with debug.acpi.ec.max_threads=1 (or 3). > > Next, how it works: > 1) Apply patch and rebuild > 2) Add 'debug.acpi.ec.gpe=1' to loader.conf (for the workaround for 2) > 3) Add 'debug.acpi.ec.timeout=100' (or even 50) to loader.conf (to minimise > impact of GPE timeout). > > This should allow EC to work (does on my Lenovo S10e), which means battery and > temperature status and poweroff should work as expected (besides a few error > messages on syslog). > > WARNING: Beware, slippery when wet, may eat babies (or baby computers), use at > your own risk (but it does work for me). > > Regards, > > David > > P.S. If this doesn't work please include details (and dmesg output) and I'll > try to help. David, Thanks for this. I'll try the patch and report back. I'm running 7.2-RELEASE at the moment, do you expect it to work on this, or should I move up to STABLE (or CURRENT)? Thanks again, Peter Harrison. From aragon at phat.za.net Thu Jun 18 19:21:14 2009 From: aragon at phat.za.net (Aragon Gouveia) Date: Thu Jun 18 19:21:20 2009 Subject: [PATCH] Lenovo S10(e) ACPI In-Reply-To: <200906181407.11607.naylor.b.david@gmail.com> References: <200906181407.11607.naylor.b.david@gmail.com> Message-ID: <4A3A9011.6070000@phat.za.net> Hi, David Naylor wrote: > ((Short version: apply patch and add 'debug.acpi.ec.gpe=1' > and 'debug.acpi.ec.timeout=100' to loader.conf and EC (battery, > thermal) ?should? work)) I think the list stripped your attachment. I get EC timeouts on my HP too, so keen to take a look at your patch. Any other way you can share it? Maybe I can put it up via http for others if you send it to me privately? Thanks, Aragon From rea-fbsd at codelabs.ru Fri Jun 19 08:40:40 2009 From: rea-fbsd at codelabs.ru (rea-fbsd@codelabs.ru) Date: Fri Jun 19 08:40:46 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> <200906121834.30294.jkim@FreeBSD.org> <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> Message-ID: Robert, good day. Wed, Jun 17, 2009 at 11:09:22AM -0700, Moore, Robert wrote: > I should point out that acpidump was never "linuxed", it was simply > written as native Linux code. OK, I think that it won't be very hard to port it to FreeBSD, at least in some way. > >>And a general question: is there a VCS repository for the pmtools, or at > >>least the download location with snapshots/releases? My Google-fu fails > >>on this and moblin.org doesn't seem to have this stuff available. Pardon for my stupidiness, but still -- where I can find pmtools, preferrably in the form of some code repository or at least in some packaged code drops. Thanks! -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From avg at icyb.net.ua Fri Jun 19 10:26:08 2009 From: avg at icyb.net.ua (Andriy Gapon) Date: Fri Jun 19 10:26:15 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> <200906121834.30294.jkim@FreeBSD.org> <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> Message-ID: <4A3B6761.4030503@icyb.net.ua> on 19/06/2009 11:40 rea-fbsd@codelabs.ru said the following: > Robert, good day. > > Wed, Jun 17, 2009 at 11:09:22AM -0700, Moore, Robert wrote: >> I should point out that acpidump was never "linuxed", it was simply >> written as native Linux code. > > OK, I think that it won't be very hard to port it to FreeBSD, at least > in some way. > >>>> And a general question: is there a VCS repository for the pmtools, or at >>>> least the download location with snapshots/releases? My Google-fu fails >>>> on this and moblin.org doesn't seem to have this stuff available. > > Pardon for my stupidiness, but still -- where I can find pmtools, > preferrably in the form of some code repository or at least in some > packaged code drops. Yeah, it's located in a not very obvious place: http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils/ -- Andriy Gapon From rea-fbsd at codelabs.ru Fri Jun 19 10:37:08 2009 From: rea-fbsd at codelabs.ru (Eygene Ryabinkin) Date: Fri Jun 19 10:37:13 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4A3B6761.4030503@icyb.net.ua> References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> <200906121834.30294.jkim@FreeBSD.org> <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> <4A3B6761.4030503@icyb.net.ua> Message-ID: Andriy, good day. Fri, Jun 19, 2009 at 01:24:33PM +0300, Andriy Gapon wrote: > on 19/06/2009 11:40 rea-fbsd@codelabs.ru said the following: > > Pardon for my stupidiness, but still -- where I can find pmtools, > > preferrably in the form of some code repository or at least in some > > packaged code drops. > > Yeah, it's located in a not very obvious place: > http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils/ Seen that. Are snapshots from the year 2007 the latest ones? I thought that the development was just moved further and tarballs live in some other hive. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From avg at icyb.net.ua Fri Jun 19 10:54:39 2009 From: avg at icyb.net.ua (Andriy Gapon) Date: Fri Jun 19 10:54:45 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> <200906121834.30294.jkim@FreeBSD.org> <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> <4A3B6761.4030503@icyb.net.ua> Message-ID: <4A3B6DB7.9050408@icyb.net.ua> on 19/06/2009 13:37 Eygene Ryabinkin said the following: > Andriy, good day. > > Fri, Jun 19, 2009 at 01:24:33PM +0300, Andriy Gapon wrote: >> on 19/06/2009 11:40 rea-fbsd@codelabs.ru said the following: >>> Pardon for my stupidiness, but still -- where I can find pmtools, >>> preferrably in the form of some code repository or at least in some >>> packaged code drops. >> Yeah, it's located in a not very obvious place: >> http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils/ > > Seen that. Are snapshots from the year 2007 the latest ones? Yes. > I thought > that the development was just moved further and tarballs live in some > other hive. This is the source of the sources according to all sources :-) -- Andriy Gapon From avg at icyb.net.ua Fri Jun 19 11:10:06 2009 From: avg at icyb.net.ua (Andriy Gapon) Date: Fri Jun 19 11:10:15 2009 Subject: estX still not attaching properly In-Reply-To: <200906180909.33511.jhb@freebsd.org> References: <200906180909.33511.jhb@freebsd.org> Message-ID: <4A3B720A.8040601@icyb.net.ua> on 18/06/2009 16:09 John Baldwin said the following: > On Wednesday 17 June 2009 2:29:25 pm Alexander Best wrote: >> hi there, >> >> although i'm running a very recent current which has "ACPICA 20090521", estX >> still isn't attaching properly on my machine: >> >> est0: on cpu0 >> est: CPU supports Enhanced Speedstep, but is not recognized. >> est: cpu_vendor GenuineIntel, msr 925092506000925 >> device_attach: est0 attach returned 6 >> est1: on cpu1 >> est: CPU supports Enhanced Speedstep, but is not recognized. >> est: cpu_vendor GenuineIntel, msr 925092506000925 >> device_attach: est1 attach returned 6 > > That just means ACPI isn't providing info about the speed steppings your CPU > provides. It is odd that cpu0 has freq_levels but cpu1 does not. > This is most probably not related to the issue at hand. But I have some (probably unfounded) suspicions about OS features that we advertise via _PDC. Also, I find the following interesting in acpi_cpu.c. First we call _PDC, then we call _OSC and then there is the following comment between the two calls: /* * On some systems we need to evaluate _OSC so that the ASL * loads the _PSS and/or _PDC methods at runtime. ... -- Andriy Gapon From robert.moore at intel.com Fri Jun 19 16:04:52 2009 From: robert.moore at intel.com (Moore, Robert) Date: Fri Jun 19 16:05:02 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4A3B6DB7.9050408@icyb.net.ua> References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E6840C8@orsmsx503.amr.corp.intel.com> <200906121834.30294.jkim@FreeBSD.org> <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> <4A3B6761.4030503@icyb.net.ua> <4A3B6DB7.9050408@icyb.net.ua> Message-ID: <4911F71203A09E4D9981D27F9D8308582E7E4C93@orsmsx503.amr.corp.intel.com> I actually already have an os-independent, acpica-compatible version of acpidump.c. I can send it out if people want to work on it. The main thing that still needs to be done is to define how the os-independent part interacts with the os-dependent part. Bob >-----Original Message----- >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >acpi@freebsd.org] On Behalf Of Andriy Gapon >Sent: Friday, June 19, 2009 3:52 AM >To: rea-fbsd@codelabs.ru >Cc: freebsd-acpi@freebsd.org >Subject: Re: [PATCH] acpidump: teach to disassemble arbitrary memory >locations as AML code > >on 19/06/2009 13:37 Eygene Ryabinkin said the following: >> Andriy, good day. >> >> Fri, Jun 19, 2009 at 01:24:33PM +0300, Andriy Gapon wrote: >>> on 19/06/2009 11:40 rea-fbsd@codelabs.ru said the following: >>>> Pardon for my stupidiness, but still -- where I can find pmtools, >>>> preferrably in the form of some code repository or at least in some >>>> packaged code drops. >>> Yeah, it's located in a not very obvious place: >>> http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/utils/ >> >> Seen that. Are snapshots from the year 2007 the latest ones? > >Yes. > >> I thought >> that the development was just moved further and tarballs live in some >> other hive. > >This is the source of the sources according to all sources :-) > >-- >Andriy Gapon >_______________________________________________ >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" From mickey242 at gmx.net Fri Jun 19 19:30:26 2009 From: mickey242 at gmx.net (Andreas Wetzel) Date: Fri Jun 19 19:30:33 2009 Subject: ThinkPad T30, 7.2-RELEASE, wrong CPU speed detected? In-Reply-To: <4A0D617D.5070008@gmx.net> References: <4A0D617D.5070008@gmx.net> Message-ID: <4A3BE74A.1010801@gmx.net> Andreas Wetzel wrote: > After an upgrade from 7.1-RELEASE-p3 to 7.2-RELEASE, on an IBM ThinkPad > T30: > > > CPU: Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz (1196.13-MHz 686-class > CPU) > ^^^^^^^ ^^^^^^^^ > > This seems not right. > > Additionally sysctl shows these: > > dev.cpu.0.freq: 1200 > dev.cpu.0.freq_levels: 1200/0 1050/0 900/0 750/0 600/0 450/0 300/0 > > I know there has been some discussion going on a while ago, which > suggested to > not compile cpufreq into the kernel, which i will try in a few moments. > Anyway, this does not seem right. I have had no luck on this issue so far. The system is *not* running on batteries. Running the Intel Processor ID Utility on Windows2k shows similar results: Expected Frequency: 2.00 GHz, Actual Frequency: 1.29 GHz. All relevant BIOS settings are set for maximum performance. Enabling or disabling Intel Speed Step technology in the BIOS settings has no effect whatsoever. Resetting the BIOS to poweron defaults (which implies having to re-apply the no-1802 fix for the Atheros based mini-PCI wi-fi card) temporarily fixed the problem. But it re-appeared a short while thereafter, without anyone having screwed with the BIOS settings in the meantime. Any help on this issue would be greatly appreciated. -- Keep it icy man. I don't want to end up a corpse before my time because you were daydreaming. From linimon at FreeBSD.org Fri Jun 19 23:09:44 2009 From: linimon at FreeBSD.org (linimon@FreeBSD.org) Date: Fri Jun 19 23:09:56 2009 Subject: amd64/121439: [boot] Installation of FreeBSD 7.0 fails: ACPI problem with abit ip35 pro Message-ID: <200906192309.n5JN9hNL050538@freefall.freebsd.org> Synopsis: [boot] Installation of FreeBSD 7.0 fails: ACPI problem with abit ip35 pro Responsible-Changed-From-To: freebsd-amd64->freebsd-acpi Responsible-Changed-By: linimon Responsible-Changed-When: Fri Jun 19 23:09:11 UTC 2009 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=121439 From peter.piggybox at virgin.net Sat Jun 20 14:05:25 2009 From: peter.piggybox at virgin.net (Peter Harrison) Date: Sat Jun 20 14:05:33 2009 Subject: [PATCH] Lenovo S10(e) ACPI In-Reply-To: <200906182100.15817.naylor.b.david@gmail.com> References: <200906181407.11607.naylor.b.david@gmail.com> <20090618174028.GA1023@ideapad.piggybox> <200906182100.15817.naylor.b.david@gmail.com> Message-ID: <20090620130403.GA1051@ideapad.piggybox> Thursday, 18 June 2009 at 21:00:11 +0200, David Naylor said: > On Thursday 18 June 2009 19:40:28 Peter Harrison wrote: > > Thursday, 18 June 2009 at 14:07:07 +0200, David Naylor said: > > > Hi, > > > > > > ((Short version: apply patch and add 'debug.acpi.ec.gpe=1' > > > and 'debug.acpi.ec.timeout=100' to loader.conf and EC (battery, > > > thermal) ?should? work)) > > > > > > After lots of struggling I believe I have found a suitable workaround for > > > this problem. First, an overview of the problem: > > > > > > 1) Sometimes apci_ec0 doesn't attach properly because of EcRead timeout > > > (patch should fix this). > > > 2) Manytimes GPE (interrupt) mode timeout and switches to polling. This > > > causes the Embedded Control to get very upset, making ACPI go back to GPE > > > mode (sysctl debug.acpi.ec.polling=0) fixes the problem until the next > > > time GPE times out. (patch provides workaround). > > > > > > On the latter point, the patch seems to fixes the problem if > > > device_printf is called after each success. This ends up spamming syslog > > > (~3 per second). This, I'm guessing, has something to do with locking and > > > providing a delay until the next call to the EC. > > > > > > This patch has not been tested with burst mode (which never worked) but > > > does work with debug.acpi.ec.max_threads=1 (or 3). > > > > > > Next, how it works: > > > 1) Apply patch and rebuild > > > 2) Add 'debug.acpi.ec.gpe=1' to loader.conf (for the workaround for 2) > > > 3) Add 'debug.acpi.ec.timeout=100' (or even 50) to loader.conf (to > > > minimise impact of GPE timeout). > > > > > > This should allow EC to work (does on my Lenovo S10e), which means > > > battery and temperature status and poweroff should work as expected > > > (besides a few error messages on syslog). > > > > > > WARNING: Beware, slippery when wet, may eat babies (or baby computers), > > > use at your own risk (but it does work for me). > > > > > > Regards, > > > > > > David > > > > > > P.S. If this doesn't work please include details (and dmesg output) and > > > I'll try to help. > > > > David, > > > > Thanks for this. I'll try the patch and report back. I'm running > > 7.2-RELEASE at the moment, do you expect it to work on this, or should I > > move up to STABLE (or CURRENT)? > > That patch should apply cleanly to 7.2 (with some minor offsetting). I don't > think anything should have changed since then that would stop this from > working. > > This patch seems to be more of a workaround than a fix. David, The patch applied cleanly, and I've rebuilt and installed. System seems to work fine and I'm getting battery time reported properly. It still won't poweroff on shutdown though... Thanks for the help. Peter Harrison. uname -a: FreeBSD ideapad.piggybox 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Sat Jun 20 11:03:21 BST 2009 peter@ideapad.piggybox:/usr/obj/usr/src/sys/GENERIC i386 dmesg: Copyright (c) 1992-2009 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.2-RELEASE-p1 #0: Sat Jun 20 11:03:21 BST 2009 peter@ideapad.piggybox:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz (1596.02-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x106c2 Stepping = 2 Features=0xbfe9fbff Features2=0x40c39d> AMD Features=0x100000 AMD Features2=0x1 Logical CPUs per core: 2 real memory = 1064108032 (1014 MB) avail memory = 1023393792 (975 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP/HT): APIC ID: 1 ioapic0: Changing APIC ID to 1 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) Timecounter "HPET" frequency 14318180 Hz quality 900 Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 acpi_ec0: port 0x62,0x66 on acpi0 acpi_button0: on acpi0 acpi_button1: on acpi0 acpi_acad0: on acpi0 battery0: on acpi0 acpi_lid0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 vgapci0: port 0x1800-0x1807 mem 0xf0500000-0xf057ffff,0xd0000000-0xdfffffff,0xf0600000-0xf063ffff irq 16 at device 2.0 on pci0 agp0: on vgapci0 agp0: detected 7932k stolen memory agp0: aperture size is 256M vgapci1: mem 0xf0580000-0xf05fffff at device 2.1 on pci0 hdac0: mem 0xf0640000-0xf0643fff irq 22 at device 27.0 on pci0 hdac0: HDA Driver Revision: 20090329_0131 hdac0: [ITHREAD] pcib1: irq 17 at device 28.0 on pci0 pci2: on pcib1 bge0: mem 0xf0200000-0xf020ffff irq 16 at device 0.0 on pci2 miibus0: on bge0 brgphy0: PHY 1 on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto bge0: Ethernet address: 00:23:8b:34:79:8a bge0: [ITHREAD] pcib2: irq 16 at device 28.1 on pci0 pci3: on pcib2 pcib3: irq 18 at device 28.2 on pci0 pci5: on pcib3 ndis0: mem 0xf0400000-0xf0403fff irq 18 at device 0.0 on pci5 ndis0: [ITHREAD] ndis0: NDIS API version: 5.1 ndis0: WARNING: using obsoleted if_watchdog interface ndis0: Ethernet address: 00:23:4e:93:a4:de uhci0: port 0x1820-0x183f irq 23 at device 29.0 on pci0 uhci0: [GIANT-LOCKED] uhci0: [ITHREAD] usb0: on uhci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered uhci1: port 0x1840-0x185f irq 19 at device 29.1 on pci0 uhci1: [GIANT-LOCKED] uhci1: [ITHREAD] usb1: on uhci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 2 ports with 2 removable, self powered uhci2: port 0x1860-0x187f irq 18 at device 29.2 on pci0 uhci2: [GIANT-LOCKED] uhci2: [ITHREAD] usb2: on uhci2 usb2: USB revision 1.0 uhub2: on usb2 uhub2: 2 ports with 2 removable, self powered uhci3: port 0x1880-0x189f irq 16 at device 29.3 on pci0 uhci3: [GIANT-LOCKED] uhci3: [ITHREAD] usb3: on uhci3 usb3: USB revision 1.0 uhub3: on usb3 uhub3: 2 ports with 2 removable, self powered ehci0: mem 0xf0844000-0xf08443ff irq 23 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb4: EHCI version 1.0 usb4: companion controllers, 2 ports each: usb0 usb1 usb2 usb3 usb4: on ehci0 usb4: USB revision 2.0 uhub4: on usb4 uhub4: 8 ports with 8 removable, self powered ugen0: on uhub4 umass0: on uhub4 pcib4: at device 30.0 on pci0 pci6: on pcib4 isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x1810-0x181f at device 31.1 on pci0 ata0: on atapci0 ata0: [ITHREAD] atapci1: port 0x18c8-0x18cf,0x18c0-0x18c3,0x18a8-0x18af,0x180c-0x180f,0x18b0-0x18bf mem 0xf0844400-0xf08447ff irq 19 at device 31.2 on pci0 atapci1: [ITHREAD] atapci1: AHCI called from vendor specific driver atapci1: AHCI Version 01.10 controller with 4 ports detected ata2: on atapci1 ata2: [ITHREAD] ata3: on atapci1 ata3: port not implemented ata3: [ITHREAD] ata4: on atapci1 ata4: [ITHREAD] ata5: on atapci1 ata5: port not implemented ata5: [ITHREAD] pci0: at device 31.3 (no driver attached) acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: irq 12 on atkbdc0 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model Generic PS/2 mouse, device ID 0 cpu0: on acpi0 est0: on cpu0 p4tcc0: on cpu0 cpu1: on acpi0 est1: on cpu1 p4tcc1: on cpu1 pmtimer0 on isa0 orm0: at iomem 0xdf000-0xdf7ff,0xe0000-0xe17ff pnpid ORM0000 on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 8250 or not responding sio0: [FILTER] sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ugen1: on uhub1 Timecounters tick every 1.000 msec ad4: 76319MB at ata2-master SATA150 hdac0: HDA Codec #0: Realtek ALC269 pcm0: at cad 0 nid 1 on hdac0 GEOM_LABEL: Label for provider ad4s1a is ufsid/4a20f9c76d1ce80d. GEOM_LABEL: Label for provider ad4s1d is ufsid/4a20f9cb4eb76445. GEOM_LABEL: Label for provider ad4s1e is ufsid/4a20f9c7c991bdb8. GEOM_LABEL: Label for provider ad4s1f is ufsid/4a20f9c769a0ccbb. (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition (probe0:umass-sim0:0:0:0): NOT READY asc:3a,0 (probe0:umass-sim0:0:0:0): Medium not present (probe0:umass-sim0:0:0:0): Unretryable error SMP: AP CPU #1 Launched! da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present Trying to mount root from ufs:/dev/ad4s1a GEOM_LABEL: Label ufsid/4a20f9c76d1ce80d removed. GEOM_LABEL: Label for provider ad4s1a is ufsid/4a20f9c76d1ce80d. GEOM_LABEL: Label ufsid/4a20f9c7c991bdb8 removed. GEOM_LABEL: Label for provider ad4s1e is ufsid/4a20f9c7c991bdb8. GEOM_LABEL: Label ufsid/4a20f9c769a0ccbb removed. GEOM_LABEL: Label for provider ad4s1f is ufsid/4a20f9c769a0ccbb. GEOM_LABEL: Label ufsid/4a20f9cb4eb76445 removed. GEOM_LABEL: Label for provider ad4s1d is ufsid/4a20f9cb4eb76445. GEOM_LABEL: Label ufsid/4a20f9c76d1ce80d removed. GEOM_LABEL: Label ufsid/4a20f9c7c991bdb8 removed. GEOM_LABEL: Label ufsid/4a20f9c769a0ccbb removed. GEOM_LABEL: Label ufsid/4a20f9cb4eb76445 removed. ndis0: link state changed to UP drm0: on vgapci0 vgapci0: child drm0 requested pci_enable_busmaster info: [drm] AGP at 0xd0000000 256MB info: [drm] Initialized i915 1.6.0 20080730 drm0: [ITHREAD] From dannyburkland at gmail.com Sat Jun 20 16:20:09 2009 From: dannyburkland at gmail.com (Daniel Burkland) Date: Sat Jun 20 16:20:15 2009 Subject: amd64/121439: [boot] Installation of FreeBSD 7.0 fails: ACPI problem with abit ip35 pro Message-ID: <200906201620.n5KGK8Jb075085@freefall.freebsd.org> The following reply was made to PR amd64/121439; it has been noted by GNATS. From: Daniel Burkland To: "bug-followup@FreeBSD.org" , "paul.antonescu@gmail.com" Cc: Subject: Re: amd64/121439: [boot] Installation of FreeBSD 7.0 fails: ACPI problem with abit ip35 pro Date: Sat, 20 Jun 2009 10:50:09 -0500 I don't have the exact same board (ASUS P5K Deluxe also p35) but had a similar issue. Even when I set IDE to AHCI it would still lockup if I tried to install from CD. However if I loaded the kernel from the cd, removed the disk at the loader screen, and performed a network install it ran great. Just recently I tried installing a 7.2 Stable snapshot from CD which suffered none of the issues described above. If I may suggest something try installing a recent 7.2 snapshot from CD and post back your results. Dan Sent from my iPhone From hexanism at gmx.de Sun Jun 21 08:27:45 2009 From: hexanism at gmx.de (hexanism@gmx.de) Date: Sun Jun 21 08:27:52 2009 Subject: Resume problem (Motherboard: MSI 790GX-G65) Message-ID: <4A3DEEFC.4010204@gmx.de> Hello, I am using suspend/resume (S3) a lot in Linux. Unfortunately I could not get it to work with FreeBSD. I wanted to solve the Problem by trying the hints in the FreeBSD manual. I could not get it to work. Maybe someone can point me in the right direction, I do not have any experience with ACPI/dsdt debugging. The motherboard I am using is a MSI 790GX-G65 featuring the AMD 790 Chipset. This model is quite a new AM3 board. It has an onboard 3D-accelerated AMD graphics card. The Bios is up to date (Revision 1.3). I am using FreeBSD 7.2-RC2 with the generic kernel (I also did all the testing with another hardrive using FreeBSD 7.2-RELEASE). Suspend and resume work with Linux (Ubuntu 9.04) and Windows XP 64 flawlessly. S1 freezes the screen about two seconds after calling "acpiconf -s 1". Then I have to press the reset button. S3/suspend seems to work. The Fans and drives turn off and the power led acts exactly the same way as it acts under Linux and Windows. Under Linux/Windows I can resume by Keyboard. Under FreeBSD that does not work, I have to press the power button to get the computer to react. Unfortunately the screen stays black (drives and fans do get turned on). I have to press the reset button. I inspected the dsdt of my motherboard: http://innoits.de/chris-msi790gx65.asl There are a lot of errors when recompiling with iasl (about 180 Errors, most of them "Object does not exist"). I downloaded the ACPI specifications (3.0a, 3.0b and 4.0) but could not fix the Errors (I started with the first one ;)) due to my lack of knowledge concerning ACPI. What can I do now? Most of the errors are of the same type. I hope that ther is a simple solution that I just can't solve by myself. Is there a good beginner friendly dsdt tutorial around? Is it possible that the dsdt of my motherboard uses a newer ACPI revision (4.0) and thus is incompatible with the current version of iasl? Thank you very much for reading this... Chris -------------- next part -------------- Copyright (c) 1992-2009 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.2-RC2 #0: Fri Jun 5 09:46:42 CEST 2009 root@phenom.home.network:/usr/obj/usr/src/sys/GENERIC Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Phenom(tm) II X3 720 Processor (2807.08-MHz 686-class CPU) Origin = "AuthenticAMD" Id = 0x100f42 Stepping = 2 Features=0x178bfbff Features2=0x802009 AMD Features=0xee500800 AMD Features2=0x37ff,,,Prefetch,,,,> TSC: P-state invariant Cores per package: 3 real memory = 3489202176 (3327 MB) avail memory = 3409829888 (3251 MB) ACPI APIC Table: <7576MS A7576100> FreeBSD/SMP: Multiprocessor System Detected: 3 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 ACPI Warning (tbfadt-0505): Optional field "Pm2ControlBlock" has zero address or length: 0 0/1 [20070320] ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: <7576MS A7576100> on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of fee00000, 1000 (3) failed acpi0: reservation of ffb80000, 80000 (3) failed acpi0: reservation of fec10000, 20 (3) failed acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, cff00000 (3) failed ACPI HPET table warning: Sequence is non-zero (2) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 acpi_hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 900 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 vgapci0: port 0xc000-0xc0ff mem 0xd0000000-0xdfffffff,0xfe9f0000-0xfe9fffff,0xfe800000-0xfe8fffff irq 18 at device 5.0 on pci1 drm0: on vgapci0 vgapci0: child drm0 requested pci_enable_busmaster info: [drm] Initialized radeon 1.29.0 20080528 pcib2: irq 17 at device 5.0 on pci0 pci2: on pcib2 re0: port 0xd800-0xd8ff mem 0xfeaff000-0xfeafffff,0xfdffc000-0xfdffffff irq 17 at device 0.0 on pci2 re0: Using 1 MSI messages re0: Chip rev. 0x28000000 re0: MAC rev. 0x00000000 miibus0: on re0 rgephy0: PHY 1 on miibus0 rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto re0: Ethernet address: 00:24:21:26:7e:45 re0: [FILTER] pcib3: irq 18 at device 6.0 on pci0 pci3: on pcib3 fwohci0: <1394 Open Host Controller Interface> port 0xe800-0xe8ff mem 0xfebff800-0xfebfffff irq 18 at device 0.0 on pci3 fwohci0: [FILTER] fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:10:dc:00:01:90:3b:2e fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:10:dc:90:3b:2e fwe0: Ethernet address: 02:10:dc:90:3b:2e fwip0: on firewire0 fwip0: Firewire address: 00:10:dc:00:01:90:3b:2e @ 0xfffe00000000, S400, maxrec 2048 sbp0: on firewire0 dcons_crom0: on firewire0 dcons_crom0: bus_addr 0x1094000 fwohci0: Initiate bus reset fwohci0: BUS reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode atapci0: port 0xb000-0xb007,0xa000-0xa003,0x9000-0x9007,0x8000-0x8003,0x7000-0x700f mem 0xfe7ffc00-0xfe7fffff irq 22 at device 17.0 on pci0 atapci0: [ITHREAD] atapci0: AHCI Version 01.10 controller with 4 ports detected ata2: on atapci0 ata2: [ITHREAD] ata3: on atapci0 ata3: [ITHREAD] ata4: on atapci0 ata4: [ITHREAD] ata5: on atapci0 ata5: [ITHREAD] ohci0: mem 0xfe7fe000-0xfe7fefff irq 16 at device 18.0 on pci0 ohci0: [GIANT-LOCKED] ohci0: [ITHREAD] usb0: OHCI version 1.0, legacy support usb0: SMM does not respond, resetting usb0: on ohci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 3 ports with 3 removable, self powered ohci1: mem 0xfe7fd000-0xfe7fdfff irq 16 at device 18.1 on pci0 ohci1: [GIANT-LOCKED] ohci1: [ITHREAD] usb1: OHCI version 1.0, legacy support usb1: SMM does not respond, resetting usb1: on ohci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 3 ports with 3 removable, self powered ehci0: mem 0xfe7ff800-0xfe7ff8ff irq 17 at device 18.2 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb2: EHCI version 1.0 usb2: companion controllers, 3 ports each: usb0 usb1 usb2: on ehci0 usb2: USB revision 2.0 uhub2: on usb2 uhub2: 6 ports with 6 removable, self powered ohci2: mem 0xfe7fc000-0xfe7fcfff irq 18 at device 19.0 on pci0 ohci2: [GIANT-LOCKED] ohci2: [ITHREAD] usb3: OHCI version 1.0, legacy support usb3: SMM does not respond, resetting usb3: on ohci2 usb3: USB revision 1.0 uhub3: on usb3 uhub3: 3 ports with 3 removable, self powered ohci3: mem 0xfe7fb000-0xfe7fbfff irq 18 at device 19.1 on pci0 ohci3: [GIANT-LOCKED] ohci3: [ITHREAD] usb4: OHCI version 1.0, legacy support usb4: SMM does not respond, resetting usb4: on ohci3 usb4: USB revision 1.0 uhub4: on usb4 uhub4: 3 ports with 3 removable, self powered ehci1: mem 0xfe7ff400-0xfe7ff4ff irq 19 at device 19.2 on pci0 ehci1: [GIANT-LOCKED] ehci1: [ITHREAD] usb5: EHCI version 1.0 usb5: companion controllers, 3 ports each: usb3 usb4 usb5: on ehci1 usb5: USB revision 2.0 uhub5: on usb5 uhub5: 6 ports with 6 removable, self powered pci0: at device 20.0 (no driver attached) atapci1: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xff00-0xff0f at device 20.1 on pci0 ata0: on atapci1 ata0: [ITHREAD] hdac0: mem 0xfe7f4000-0xfe7f7fff irq 16 at device 20.2 on pci0 hdac0: HDA Driver Revision: 20090329_0131 hdac0: [ITHREAD] isab0: at device 20.3 on pci0 isa0: on isab0 pcib4: at device 20.4 on pci0 pci4: on pcib4 ohci4: mem 0xfe7fa000-0xfe7fafff irq 18 at device 20.5 on pci0 ohci4: [GIANT-LOCKED] ohci4: [ITHREAD] usb6: OHCI version 1.0, legacy support usb6: SMM does not respond, resetting usb6: on ohci4 usb6: USB revision 1.0 uhub6: on usb6 uhub6: 2 ports with 2 removable, self powered acpi_button0: on acpi0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio0: [FILTER] fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FILTER] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 cpu0: on acpi0 acpi_throttle0: on cpu0 cpu1: on acpi0 cpu2: on acpi0 pmtimer0 on isa0 ppc0: parallel port not found. sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ukbd0: on uhub0 kbd2 at ukbd0 ums0: on uhub4 ums0: 4 buttons and Z dir. Timecounters tick every 1.000 msec firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) ad4: 610480MB at ata2-master SATA300 ad6: 476940MB at ata3-master SATA300 acd0: DVDR at ata4-master SATA150 hdac0: HDA Codec #3: Realtek ALC889 pcm0: at cad 3 nid 1 on hdac0 pcm1: at cad 3 nid 1 on hdac0 pcm2: at cad 3 nid 1 on hdac0 pcm3: at cad 3 nid 1 on hdac0 SMP: AP CPU #2 Launched! SMP: AP CPU #1 Launched! GEOM_LABEL: Label for provider acd0 is iso9660/COD2DVD. GEOM_LABEL: Label for provider ad6s1 is ufsid/47bfa940baa976b0. GEOM_LABEL: Label for provider ad4s2a is ufsid/4a0421dbf6c33b7f. GEOM_LABEL: Label for provider ad4s2d is ufsid/4a0421de783ef232. GEOM_LABEL: Label for provider ad4s2e is ufsid/4a0421db6fb07dcc. GEOM_LABEL: Label for provider ad4s2f is ufsid/4a0421db9ffdbb73. Trying to mount root from ufs:/dev/ad4s2a GEOM_LABEL: Label ufsid/4a0421dbf6c33b7f removed. GEOM_LABEL: Label for provider ad4s2a is ufsid/4a0421dbf6c33b7f. GEOM_LABEL: Label ufsid/4a0421db6fb07dcc removed. GEOM_LABEL: Label ufsid/47bfa940baa976b0 removed. GEOM_LABEL: Label for provider ad4s2e is ufsid/4a0421db6fb07dcc. GEOM_LABEL: Label for provider ad6s1 is ufsid/47bfa940baa976b0. GEOM_LABEL: Label ufsid/4a0421db9ffdbb73 removed. GEOM_LABEL: Label for provider ad4s2f is ufsid/4a0421db9ffdbb73. GEOM_LABEL: Label ufsid/4a0421de783ef232 removed. GEOM_LABEL: Label for provider ad4s2d is ufsid/4a0421de783ef232. GEOM_LABEL: Label ufsid/4a0421dbf6c33b7f removed. GEOM_LABEL: Label ufsid/4a0421db6fb07dcc removed. GEOM_LABEL: Label ufsid/4a0421db9ffdbb73 removed. GEOM_LABEL: Label ufsid/4a0421de783ef232 removed. GEOM_LABEL: Label ufsid/47bfa940baa976b0 removed. vgapci0: child drm0 requested pci_disable_busmaster drm0: detached kldunload: attempt to unload file that was loaded by the kernel pcm0: detached pcm1: detached pcm2: detached pcm3: detached hdac0: detached -------------- next part -------------- Id Refs Address Size Name 1 3 0xc0400000 9fab28 kernel 6 1 0xc0ed9000 6a45c acpi.ko -------------- next part -------------- hw.acpi.supported_sleep_state: S1 S3 S4 S5 hw.acpi.power_button_state: S5 hw.acpi.sleep_button_state: S1 hw.acpi.lid_switch_state: NONE hw.acpi.standby_state: S1 hw.acpi.suspend_state: S3 hw.acpi.sleep_delay: 1 hw.acpi.s4bios: 0 hw.acpi.verbose: 0 hw.acpi.disable_on_reboot: 0 hw.acpi.handle_reboot: 0 hw.acpi.reset_video: 0 hw.acpi.cpu.cx_lowest: C1 -------------- next part -------------- FreeBSD phenom.home.network 7.2-RC2 FreeBSD 7.2-RC2 #0: Fri Jun 5 09:46:42 CEST 2009 root@phenom.home.network:/usr/obj/usr/src/sys/GENERIC i386 -------------- next part -------------- acpidump: RSDT entry 3 (sig OEMB) is corrupt From freebsdusb at bindone.de Sun Jun 21 11:48:10 2009 From: freebsdusb at bindone.de (Michael) Date: Sun Jun 21 11:48:19 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp Message-ID: <4A3E1784.2050406@bindone.de> Hello, I wrote two new acpi modules last year and finally found the time to fix them, add some missing features and write man pages. This is the first time I'm writing kernel code for FreeBSD, so please excuse me if I failed to apply to all style conventions (I tried to follow style(9) as closely as possible). acpi_wmi is an ACPI to WMI mapping driver (this is used by HP and Acer notebooks and potentially others), so this could also be used to implement additional drivers on (see for more details on WMI and ACPI: http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx). It provides /dev/wmistat, example output: cat /dev/wmistat GUID INST EXPE METH STR EVENT OID {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - {2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB {1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA {2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC {988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD {14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE {322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI acpi_hp is a driver that uses acpi_wmi to provide HP specific features. These include: - Activate/deactivate WLAN - Activate/deactivate WWAN - Activate/deactivate Bluetooth - Auto activate/deactiavte based on hw radio status - Devd notifications - On air status for different - Controls ambient light sensor - Get docking status - Read BIOS settings through /dev/hpcmi, example output: Flash Media Reader Disable USB Ports including Express Card slot Enable 1394 Port Enable Cardbus Slot Disable Express Card Slot Disable F9, F10 and F12 Delay(Sec) 0 USB Device Detection Delay (Sec) 0 Multiboot Enable Express Boot Popup Delay(Sec) 0 CD-ROM Boot Enable Floppy Boot Disable Internal Network Adapter Boot Disable Internal Network Adapter Boot Mode PXE Swap Fn/Ctrl Key Disable USB Legacy Support Disable Parallel Port Mode ECP ... The man pages included in the patch (man acpi_hp / man acpi_wmi) give you detailed information about all sysctls and devices. The patch attached (acpi_wmi_and_acpi_hp.patch) has been tested against 7.2-RELEASE and everything compiles cleanly, although my tests have been on 8-CURRENT (but the snapshot is older than 7.2), so I expect this to work ok on 7.2. The patch might fail against CURRENT though, this is why I also attached patches.tgz, which contains individual patches per file. I only tested this on i386 and the patch only changes i386 specific things (I have no idea if this could possibly work on amd64, especially because all the other acpi_support modules seem to be i386 only). Also note, that I could only test this on my own machine (HP Compaq 8510p), which features WLAN/BT/WLAN, so I don't know if the readings will be sane if your machine doesn't feature a WWAN chip. In theory this should work for many different HP models. Installation instructions (replace MYKERNEL with your kernel name): mkdir /usr/src/sys/modules/acpi/acpi_wmi mkdir /usr/src/sys/modules/acpi/acpi_hp patch -d /usr/src < acpi_wmi_and_acpi_hp.patch cd /usr/src/share/man/man4/man4.i386 make all && make install cd /usr/src/sys/i386/conf config MYKERNEL cd ../compile/MYKERNEL make cleandepend && make depend make all make install reboot . . . kldload acpi_hp cat /dev/wmistat sysctl -a | grep acpi_hp.0 sysctl dev.acpi_hp.0.als = 0 cat /dev/hpcmi sysctl dev.acpi_hp.0.cmi_detail=7 cat /dev/hpcmi It would be nice to get some feedback on this and maybe someone else can implement vendor specific ACPI modules for other WMI based laptops now. cheers Michael -------------- next part -------------- --- sys/i386/conf/NOTES~ 2008-12-29 04:48:16.000000000 +0100 +++ sys/i386/conf/NOTES 2009-06-21 12:10:16.000000000 +0100 @@ -471,6 +471,9 @@ options ACPI_DEBUG #!options ACPI_NO_SEMAPHORES +# ACPI WMI Mapping driver +device acpi_wmi + # ACPI Asus Desktop Extras. (voltage, temp, fan) device acpi_aiboost @@ -480,6 +483,9 @@ # ACPI Fujitsu Extras (Buttons) device acpi_fujitsu +# ACPI extras driver for HP laptops +device acpi_hp + # ACPI extras driver for IBM laptops device acpi_ibm --- sys/modules/acpi/Makefile~ 2008-12-29 04:41:59.000000000 +0100 +++ sys/modules/acpi/Makefile 2009-06-21 12:10:59.000000000 +0100 @@ -4,7 +4,7 @@ SUBDIR= acpi .endif -SUBDIR+= acpi_aiboost acpi_asus acpi_fujitsu acpi_ibm \ +SUBDIR+= acpi_wmi acpi_aiboost acpi_asus acpi_fujitsu acpi_hp acpi_ibm \ acpi_panasonic acpi_sony acpi_toshiba acpi_video \ acpi_dock --- share/man/man4/man4.i386/acpi_hp.4~ 2009-06-21 12:09:58.000000000 +0200 +++ share/man/man4/man4.i386/acpi_hp.4 2009-06-21 12:10:21.229934511 +0200 @@ -0,0 +1,273 @@ +.\" Copyright (c) 2009 Michael Gmelin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 21, 2009 +.Dt ACPI_HP 4 i386 +.Os +.Sh NAME +.Nm acpi_hp +.Nd "ACPI extras driver for HP laptops" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device acpi_hp" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +acpi_hp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for ACPI-controlled features found on HP laptops +that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). +.Pp +The main purpose of this driver is to provide an interface, +accessible via +.Xr sysctl 8 , +.Xr devd 8 and +.Xr devfs 8 , +through which applications can determine and change the status of +various laptop components and BIOS settings. +.Pp +.Ss Xr devd 8 Ss Events +Devd events received by +.Xr devd 8 +provide the following information: +.Pp +.Bl -tag -width "subsystem" -offset indent -compact +.It system +.Qq Li ACPI +.It subsystem +.Qq Li HP +.It type +The source of the event in the ACPI namespace. +The value depends on the model. +.It notify +Event code (see below). +.El +.Pp +Event codes: +.Pp +.Bl -tag -width "0xc0" -offset indent -compact +.It Li 0xc0 +WLAN on air status changed to 0 (not on air) +.It Li 0xc1 +WLAN on air status changed to 1 (on air) +.It Li 0xd0 +Bluetooth on air status changed to 0 (not on air) +.It Li 0xd1 +Bluetooth on air status changed to 1 (on air) +.It Li 0xe0 +WWAN on air status changed to 0 (not on air) +.It Li 0xe1 +WWAN on air status changed to 1 (on air) +.El +.Ss Xr devfs 8 Ss Device +You can read /dev/hpcmi to see your current BIOS settings. The detail level +can be adjusted by setting the sysctl +.Va cmi_detail +as described below. +.Sh SYSCTL VARIABLES +The following sysctls are currently implemented: +.Ss WLAN: +.Bl -tag -width indent +.It Va dev.acpi_hp.0.wlan_enabled +Toggle WLAN chip activity. +.It Va dev.acpi_hp.0.wlan_radio +(read-only) +WLAN radio status (controlled by hardware switch) +.It Va dev.acpi_hp.0.wlan_on_air +(read-only) +WLAN on air (chip enabled, hardware switch enabled + enabled in BIOS) +.It Va dev.acpi_hp.0.wlan_enabled_if_radio_on +If set to 1, the WLAN chip will be enabled if the radio is turned on +.It Va dev.acpi_hp.0.wlan_disable_if_radio_off +If set to 1, the WLAN chip will be disabled if the radio is turned off +.El +.Ss Bluetooth: +.Bl -tag -width indent +.It Va dev.acpi_hp.0.bt_enabled +Toggle Bluetooth chip activity. +.It Va dev.acpi_hp.0.bt_radio +(read-only) +Bluetooth radio status (controlled by hardware switch) +.It Va dev.acpi_hp.0.bt_on_air +(read-only) +Bluetooth on air (chip enabled, hardware switch enabled + enabled in BIOS) +.It Va dev.acpi_hp.0.bt_enabled_if_radio_on +If set to 1, the Bluetooth chip will be enabled if the radio is turned on +.It Va dev.acpi_hp.0.bt_disable_if_radio_off +If set to 1, the Bluetooth chip will be disabled if the radio is turned off +.El +.Ss WWAN: +.Bl -tag -width indent +.It Va dev.acpi_hp.0.wwan_enabled +Toggle WWAN chip activity. +.It Va dev.acpi_hp.0.wwan_radio +(read-only) +WWAN radio status (controlled by hardware switch) +.It Va dev.acpi_hp.0.wwan_on_air +(read-only) +WWAN on air (chip enabled, hardware switch enabled + enabled in BIOS) +.It Va dev.acpi_hp.0.wwan_enabled_if_radio_on +If set to 1, the WWAN chip will be enabled if the radio is turned on +.It Va dev.acpi_hp.0.wwan_disable_if_radio_off +If set to 1, the WWAN chip will be disabled if the radio is turned off +.El +.Ss Misc: +.Bl -tag -width indent +.It Va dev.acpi_hp.0.als_enabled +Toggle ambient light sensor (ALS) +.It Va dev.acpi_hp.0.display +(read-only) +Display status (bitmask) +.It Va dev.acpi_hp.0.hdd_temperature +(read-only) +HDD temperature +.It Va dev.acpi_hp.0.is_docked +(read-only) +Docking station status (1 if docked) +.It Va dev.acpi_hp.0.cmi_detail +Bitmask to control detail level in /dev/hpcmi output (values can be ORed). +.Bl -tag -width "0x01" -offset indent -compact +.It Li 0x01 +Show path component of BIOS setting +.It Li 0x02 +Show a list of valid options for the BIOS setting +.It Li 0x04 +Show additional flags of BIOS setting (ReadOnly etc.) +.El +.El +.Pp +Defaults for these sysctls can be set in +.Xr sysctl.conf 5 . +.Sh FILES +.Bl -tag -width ".Pa /dev/hpcmi" +.It Pa /dev/hpcmi +Interface to read BIOS settings +.El +.Sh EXAMPLES +The following can be added to +.Xr devd.conf 5 +in order disable the LAN interface when WLAN on air and reenable if it's +not: +.Bd -literal -offset indent +notify 0 { + match "system" "ACPI"; + match "subsystem" "HP"; + match "notify" "0xc0"; + action "ifconfig em0 up"; +}; + +notify 0 { + match "system" "ACPI"; + match "subsystem" "HP"; + match "notify" "0xc1"; + action "ifconfig em0 down"; +}; +.Ed +.Pp +Enable the ambient light sensor: +.Bd -literal -offset indent +sysctl dev.acpi_hp.0.als_enabled=1 +.Ed +.Pp +Enable Bluetooth: +.Bd -literal -offset indent +sysctl dev.acpi_hp.0.bt_enabled=1 +.Ed +.Pp +Get BIOS settings: +.Bd -literal -offset indent +cat /dev/hpcmi + +Serial Port Disable +Infrared Port Enable +Parallel Port Disable +Flash Media Reader Disable +USB Ports including Express Card slot Enable +1394 Port Enable +Cardbus Slot Disable +Express Card Slot Disable +(...) +.Ed +.Pp +Set maximum detail level for /dev/hpcmi output: +.Bd -literal -offset indent +sysctl dev.acpi_hp.0.cmi_detail=7 +.Ed +.Pp + + + +.Sh SEE ALSO +.Xr acpi 4 , +.Xr acpi_wmi 4 , +.Xr sysctl.conf 5 , +.Xr devd 8 , +.Xr devfs 8 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx CURRENT . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Michael Gmelin Aq freebsd@grem.de +.Pp +It has been inspired by hp-wmi driver, which implements a subset of these +features (hotkeys) on Linux. +.Pp +.Bl -tag -width indent +.It HP CMI whitepaper: +http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf +.It wmi-hp for Linux: +http://www.kernel.org +.It WMI and ACPI: +http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx +.El +.Pp +This manual page was written by +.An Michael Gmelin Aq freebsd@grem.de +.Sh BUGS +This driver is experimental and has only been tested on CURRENT i386 on an +HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). +Expect undefined results when operating on different hardware. +.Pp +Loading the driver is slow. Reading from /dev/hpcmi is even slower. +.Pp +Additional features like HP specific sensor readings or writing BIOS +settings are not supported. --- sys/dev/acpi_support/acpi_hp.c~ 2009-06-21 12:09:58.000000000 +0200 +++ sys/dev/acpi_support/acpi_hp.c 2009-06-21 12:10:55.256712496 +0200 @@ -0,0 +1,1042 @@ +/*- + * Copyright (c) 2009 Michael Gmelin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Driver for extra ACPI-controlled features found on HP laptops + * that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). + * Allows to control and read status of integrated hardware and read + * BIOS settings through CMI. + * Inspired by the hp-wmi driver, which implements a subset of these + * features (hotkeys) on Linux. + * + * HP CMI whitepaper: http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf + * wmi-hp for Linux: http://www.kernel.org + * WMI and ACPI: http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx + */ + +#include "opt_acpi.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "acpi_wmi_if.h" + +#define _COMPONENT ACPI_OEM +ACPI_MODULE_NAME("HP") + +#define ACPI_HP_WMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C" +#define ACPI_HP_WMI_BIOS_GUID "5FB7F034-2C63-45E9-BE91-3D44E2C707E4" +#define ACPI_HP_WMI_CMI_GUID "2D114B49-2DFB-4130-B8FE-4A3C09E75133" + +#define ACPI_HP_WMI_DISPLAY_COMMAND 0x1 +#define ACPI_HP_WMI_HDDTEMP_COMMAND 0x2 +#define ACPI_HP_WMI_ALS_COMMAND 0x3 +#define ACPI_HP_WMI_DOCK_COMMAND 0x4 +#define ACPI_HP_WMI_WIRELESS_COMMAND 0x5 + +#define ACPI_HP_METHOD_WLAN_ENABLED 1 +#define ACPI_HP_METHOD_WLAN_RADIO 2 +#define ACPI_HP_METHOD_WLAN_ON_AIR 3 +#define ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON 4 +#define ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF 5 +#define ACPI_HP_METHOD_BLUETOOTH_ENABLED 6 +#define ACPI_HP_METHOD_BLUETOOTH_RADIO 7 +#define ACPI_HP_METHOD_BLUETOOTH_ON_AIR 8 +#define ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON 9 +#define ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF 10 +#define ACPI_HP_METHOD_WWAN_ENABLED 11 +#define ACPI_HP_METHOD_WWAN_RADIO 12 +#define ACPI_HP_METHOD_WWAN_ON_AIR 13 +#define ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON 14 +#define ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF 15 +#define ACPI_HP_METHOD_ALS 16 +#define ACPI_HP_METHOD_DISPLAY 17 +#define ACPI_HP_METHOD_HDDTEMP 18 +#define ACPI_HP_METHOD_DOCK 19 +#define ACPI_HP_METHOD_CMI_DETAIL 20 + +#define HP_MASK_WWAN_ON_AIR 0x1000000 +#define HP_MASK_BLUETOOTH_ON_AIR 0x10000 +#define HP_MASK_WLAN_ON_AIR 0x100 +#define HP_MASK_WWAN_RADIO 0x8000000 +#define HP_MASK_BLUETOOTH_RADIO 0x80000 +#define HP_MASK_WLAN_RADIO 0x800 +#define HP_MASK_WWAN_ENABLED 0x2000000 +#define HP_MASK_BLUETOOTH_ENABLED 0x20000 +#define HP_MASK_WLAN_ENABLED 0x200 + +#define ACPI_HP_CMI_DETAIL_PATHS 0x01 +#define ACPI_HP_CMI_DETAIL_ENUMS 0x02 +#define ACPI_HP_CMI_DETAIL_FLAGS 0x04 + +struct acpi_hp_inst_seq_pair { + UINT32 sequence; /* sequence number as suggested by cmi bios */ + UINT8 instance; /* object instance on guid */ +}; + +struct acpi_hp_softc { + device_t dev; + ACPI_HANDLE handle; + device_t wmi_dev; + int has_notify; /* notification GUID found */ + int has_cmi; /* CMI GUID found */ + int cmi_detail; /* CMI detail level (controlled by sysctl) */ + int wlan_enable_if_radio_on; /* controlled by sysctl */ + int wlan_disable_if_radio_off; /* controlled by sysctl */ + int bluetooth_enable_if_radio_on; /* controlled by sysctl */ + int bluetooth_disable_if_radio_off; /* controlled by sysctl */ + int wwan_enable_if_radio_on; /* controlled by sysctl */ + int wwan_disable_if_radio_off; /* controlled by sysctl */ + int was_wlan_on_air; /* last known WLAN on air status */ + int was_bluetooth_on_air; /* last known Bluetooth in air status */ + int was_wwan_on_air; /* last known WWAN on air status */ + struct sysctl_ctx_list *sysctl_ctx; + struct sysctl_oid *sysctl_tree; + struct cdev *hpcmi_dev_t; /* hpcmi device handle */ + struct sbuf hpcmi_sbuf; /* /dev/hpcmi output sbuf */ + pid_t hpcmi_open_pid; /* pid operating on /dev/hpcmi */ + int hpcmi_bufptr; /* current pointer position in /dev/hpcmi output buffer */ + int cmi_order_size; /* size of cmi_order list */ + struct acpi_hp_inst_seq_pair cmi_order[128]; /* list of CMI instances ordered by BIOS suggested sequence */ +}; + +static struct { + char *name; + int method; + char *description; + int access; +} acpi_hp_sysctls[] = { + { + .name = "wlan_enabled", + .method = ACPI_HP_METHOD_WLAN_ENABLED, + .description = "Enable/Disable WLAN (WiFi)", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wlan_radio", + .method = ACPI_HP_METHOD_WLAN_RADIO, + .description = "WLAN radio status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "wlan_on_air", + .method = ACPI_HP_METHOD_WLAN_ON_AIR, + .description = "WLAN radio ready to use (enabled and radio)", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "wlan_enable_if_radio_on", + .method = ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON, + .description = "Enable WLAN if radio is turned on", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wlan_disable_if_radio_off", + .method = ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF, + .description = "Disable WLAN if radio is turned off", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "bt_enabled", + .method = ACPI_HP_METHOD_BLUETOOTH_ENABLED, + .description = "Enable/Disable Bluetooth", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "bt_radio", + .method = ACPI_HP_METHOD_BLUETOOTH_RADIO, + .description = "Bluetooth radio status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "bt_on_air", + .method = ACPI_HP_METHOD_BLUETOOTH_ON_AIR, + .description = "Bluetooth radio ready to use (enabled and radio)", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "bt_enable_if_radio_on", + .method = ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON, + .description = "Enable bluetooth if radio is turned on", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "bt_disable_if_radio_off", + .method = ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF, + .description = "Disable bluetooth if radio is turned off", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wwan_enabled", + .method = ACPI_HP_METHOD_WWAN_ENABLED, + .description = "Enable/Disable WWAN (UMTS)", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wwan_radio", + .method = ACPI_HP_METHOD_WWAN_RADIO, + .description = "WWAN radio status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "wwan_on_air", + .method = ACPI_HP_METHOD_WWAN_ON_AIR, + .description = "WWAN radio ready to use (enabled and radio)", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "wwan_enable_if_radio_on", + .method = ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON, + .description = "Enable WWAN if radio is turned on", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wwan_disable_if_radio_off", + .method = ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF, + .description = "Disable WWAN if radio is turned off", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "als_enabled", + .method = ACPI_HP_METHOD_ALS, + .description = "Enable/Disable ALS (Ambient light sensor)", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "display", + .method = ACPI_HP_METHOD_DISPLAY, + .description = "Display status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "hdd_temperature", + .method = ACPI_HP_METHOD_HDDTEMP, + .description = "HDD temperature", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "is_docked", + .method = ACPI_HP_METHOD_DOCK, + .description = "Docking station status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "cmi_detail", + .method = ACPI_HP_METHOD_CMI_DETAIL, + .description = "Details shown in CMI output (cat /dev/hpcmi)", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + + { NULL, 0, NULL, 0 } +}; + +ACPI_SERIAL_DECL(hp, "HP ACPI-WMI Mapping"); + +static int acpi_hp_probe(device_t dev); +static int acpi_hp_attach(device_t dev); +static int acpi_hp_detach(device_t dev); + +static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc* sc); +static int acpi_hp_sysctl(SYSCTL_HANDLER_ARGS); +static int acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg); +static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method); +static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val); +static void acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context); +static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, + char* outbuf, size_t outsize, UINT32* sequence, int detail); +static void acpi_hp_hex_decode(char* buffer); + +static d_open_t acpi_hp_hpcmi_open; +static d_close_t acpi_hp_hpcmi_close; +static d_read_t acpi_hp_hpcmi_read; + +/* handler /dev/hpcmi device */ +static struct cdevsw hpcmi_cdevsw = { + .d_version = D_VERSION, + .d_open = acpi_hp_hpcmi_open, + .d_close = acpi_hp_hpcmi_close, + .d_read = acpi_hp_hpcmi_read, + .d_name = "hpcmi", +}; + +static device_method_t acpi_hp_methods[] = { + DEVMETHOD(device_probe, acpi_hp_probe), + DEVMETHOD(device_attach, acpi_hp_attach), + DEVMETHOD(device_detach, acpi_hp_detach), + {0, 0} +}; + +static driver_t acpi_hp_driver = { + "acpi_hp", + acpi_hp_methods, + sizeof(struct acpi_hp_softc), +}; + +static devclass_t acpi_hp_devclass; + +DRIVER_MODULE(acpi_hp, acpi, acpi_hp_driver, acpi_hp_devclass, + 0, 0); +MODULE_DEPEND(acpi_hp, acpi_wmi, 1, 1, 1); +MODULE_DEPEND(acpi_hp, acpi, 1, 1, 1); + +static void +acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc *sc) +{ + int wireless; + int new_wlan_status; + int new_bluetooth_status; + int new_wwan_status; + + wireless = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + new_wlan_status = -1; + new_bluetooth_status = -1; + new_wwan_status = -1; + + device_printf(sc->wmi_dev, "Wireless status is %x\n", wireless); + if (sc->wlan_disable_if_radio_off && !(wireless & HP_MASK_WLAN_RADIO) && (wireless & HP_MASK_WLAN_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x100); + new_wlan_status = 0; + } + else if (sc->wlan_enable_if_radio_on && (wireless & HP_MASK_WLAN_RADIO) && !(wireless & HP_MASK_WLAN_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x101); + new_wlan_status = 1; + } + if (sc->bluetooth_disable_if_radio_off && !(wireless & HP_MASK_BLUETOOTH_RADIO) && (wireless & HP_MASK_BLUETOOTH_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x200); + new_bluetooth_status = 0; + } + else if (sc->bluetooth_enable_if_radio_on && (wireless & HP_MASK_BLUETOOTH_RADIO) && !(wireless & HP_MASK_BLUETOOTH_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x202); + new_bluetooth_status = 1; + } + if (sc->wwan_disable_if_radio_off && !(wireless & HP_MASK_WWAN_RADIO) && (wireless & HP_MASK_WWAN_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x400); + new_wwan_status = 0; + } + else if (sc->wwan_enable_if_radio_on && (wireless & HP_MASK_WWAN_RADIO) && !(wireless & HP_MASK_WWAN_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x404); + new_wwan_status = 1; + } + + if (new_wlan_status == -1) { + new_wlan_status = (wireless & HP_MASK_WLAN_ON_AIR); + if ((new_wlan_status?1:0) != sc->was_wlan_on_air) { + sc->was_wlan_on_air = sc->was_wlan_on_air?0:1; + device_printf(sc->wmi_dev, "WLAN on air changed to %i (new_wlan_status is %i)\n", sc->was_wlan_on_air, new_wlan_status); + acpi_UserNotify("HP", sc->handle, 0xc0+sc->was_wlan_on_air); + } + } + if (new_bluetooth_status == -1) { + new_bluetooth_status = (wireless & HP_MASK_BLUETOOTH_ON_AIR); + if ((new_bluetooth_status?1:0) != sc->was_bluetooth_on_air) { + sc->was_bluetooth_on_air = sc->was_bluetooth_on_air?0:1; + device_printf(sc->wmi_dev, "BLUETOOTH on air changed to %i (new_bluetooth_status is %i)\n", sc->was_bluetooth_on_air, new_bluetooth_status); + acpi_UserNotify("HP", sc->handle, 0xd0+sc->was_bluetooth_on_air); + } + } + if (new_wwan_status == -1) { + new_wwan_status = (wireless & HP_MASK_WWAN_ON_AIR); + if ((new_wwan_status?1:0) != sc->was_wwan_on_air) { + sc->was_wwan_on_air = sc->was_wwan_on_air?0:1; + device_printf(sc->wmi_dev, "WWAN on air changed to %i (new_wwan_status is %i)\n", sc->was_wwan_on_air, new_wwan_status); + acpi_UserNotify("HP", sc->handle, 0xe0+sc->was_wwan_on_air); + } + } +} + +static int +acpi_hp_probe(device_t dev) +{ + if (acpi_disabled("hp") || device_get_unit(dev) != 0) + return (ENXIO); + device_set_desc(dev, "HP ACPI-WMI Mapping"); + return (0); +} + +static int +acpi_hp_attach(device_t dev) +{ + struct acpi_hp_softc *sc; + struct acpi_softc *acpi_sc; + devclass_t wmi_devclass; + int arg; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + sc = device_get_softc(dev); + sc->dev = dev; + sc->handle = acpi_get_handle(dev); + sc->has_notify = 0; + sc->has_cmi = 0; + sc->bluetooth_enable_if_radio_on = 0; + sc->bluetooth_disable_if_radio_off = 0; + sc->wlan_enable_if_radio_on = 0; + sc->wlan_disable_if_radio_off = 0; + sc->wlan_enable_if_radio_on = 0; + sc->wlan_disable_if_radio_off = 0; + sc->was_wlan_on_air = 0; + sc->was_bluetooth_on_air = 0; + sc->was_wwan_on_air = 0; + sc->cmi_detail = 0; + sc->cmi_order_size = -1; + memset(sc->cmi_order, 0, sizeof(sc->cmi_order)); + acpi_sc = acpi_device_get_parent_softc(dev); + + if (!(wmi_devclass = devclass_find ("acpi_wmi"))) { + device_printf(dev, "Couldn't find acpi_wmi devclass\n"); + return (EINVAL); + } + if (!(sc->wmi_dev = devclass_get_device(wmi_devclass, 0))) { + device_printf(dev, "Couldn't find acpi_wmi device\n"); + return (EINVAL); + } + if (!ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_BIOS_GUID)) { + device_printf(dev, "WMI device does not provide the HP BIOS GUID\n"); + return (EINVAL); + } + if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_EVENT_GUID)) { + device_printf(dev, "HP event GUID detected, installing event handler\n"); + if (ACPI_WMI_INSTALL_EVENT_HANDLER(sc->wmi_dev, ACPI_HP_WMI_EVENT_GUID, acpi_hp_notify, dev)) { + device_printf(dev, "Could not install notification handler!\n"); + } + else { + sc->has_notify = 1; + } + } + if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID)) { + device_printf(dev, "HP CMI GUID detected\n"); + sc->has_cmi = 1; + } + + if (sc->has_cmi) { + sc->hpcmi_dev_t = make_dev(&hpcmi_cdevsw, 0, UID_ROOT, GID_WHEEL, 0644, "hpcmi"); + sc->hpcmi_dev_t->si_drv1 = sc; + sc->hpcmi_open_pid = 0; + sc->hpcmi_bufptr = -1; + } + + ACPI_SERIAL_BEGIN(hp); + + sc->sysctl_ctx = device_get_sysctl_ctx(dev); + sc->sysctl_tree = device_get_sysctl_tree(dev); + for (int i = 0; acpi_hp_sysctls[i].name != NULL; ++i) { + arg = 0; + if ((!sc->has_notify && + (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON || + acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF || + acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON || + acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF || + acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON || + acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF)) || + (arg = acpi_hp_sysctl_get(sc, acpi_hp_sysctls[i].method)) < 0) { + continue; + } + if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ON_AIR) { + sc->was_wlan_on_air = arg; + } + else if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_ON_AIR) { + sc->was_bluetooth_on_air = arg; + } + else if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_ON_AIR) { + sc->was_wwan_on_air = arg; + } + + SYSCTL_ADD_PROC(sc->sysctl_ctx, + SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, + acpi_hp_sysctls[i].name, acpi_hp_sysctls[i].access, + sc, i, acpi_hp_sysctl, "I", + acpi_hp_sysctls[i].description); + } + ACPI_SERIAL_END(hp); + + return (0); +} + +static int +acpi_hp_detach(device_t dev) +{ + int ret; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + struct acpi_hp_softc *sc = device_get_softc(dev); + if (sc->has_cmi && sc->hpcmi_open_pid != 0) { + ret = EBUSY; + } + else { + if (sc->has_notify) { + ACPI_WMI_REMOVE_EVENT_HANDLER(dev, ACPI_HP_WMI_EVENT_GUID); + } + if (sc->hpcmi_bufptr != -1) { + sbuf_delete(&sc->hpcmi_sbuf); + sc->hpcmi_bufptr = -1; + } + sc->hpcmi_open_pid = 0; + destroy_dev(sc->hpcmi_dev_t); + ret = 0; + } + return (ret); +} + +static int +acpi_hp_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct acpi_hp_softc *sc; + int arg; + int oldarg; + int error = 0; + int function; + int method; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = (struct acpi_hp_softc *)oidp->oid_arg1; + function = oidp->oid_arg2; + method = acpi_hp_sysctls[function].method; + + ACPI_SERIAL_BEGIN(hp); + arg = acpi_hp_sysctl_get(sc, method); + oldarg = arg; + error = sysctl_handle_int(oidp, &arg, 0, req); + if (!error && req->newptr != NULL) { + error = acpi_hp_sysctl_set(sc, method, arg, oldarg); + } + ACPI_SERIAL_END(hp); + + return (error); +} + +static int +acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) +{ + int val = 0; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_ASSERT(hp); + + switch (method) { + case ACPI_HP_METHOD_WLAN_ENABLED: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WLAN_ENABLED) != 0); + break; + case ACPI_HP_METHOD_WLAN_RADIO: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WLAN_RADIO) != 0); + break; + case ACPI_HP_METHOD_WLAN_ON_AIR: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WLAN_ON_AIR) != 0); + break; + case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: + val = sc->wlan_enable_if_radio_on; + break; + case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: + val = sc->wlan_disable_if_radio_off; + break; + case ACPI_HP_METHOD_BLUETOOTH_ENABLED: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_BLUETOOTH_ENABLED) != 0); + break; + case ACPI_HP_METHOD_BLUETOOTH_RADIO: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_BLUETOOTH_RADIO) != 0); + break; + case ACPI_HP_METHOD_BLUETOOTH_ON_AIR: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_BLUETOOTH_ON_AIR) != 0); + break; + case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: + val = sc->bluetooth_enable_if_radio_on; + break; + case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: + val = sc->bluetooth_disable_if_radio_off; + break; + case ACPI_HP_METHOD_WWAN_ENABLED: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WWAN_ENABLED) != 0); + break; + case ACPI_HP_METHOD_WWAN_RADIO: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WWAN_RADIO) != 0); + break; + case ACPI_HP_METHOD_WWAN_ON_AIR: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WWAN_ON_AIR) != 0); + break; + case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: + val = sc->wwan_enable_if_radio_on; + break; + case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: + val = sc->wwan_disable_if_radio_off; + break; + case ACPI_HP_METHOD_ALS: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_ALS_COMMAND, 0, 0); + break; + case ACPI_HP_METHOD_DISPLAY: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_DISPLAY_COMMAND, 0, 0); + break; + case ACPI_HP_METHOD_HDDTEMP: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_HDDTEMP_COMMAND, 0, 0); + break; + case ACPI_HP_METHOD_DOCK: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_DOCK_COMMAND, 0, 0); + break; + case ACPI_HP_METHOD_CMI_DETAIL: + val = sc->cmi_detail; + break; + } + return (val); +} + +static int +acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg) +{ + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_ASSERT(hp); + + if (method != ACPI_HP_METHOD_CMI_DETAIL) + arg = arg?1:0; + + if (arg != oldarg) { + switch (method) { + case ACPI_HP_METHOD_WLAN_ENABLED: + return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x101:0x100)); + case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: + sc->wlan_enable_if_radio_on = arg; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: + sc->wlan_disable_if_radio_off = arg; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_BLUETOOTH_ENABLED: + return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x202:0x200)); + case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: + sc->bluetooth_enable_if_radio_on = arg; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: + sc->bluetooth_disable_if_radio_off = arg?1:0; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_WWAN_ENABLED: + return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x404:0x400)); + case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: + sc->wwan_enable_if_radio_on = arg?1:0; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: + sc->wwan_disable_if_radio_off = arg?1:0; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_ALS: + return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_ALS_COMMAND, 1, arg?1:0)); + case ACPI_HP_METHOD_CMI_DETAIL: + sc->cmi_detail = arg; + break; + } + } + return (0); +} + +static __inline void acpi_hp_free_buffer(ACPI_BUFFER* buf) { + if (buf && buf->Pointer) { + AcpiOsFree(buf->Pointer); + } +} + +static void +acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context) +{ + device_t dev = context; + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); + + struct acpi_hp_softc *sc = device_get_softc(dev); + ACPI_BUFFER response = { ACPI_ALLOCATE_BUFFER, NULL }; + ACPI_OBJECT *obj; + ACPI_WMI_GET_EVENT_DATA(sc->wmi_dev, notify, &response); + obj = (ACPI_OBJECT*) response.Pointer; + if (obj && obj->Type == ACPI_TYPE_BUFFER && obj->Buffer.Length == 8) { + if (*((UINT8 *) obj->Buffer.Pointer) == 0x5) { + acpi_hp_evaluate_auto_on_off(sc); + } + } + acpi_hp_free_buffer(&response); +} + +static int +acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val) +{ + UINT32 params[5] = {0x55434553, is_write?2:1, command, is_write?4:0, val}; + UINT32* result; + ACPI_OBJECT *obj; + ACPI_BUFFER in = { sizeof(params), ¶ms }; + ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; + int retval; + + if (ACPI_FAILURE(ACPI_WMI_EVALUATE_CALL(wmi_dev, ACPI_HP_WMI_BIOS_GUID, 0, 0x3, &in, &out))) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + obj = out.Pointer; + if (!obj || obj->Type != ACPI_TYPE_BUFFER) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + result = (UINT32*) obj->Buffer.Pointer; + retval = result[2]; + if (result[1] > 0) { + retval = result[1]; + } + acpi_hp_free_buffer(&out); + return (retval); +} + +static __inline char* acpi_hp_get_string_from_object(ACPI_OBJECT* obj, char* dst, size_t size) { + int length; + dst[0] = 0; + if (obj->Type == ACPI_TYPE_STRING) { + length = obj->String.Length+1; + if (length > size) { + length = size - 1; + } + strlcpy(dst, obj->String.Pointer, length); + acpi_hp_hex_decode(dst); + } + return (dst); +} + + +/* + * Read BIOS Setting block in instance "instance". + * The block returned is ACPI_TYPE_PACKAGE which should contain the following elements: + * Index Meaning + * 0 Setting Name [string] + * 1 Value (comma separated, asterisk marks the current value) [string] + * 2 Path within the bios hierarchy [string] + * 3 IsReadOnly [int] + * 4 DisplayInUI [int] + * 5 RequiresPhysicalPresence [int] + * 6 Sequence for ordering within the bios settings (absolute) [int] + * 7 Length of prerequisites array [int] + * 8 Prerequisite1 [string] + * 9 Prerequisite2 [string] + * 10 Prerequisite3 [string] + * 11 Current value (in case of enum) [string] / Array length [int] + * 12 Enum length [int] / Array values + * 13ff Enum value at index x [string] + */ +static int +acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, char* outbuf, size_t outsize, UINT32* sequence, int detail) +{ + ACPI_OBJECT *obj; + ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; + int i; + int outlen; + int size = 255; + int has_enums = 0; + char string_buffer[size]; + int enumbase; + + outlen = 0; + outbuf[0] = 0; + if (ACPI_FAILURE(ACPI_WMI_GET_BLOCK(wmi_dev, guid, instance, &out))) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + obj = out.Pointer; + if (!obj && obj->Type != ACPI_TYPE_PACKAGE) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + + /* check if this matches our expectations based on our limited knowledge */ + if (obj->Package.Count >= 13 && + obj->Package.Elements[0].Type == ACPI_TYPE_STRING && + obj->Package.Elements[1].Type == ACPI_TYPE_STRING && + obj->Package.Elements[2].Type == ACPI_TYPE_STRING && + obj->Package.Elements[3].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[4].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[5].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[6].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[7].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[8].Type == ACPI_TYPE_STRING && + obj->Package.Elements[9].Type == ACPI_TYPE_STRING && + obj->Package.Elements[10].Type == ACPI_TYPE_STRING && + ((obj->Package.Elements[11].Type == ACPI_TYPE_STRING && + obj->Package.Elements[12].Type == ACPI_TYPE_INTEGER && + obj->Package.Count >= 13+obj->Package.Elements[12].Integer.Value) || + (obj->Package.Elements[11].Type == ACPI_TYPE_INTEGER && + obj->Package.Count >= 12+obj->Package.Elements[11].Integer.Value)) + ) { + enumbase = obj->Package.Elements[11].Type == ACPI_TYPE_STRING?12:11; + if (detail & ACPI_HP_CMI_DETAIL_PATHS) { + strlcat(outbuf, acpi_hp_get_string_from_object(&obj->Package.Elements[2], string_buffer, size), outsize); + outlen += 48; + while (strlen(outbuf) < outlen) + strlcat(outbuf, " ", outsize); + } + strlcat(outbuf, acpi_hp_get_string_from_object(&obj->Package.Elements[0], string_buffer, size), outsize); + outlen += 43; + while (strlen(outbuf) < outlen) + strlcat(outbuf, " ", outsize); + if (enumbase == 12) + strlcat(outbuf, acpi_hp_get_string_from_object(&obj->Package.Elements[11], string_buffer, size), outsize); + outlen += 21; + while (strlen(outbuf) < outlen) + strlcat(outbuf, " ", outsize); + for (i = 0; i < strlen(outbuf); ++i) + if (outbuf[i] == '\\') + outbuf[i] = '/'; + if (detail & ACPI_HP_CMI_DETAIL_ENUMS) { + for (i = enumbase+1; i < enumbase+1 + obj->Package.Elements[enumbase].Integer.Value; ++i) { + acpi_hp_get_string_from_object(&obj->Package.Elements[i], string_buffer, size); + if (strlen(string_buffer) > 1 || (strlen(string_buffer) == 1 && string_buffer[0] != ' ')) { + if (has_enums) + strlcat(outbuf, "/", outsize); + else + strlcat(outbuf, " (", outsize); + strlcat(outbuf, string_buffer, outsize); + has_enums = 1; + } + } + } + if (has_enums) + strlcat(outbuf, ")", outsize); + if (detail & ACPI_HP_CMI_DETAIL_FLAGS) { + strlcat(outbuf, obj->Package.Elements[3].Integer.Value?" [ReadOnly]":"", outsize); + strlcat(outbuf, obj->Package.Elements[4].Integer.Value?"":" [NOUI]", outsize); + strlcat(outbuf, obj->Package.Elements[5].Integer.Value?" [RPP]":"", outsize); + } + *sequence = (UINT32) obj->Package.Elements[6].Integer.Value; + } + acpi_hp_free_buffer(&out); + return (0); +} + + + +/* + * Convert given two digit hex string (hexin) to an UINT8 referenced + * by byteout. + * Return != 0 if the was a problem (invalid input) + */ +static __inline int acpi_hp_hex_to_int(const UINT8 *hexin, UINT8 *byteout) +{ + unsigned int hi; + unsigned int lo; + + hi = hexin[0]; + lo = hexin[1]; + if ('0' <= hi && hi <= '9') + hi -= '0'; + else if ('A' <= hi && hi <= 'F') + hi -= ('A' - 10); + else if ('a' <= hi && hi <= 'f') + hi -= ('a' - 10); + else + return (1); + if ('0' <= lo && lo <= '9') + lo -= '0'; + else if ('A' <= lo && lo <= 'F') + lo -= ('A' - 10); + else if ('a' <= lo && lo <= 'f') + lo -= ('a' - 10); + else + return (1); + *byteout = (hi << 4) + lo; + return (0); +} + + +static void +acpi_hp_hex_decode(char* buffer) +{ + int i; + int length = strlen(buffer); + UINT8 *uin; + UINT8 uout; + + if (((int)length/2)*2 == length || length < 10) return; + + for (i = 0; i= '0' && buffer[i] <= '9') || + (buffer[i] >= 'A' && buffer[i] <= 'F'))) + return; + } + + for (i = 0; isi_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(hp); + if (sc->hpcmi_open_pid != 0) { + ret = EBUSY; + } + else { + if (sbuf_new(&sc->hpcmi_sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { + ret = ENXIO; + } else { + sc->hpcmi_open_pid = td->td_proc->p_pid; + sc->hpcmi_bufptr = 0; + ret = 0; + } + } + ACPI_SERIAL_END(hp); + return (ret); +} + +/* + * close hpcmi device + */ +static int +acpi_hp_hpcmi_close(struct cdev* dev, int flags, int mode, struct thread *td) +{ + struct acpi_hp_softc *sc; + int ret; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(hp); + if (sc->hpcmi_open_pid == 0) { + ret = EBADF; + } + else { + if (sc->hpcmi_bufptr != -1) { + sbuf_delete(&sc->hpcmi_sbuf); + sc->hpcmi_bufptr = -1; + } + sc->hpcmi_open_pid = 0; + ret = 0; + } + ACPI_SERIAL_END(hp); + return (ret); +} + +/* + * Read from hpcmi bios information + */ +static int +acpi_hp_hpcmi_read(struct cdev *dev, struct uio *buf, int flag) +{ + struct acpi_hp_softc *sc; + int pos, i, l, ret; + UINT8 instance; + UINT32 sequence; + int linesize = 1025; + char line[linesize]; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(hp); + if (sc->hpcmi_open_pid != buf->uio_td->td_proc->p_pid || sc->hpcmi_bufptr == -1) { + ret = EBADF; + } + else { + if (!sbuf_done(&sc->hpcmi_sbuf)) { + if (sc->cmi_order_size < 0) { + sc->cmi_order_size = 0; + for (instance = 0; instance < 128; ++instance) { + if (acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, instance, line, linesize, &sequence, sc->cmi_detail)) { + instance = 128; + } + else { + pos = sc->cmi_order_size; + for (i=0; icmi_order_size && i<127; ++i) { + if (sc->cmi_order[i].sequence > sequence) { + pos = i; + break; + } + } + for (i=sc->cmi_order_size; i>pos; --i) { + sc->cmi_order[i].sequence = sc->cmi_order[i-1].sequence; + sc->cmi_order[i].instance = sc->cmi_order[i-1].instance; + } + sc->cmi_order[pos].sequence = sequence; + sc->cmi_order[pos].instance = instance; + sc->cmi_order_size++; + } + } + } + for (i=0; icmi_order_size; ++i) { + if (!acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, sc->cmi_order[i].instance, line, linesize, &sequence, sc->cmi_detail)) { + sbuf_printf(&sc->hpcmi_sbuf, "%s\n", line); + } + } + sbuf_finish(&sc->hpcmi_sbuf); + } + if (sbuf_len(&sc->hpcmi_sbuf) <= 0) { + sbuf_delete(&sc->hpcmi_sbuf); + sc->hpcmi_bufptr = -1; + sc->hpcmi_open_pid = 0; + ret = ENOMEM; + } else { + l = min(buf->uio_resid, sbuf_len(&sc->hpcmi_sbuf) - sc->hpcmi_bufptr); + ret = (l > 0)?uiomove(sbuf_data(&sc->hpcmi_sbuf) + sc->hpcmi_bufptr, l, buf) : 0; + sc->hpcmi_bufptr += l; + } + } + ACPI_SERIAL_END(hp); + return (ret); +} --- share/man/man4/man4.i386/acpi_wmi.4~ 2009-06-21 12:09:58.000000000 +0200 +++ share/man/man4/man4.i386/acpi_wmi.4 2009-06-21 12:10:57.178932778 +0200 @@ -0,0 +1,97 @@ +.\" Copyright (c) 2009 Michael Gmelin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 21, 2009 +.Dt ACPI_WMI 4 i386 +.Os +.Sh NAME +.Nm acpi_wmi +.Nd "ACPI to WMI mapping driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device acpi_wmi" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +acpi_wmi_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides an interface for vendor specific WMI implementations +(e.g. HP and Acer laptops). It creates /dev/wmistat, which can be read to get +information about GUIDs found in the system. +.Sh FILES +.Bl -tag -width /dev/wmistat -compact +.It Pa /dev/wmistat +WMI status device. +.El +.Sh EXAMPLES +.Bd Literal +root# cat /dev/wmistat + +GUID INST EXPE METH STR EVENT OID +{5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA +{95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - +{2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - +{05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB +{1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA +{2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC +{988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD +{14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE +{322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF +{8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG +{8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH +{8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI +.Ed + +.Sh SEE ALSO +.Xr acpi 4 , +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx CURRENT . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Michael Gmelin Aq freebsd@grem.de +.Pp +Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho +.Pp +See http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx for +the specification of ACPI-WMI. +.Pp +This manual page was written by +.An Michael Gmelin Aq freebsd@grem.de --- sys/dev/acpi_support/acpi_wmi.c~ 2009-06-21 12:09:58.000000000 +0200 +++ sys/dev/acpi_support/acpi_wmi.c 2009-06-21 12:10:26.901562330 +0200 @@ -0,0 +1,911 @@ +/*- + * Copyright (c) 2009 Michael Gmelin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Driver for acpi-wmi mapping, provides an interface for vendor specific + * implementations (e.g. HP and Acer laptops). + * Inspired by the ACPI-WMI mapping driver (c) 2008-2008 Carlos Corbacho which + * implements this functionality for Linux. + * + * WMI and ACPI: http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx + * acpi-wmi for Linux: http://www.kernel.org + */ + +#include "opt_acpi.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "acpi_wmi_if.h" + +MALLOC_DEFINE(M_ACPIWMI, "acpiwmi", "ACPI-WMI mapping"); + +#define _COMPONENT ACPI_OEM +ACPI_MODULE_NAME("ACPI_WMI"); + +#define ACPI_WMI_REGFLAG_EXPENSIVE 0x1 /* GUID flag: Expensive operation */ +#define ACPI_WMI_REGFLAG_METHOD 0x2 /* GUID flag: Method call */ +#define ACPI_WMI_REGFLAG_STRING 0x4 /* GUID flag: String */ +#define ACPI_WMI_REGFLAG_EVENT 0x8 /* GUID flag: Event */ + +/* + * acpi_wmi driver private structure + */ +struct acpi_wmi_softc { + device_t wmi_dev; /* wmi device id */ + ACPI_HANDLE wmi_handle; /* handle of the PNP0C14 node */ + device_t ec_dev; /* acpi_ec0 */ + struct cdev *wmistat_dev_t; /* wmistat device handle */ + struct sbuf wmistat_sbuf; /* sbuf for /dev/wmistat output */ + pid_t wmistat_open_pid; /* pid currently operating in /dev/wmistat */ + int wmistat_bufptr; /* /dev/wmistat ptr to current buffer position */ +}; + +/* + * Struct that holds information about + * about a single GUID entry in _WDG + */ +struct guid_info { + char guid[16]; /* 16 byte non human readable GUID */ + char oid[2]; /* object id or event notify id (first byte) */ + UINT8 max_instance; /* highest instance known for this GUID */ + UINT8 flags; /* ACPI_WMI_REGFLAG_%s */ +}; + +/* WExx event generation state (on/off) */ +enum event_generation_state { + EVENT_GENERATION_ON = 1, + EVENT_GENERATION_OFF = 0 +}; + + +/* + * Information about one entry in _WDG. + * List of those is used to lookup information by GUID. + */ +struct wmi_info { + TAILQ_ENTRY(wmi_info) wmi_list; + struct guid_info ginfo; /* information on guid */ + ACPI_NOTIFY_HANDLER event_handler; /* client provided event handler */ + void *event_handler_user_data; /* cookie to send when calling event_handler */ +}; +TAILQ_HEAD(wmi_info_list_head, wmi_info) wmi_info_list = TAILQ_HEAD_INITIALIZER(wmi_info_list); + +ACPI_SERIAL_DECL(acpi_wmi, "ACPI-WMI Mapping"); + +/* public interface - declaration */ +/* standard device interface*/ +static int acpi_wmi_probe(device_t dev); +static int acpi_wmi_attach(device_t dev); +static int acpi_wmi_detach(device_t dev); +/* see acpi_wmi_if.m */ +static int acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string); +static ACPI_STATUS acpi_wmi_evaluate_call_method(device_t dev, const char *guid_string, + UINT8 instance, UINT32 method_id, const ACPI_BUFFER *in, ACPI_BUFFER *out); +static ACPI_STATUS acpi_wmi_install_event_handler_method(device_t dev, const char *guid_string, + ACPI_NOTIFY_HANDLER handler, void *data); +static ACPI_STATUS acpi_wmi_remove_event_handler_method(device_t dev, const char *guid_string); +static ACPI_STATUS acpi_wmi_get_event_data_method(device_t dev, UINT32 event_id, ACPI_BUFFER *out); +static ACPI_STATUS acpi_wmi_get_block_method(device_t dev, const char *guid_string, + UINT8 instance, ACPI_BUFFER *out); +static ACPI_STATUS acpi_wmi_set_block_method(device_t dev, const char *guid_string, + UINT8 instance, const ACPI_BUFFER *in); +/* private interface - declaration */ +/* callbacks */ +static void acpi_wmi_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context); +static ACPI_STATUS acpi_wmi_ec_handler(UINT32 function, ACPI_PHYSICAL_ADDRESS address, + UINT32 width, ACPI_INTEGER *value, void *context, + void *region_context); +/* helpers */ +static ACPI_STATUS acpi_wmi_read_wdg_blocks(ACPI_HANDLE h); +static ACPI_STATUS acpi_wmi_toggle_we_event_generation(device_t dev, struct wmi_info *winfo, + enum event_generation_state state); +static int acpi_wmi_guid_string_to_guid(const UINT8 *guid_string, UINT8 *guid); +static struct wmi_info* acpi_wmi_lookup_wmi_info_by_guid_string(const char *guid_string); + +static d_open_t acpi_wmi_wmistat_open; +static d_close_t acpi_wmi_wmistat_close; +static d_read_t acpi_wmi_wmistat_read; + +/* handler /dev/wmistat device */ +static struct cdevsw wmistat_cdevsw = { + .d_version = D_VERSION, + .d_open = acpi_wmi_wmistat_open, + .d_close = acpi_wmi_wmistat_close, + .d_read = acpi_wmi_wmistat_read, + .d_name = "wmistat", +}; + + +static device_method_t acpi_wmi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, acpi_wmi_probe), + DEVMETHOD(device_attach, acpi_wmi_attach), + DEVMETHOD(device_detach, acpi_wmi_detach), + + /* acpi_wmi interface */ + DEVMETHOD(acpi_wmi_provides_guid_string, acpi_wmi_provides_guid_string_method), + DEVMETHOD(acpi_wmi_evaluate_call, acpi_wmi_evaluate_call_method), + DEVMETHOD(acpi_wmi_install_event_handler, acpi_wmi_install_event_handler_method), + DEVMETHOD(acpi_wmi_remove_event_handler, acpi_wmi_remove_event_handler_method), + DEVMETHOD(acpi_wmi_get_event_data, acpi_wmi_get_event_data_method), + DEVMETHOD(acpi_wmi_get_block, acpi_wmi_get_block_method), + DEVMETHOD(acpi_wmi_set_block, acpi_wmi_set_block_method), + + {0, 0} +}; + +static driver_t acpi_wmi_driver = { + "acpi_wmi", + acpi_wmi_methods, + sizeof(struct acpi_wmi_softc), +}; + +static devclass_t acpi_wmi_devclass; +DRIVER_MODULE(acpi_wmi, acpi, acpi_wmi_driver, acpi_wmi_devclass, 0, 0); +MODULE_VERSION(acpi_wmi, 1); +MODULE_DEPEND(acpi_wmi, acpi, 1, 1, 1); +static char *wmi_ids[] = {"PNP0C14", "PNP0c14", NULL}; + +/* + * Probe for the PNP0C14 ACPI node + */ +static int +acpi_wmi_probe(device_t dev) +{ + if (acpi_disabled("wmi") || + ACPI_ID_PROBE(device_get_parent(dev), dev, wmi_ids) == NULL) + return (ENXIO); + device_set_desc(dev, "ACPI-WMI mapping"); + return (0); +} + +/* + * Attach the device by: + * - Looking for the first ACPI EC device + * - Install the notify handler + * - Install the EC address space handler + * - Look for the _WDG node and read GUID information blocks + */ +static int +acpi_wmi_attach(device_t dev) +{ + struct acpi_wmi_softc *sc; + int ret; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + sc = device_get_softc(dev); + ret = ENXIO; + + ACPI_SERIAL_BEGIN(acpi_wmi); + sc->wmi_dev = dev; + sc->wmi_handle = acpi_get_handle(dev); + TAILQ_INIT(&wmi_info_list); + /* XXX Only works with one EC, but nearly all systems only have one. */ + if ((sc->ec_dev = devclass_get_device(devclass_find("acpi_ec"), 0)) == NULL) + device_printf(dev, "cannot find EC device\n"); + else if (ACPI_FAILURE((status = AcpiInstallNotifyHandler(sc->wmi_handle, + ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler, sc)))) + device_printf(sc->wmi_dev, "couldn't install notify handler - %s\n", AcpiFormatException(status)); + else if (ACPI_FAILURE((status = AcpiInstallAddressSpaceHandler(sc->wmi_handle, + ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler, NULL, sc)))) { + device_printf(sc->wmi_dev, "couldn't install EC handler - %s\n", AcpiFormatException(status)); + AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); + } else if (ACPI_FAILURE((status = acpi_wmi_read_wdg_blocks(sc->wmi_handle)))) { + device_printf(sc->wmi_dev, "couldn't parse _WDG - %s\n", AcpiFormatException(status)); + AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); + AcpiRemoveAddressSpaceHandler(sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler); + } else { + sc->wmistat_dev_t = make_dev(&wmistat_cdevsw, 0, UID_ROOT, GID_WHEEL, 0644, "wmistat"); + sc->wmistat_dev_t->si_drv1 = sc; + sc->wmistat_open_pid = 0; + sc->wmistat_bufptr = -1; + ret = 0; + } + ACPI_SERIAL_END(acpi_wmi); + return (ret); +} + +/* + * Detach the driver by: + * - Removing notification handler + * - Removing address space handler + * - Turning off event generation for all WExx event activated by + * child drivers + */ +static int +acpi_wmi_detach(device_t dev) +{ + struct wmi_info *winfo, *tmp; + struct acpi_wmi_softc *sc; + int ret; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + sc = device_get_softc(dev); + ACPI_SERIAL_BEGIN(acpi_wmi); + + if (sc->wmistat_open_pid != 0) { + ret = EBUSY; + } else { + AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); + AcpiRemoveAddressSpaceHandler(sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler); + TAILQ_FOREACH_SAFE(winfo, &wmi_info_list, wmi_list, tmp) { + if (winfo->event_handler) + acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_OFF); + TAILQ_REMOVE(&wmi_info_list, winfo, wmi_list); + free(winfo, M_ACPIWMI); + } + if (sc->wmistat_bufptr != -1) { + sbuf_delete(&sc->wmistat_sbuf); + sc->wmistat_bufptr = -1; + } + sc->wmistat_open_pid = 0; + destroy_dev(sc->wmistat_dev_t); + ret = 0; + } + ACPI_SERIAL_END(acpi_wmi); + return (ret); +} + + +/* + * Check if the given GUID string (human readable format AABBCCDD-EEFF-GGHH-IIJJ-KKLLMMNNOOPP) + * exists within _WDG + */ +static int +acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string) +{ + int ret; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_BEGIN(acpi_wmi); + ret = (acpi_wmi_lookup_wmi_info_by_guid_string(guid_string) == NULL)?0:1; + ACPI_SERIAL_END(acpi_wmi); + return (ret); +} + +/* + * Call a method "method_id" on the given GUID block + * write result into user provided output buffer + */ +static ACPI_STATUS +acpi_wmi_evaluate_call_method(device_t dev, const char *guid_string, UINT8 instance, + UINT32 method_id, const ACPI_BUFFER *in, ACPI_BUFFER *out) +{ + ACPI_OBJECT params[3]; + ACPI_OBJECT_LIST input; + char method[5] = "WMxx"; + struct wmi_info *winfo; + struct acpi_wmi_softc *sc; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + ACPI_SERIAL_BEGIN(acpi_wmi); + if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) == NULL) + status = AE_NOT_FOUND; + else if (!(winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) + status = AE_BAD_DATA; + else if (instance > winfo->ginfo.max_instance) + status = AE_BAD_PARAMETER; + else { + params[0].Type = ACPI_TYPE_INTEGER; + params[0].Integer.Value = instance; + params[1].Type = ACPI_TYPE_INTEGER; + params[1].Integer.Value = method_id; + input.Pointer = params; + input.Count = 2; + if (in) { + params[2].Type = (winfo->ginfo.flags & ACPI_WMI_REGFLAG_STRING) + ?ACPI_TYPE_STRING:ACPI_TYPE_BUFFER; + params[2].Buffer.Length = in->Length; + params[2].Buffer.Pointer = in->Pointer; + input.Count = 3; + } + method[2] = winfo->ginfo.oid[0]; + method[3] = winfo->ginfo.oid[1]; + status = AcpiEvaluateObject(sc->wmi_handle, method, &input, out); + } + ACPI_SERIAL_END(acpi_wmi); + return (status); +} + +/* + * Install a user provided event_handler on the given GUID + * provided *data will be passed on callback + * If there is already an existing event handler registered it will be silently discarded + */ +static ACPI_STATUS +acpi_wmi_install_event_handler_method(device_t dev, const char *guid_string, + ACPI_NOTIFY_HANDLER event_handler, void *data) +{ + struct wmi_info *winfo; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + status = AE_OK; + ACPI_SERIAL_BEGIN(acpi_wmi); + if (guid_string == NULL || event_handler == NULL) + status = AE_BAD_PARAMETER; + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) == NULL) + status = AE_NOT_EXIST; + else if (winfo->event_handler != NULL || + (status = acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_ON)) == AE_OK) { + winfo->event_handler = event_handler; + winfo->event_handler_user_data = data; + } + ACPI_SERIAL_END(acpi_wmi); + return (status); +} + +/* + * Remove a previously installed event handler from the given GUID + * If there was none installed, this call is silently discarded and reported as AE_OK + */ +static ACPI_STATUS +acpi_wmi_remove_event_handler_method(device_t dev, const char *guid_string) +{ + struct wmi_info *winfo; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + status = AE_OK; + ACPI_SERIAL_BEGIN(acpi_wmi); + if (guid_string && + (winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) != NULL && + winfo->event_handler) + { + status = acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_OFF); + winfo->event_handler = NULL; + winfo->event_handler_user_data = NULL; + } + ACPI_SERIAL_END(acpi_wmi); + return (status); +} + +/* + * Get details on an event received through a callback registered + * through ACPI_WMI_REMOVE_EVENT_HANDLER into a user provided output buffer. + * (event_id equals "notify" passed in the callback) + */ +static ACPI_STATUS +acpi_wmi_get_event_data_method(device_t dev, UINT32 event_id, ACPI_BUFFER *out) +{ + ACPI_OBJECT_LIST input; + ACPI_OBJECT params[1]; + struct acpi_wmi_softc *sc; + struct wmi_info *winfo; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + status = AE_NOT_FOUND; + ACPI_SERIAL_BEGIN(acpi_wmi); + params[0].Type = ACPI_TYPE_INTEGER; + params[0].Integer.Value = event_id; + input.Pointer = params; + input.Count = 1; + TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && + ((UINT8) winfo->ginfo.oid[0] == event_id)) { + status = AcpiEvaluateObject(sc->wmi_handle, "_WED", &input, out); + break; + } + } + ACPI_SERIAL_END(acpi_wmi); + return (status); +} + +/* + * Read a block of data from the given GUID (using WQxx (query)) + * Will be returned in a user provided buffer (out). + * If the method is marked as expensive (ACPI_WMI_REGFLAG_EXPENSIVE) + * we will first call the WCxx control method to lock the node to + * lock the node for data collection and release it afterwards. + * (Failed WCxx calls are ignored to "support" broken implementations) + */ +static ACPI_STATUS +acpi_wmi_get_block_method(device_t dev, const char *guid_string, UINT8 instance, + ACPI_BUFFER *out) +{ + char wc_method[5] = "WCxx"; + char wq_method[5] = "WQxx"; + ACPI_OBJECT_LIST wc_input; + ACPI_OBJECT_LIST wq_input; + ACPI_OBJECT wc_params[1]; + ACPI_OBJECT wq_params[1]; + ACPI_HANDLE wc_handle; + struct acpi_wmi_softc *sc; + struct wmi_info *winfo; + ACPI_STATUS status; + ACPI_STATUS wc_status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + wc_status = AE_ERROR; + ACPI_SERIAL_BEGIN(acpi_wmi); + if (guid_string == NULL || out == NULL) + status = AE_BAD_PARAMETER; + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) == NULL) + status = AE_ERROR; + else if (instance > winfo->ginfo.max_instance) + status = AE_BAD_PARAMETER; + else if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) || + (winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) + status = AE_ERROR; + else { + wq_params[0].Type = ACPI_TYPE_INTEGER; + wq_params[0].Integer.Value = instance; + wq_input.Pointer = wq_params; + wq_input.Count = 1; + if (winfo->ginfo.flags & ACPI_WMI_REGFLAG_EXPENSIVE) { + wc_params[0].Type = ACPI_TYPE_INTEGER; + wc_params[0].Integer.Value = 1; + wc_input.Pointer = wc_params; + wc_input.Count = 1; + wc_method[2] = winfo->ginfo.oid[0]; + wc_method[3] = winfo->ginfo.oid[1]; + wc_status = AcpiGetHandle(sc->wmi_handle, wc_method, &wc_handle); + if (ACPI_SUCCESS(wc_status)) + wc_status = AcpiEvaluateObject(wc_handle, wc_method, &wc_input, NULL); + } + wq_method[2] = winfo->ginfo.oid[0]; + wq_method[3] = winfo->ginfo.oid[1]; + status = AcpiEvaluateObject(sc->wmi_handle, wq_method, &wq_input, out); + if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EXPENSIVE) && ACPI_SUCCESS(wc_status)) { + wc_params[0].Integer.Value = 0; + status = AcpiEvaluateObject(wc_handle, wc_method, &wc_input, NULL); /* XXX this might be the wrong status to return? */ + } + } + ACPI_SERIAL_END(acpi_wmi); + return (status); +} + +/* + * Write a block of data to the given GUID (using WSxx) + */ +static ACPI_STATUS +acpi_wmi_set_block_method(device_t dev, const char *guid_string, UINT8 instance, + const ACPI_BUFFER *in) +{ + char method[5] = "WSxx"; + ACPI_OBJECT_LIST input; + ACPI_OBJECT params[2]; + struct wmi_info *winfo; + struct acpi_wmi_softc *sc; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + ACPI_SERIAL_BEGIN(acpi_wmi); + if (guid_string == NULL || in == NULL) + status = AE_BAD_DATA; + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + == NULL) + status = AE_ERROR; + else if (instance > winfo->ginfo.max_instance) + status = AE_BAD_PARAMETER; + else if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) || + (winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) + status = AE_ERROR; + else { + params[0].Type = ACPI_TYPE_INTEGER; + params[0].Integer.Value = instance; + input.Pointer = params; + input.Count = 2; + params[1].Type = (winfo->ginfo.flags & ACPI_WMI_REGFLAG_STRING) + ?ACPI_TYPE_STRING:ACPI_TYPE_BUFFER; + params[1].Buffer.Length = in->Length; + params[1].Buffer.Pointer = in->Pointer; + method[2] = winfo->ginfo.oid[0]; + method[3] = winfo->ginfo.oid[1]; + status = AcpiEvaluateObject(sc->wmi_handle, method, &input, NULL); + } + ACPI_SERIAL_END(acpi_wmi); + return (status); +} + +/* + * Handle events received and dispatch them to + * stakeholders that registered through ACPI_WMI_INSTALL_EVENT_HANDLER + */ +static void +acpi_wmi_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) +{ + ACPI_NOTIFY_HANDLER handler; + void *handler_data; + struct wmi_info *winfo; + + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); + + handler = NULL; + handler_data = NULL; + ACPI_SERIAL_BEGIN(acpi_wmi); + TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && + ((UINT8) winfo->ginfo.oid[0] == notify)) { + if (winfo->event_handler) { + handler = winfo->event_handler; + handler_data = winfo->event_handler_user_data; + break; + } + } + } + ACPI_SERIAL_END(acpi_wmi); + if (handler) { + handler(h, notify, handler_data); + } +} + +/* + * Handle EC address space notifications reveived on the WDG node + * (this mimics EcAddressSpaceHandler in acpi_ec.c) + */ +static ACPI_STATUS +acpi_wmi_ec_handler(UINT32 function, ACPI_PHYSICAL_ADDRESS address, UINT32 width, + ACPI_INTEGER *value, void *context, void *region_context) +{ + struct acpi_wmi_softc *sc; + int i; + ACPI_INTEGER ec_data; + UINT8 ec_addr; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Address); + + sc = (struct acpi_wmi_softc *)context; + if (width % 8 != 0 || value == NULL || context == NULL) + return (AE_BAD_PARAMETER); + if (address + (width / 8) - 1 > 0xFF) + return (AE_BAD_ADDRESS); + if (function == ACPI_READ) + *value = 0; + ec_addr = address; + status = AE_ERROR; + + for (i = 0; i < width; i += 8, ++ec_addr) { + switch (function) { + case ACPI_READ: + status = ACPI_EC_READ(sc->ec_dev, ec_addr, &ec_data, 1); + if (ACPI_SUCCESS(status)) + *value |= ((ACPI_INTEGER)ec_data) << i; + break; + case ACPI_WRITE: + ec_data = (UINT8)((*value) >> i); + status = ACPI_EC_WRITE(sc->ec_dev, ec_addr, ec_data, 1); + break; + default: + device_printf(sc->wmi_dev, "invalid acpi_wmi_ec_handler function %d\n", + function); + status = AE_BAD_PARAMETER; + break; + } + if (ACPI_FAILURE(status)) + break; + } + return (status); +} + +/* + * Read GUID blocks from the _WDG node + * into wmi_info_list. + */ +static ACPI_STATUS +acpi_wmi_read_wdg_blocks(ACPI_HANDLE h) +{ + ACPI_BUFFER out = {ACPI_ALLOCATE_BUFFER, NULL}; + struct guid_info *ginfo; + ACPI_OBJECT *obj; + struct wmi_info *winfo; + UINT32 i; + UINT32 wdg_block_count; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + ACPI_SERIAL_ASSERT(acpi_wmi); + if (ACPI_FAILURE(status = AcpiEvaluateObject(h, "_WDG", NULL, &out))) + return (status); + obj = (ACPI_OBJECT*) out.Pointer; + wdg_block_count = obj->Buffer.Length / sizeof(struct guid_info); + if ((ginfo = malloc(obj->Buffer.Length, M_ACPIWMI, M_NOWAIT)) == NULL) { + AcpiOsFree(out.Pointer); + return (AE_NO_MEMORY); + } + memcpy(ginfo, obj->Buffer.Pointer, obj->Buffer.Length); + for (i = 0; i < wdg_block_count; ++i) { + if ((winfo = malloc(sizeof(struct wmi_info), M_ACPIWMI, M_NOWAIT | M_ZERO)) == NULL) { + AcpiOsFree(out.Pointer); + free(ginfo, M_ACPIWMI); + return (AE_NO_MEMORY); + } + winfo->ginfo = ginfo[i]; + TAILQ_INSERT_TAIL(&wmi_info_list, winfo, wmi_list); + } + AcpiOsFree(out.Pointer); + free(ginfo, M_ACPIWMI); + return (status); +} + +/* + * Toggle event generation in for the given GUID (passed by winfo) + * Turn on to get notified (through acpi_wmi_notify_handler) if eventy happen + * on the given GUID. + */ +static ACPI_STATUS +acpi_wmi_toggle_we_event_generation(device_t dev, struct wmi_info *winfo, enum event_generation_state state) +{ + char method[5] = "WExx"; + ACPI_OBJECT_LIST input; + ACPI_OBJECT params[1]; + struct acpi_wmi_softc *sc; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + ACPI_SERIAL_ASSERT(acpi_wmi); + params[0].Type = ACPI_TYPE_INTEGER; + params[0].Integer.Value = state==EVENT_GENERATION_ON?1:0; + input.Pointer = params; + input.Count = 1; + + UINT8 hi = ((UINT8) winfo->ginfo.oid[0]) >> 4; + UINT8 lo = ((UINT8) winfo->ginfo.oid[0]) & 0xf; + method[2] = (hi > 9 ? hi + 55: hi + 48); + method[3] = (lo > 9 ? lo + 55: lo + 48); + status = AcpiEvaluateObject(sc->wmi_handle, method, &input, NULL); + if (status == AE_NOT_FOUND) status = AE_OK; + return (status); +} + +/* + * Convert given two digit hex string (hexin) to an UINT8 referenced + * by byteout. + * Return != 0 if the was a problem (invalid input) + */ +static __inline int acpi_wmi_hex_to_int(const UINT8 *hexin, UINT8 *byteout) +{ + unsigned int hi; + unsigned int lo; + + hi = hexin[0]; + lo = hexin[1]; + if ('0' <= hi && hi <= '9') + hi -= '0'; + else if ('A' <= hi && hi <= 'F') + hi -= ('A' - 10); + else if ('a' <= hi && hi <= 'f') + hi -= ('a' - 10); + else + return (1); + if ('0' <= lo && lo <= '9') + lo -= '0'; + else if ('A' <= lo && lo <= 'F') + lo -= ('A' - 10); + else if ('a' <= lo && lo <= 'f') + lo -= ('a' - 10); + else + return (1); + *byteout = (hi << 4) + lo; + return (0); +} + +/* + * Convert a human readable 36 character GUID into a 16byte machine readable one. + * The basic algorithm looks as follows: + * Input: AABBCCDD-EEFF-GGHH-IIJJ-KKLLMMNNOOPP + * Output: DCBAFEHGIJKLMNOP + * (AA BB CC etc. represent two digit hex numbers == bytes) + * Return != 0 if passed guid string is invalid + */ +static int +acpi_wmi_guid_string_to_guid(const UINT8 *guid_string, UINT8 *guid) +{ + static const int mapping[20] = {3, 2, 1, 0, -1, 5, 4, -1, 7, 6, -1, 8, 9, + -1, 10, 11, 12, 13, 14, 15}; + int i; + + for (i = 0; i < 20; ++i, ++guid_string) { + if (mapping[i] >= 0) { + if (acpi_wmi_hex_to_int(guid_string, &guid[mapping[i]])) + return (-1); + ++guid_string; + } else if (*guid_string != '-') + return (-1); + } + return (0); +} + +/* + * Lookup a wmi_info structure in wmi_list based on a + * human readable GUID + * Return NULL if the GUID is unknown in the _WDG + */ +static struct wmi_info* +acpi_wmi_lookup_wmi_info_by_guid_string(const char *guid_string) +{ + char guid[16]; + struct wmi_info *winfo; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + ACPI_SERIAL_ASSERT(acpi_wmi); + + if (!acpi_wmi_guid_string_to_guid(guid_string, guid)) { + TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + if (!memcmp(winfo->ginfo.guid, guid, 16)) { + return (winfo); + } + } + } + return (NULL); +} + +/* + * open wmistat device + */ +static int +acpi_wmi_wmistat_open(struct cdev* dev, int flags, int mode, struct thread *td) +{ + struct acpi_wmi_softc *sc; + int ret; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(acpi_wmi); + if (sc->wmistat_open_pid != 0) { + ret = EBUSY; + } + else { + if (sbuf_new(&sc->wmistat_sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { + ret = ENXIO; + } else { + sc->wmistat_open_pid = td->td_proc->p_pid; + sc->wmistat_bufptr = 0; + ret = 0; + } + } + ACPI_SERIAL_END(acpi_wmi); + return (ret); +} + +/* + * close wmistat device + */ +static int +acpi_wmi_wmistat_close(struct cdev* dev, int flags, int mode, struct thread *td) +{ + struct acpi_wmi_softc *sc; + int ret; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(acpi_wmi); + if (sc->wmistat_open_pid == 0) { + ret = EBADF; + } + else { + if (sc->wmistat_bufptr != -1) { + sbuf_delete(&sc->wmistat_sbuf); + sc->wmistat_bufptr = -1; + } + sc->wmistat_open_pid = 0; + ret = 0; + } + ACPI_SERIAL_END(acpi_wmi); + return (ret); +} + +/* + * Read from wmistat guid information + */ +static int +acpi_wmi_wmistat_read(struct cdev *dev, struct uio *buf, int flag) +{ + struct acpi_wmi_softc *sc; + struct wmi_info *winfo; + int l; + int ret; + UINT8* guid; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(acpi_wmi); + if (sc->wmistat_open_pid != buf->uio_td->td_proc->p_pid || + sc->wmistat_bufptr == -1) { + ret = EBADF; + } + else { + if (!sbuf_done(&sc->wmistat_sbuf)) { + sbuf_printf(&sc->wmistat_sbuf, "GUID INST EXPE METH STR EVENT OID\n"); + TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + guid = (UINT8*)winfo->ginfo.guid; + sbuf_printf(&sc->wmistat_sbuf, + "{%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X} %3d %-5s", + guid[3], guid[2], guid[1], guid[0], + guid[5], guid[4], + guid[7], guid[6], + guid[8], guid[9], + guid[10], guid[11], guid[12], guid[13], guid[14], guid[15], + winfo->ginfo.max_instance, + (winfo->ginfo.flags&ACPI_WMI_REGFLAG_EXPENSIVE)?"YES":"NO" + ); + if (winfo->ginfo.flags&ACPI_WMI_REGFLAG_METHOD) + sbuf_printf(&sc->wmistat_sbuf, "WM%c%c ", + winfo->ginfo.oid[0], winfo->ginfo.oid[1]); + else + sbuf_printf(&sc->wmistat_sbuf, "NO "); + sbuf_printf(&sc->wmistat_sbuf, "%-4s", + (winfo->ginfo.flags&ACPI_WMI_REGFLAG_STRING)?"YES":"NO" + ); + if (winfo->ginfo.flags&ACPI_WMI_REGFLAG_EVENT) + sbuf_printf(&sc->wmistat_sbuf, "0x%02X%s -\n", + (UINT8)winfo->ginfo.oid[0], winfo->event_handler==NULL?" ":"+"); + else + sbuf_printf(&sc->wmistat_sbuf, "NO %c%c\n", + winfo->ginfo.oid[0], winfo->ginfo.oid[1]); + } + sbuf_finish(&sc->wmistat_sbuf); + } + if (sbuf_len(&sc->wmistat_sbuf) <= 0) { + sbuf_delete(&sc->wmistat_sbuf); + sc->wmistat_bufptr = -1; + sc->wmistat_open_pid = 0; + ret = ENOMEM; + } else { + l = min(buf->uio_resid, sbuf_len(&sc->wmistat_sbuf) - sc->wmistat_bufptr); + ret = (l > 0)?uiomove(sbuf_data(&sc->wmistat_sbuf) + sc->wmistat_bufptr, l, buf) : 0; + sc->wmistat_bufptr += l; + } + } + ACPI_SERIAL_END(acpi_wmi); + return (ret); +} --- sys/dev/acpi_support/acpi_wmi_if.m~ 2009-06-21 12:09:58.000000000 +0200 +++ sys/dev/acpi_support/acpi_wmi_if.m 2009-06-21 12:13:23.546375847 +0200 @@ -0,0 +1,144 @@ +#- +# Copyright (c) 2009 Michael Gmelin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD: src/sys/dev/acpic_support/acpi_wmi_if.m,v 1.0 2008/11/23 16:33:00 rmg Exp $ +# + +#include +#include +#include + +INTERFACE acpi_wmi; + +# +# Default implementation for acpi_wmi_generic_provides_guid_string(). +# +CODE { + static int + acpi_wmi_generic_provides_guid_string(device_t dev, const char* guid_string) + { + return 0; + } +}; + + +# +# Check if given GUID exists in WMI +# +# device_t dev: Device to probe +# const char* guid_string: String form of the GUID +# +METHOD int provides_guid_string { + device_t dev; + const char* guid_string; +} DEFAULT acpi_wmi_generic_provides_guid_string; + +# +# Evaluate a WMI method call +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# UINT8 instance: instance id +# UINT32 method_id: method to call +# const ACPI_BUFFER* in: input data +# ACPI_BUFFER* out: output buffer +# +METHOD ACPI_STATUS evaluate_call { + device_t dev; + const char *guid_string; + UINT8 instance; + UINT32 method_id; + const ACPI_BUFFER *in; + ACPI_BUFFER *out; +}; + +# +# Get content of a WMI block +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# UINT8 instance: instance id +# ACPI_BUFFER* out: output buffer +# +METHOD ACPI_STATUS get_block { + device_t dev; + const char *guid_string; + UINT8 instance; + ACPI_BUFFER *out; +}; +# +# Write to a WMI data block +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# UINT8 instance: instance id +# const ACPI_BUFFER* in: input data +# +METHOD ACPI_STATUS set_block { + device_t dev; + const char *guid_string; + UINT8 instance; + const ACPI_BUFFER *in; +}; + +# +# Install wmi event handler +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# ACPI_NOTIFY_HANDLER handler: Handler +# void* data: Payload +# +METHOD ACPI_STATUS install_event_handler { + device_t dev; + const char *guid_string; + ACPI_NOTIFY_HANDLER handler; + void *data; +}; + +# +# Remove wmi event handler +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# +METHOD ACPI_STATUS remove_event_handler { + device_t dev; + const char *guid_string; +}; + + +# +# Get event data associated to an event +# +# device_t dev: Device to use +# UINT32 event_id: event id +# ACPI_BUFFER* out: output buffer +# +METHOD ACPI_STATUS get_event_data { + device_t dev; + UINT32 event_id; + ACPI_BUFFER *out; +}; --- sys/modules/acpi/acpi_hp/Makefile~ 2009-06-21 12:09:58.000000000 +0200 +++ sys/modules/acpi/acpi_hp/Makefile 2009-06-21 12:10:33.000000000 +0100 @@ -0,0 +1,9 @@ +# $FreeBSD: src/sys/modules/acpi/acpi_hp/Makefile,v 1.3 2004/12/13 04:59:35 imp Exp $ + +.PATH: ${.CURDIR}/../../../dev/acpi_support +KMOD= acpi_hp +CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica +SRCS= acpi_hp.c opt_acpi.h device_if.h bus_if.h acpi_if.h acpi_wmi_if.h +SRCS+= opt_ddb.h + +.include --- sys/modules/acpi/acpi_wmi/Makefile~ 2009-06-21 12:09:58.000000000 +0200 +++ sys/modules/acpi/acpi_wmi/Makefile 2009-06-21 12:10:39.000000000 +0100 @@ -0,0 +1,10 @@ +# $FreeBSD: src/sys/modules/acpi/acpi_wmi/Makefile,v 1.7 2007/06/24 20:36:51 njl Exp $ + +.PATH: ${.CURDIR}/../../../dev/acpi_support + +KMOD= acpi_wmi +CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica +SRCS= acpi_wmi.c +SRCS+= opt_acpi.h acpi_if.h bus_if.h device_if.h acpi_wmi_if.h + +.include --- sys/conf/files.i386~ 2008-12-29 04:46:14.000000000 +0100 +++ sys/conf/files.i386 2009-06-21 12:10:14.000000000 +0100 @@ -226,6 +226,7 @@ dev/syscons/scvtb.c optional sc dev/uart/uart_cpu_i386.c optional uart dev/acpica/acpi_if.m standard +dev/acpi_support/acpi_wmi_if.m standard dev/wpi/if_wpi.c optional wpi i386/acpica/OsdEnvironment.c optional acpi i386/acpica/acpi_machdep.c optional acpi --- sys/conf/files~ 2008-12-29 04:45:44.000000000 +0100 +++ sys/conf/files 2009-06-21 12:10:44.000000000 +0100 @@ -375,9 +375,11 @@ dev/aac/aac_disk.c optional aac dev/aac/aac_linux.c optional aac compat_linux dev/aac/aac_pci.c optional aac pci +dev/acpi_support/acpi_wmi.c optional acpi_wmi acpi dev/acpi_support/acpi_aiboost.c optional acpi_aiboost acpi dev/acpi_support/acpi_asus.c optional acpi_asus acpi dev/acpi_support/acpi_fujitsu.c optional acpi_fujitsu acpi +dev/acpi_support/acpi_hp.c optional acpi_hp acpi dev/acpi_support/acpi_ibm.c optional acpi_ibm acpi dev/acpi_support/acpi_panasonic.c optional acpi_panasonic acpi dev/acpi_support/acpi_sony.c optional acpi_sony acpi --- sys/conf/kmod.mk~ 2008-12-29 04:44:41.000000000 +0100 +++ sys/conf/kmod.mk 2009-06-21 12:10:41.000000000 +0100 @@ -321,7 +321,7 @@ .endfor .endif -MFILES?= dev/acpica/acpi_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \ +MFILES?= dev/acpica/acpi_if.m dev/acpi_support/acpi_wmi_if.m dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \ dev/iicbus/iicbb_if.m dev/iicbus/iicbus_if.m \ dev/mmc/mmcbr_if.m dev/mmc/mmcbus_if.m \ dev/mii/miibus_if.m dev/ofw/ofw_bus_if.m \ --- share/man/man4/man4.i386/Makefile~ 2009-06-21 12:36:50.000000000 +0200 +++ share/man/man4/man4.i386/Makefile 2009-06-21 12:36:50.000000000 +0200 @@ -3,10 +3,12 @@ MAN= acpi_aiboost.4 \ acpi_asus.4 \ acpi_fujitsu.4 \ + acpi_hp.4 \ acpi_ibm.4 \ acpi_panasonic.4 \ acpi_sony.4 \ acpi_toshiba.4 \ + acpi_wmi.4 \ aic.4 \ alpm.4 \ amdpm.4 \ -------------- next part -------------- A non-text attachment was scrubbed... Name: patches.tgz Type: application/octet-stream Size: 20387 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090621/13e0f705/patches-0001.obj From naylor.b.david at gmail.com Sun Jun 21 11:59:03 2009 From: naylor.b.david at gmail.com (David Naylor) Date: Sun Jun 21 11:59:10 2009 Subject: [PATCH] Lenovo S10(e) ACPI In-Reply-To: <20090620130403.GA1051@ideapad.piggybox> References: <200906181407.11607.naylor.b.david@gmail.com> <200906182100.15817.naylor.b.david@gmail.com> <20090620130403.GA1051@ideapad.piggybox> Message-ID: <200906211400.19033.naylor.b.david@gmail.com> Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: This is a digitally signed message part. Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090621/4a822bff/attachment.pgp From rpaulo at freebsd.org Sun Jun 21 13:56:07 2009 From: rpaulo at freebsd.org (Rui Paulo) Date: Sun Jun 21 13:56:38 2009 Subject: ACPI regression Message-ID: <2F4DD9CA-934B-4BAB-9550-F9897623741F@freebsd.org> Hi, I just found out that 7.2 boots ok on my 2009 Mac mini, but 8.0 doesn't. The reason for this is related to ACPI. I don't have much time available to debug this right now, so this is just sort of a heads up. The machine locks up after printing the acpi0 driver announcement. (Disabling ACPI makes the system boot, but many devices are missing, including the SATA controller -- no install possible). I'll keep you informed if something else comes up. -- Rui Paulo From rpaulo at FreeBSD.org Sun Jun 21 14:05:01 2009 From: rpaulo at FreeBSD.org (rpaulo@FreeBSD.org) Date: Sun Jun 21 14:05:06 2009 Subject: kern/128639: [patch] [acpi_asus] acpi for ASUS A6F, A3E, A3F, A3N not working Message-ID: <200906211404.n5LE4x7a009233@freefall.freebsd.org> Synopsis: [patch] [acpi_asus] acpi for ASUS A6F,A3E,A3F,A3N not working State-Changed-From-To: open->feedback State-Changed-By: rpaulo State-Changed-When: Sun Jun 21 14:04:34 UTC 2009 State-Changed-Why: Can you try a more recent FreeBSD version, please? http://www.freebsd.org/cgi/query-pr.cgi?pr=128639 From rpaulo at freebsd.org Sun Jun 21 14:17:49 2009 From: rpaulo at freebsd.org (Rui Paulo) Date: Sun Jun 21 14:17:56 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <5AFA3C27-D3DB-48DA-9AF3-9E14D11EEC61@freebsd.org> References: <4A3E1784.2050406@bindone.de> <5AFA3C27-D3DB-48DA-9AF3-9E14D11EEC61@freebsd.org> Message-ID: On 21 Jun 2009, at 15:08, Rui Paulo wrote: > On 21 Jun 2009, at 12:20, Michael wrote: > >> Hello, >> >> I wrote two new acpi modules last year and finally found the time >> to fix >> them, add some missing features and write man pages. > > Michael, this is great work! I'll review and see if we can ship it > with 8.0! Michael, this looks good, but there are two style nits that we need to fix. * we should try not going over the 80 column mark * add a empty new line before every return If you could send me a new patch for 8.0 with these fixes, I'll commit it (unless someone else has objections). Regards, -- Rui Paulo From freebsdusb at bindone.de Sun Jun 21 16:27:32 2009 From: freebsdusb at bindone.de (Michael) Date: Sun Jun 21 16:27:39 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: References: <4A3E1784.2050406@bindone.de> <5AFA3C27-D3DB-48DA-9AF3-9E14D11EEC61@freebsd.org> Message-ID: <4A3E5F40.4040709@bindone.de> Rui Paulo wrote: > On 21 Jun 2009, at 15:08, Rui Paulo wrote: > >> On 21 Jun 2009, at 12:20, Michael wrote: >> >>> Hello, >>> >>> I wrote two new acpi modules last year and finally found the time to fix >>> them, add some missing features and write man pages. >> >> Michael, this is great work! I'll review and see if we can ship it >> with 8.0! > > Michael, this looks good, but there are two style nits that we need to fix. > * we should try not going over the 80 column mark > * add a empty new line before every return > > If you could send me a new patch for 8.0 with these fixes, I'll commit > it (unless someone else has objections). > > Regards, > -- > Rui Paulo > Hi Rui, hmm style(9) doesn't say anything about columns or return statements in this context (maybe it should be updated?!?). Anyway, when saying adding an empty line before every return statement, do you also mean conditional return statements: So e.g. int func() { int a; if (!a) return 0; return 1; } Should be: int func() { int a; if (!a) return 0; return 1; } or int func() { int a; if (!a) { return 0; } return 1; } ?? Thanks Michael From freebsdusb at bindone.de Sun Jun 21 16:53:46 2009 From: freebsdusb at bindone.de (Michael) Date: Sun Jun 21 16:53:55 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: References: <4A3E1784.2050406@bindone.de> <5AFA3C27-D3DB-48DA-9AF3-9E14D11EEC61@freebsd.org> Message-ID: <4A3E6563.7040400@bindone.de> Rui Paulo wrote: > On 21 Jun 2009, at 15:08, Rui Paulo wrote: > >> On 21 Jun 2009, at 12:20, Michael wrote: >> >>> Hello, >>> >>> I wrote two new acpi modules last year and finally found the time to fix >>> them, add some missing features and write man pages. >> >> Michael, this is great work! I'll review and see if we can ship it >> with 8.0! > > Michael, this looks good, but there are two style nits that we need to fix. > * we should try not going over the 80 column mark > * add a empty new line before every return > > If you could send me a new patch for 8.0 with these fixes, I'll commit > it (unless someone else has objections). > > Regards, > -- > Rui Paulo > Hi Rui, I figured that adding newlines in conditional returns makes no sense (see my last post), so I did reformat everything to be (close to) 80 columns a line add added newlines in front of returns at the end of a function. Please find attached the complete patch again (against clean 7.2-RELEASE) and the files that changed (acpi_hp.c and acpi_wmi.c). Btw, what is the normal adoption path for 7-STABLE (I would assume first it gets into HEAD and if there's interest there will be a backport to 7? It should at least work in there, even so for HP laptops my guess is that most users will use 8 anyway because of wireless support). cheers Michael -------------- next part -------------- --- sys/i386/conf/NOTES~ 2008-12-29 04:48:16.000000000 +0100 +++ sys/i386/conf/NOTES 2009-06-21 12:10:16.000000000 +0100 @@ -471,6 +471,9 @@ options ACPI_DEBUG #!options ACPI_NO_SEMAPHORES +# ACPI WMI Mapping driver +device acpi_wmi + # ACPI Asus Desktop Extras. (voltage, temp, fan) device acpi_aiboost @@ -480,6 +483,9 @@ # ACPI Fujitsu Extras (Buttons) device acpi_fujitsu +# ACPI extras driver for HP laptops +device acpi_hp + # ACPI extras driver for IBM laptops device acpi_ibm --- sys/modules/acpi/Makefile~ 2008-12-29 04:41:59.000000000 +0100 +++ sys/modules/acpi/Makefile 2009-06-21 12:10:59.000000000 +0100 @@ -4,7 +4,7 @@ SUBDIR= acpi .endif -SUBDIR+= acpi_aiboost acpi_asus acpi_fujitsu acpi_ibm \ +SUBDIR+= acpi_wmi acpi_aiboost acpi_asus acpi_fujitsu acpi_hp acpi_ibm \ acpi_panasonic acpi_sony acpi_toshiba acpi_video \ acpi_dock --- share/man/man4/man4.i386/acpi_hp.4~ 2009-06-21 12:09:58.000000000 +0200 +++ share/man/man4/man4.i386/acpi_hp.4 2009-06-21 12:10:21.229934511 +0200 @@ -0,0 +1,273 @@ +.\" Copyright (c) 2009 Michael Gmelin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 21, 2009 +.Dt ACPI_HP 4 i386 +.Os +.Sh NAME +.Nm acpi_hp +.Nd "ACPI extras driver for HP laptops" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device acpi_hp" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +acpi_hp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for ACPI-controlled features found on HP laptops +that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). +.Pp +The main purpose of this driver is to provide an interface, +accessible via +.Xr sysctl 8 , +.Xr devd 8 and +.Xr devfs 8 , +through which applications can determine and change the status of +various laptop components and BIOS settings. +.Pp +.Ss Xr devd 8 Ss Events +Devd events received by +.Xr devd 8 +provide the following information: +.Pp +.Bl -tag -width "subsystem" -offset indent -compact +.It system +.Qq Li ACPI +.It subsystem +.Qq Li HP +.It type +The source of the event in the ACPI namespace. +The value depends on the model. +.It notify +Event code (see below). +.El +.Pp +Event codes: +.Pp +.Bl -tag -width "0xc0" -offset indent -compact +.It Li 0xc0 +WLAN on air status changed to 0 (not on air) +.It Li 0xc1 +WLAN on air status changed to 1 (on air) +.It Li 0xd0 +Bluetooth on air status changed to 0 (not on air) +.It Li 0xd1 +Bluetooth on air status changed to 1 (on air) +.It Li 0xe0 +WWAN on air status changed to 0 (not on air) +.It Li 0xe1 +WWAN on air status changed to 1 (on air) +.El +.Ss Xr devfs 8 Ss Device +You can read /dev/hpcmi to see your current BIOS settings. The detail level +can be adjusted by setting the sysctl +.Va cmi_detail +as described below. +.Sh SYSCTL VARIABLES +The following sysctls are currently implemented: +.Ss WLAN: +.Bl -tag -width indent +.It Va dev.acpi_hp.0.wlan_enabled +Toggle WLAN chip activity. +.It Va dev.acpi_hp.0.wlan_radio +(read-only) +WLAN radio status (controlled by hardware switch) +.It Va dev.acpi_hp.0.wlan_on_air +(read-only) +WLAN on air (chip enabled, hardware switch enabled + enabled in BIOS) +.It Va dev.acpi_hp.0.wlan_enabled_if_radio_on +If set to 1, the WLAN chip will be enabled if the radio is turned on +.It Va dev.acpi_hp.0.wlan_disable_if_radio_off +If set to 1, the WLAN chip will be disabled if the radio is turned off +.El +.Ss Bluetooth: +.Bl -tag -width indent +.It Va dev.acpi_hp.0.bt_enabled +Toggle Bluetooth chip activity. +.It Va dev.acpi_hp.0.bt_radio +(read-only) +Bluetooth radio status (controlled by hardware switch) +.It Va dev.acpi_hp.0.bt_on_air +(read-only) +Bluetooth on air (chip enabled, hardware switch enabled + enabled in BIOS) +.It Va dev.acpi_hp.0.bt_enabled_if_radio_on +If set to 1, the Bluetooth chip will be enabled if the radio is turned on +.It Va dev.acpi_hp.0.bt_disable_if_radio_off +If set to 1, the Bluetooth chip will be disabled if the radio is turned off +.El +.Ss WWAN: +.Bl -tag -width indent +.It Va dev.acpi_hp.0.wwan_enabled +Toggle WWAN chip activity. +.It Va dev.acpi_hp.0.wwan_radio +(read-only) +WWAN radio status (controlled by hardware switch) +.It Va dev.acpi_hp.0.wwan_on_air +(read-only) +WWAN on air (chip enabled, hardware switch enabled + enabled in BIOS) +.It Va dev.acpi_hp.0.wwan_enabled_if_radio_on +If set to 1, the WWAN chip will be enabled if the radio is turned on +.It Va dev.acpi_hp.0.wwan_disable_if_radio_off +If set to 1, the WWAN chip will be disabled if the radio is turned off +.El +.Ss Misc: +.Bl -tag -width indent +.It Va dev.acpi_hp.0.als_enabled +Toggle ambient light sensor (ALS) +.It Va dev.acpi_hp.0.display +(read-only) +Display status (bitmask) +.It Va dev.acpi_hp.0.hdd_temperature +(read-only) +HDD temperature +.It Va dev.acpi_hp.0.is_docked +(read-only) +Docking station status (1 if docked) +.It Va dev.acpi_hp.0.cmi_detail +Bitmask to control detail level in /dev/hpcmi output (values can be ORed). +.Bl -tag -width "0x01" -offset indent -compact +.It Li 0x01 +Show path component of BIOS setting +.It Li 0x02 +Show a list of valid options for the BIOS setting +.It Li 0x04 +Show additional flags of BIOS setting (ReadOnly etc.) +.El +.El +.Pp +Defaults for these sysctls can be set in +.Xr sysctl.conf 5 . +.Sh FILES +.Bl -tag -width ".Pa /dev/hpcmi" +.It Pa /dev/hpcmi +Interface to read BIOS settings +.El +.Sh EXAMPLES +The following can be added to +.Xr devd.conf 5 +in order disable the LAN interface when WLAN on air and reenable if it's +not: +.Bd -literal -offset indent +notify 0 { + match "system" "ACPI"; + match "subsystem" "HP"; + match "notify" "0xc0"; + action "ifconfig em0 up"; +}; + +notify 0 { + match "system" "ACPI"; + match "subsystem" "HP"; + match "notify" "0xc1"; + action "ifconfig em0 down"; +}; +.Ed +.Pp +Enable the ambient light sensor: +.Bd -literal -offset indent +sysctl dev.acpi_hp.0.als_enabled=1 +.Ed +.Pp +Enable Bluetooth: +.Bd -literal -offset indent +sysctl dev.acpi_hp.0.bt_enabled=1 +.Ed +.Pp +Get BIOS settings: +.Bd -literal -offset indent +cat /dev/hpcmi + +Serial Port Disable +Infrared Port Enable +Parallel Port Disable +Flash Media Reader Disable +USB Ports including Express Card slot Enable +1394 Port Enable +Cardbus Slot Disable +Express Card Slot Disable +(...) +.Ed +.Pp +Set maximum detail level for /dev/hpcmi output: +.Bd -literal -offset indent +sysctl dev.acpi_hp.0.cmi_detail=7 +.Ed +.Pp + + + +.Sh SEE ALSO +.Xr acpi 4 , +.Xr acpi_wmi 4 , +.Xr sysctl.conf 5 , +.Xr devd 8 , +.Xr devfs 8 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx CURRENT . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Michael Gmelin Aq freebsd@grem.de +.Pp +It has been inspired by hp-wmi driver, which implements a subset of these +features (hotkeys) on Linux. +.Pp +.Bl -tag -width indent +.It HP CMI whitepaper: +http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf +.It wmi-hp for Linux: +http://www.kernel.org +.It WMI and ACPI: +http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx +.El +.Pp +This manual page was written by +.An Michael Gmelin Aq freebsd@grem.de +.Sh BUGS +This driver is experimental and has only been tested on CURRENT i386 on an +HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). +Expect undefined results when operating on different hardware. +.Pp +Loading the driver is slow. Reading from /dev/hpcmi is even slower. +.Pp +Additional features like HP specific sensor readings or writing BIOS +settings are not supported. --- sys/dev/acpi_support/acpi_hp.c~ 2009-06-21 18:50:08.924078040 +0200 +++ sys/dev/acpi_support/acpi_hp.c 2009-06-21 18:50:54.166723000 +0200 @@ -0,0 +1,1182 @@ +/*- + * Copyright (c) 2009 Michael Gmelin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Driver for extra ACPI-controlled features found on HP laptops + * that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). + * Allows to control and read status of integrated hardware and read + * BIOS settings through CMI. + * Inspired by the hp-wmi driver, which implements a subset of these + * features (hotkeys) on Linux. + * + * HP CMI whitepaper: + * http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf + * wmi-hp for Linux: + * http://www.kernel.org + * WMI and ACPI: + * http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx + */ + +#include "opt_acpi.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "acpi_wmi_if.h" + +#define _COMPONENT ACPI_OEM +ACPI_MODULE_NAME("HP") + +#define ACPI_HP_WMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C" +#define ACPI_HP_WMI_BIOS_GUID "5FB7F034-2C63-45E9-BE91-3D44E2C707E4" +#define ACPI_HP_WMI_CMI_GUID "2D114B49-2DFB-4130-B8FE-4A3C09E75133" + +#define ACPI_HP_WMI_DISPLAY_COMMAND 0x1 +#define ACPI_HP_WMI_HDDTEMP_COMMAND 0x2 +#define ACPI_HP_WMI_ALS_COMMAND 0x3 +#define ACPI_HP_WMI_DOCK_COMMAND 0x4 +#define ACPI_HP_WMI_WIRELESS_COMMAND 0x5 + +#define ACPI_HP_METHOD_WLAN_ENABLED 1 +#define ACPI_HP_METHOD_WLAN_RADIO 2 +#define ACPI_HP_METHOD_WLAN_ON_AIR 3 +#define ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON 4 +#define ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF 5 +#define ACPI_HP_METHOD_BLUETOOTH_ENABLED 6 +#define ACPI_HP_METHOD_BLUETOOTH_RADIO 7 +#define ACPI_HP_METHOD_BLUETOOTH_ON_AIR 8 +#define ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON 9 +#define ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF 10 +#define ACPI_HP_METHOD_WWAN_ENABLED 11 +#define ACPI_HP_METHOD_WWAN_RADIO 12 +#define ACPI_HP_METHOD_WWAN_ON_AIR 13 +#define ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON 14 +#define ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF 15 +#define ACPI_HP_METHOD_ALS 16 +#define ACPI_HP_METHOD_DISPLAY 17 +#define ACPI_HP_METHOD_HDDTEMP 18 +#define ACPI_HP_METHOD_DOCK 19 +#define ACPI_HP_METHOD_CMI_DETAIL 20 + +#define HP_MASK_WWAN_ON_AIR 0x1000000 +#define HP_MASK_BLUETOOTH_ON_AIR 0x10000 +#define HP_MASK_WLAN_ON_AIR 0x100 +#define HP_MASK_WWAN_RADIO 0x8000000 +#define HP_MASK_BLUETOOTH_RADIO 0x80000 +#define HP_MASK_WLAN_RADIO 0x800 +#define HP_MASK_WWAN_ENABLED 0x2000000 +#define HP_MASK_BLUETOOTH_ENABLED 0x20000 +#define HP_MASK_WLAN_ENABLED 0x200 + +#define ACPI_HP_CMI_DETAIL_PATHS 0x01 +#define ACPI_HP_CMI_DETAIL_ENUMS 0x02 +#define ACPI_HP_CMI_DETAIL_FLAGS 0x04 + +struct acpi_hp_inst_seq_pair { + UINT32 sequence; /* sequence number as suggested by cmi bios */ + UINT8 instance; /* object instance on guid */ +}; + +struct acpi_hp_softc { + device_t dev; + ACPI_HANDLE handle; + device_t wmi_dev; + int has_notify; /* notification GUID found */ + int has_cmi; /* CMI GUID found */ + int cmi_detail; /* CMI detail level + (set by sysctl) */ + int wlan_enable_if_radio_on; /* set by sysctl */ + int wlan_disable_if_radio_off; /* set by sysctl */ + int bluetooth_enable_if_radio_on; /* set by sysctl */ + int bluetooth_disable_if_radio_off; /* set by sysctl */ + int wwan_enable_if_radio_on; /* set by sysctl */ + int wwan_disable_if_radio_off; /* set by sysctl */ + int was_wlan_on_air; /* last known WLAN + on air status */ + int was_bluetooth_on_air; /* last known BT + on air status */ + int was_wwan_on_air; /* last known WWAN + on air status */ + struct sysctl_ctx_list *sysctl_ctx; + struct sysctl_oid *sysctl_tree; + struct cdev *hpcmi_dev_t; /* hpcmi device handle */ + struct sbuf hpcmi_sbuf; /* /dev/hpcmi output sbuf */ + pid_t hpcmi_open_pid; /* pid operating on + /dev/hpcmi */ + int hpcmi_bufptr; /* current pointer position + in /dev/hpcmi output buffer + */ + int cmi_order_size; /* size of cmi_order list */ + struct acpi_hp_inst_seq_pair cmi_order[128]; /* list of CMI + instances ordered by BIOS suggested sequence */ +}; + +static struct { + char *name; + int method; + char *description; + int access; +} acpi_hp_sysctls[] = { + { + .name = "wlan_enabled", + .method = ACPI_HP_METHOD_WLAN_ENABLED, + .description = "Enable/Disable WLAN (WiFi)", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wlan_radio", + .method = ACPI_HP_METHOD_WLAN_RADIO, + .description = "WLAN radio status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "wlan_on_air", + .method = ACPI_HP_METHOD_WLAN_ON_AIR, + .description = "WLAN radio ready to use (enabled and radio)", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "wlan_enable_if_radio_on", + .method = ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON, + .description = "Enable WLAN if radio is turned on", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wlan_disable_if_radio_off", + .method = ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF, + .description = "Disable WLAN if radio is turned off", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "bt_enabled", + .method = ACPI_HP_METHOD_BLUETOOTH_ENABLED, + .description = "Enable/Disable Bluetooth", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "bt_radio", + .method = ACPI_HP_METHOD_BLUETOOTH_RADIO, + .description = "Bluetooth radio status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "bt_on_air", + .method = ACPI_HP_METHOD_BLUETOOTH_ON_AIR, + .description = "Bluetooth radio ready to use" + " (enabled and radio)", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "bt_enable_if_radio_on", + .method = ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON, + .description = "Enable bluetooth if radio is turned on", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "bt_disable_if_radio_off", + .method = ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF, + .description = "Disable bluetooth if radio is turned off", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wwan_enabled", + .method = ACPI_HP_METHOD_WWAN_ENABLED, + .description = "Enable/Disable WWAN (UMTS)", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wwan_radio", + .method = ACPI_HP_METHOD_WWAN_RADIO, + .description = "WWAN radio status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "wwan_on_air", + .method = ACPI_HP_METHOD_WWAN_ON_AIR, + .description = "WWAN radio ready to use (enabled and radio)", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "wwan_enable_if_radio_on", + .method = ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON, + .description = "Enable WWAN if radio is turned on", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "wwan_disable_if_radio_off", + .method = ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF, + .description = "Disable WWAN if radio is turned off", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "als_enabled", + .method = ACPI_HP_METHOD_ALS, + .description = "Enable/Disable ALS (Ambient light sensor)", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + { + .name = "display", + .method = ACPI_HP_METHOD_DISPLAY, + .description = "Display status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "hdd_temperature", + .method = ACPI_HP_METHOD_HDDTEMP, + .description = "HDD temperature", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "is_docked", + .method = ACPI_HP_METHOD_DOCK, + .description = "Docking station status", + .access = CTLTYPE_INT | CTLFLAG_RD + }, + { + .name = "cmi_detail", + .method = ACPI_HP_METHOD_CMI_DETAIL, + .description = "Details shown in CMI output " + "(cat /dev/hpcmi)", + .access = CTLTYPE_INT | CTLFLAG_RW + }, + + { NULL, 0, NULL, 0 } +}; + +ACPI_SERIAL_DECL(hp, "HP ACPI-WMI Mapping"); + +static int acpi_hp_probe(device_t dev); +static int acpi_hp_attach(device_t dev); +static int acpi_hp_detach(device_t dev); + +static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc* sc); +static int acpi_hp_sysctl(SYSCTL_HANDLER_ARGS); +static int acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, + int arg, int oldarg); +static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method); +static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, + int is_write, int val); +static void acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context); +static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, + UINT8 instance, char* outbuf, size_t outsize, + UINT32* sequence, int detail); +static void acpi_hp_hex_decode(char* buffer); + +static d_open_t acpi_hp_hpcmi_open; +static d_close_t acpi_hp_hpcmi_close; +static d_read_t acpi_hp_hpcmi_read; + +/* handler /dev/hpcmi device */ +static struct cdevsw hpcmi_cdevsw = { + .d_version = D_VERSION, + .d_open = acpi_hp_hpcmi_open, + .d_close = acpi_hp_hpcmi_close, + .d_read = acpi_hp_hpcmi_read, + .d_name = "hpcmi", +}; + +static device_method_t acpi_hp_methods[] = { + DEVMETHOD(device_probe, acpi_hp_probe), + DEVMETHOD(device_attach, acpi_hp_attach), + DEVMETHOD(device_detach, acpi_hp_detach), + {0, 0} +}; + +static driver_t acpi_hp_driver = { + "acpi_hp", + acpi_hp_methods, + sizeof(struct acpi_hp_softc), +}; + +static devclass_t acpi_hp_devclass; + +DRIVER_MODULE(acpi_hp, acpi, acpi_hp_driver, acpi_hp_devclass, + 0, 0); +MODULE_DEPEND(acpi_hp, acpi_wmi, 1, 1, 1); +MODULE_DEPEND(acpi_hp, acpi, 1, 1, 1); + +static void +acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc *sc) +{ + int wireless; + int new_wlan_status; + int new_bluetooth_status; + int new_wwan_status; + + wireless = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + new_wlan_status = -1; + new_bluetooth_status = -1; + new_wwan_status = -1; + + device_printf(sc->wmi_dev, "Wireless status is %x\n", wireless); + if (sc->wlan_disable_if_radio_off && !(wireless & HP_MASK_WLAN_RADIO) + && (wireless & HP_MASK_WLAN_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x100); + new_wlan_status = 0; + } + else if (sc->wlan_enable_if_radio_on && (wireless & HP_MASK_WLAN_RADIO) + && !(wireless & HP_MASK_WLAN_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x101); + new_wlan_status = 1; + } + if (sc->bluetooth_disable_if_radio_off && + !(wireless & HP_MASK_BLUETOOTH_RADIO) && + (wireless & HP_MASK_BLUETOOTH_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x200); + new_bluetooth_status = 0; + } + else if (sc->bluetooth_enable_if_radio_on && + (wireless & HP_MASK_BLUETOOTH_RADIO) && + !(wireless & HP_MASK_BLUETOOTH_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x202); + new_bluetooth_status = 1; + } + if (sc->wwan_disable_if_radio_off && + !(wireless & HP_MASK_WWAN_RADIO) && + (wireless & HP_MASK_WWAN_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x400); + new_wwan_status = 0; + } + else if (sc->wwan_enable_if_radio_on && + (wireless & HP_MASK_WWAN_RADIO) && + !(wireless & HP_MASK_WWAN_ENABLED)) { + acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x404); + new_wwan_status = 1; + } + + if (new_wlan_status == -1) { + new_wlan_status = (wireless & HP_MASK_WLAN_ON_AIR); + if ((new_wlan_status?1:0) != sc->was_wlan_on_air) { + sc->was_wlan_on_air = sc->was_wlan_on_air?0:1; + device_printf(sc->wmi_dev, + "WLAN on air changed to %i " + "(new_wlan_status is %i)\n", + sc->was_wlan_on_air, new_wlan_status); + acpi_UserNotify("HP", sc->handle, + 0xc0+sc->was_wlan_on_air); + } + } + if (new_bluetooth_status == -1) { + new_bluetooth_status = (wireless & HP_MASK_BLUETOOTH_ON_AIR); + if ((new_bluetooth_status?1:0) != sc->was_bluetooth_on_air) { + sc->was_bluetooth_on_air = sc->was_bluetooth_on_air? + 0:1; + device_printf(sc->wmi_dev, "BLUETOOTH on air changed" + " to %i (new_bluetooth_status is %i)\n", + sc->was_bluetooth_on_air, new_bluetooth_status); + acpi_UserNotify("HP", sc->handle, + 0xd0+sc->was_bluetooth_on_air); + } + } + if (new_wwan_status == -1) { + new_wwan_status = (wireless & HP_MASK_WWAN_ON_AIR); + if ((new_wwan_status?1:0) != sc->was_wwan_on_air) { + sc->was_wwan_on_air = sc->was_wwan_on_air?0:1; + device_printf(sc->wmi_dev, "WWAN on air changed to %i" + " (new_wwan_status is %i)\n", + sc->was_wwan_on_air, new_wwan_status); + acpi_UserNotify("HP", sc->handle, + 0xe0+sc->was_wwan_on_air); + } + } +} + +static int +acpi_hp_probe(device_t dev) +{ + if (acpi_disabled("hp") || device_get_unit(dev) != 0) + return (ENXIO); + device_set_desc(dev, "HP ACPI-WMI Mapping"); + + return (0); +} + +static int +acpi_hp_attach(device_t dev) +{ + struct acpi_hp_softc *sc; + struct acpi_softc *acpi_sc; + devclass_t wmi_devclass; + int arg; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + + sc = device_get_softc(dev); + sc->dev = dev; + sc->handle = acpi_get_handle(dev); + sc->has_notify = 0; + sc->has_cmi = 0; + sc->bluetooth_enable_if_radio_on = 0; + sc->bluetooth_disable_if_radio_off = 0; + sc->wlan_enable_if_radio_on = 0; + sc->wlan_disable_if_radio_off = 0; + sc->wlan_enable_if_radio_on = 0; + sc->wlan_disable_if_radio_off = 0; + sc->was_wlan_on_air = 0; + sc->was_bluetooth_on_air = 0; + sc->was_wwan_on_air = 0; + sc->cmi_detail = 0; + sc->cmi_order_size = -1; + memset(sc->cmi_order, 0, sizeof(sc->cmi_order)); + acpi_sc = acpi_device_get_parent_softc(dev); + + if (!(wmi_devclass = devclass_find ("acpi_wmi"))) { + device_printf(dev, "Couldn't find acpi_wmi devclass\n"); + return (EINVAL); + } + if (!(sc->wmi_dev = devclass_get_device(wmi_devclass, 0))) { + device_printf(dev, "Couldn't find acpi_wmi device\n"); + return (EINVAL); + } + if (!ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, + ACPI_HP_WMI_BIOS_GUID)) { + device_printf(dev, + "WMI device does not provide the HP BIOS GUID\n"); + return (EINVAL); + } + if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, + ACPI_HP_WMI_EVENT_GUID)) { + device_printf(dev, + "HP event GUID detected, installing event handler\n"); + if (ACPI_WMI_INSTALL_EVENT_HANDLER(sc->wmi_dev, + ACPI_HP_WMI_EVENT_GUID, acpi_hp_notify, dev)) { + device_printf(dev, + "Could not install notification handler!\n"); + } + else { + sc->has_notify = 1; + } + } + if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID)) { + device_printf(dev, "HP CMI GUID detected\n"); + sc->has_cmi = 1; + } + + if (sc->has_cmi) { + sc->hpcmi_dev_t = make_dev(&hpcmi_cdevsw, 0, UID_ROOT, + GID_WHEEL, 0644, "hpcmi"); + sc->hpcmi_dev_t->si_drv1 = sc; + sc->hpcmi_open_pid = 0; + sc->hpcmi_bufptr = -1; + } + + ACPI_SERIAL_BEGIN(hp); + + sc->sysctl_ctx = device_get_sysctl_ctx(dev); + sc->sysctl_tree = device_get_sysctl_tree(dev); + for (int i = 0; acpi_hp_sysctls[i].name != NULL; ++i) { + arg = 0; + if ((!sc->has_notify && + (acpi_hp_sysctls[i].method == + ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON || + acpi_hp_sysctls[i].method == + ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF || + acpi_hp_sysctls[i].method == + ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON || + acpi_hp_sysctls[i].method == + ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF || + acpi_hp_sysctls[i].method == + ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON || + acpi_hp_sysctls[i].method == + ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF)) || + (arg = acpi_hp_sysctl_get(sc, + acpi_hp_sysctls[i].method)) < 0) { + continue; + } + if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ON_AIR) { + sc->was_wlan_on_air = arg; + } + else if (acpi_hp_sysctls[i].method == + ACPI_HP_METHOD_BLUETOOTH_ON_AIR) { + sc->was_bluetooth_on_air = arg; + } + else if (acpi_hp_sysctls[i].method == + ACPI_HP_METHOD_WWAN_ON_AIR) { + sc->was_wwan_on_air = arg; + } + + SYSCTL_ADD_PROC(sc->sysctl_ctx, + SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, + acpi_hp_sysctls[i].name, acpi_hp_sysctls[i].access, + sc, i, acpi_hp_sysctl, "I", + acpi_hp_sysctls[i].description); + } + ACPI_SERIAL_END(hp); + + return (0); +} + +static int +acpi_hp_detach(device_t dev) +{ + int ret; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); + struct acpi_hp_softc *sc = device_get_softc(dev); + if (sc->has_cmi && sc->hpcmi_open_pid != 0) { + ret = EBUSY; + } + else { + if (sc->has_notify) { + ACPI_WMI_REMOVE_EVENT_HANDLER(dev, + ACPI_HP_WMI_EVENT_GUID); + } + if (sc->hpcmi_bufptr != -1) { + sbuf_delete(&sc->hpcmi_sbuf); + sc->hpcmi_bufptr = -1; + } + sc->hpcmi_open_pid = 0; + destroy_dev(sc->hpcmi_dev_t); + ret = 0; + } + + return (ret); +} + +static int +acpi_hp_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct acpi_hp_softc *sc; + int arg; + int oldarg; + int error = 0; + int function; + int method; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = (struct acpi_hp_softc *)oidp->oid_arg1; + function = oidp->oid_arg2; + method = acpi_hp_sysctls[function].method; + + ACPI_SERIAL_BEGIN(hp); + arg = acpi_hp_sysctl_get(sc, method); + oldarg = arg; + error = sysctl_handle_int(oidp, &arg, 0, req); + if (!error && req->newptr != NULL) { + error = acpi_hp_sysctl_set(sc, method, arg, oldarg); + } + ACPI_SERIAL_END(hp); + + return (error); +} + +static int +acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) +{ + int val = 0; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_ASSERT(hp); + + switch (method) { + case ACPI_HP_METHOD_WLAN_ENABLED: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WLAN_ENABLED) != 0); + break; + case ACPI_HP_METHOD_WLAN_RADIO: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WLAN_RADIO) != 0); + break; + case ACPI_HP_METHOD_WLAN_ON_AIR: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WLAN_ON_AIR) != 0); + break; + case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: + val = sc->wlan_enable_if_radio_on; + break; + case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: + val = sc->wlan_disable_if_radio_off; + break; + case ACPI_HP_METHOD_BLUETOOTH_ENABLED: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_BLUETOOTH_ENABLED) != 0); + break; + case ACPI_HP_METHOD_BLUETOOTH_RADIO: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_BLUETOOTH_RADIO) != 0); + break; + case ACPI_HP_METHOD_BLUETOOTH_ON_AIR: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_BLUETOOTH_ON_AIR) != 0); + break; + case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: + val = sc->bluetooth_enable_if_radio_on; + break; + case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: + val = sc->bluetooth_disable_if_radio_off; + break; + case ACPI_HP_METHOD_WWAN_ENABLED: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WWAN_ENABLED) != 0); + break; + case ACPI_HP_METHOD_WWAN_RADIO: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WWAN_RADIO) != 0); + break; + case ACPI_HP_METHOD_WWAN_ON_AIR: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); + val = ((val & HP_MASK_WWAN_ON_AIR) != 0); + break; + case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: + val = sc->wwan_enable_if_radio_on; + break; + case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: + val = sc->wwan_disable_if_radio_off; + break; + case ACPI_HP_METHOD_ALS: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_ALS_COMMAND, 0, 0); + break; + case ACPI_HP_METHOD_DISPLAY: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_DISPLAY_COMMAND, 0, 0); + break; + case ACPI_HP_METHOD_HDDTEMP: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_HDDTEMP_COMMAND, 0, 0); + break; + case ACPI_HP_METHOD_DOCK: + val = acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_DOCK_COMMAND, 0, 0); + break; + case ACPI_HP_METHOD_CMI_DETAIL: + val = sc->cmi_detail; + break; + } + + return (val); +} + +static int +acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg) +{ + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_ASSERT(hp); + + if (method != ACPI_HP_METHOD_CMI_DETAIL) + arg = arg?1:0; + + if (arg != oldarg) { + switch (method) { + case ACPI_HP_METHOD_WLAN_ENABLED: + return (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, + arg?0x101:0x100)); + case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: + sc->wlan_enable_if_radio_on = arg; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: + sc->wlan_disable_if_radio_off = arg; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_BLUETOOTH_ENABLED: + return (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, + arg?0x202:0x200)); + case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: + sc->bluetooth_enable_if_radio_on = arg; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: + sc->bluetooth_disable_if_radio_off = arg?1:0; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_WWAN_ENABLED: + return (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_WIRELESS_COMMAND, 1, + arg?0x404:0x400)); + case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: + sc->wwan_enable_if_radio_on = arg?1:0; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: + sc->wwan_disable_if_radio_off = arg?1:0; + acpi_hp_evaluate_auto_on_off(sc); + break; + case ACPI_HP_METHOD_ALS: + return (acpi_hp_exec_wmi_command(sc->wmi_dev, + ACPI_HP_WMI_ALS_COMMAND, 1, + arg?1:0)); + case ACPI_HP_METHOD_CMI_DETAIL: + sc->cmi_detail = arg; + break; + } + } + + return (0); +} + +static __inline void +acpi_hp_free_buffer(ACPI_BUFFER* buf) { + if (buf && buf->Pointer) { + AcpiOsFree(buf->Pointer); + } +} + +static void +acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context) +{ + device_t dev = context; + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); + + struct acpi_hp_softc *sc = device_get_softc(dev); + ACPI_BUFFER response = { ACPI_ALLOCATE_BUFFER, NULL }; + ACPI_OBJECT *obj; + ACPI_WMI_GET_EVENT_DATA(sc->wmi_dev, notify, &response); + obj = (ACPI_OBJECT*) response.Pointer; + if (obj && obj->Type == ACPI_TYPE_BUFFER && obj->Buffer.Length == 8) { + if (*((UINT8 *) obj->Buffer.Pointer) == 0x5) { + acpi_hp_evaluate_auto_on_off(sc); + } + } + acpi_hp_free_buffer(&response); +} + +static int +acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val) +{ + UINT32 params[5] = { 0x55434553, + is_write?2:1, + command, + is_write?4:0, + val}; + UINT32* result; + ACPI_OBJECT *obj; + ACPI_BUFFER in = { sizeof(params), ¶ms }; + ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; + int retval; + + if (ACPI_FAILURE(ACPI_WMI_EVALUATE_CALL(wmi_dev, ACPI_HP_WMI_BIOS_GUID, + 0, 0x3, &in, &out))) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + obj = out.Pointer; + if (!obj || obj->Type != ACPI_TYPE_BUFFER) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + result = (UINT32*) obj->Buffer.Pointer; + retval = result[2]; + if (result[1] > 0) { + retval = result[1]; + } + acpi_hp_free_buffer(&out); + + return (retval); +} + +static __inline char* +acpi_hp_get_string_from_object(ACPI_OBJECT* obj, char* dst, size_t size) { + int length; + dst[0] = 0; + if (obj->Type == ACPI_TYPE_STRING) { + length = obj->String.Length+1; + if (length > size) { + length = size - 1; + } + strlcpy(dst, obj->String.Pointer, length); + acpi_hp_hex_decode(dst); + } + + return (dst); +} + + +/* + * Read BIOS Setting block in instance "instance". + * The block returned is ACPI_TYPE_PACKAGE which should contain the following + * elements: + * Index Meaning + * 0 Setting Name [string] + * 1 Value (comma separated, asterisk marks the current value) [string] + * 2 Path within the bios hierarchy [string] + * 3 IsReadOnly [int] + * 4 DisplayInUI [int] + * 5 RequiresPhysicalPresence [int] + * 6 Sequence for ordering within the bios settings (absolute) [int] + * 7 Length of prerequisites array [int] + * 8 Prerequisite1 [string] + * 9 Prerequisite2 [string] + * 10 Prerequisite3 [string] + * 11 Current value (in case of enum) [string] / Array length [int] + * 12 Enum length [int] / Array values + * 13ff Enum value at index x [string] + */ +static int +acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, + char* outbuf, size_t outsize, UINT32* sequence, int detail) +{ + ACPI_OBJECT *obj; + ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; + int i; + int outlen; + int size = 255; + int has_enums = 0; + char string_buffer[size]; + int enumbase; + + outlen = 0; + outbuf[0] = 0; + if (ACPI_FAILURE(ACPI_WMI_GET_BLOCK(wmi_dev, guid, instance, &out))) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + obj = out.Pointer; + if (!obj && obj->Type != ACPI_TYPE_PACKAGE) { + acpi_hp_free_buffer(&out); + return (-EINVAL); + } + + /* check if this matches our expectations based on limited knowledge */ + if (obj->Package.Count >= 13 && + obj->Package.Elements[0].Type == ACPI_TYPE_STRING && + obj->Package.Elements[1].Type == ACPI_TYPE_STRING && + obj->Package.Elements[2].Type == ACPI_TYPE_STRING && + obj->Package.Elements[3].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[4].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[5].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[6].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[7].Type == ACPI_TYPE_INTEGER && + obj->Package.Elements[8].Type == ACPI_TYPE_STRING && + obj->Package.Elements[9].Type == ACPI_TYPE_STRING && + obj->Package.Elements[10].Type == ACPI_TYPE_STRING && + ((obj->Package.Elements[11].Type == ACPI_TYPE_STRING && + obj->Package.Elements[12].Type == ACPI_TYPE_INTEGER && + obj->Package.Count >= + 13+obj->Package.Elements[12].Integer.Value) || + (obj->Package.Elements[11].Type == ACPI_TYPE_INTEGER && + obj->Package.Count >= + 12+obj->Package.Elements[11].Integer.Value)) + ) { + enumbase = obj->Package.Elements[11].Type == ACPI_TYPE_STRING? + 12:11; + if (detail & ACPI_HP_CMI_DETAIL_PATHS) { + strlcat(outbuf, acpi_hp_get_string_from_object( + &obj->Package.Elements[2], string_buffer, size), + outsize); + outlen += 48; + while (strlen(outbuf) < outlen) + strlcat(outbuf, " ", outsize); + } + strlcat(outbuf, acpi_hp_get_string_from_object( + &obj->Package.Elements[0], string_buffer, size), + outsize); + outlen += 43; + while (strlen(outbuf) < outlen) + strlcat(outbuf, " ", outsize); + if (enumbase == 12) + strlcat(outbuf, acpi_hp_get_string_from_object( + &obj->Package.Elements[11], + string_buffer, size), + outsize); + outlen += 21; + while (strlen(outbuf) < outlen) + strlcat(outbuf, " ", outsize); + for (i = 0; i < strlen(outbuf); ++i) + if (outbuf[i] == '\\') + outbuf[i] = '/'; + if (detail & ACPI_HP_CMI_DETAIL_ENUMS) { + for (i = enumbase+1; i < enumbase + 1 + + obj->Package.Elements[enumbase].Integer.Value; + ++i) { + acpi_hp_get_string_from_object( + &obj->Package.Elements[i], string_buffer, + size); + if (strlen(string_buffer) > 1 || + (strlen(string_buffer) == 1 && + string_buffer[0] != ' ')) { + if (has_enums) + strlcat(outbuf, "/", outsize); + else + strlcat(outbuf, " (", outsize); + strlcat(outbuf, string_buffer, outsize); + has_enums = 1; + } + } + } + if (has_enums) + strlcat(outbuf, ")", outsize); + if (detail & ACPI_HP_CMI_DETAIL_FLAGS) { + strlcat(outbuf, obj->Package.Elements[3].Integer.Value? + " [ReadOnly]":"", outsize); + strlcat(outbuf, obj->Package.Elements[4].Integer.Value? + "":" [NOUI]", outsize); + strlcat(outbuf, obj->Package.Elements[5].Integer.Value? + " [RPP]":"", outsize); + } + *sequence = (UINT32) obj->Package.Elements[6].Integer.Value; + } + acpi_hp_free_buffer(&out); + + return (0); +} + + + +/* + * Convert given two digit hex string (hexin) to an UINT8 referenced + * by byteout. + * Return != 0 if the was a problem (invalid input) + */ +static __inline int acpi_hp_hex_to_int(const UINT8 *hexin, UINT8 *byteout) +{ + unsigned int hi; + unsigned int lo; + + hi = hexin[0]; + lo = hexin[1]; + if ('0' <= hi && hi <= '9') + hi -= '0'; + else if ('A' <= hi && hi <= 'F') + hi -= ('A' - 10); + else if ('a' <= hi && hi <= 'f') + hi -= ('a' - 10); + else + return (1); + if ('0' <= lo && lo <= '9') + lo -= '0'; + else if ('A' <= lo && lo <= 'F') + lo -= ('A' - 10); + else if ('a' <= lo && lo <= 'f') + lo -= ('a' - 10); + else + return (1); + *byteout = (hi << 4) + lo; + + return (0); +} + + +static void +acpi_hp_hex_decode(char* buffer) +{ + int i; + int length = strlen(buffer); + UINT8 *uin; + UINT8 uout; + + if (((int)length/2)*2 == length || length < 10) return; + + for (i = 0; i= '0' && buffer[i] <= '9') || + (buffer[i] >= 'A' && buffer[i] <= 'F'))) + return; + } + + for (i = 0; isi_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(hp); + if (sc->hpcmi_open_pid != 0) { + ret = EBUSY; + } + else { + if (sbuf_new(&sc->hpcmi_sbuf, NULL, 4096, SBUF_AUTOEXTEND) + == NULL) { + ret = ENXIO; + } else { + sc->hpcmi_open_pid = td->td_proc->p_pid; + sc->hpcmi_bufptr = 0; + ret = 0; + } + } + ACPI_SERIAL_END(hp); + + return (ret); +} + +/* + * close hpcmi device + */ +static int +acpi_hp_hpcmi_close(struct cdev* dev, int flags, int mode, struct thread *td) +{ + struct acpi_hp_softc *sc; + int ret; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(hp); + if (sc->hpcmi_open_pid == 0) { + ret = EBADF; + } + else { + if (sc->hpcmi_bufptr != -1) { + sbuf_delete(&sc->hpcmi_sbuf); + sc->hpcmi_bufptr = -1; + } + sc->hpcmi_open_pid = 0; + ret = 0; + } + ACPI_SERIAL_END(hp); + + return (ret); +} + +/* + * Read from hpcmi bios information + */ +static int +acpi_hp_hpcmi_read(struct cdev *dev, struct uio *buf, int flag) +{ + struct acpi_hp_softc *sc; + int pos, i, l, ret; + UINT8 instance; + UINT32 sequence; + int linesize = 1025; + char line[linesize]; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(hp); + if (sc->hpcmi_open_pid != buf->uio_td->td_proc->p_pid + || sc->hpcmi_bufptr == -1) { + ret = EBADF; + } + else { + if (!sbuf_done(&sc->hpcmi_sbuf)) { + if (sc->cmi_order_size < 0) { + sc->cmi_order_size = 0; + for (instance = 0; instance < 128; + ++instance) { + if (acpi_hp_get_cmi_block(sc->wmi_dev, + ACPI_HP_WMI_CMI_GUID, instance, + line, linesize, &sequence, + sc->cmi_detail)) { + instance = 128; + } + else { + pos = sc->cmi_order_size; + for (i=0; + icmi_order_size && i<127; + ++i) { + if (sc->cmi_order[i].sequence > sequence) { + pos = i; + break; + } + } + for (i=sc->cmi_order_size; + i>pos; + --i) { + sc->cmi_order[i].sequence = + sc->cmi_order[i-1].sequence; + sc->cmi_order[i].instance = + sc->cmi_order[i-1].instance; + } + sc->cmi_order[pos].sequence = + sequence; + sc->cmi_order[pos].instance = + instance; + sc->cmi_order_size++; + } + } + } + for (i=0; icmi_order_size; ++i) { + if (!acpi_hp_get_cmi_block(sc->wmi_dev, + ACPI_HP_WMI_CMI_GUID, + sc->cmi_order[i].instance, line, linesize, + &sequence, sc->cmi_detail)) { + sbuf_printf(&sc->hpcmi_sbuf, "%s\n", line); + } + } + sbuf_finish(&sc->hpcmi_sbuf); + } + if (sbuf_len(&sc->hpcmi_sbuf) <= 0) { + sbuf_delete(&sc->hpcmi_sbuf); + sc->hpcmi_bufptr = -1; + sc->hpcmi_open_pid = 0; + ret = ENOMEM; + } else { + l = min(buf->uio_resid, sbuf_len(&sc->hpcmi_sbuf) - + sc->hpcmi_bufptr); + ret = (l > 0)?uiomove(sbuf_data(&sc->hpcmi_sbuf) + + sc->hpcmi_bufptr, l, buf) : 0; + sc->hpcmi_bufptr += l; + } + } + ACPI_SERIAL_END(hp); + + return (ret); +} --- share/man/man4/man4.i386/acpi_wmi.4~ 2009-06-21 12:09:58.000000000 +0200 +++ share/man/man4/man4.i386/acpi_wmi.4 2009-06-21 12:10:57.178932778 +0200 @@ -0,0 +1,97 @@ +.\" Copyright (c) 2009 Michael Gmelin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 21, 2009 +.Dt ACPI_WMI 4 i386 +.Os +.Sh NAME +.Nm acpi_wmi +.Nd "ACPI to WMI mapping driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device acpi_wmi" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +acpi_wmi_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides an interface for vendor specific WMI implementations +(e.g. HP and Acer laptops). It creates /dev/wmistat, which can be read to get +information about GUIDs found in the system. +.Sh FILES +.Bl -tag -width /dev/wmistat -compact +.It Pa /dev/wmistat +WMI status device. +.El +.Sh EXAMPLES +.Bd Literal +root# cat /dev/wmistat + +GUID INST EXPE METH STR EVENT OID +{5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA +{95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - +{2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - +{05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB +{1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA +{2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC +{988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD +{14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE +{322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF +{8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG +{8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH +{8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI +.Ed + +.Sh SEE ALSO +.Xr acpi 4 , +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx CURRENT . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Michael Gmelin Aq freebsd@grem.de +.Pp +Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho +.Pp +See http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx for +the specification of ACPI-WMI. +.Pp +This manual page was written by +.An Michael Gmelin Aq freebsd@grem.de --- sys/dev/acpi_support/acpi_wmi.c~ 2009-06-21 18:42:25.739784505 +0200 +++ sys/dev/acpi_support/acpi_wmi.c 2009-06-21 18:50:54.166723000 +0200 @@ -0,0 +1,1005 @@ +/*- + * Copyright (c) 2009 Michael Gmelin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Driver for acpi-wmi mapping, provides an interface for vendor specific + * implementations (e.g. HP and Acer laptops). + * Inspired by the ACPI-WMI mapping driver (c) 2008-2008 Carlos Corbacho which + * implements this functionality for Linux. + * + * WMI and ACPI: http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx + * acpi-wmi for Linux: http://www.kernel.org + */ + +#include "opt_acpi.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "acpi_wmi_if.h" + +MALLOC_DEFINE(M_ACPIWMI, "acpiwmi", "ACPI-WMI mapping"); + +#define _COMPONENT ACPI_OEM +ACPI_MODULE_NAME("ACPI_WMI"); + +#define ACPI_WMI_REGFLAG_EXPENSIVE 0x1 /* GUID flag: Expensive operation */ +#define ACPI_WMI_REGFLAG_METHOD 0x2 /* GUID flag: Method call */ +#define ACPI_WMI_REGFLAG_STRING 0x4 /* GUID flag: String */ +#define ACPI_WMI_REGFLAG_EVENT 0x8 /* GUID flag: Event */ + +/* + * acpi_wmi driver private structure + */ +struct acpi_wmi_softc { + device_t wmi_dev; /* wmi device id */ + ACPI_HANDLE wmi_handle; /* handle of the PNP0C14 node */ + device_t ec_dev; /* acpi_ec0 */ + struct cdev *wmistat_dev_t; /* wmistat device handle */ + struct sbuf wmistat_sbuf; /* sbuf for /dev/wmistat output */ + pid_t wmistat_open_pid; /* pid operating on /dev/wmistat */ + int wmistat_bufptr; /* /dev/wmistat ptr to buffer position */ +}; + +/* + * Struct that holds information about + * about a single GUID entry in _WDG + */ +struct guid_info { + char guid[16]; /* 16 byte non human readable GUID */ + char oid[2]; /* object id or event notify id (first byte) */ + UINT8 max_instance; /* highest instance known for this GUID */ + UINT8 flags; /* ACPI_WMI_REGFLAG_%s */ +}; + +/* WExx event generation state (on/off) */ +enum event_generation_state { + EVENT_GENERATION_ON = 1, + EVENT_GENERATION_OFF = 0 +}; + + +/* + * Information about one entry in _WDG. + * List of those is used to lookup information by GUID. + */ +struct wmi_info { + TAILQ_ENTRY(wmi_info) wmi_list; + struct guid_info ginfo; /* information on guid */ + ACPI_NOTIFY_HANDLER event_handler;/* client provided event handler */ + void *event_handler_user_data; /* ev handler cookie */ +}; + +TAILQ_HEAD(wmi_info_list_head, wmi_info) + wmi_info_list = TAILQ_HEAD_INITIALIZER(wmi_info_list); + +ACPI_SERIAL_DECL(acpi_wmi, "ACPI-WMI Mapping"); + +/* public interface - declaration */ +/* standard device interface*/ +static int acpi_wmi_probe(device_t dev); +static int acpi_wmi_attach(device_t dev); +static int acpi_wmi_detach(device_t dev); +/* see acpi_wmi_if.m */ +static int acpi_wmi_provides_guid_string_method(device_t dev, + const char *guid_string); +static ACPI_STATUS acpi_wmi_evaluate_call_method(device_t dev, + const char *guid_string, UINT8 instance, + UINT32 method_id, const ACPI_BUFFER *in, + ACPI_BUFFER *out); +static ACPI_STATUS acpi_wmi_install_event_handler_method(device_t dev, + const char *guid_string, ACPI_NOTIFY_HANDLER handler, + void *data); +static ACPI_STATUS acpi_wmi_remove_event_handler_method(device_t dev, + const char *guid_string); +static ACPI_STATUS acpi_wmi_get_event_data_method(device_t dev, + UINT32 event_id, ACPI_BUFFER *out); +static ACPI_STATUS acpi_wmi_get_block_method(device_t dev, + const char *guid_string, + UINT8 instance, ACPI_BUFFER *out); +static ACPI_STATUS acpi_wmi_set_block_method(device_t dev, + const char *guid_string, + UINT8 instance, const ACPI_BUFFER *in); +/* private interface - declaration */ +/* callbacks */ +static void acpi_wmi_notify_handler(ACPI_HANDLE h, UINT32 notify, + void *context); +static ACPI_STATUS acpi_wmi_ec_handler(UINT32 function, + ACPI_PHYSICAL_ADDRESS address, UINT32 width, + ACPI_INTEGER *value, void *context, + void *region_context); +/* helpers */ +static ACPI_STATUS acpi_wmi_read_wdg_blocks(ACPI_HANDLE h); +static ACPI_STATUS acpi_wmi_toggle_we_event_generation(device_t dev, + struct wmi_info *winfo, + enum event_generation_state state); +static int acpi_wmi_guid_string_to_guid(const UINT8 *guid_string, + UINT8 *guid); +static struct wmi_info* acpi_wmi_lookup_wmi_info_by_guid_string( + const char *guid_string); + +static d_open_t acpi_wmi_wmistat_open; +static d_close_t acpi_wmi_wmistat_close; +static d_read_t acpi_wmi_wmistat_read; + +/* handler /dev/wmistat device */ +static struct cdevsw wmistat_cdevsw = { + .d_version = D_VERSION, + .d_open = acpi_wmi_wmistat_open, + .d_close = acpi_wmi_wmistat_close, + .d_read = acpi_wmi_wmistat_read, + .d_name = "wmistat", +}; + + +static device_method_t acpi_wmi_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, acpi_wmi_probe), + DEVMETHOD(device_attach, acpi_wmi_attach), + DEVMETHOD(device_detach, acpi_wmi_detach), + + /* acpi_wmi interface */ + DEVMETHOD(acpi_wmi_provides_guid_string, + acpi_wmi_provides_guid_string_method), + DEVMETHOD(acpi_wmi_evaluate_call, acpi_wmi_evaluate_call_method), + DEVMETHOD(acpi_wmi_install_event_handler, + acpi_wmi_install_event_handler_method), + DEVMETHOD(acpi_wmi_remove_event_handler, + acpi_wmi_remove_event_handler_method), + DEVMETHOD(acpi_wmi_get_event_data, acpi_wmi_get_event_data_method), + DEVMETHOD(acpi_wmi_get_block, acpi_wmi_get_block_method), + DEVMETHOD(acpi_wmi_set_block, acpi_wmi_set_block_method), + + {0, 0} +}; + +static driver_t acpi_wmi_driver = { + "acpi_wmi", + acpi_wmi_methods, + sizeof(struct acpi_wmi_softc), +}; + +static devclass_t acpi_wmi_devclass; +DRIVER_MODULE(acpi_wmi, acpi, acpi_wmi_driver, acpi_wmi_devclass, 0, 0); +MODULE_VERSION(acpi_wmi, 1); +MODULE_DEPEND(acpi_wmi, acpi, 1, 1, 1); +static char *wmi_ids[] = {"PNP0C14", "PNP0c14", NULL}; + +/* + * Probe for the PNP0C14 ACPI node + */ +static int +acpi_wmi_probe(device_t dev) +{ + if (acpi_disabled("wmi") || + ACPI_ID_PROBE(device_get_parent(dev), dev, wmi_ids) == NULL) + return (ENXIO); + device_set_desc(dev, "ACPI-WMI mapping"); + + return (0); +} + +/* + * Attach the device by: + * - Looking for the first ACPI EC device + * - Install the notify handler + * - Install the EC address space handler + * - Look for the _WDG node and read GUID information blocks + */ +static int +acpi_wmi_attach(device_t dev) +{ + struct acpi_wmi_softc *sc; + int ret; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + sc = device_get_softc(dev); + ret = ENXIO; + + ACPI_SERIAL_BEGIN(acpi_wmi); + sc->wmi_dev = dev; + sc->wmi_handle = acpi_get_handle(dev); + TAILQ_INIT(&wmi_info_list); + /* XXX Only works with one EC, but nearly all systems only have one. */ + if ((sc->ec_dev = devclass_get_device(devclass_find("acpi_ec"), 0)) + == NULL) + device_printf(dev, "cannot find EC device\n"); + else if (ACPI_FAILURE((status = AcpiInstallNotifyHandler(sc->wmi_handle, + ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler, sc)))) + device_printf(sc->wmi_dev, "couldn't install notify handler - %s\n", + AcpiFormatException(status)); + else if (ACPI_FAILURE((status = AcpiInstallAddressSpaceHandler( + sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler, + NULL, sc)))) { + device_printf(sc->wmi_dev, "couldn't install EC handler - %s\n", + AcpiFormatException(status)); + AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, + acpi_wmi_notify_handler); + } else if (ACPI_FAILURE((status = acpi_wmi_read_wdg_blocks( + sc->wmi_handle)))) { + device_printf(sc->wmi_dev, "couldn't parse _WDG - %s\n", + AcpiFormatException(status)); + AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, + acpi_wmi_notify_handler); + AcpiRemoveAddressSpaceHandler(sc->wmi_handle, ACPI_ADR_SPACE_EC, + acpi_wmi_ec_handler); + } else { + sc->wmistat_dev_t = make_dev(&wmistat_cdevsw, 0, UID_ROOT, + GID_WHEEL, 0644, "wmistat"); + sc->wmistat_dev_t->si_drv1 = sc; + sc->wmistat_open_pid = 0; + sc->wmistat_bufptr = -1; + ret = 0; + } + ACPI_SERIAL_END(acpi_wmi); + + return (ret); +} + +/* + * Detach the driver by: + * - Removing notification handler + * - Removing address space handler + * - Turning off event generation for all WExx event activated by + * child drivers + */ +static int +acpi_wmi_detach(device_t dev) +{ + struct wmi_info *winfo, *tmp; + struct acpi_wmi_softc *sc; + int ret; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + sc = device_get_softc(dev); + ACPI_SERIAL_BEGIN(acpi_wmi); + + if (sc->wmistat_open_pid != 0) { + ret = EBUSY; + } else { + AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, + acpi_wmi_notify_handler); + AcpiRemoveAddressSpaceHandler(sc->wmi_handle, + ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler); + TAILQ_FOREACH_SAFE(winfo, &wmi_info_list, wmi_list, tmp) { + if (winfo->event_handler) + acpi_wmi_toggle_we_event_generation(dev, + winfo, EVENT_GENERATION_OFF); + TAILQ_REMOVE(&wmi_info_list, winfo, wmi_list); + free(winfo, M_ACPIWMI); + } + if (sc->wmistat_bufptr != -1) { + sbuf_delete(&sc->wmistat_sbuf); + sc->wmistat_bufptr = -1; + } + sc->wmistat_open_pid = 0; + destroy_dev(sc->wmistat_dev_t); + ret = 0; + } + ACPI_SERIAL_END(acpi_wmi); + + return (ret); +} + + +/* + * Check if the given GUID string (human readable format + * AABBCCDD-EEFF-GGHH-IIJJ-KKLLMMNNOOPP) + * exists within _WDG + */ +static int +acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string) +{ + int ret; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + ACPI_SERIAL_BEGIN(acpi_wmi); + ret = (acpi_wmi_lookup_wmi_info_by_guid_string(guid_string) == NULL)?0:1; + ACPI_SERIAL_END(acpi_wmi); + + return (ret); +} + +/* + * Call a method "method_id" on the given GUID block + * write result into user provided output buffer + */ +static ACPI_STATUS +acpi_wmi_evaluate_call_method(device_t dev, const char *guid_string, + UINT8 instance, UINT32 method_id, const ACPI_BUFFER *in, ACPI_BUFFER *out) +{ + ACPI_OBJECT params[3]; + ACPI_OBJECT_LIST input; + char method[5] = "WMxx"; + struct wmi_info *winfo; + struct acpi_wmi_softc *sc; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + ACPI_SERIAL_BEGIN(acpi_wmi); + if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + == NULL) + status = AE_NOT_FOUND; + else if (!(winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) + status = AE_BAD_DATA; + else if (instance > winfo->ginfo.max_instance) + status = AE_BAD_PARAMETER; + else { + params[0].Type = ACPI_TYPE_INTEGER; + params[0].Integer.Value = instance; + params[1].Type = ACPI_TYPE_INTEGER; + params[1].Integer.Value = method_id; + input.Pointer = params; + input.Count = 2; + if (in) { + params[2].Type = + (winfo->ginfo.flags & ACPI_WMI_REGFLAG_STRING) + ?ACPI_TYPE_STRING:ACPI_TYPE_BUFFER; + params[2].Buffer.Length = in->Length; + params[2].Buffer.Pointer = in->Pointer; + input.Count = 3; + } + method[2] = winfo->ginfo.oid[0]; + method[3] = winfo->ginfo.oid[1]; + status = AcpiEvaluateObject(sc->wmi_handle, method, + &input, out); + } + ACPI_SERIAL_END(acpi_wmi); + + return (status); +} + +/* + * Install a user provided event_handler on the given GUID + * provided *data will be passed on callback + * If there is already an existing event handler registered it will be silently + * discarded + */ +static ACPI_STATUS +acpi_wmi_install_event_handler_method(device_t dev, const char *guid_string, + ACPI_NOTIFY_HANDLER event_handler, void *data) +{ + struct wmi_info *winfo; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + status = AE_OK; + ACPI_SERIAL_BEGIN(acpi_wmi); + if (guid_string == NULL || event_handler == NULL) + status = AE_BAD_PARAMETER; + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + == NULL) + status = AE_NOT_EXIST; + else if (winfo->event_handler != NULL || + (status = acpi_wmi_toggle_we_event_generation(dev, winfo, + EVENT_GENERATION_ON)) == AE_OK) { + winfo->event_handler = event_handler; + winfo->event_handler_user_data = data; + } + ACPI_SERIAL_END(acpi_wmi); + + return (status); +} + +/* + * Remove a previously installed event handler from the given GUID + * If there was none installed, this call is silently discarded and + * reported as AE_OK + */ +static ACPI_STATUS +acpi_wmi_remove_event_handler_method(device_t dev, const char *guid_string) +{ + struct wmi_info *winfo; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + status = AE_OK; + ACPI_SERIAL_BEGIN(acpi_wmi); + if (guid_string && + (winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + != NULL && winfo->event_handler) { + status = acpi_wmi_toggle_we_event_generation(dev, winfo, + EVENT_GENERATION_OFF); + winfo->event_handler = NULL; + winfo->event_handler_user_data = NULL; + } + ACPI_SERIAL_END(acpi_wmi); + + return (status); +} + +/* + * Get details on an event received through a callback registered + * through ACPI_WMI_REMOVE_EVENT_HANDLER into a user provided output buffer. + * (event_id equals "notify" passed in the callback) + */ +static ACPI_STATUS +acpi_wmi_get_event_data_method(device_t dev, UINT32 event_id, ACPI_BUFFER *out) +{ + ACPI_OBJECT_LIST input; + ACPI_OBJECT params[1]; + struct acpi_wmi_softc *sc; + struct wmi_info *winfo; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + status = AE_NOT_FOUND; + ACPI_SERIAL_BEGIN(acpi_wmi); + params[0].Type = ACPI_TYPE_INTEGER; + params[0].Integer.Value = event_id; + input.Pointer = params; + input.Count = 1; + TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && + ((UINT8) winfo->ginfo.oid[0] == event_id)) { + status = AcpiEvaluateObject(sc->wmi_handle, "_WED", + &input, out); + break; + } + } + ACPI_SERIAL_END(acpi_wmi); + + return (status); +} + +/* + * Read a block of data from the given GUID (using WQxx (query)) + * Will be returned in a user provided buffer (out). + * If the method is marked as expensive (ACPI_WMI_REGFLAG_EXPENSIVE) + * we will first call the WCxx control method to lock the node to + * lock the node for data collection and release it afterwards. + * (Failed WCxx calls are ignored to "support" broken implementations) + */ +static ACPI_STATUS +acpi_wmi_get_block_method(device_t dev, const char *guid_string, UINT8 instance, + ACPI_BUFFER *out) +{ + char wc_method[5] = "WCxx"; + char wq_method[5] = "WQxx"; + ACPI_OBJECT_LIST wc_input; + ACPI_OBJECT_LIST wq_input; + ACPI_OBJECT wc_params[1]; + ACPI_OBJECT wq_params[1]; + ACPI_HANDLE wc_handle; + struct acpi_wmi_softc *sc; + struct wmi_info *winfo; + ACPI_STATUS status; + ACPI_STATUS wc_status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + wc_status = AE_ERROR; + ACPI_SERIAL_BEGIN(acpi_wmi); + if (guid_string == NULL || out == NULL) + status = AE_BAD_PARAMETER; + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + == NULL) + status = AE_ERROR; + else if (instance > winfo->ginfo.max_instance) + status = AE_BAD_PARAMETER; + else if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) || + (winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) + status = AE_ERROR; + else { + wq_params[0].Type = ACPI_TYPE_INTEGER; + wq_params[0].Integer.Value = instance; + wq_input.Pointer = wq_params; + wq_input.Count = 1; + if (winfo->ginfo.flags & ACPI_WMI_REGFLAG_EXPENSIVE) { + wc_params[0].Type = ACPI_TYPE_INTEGER; + wc_params[0].Integer.Value = 1; + wc_input.Pointer = wc_params; + wc_input.Count = 1; + wc_method[2] = winfo->ginfo.oid[0]; + wc_method[3] = winfo->ginfo.oid[1]; + wc_status = AcpiGetHandle(sc->wmi_handle, wc_method, + &wc_handle); + if (ACPI_SUCCESS(wc_status)) + wc_status = AcpiEvaluateObject(wc_handle, + wc_method, &wc_input, NULL); + } + wq_method[2] = winfo->ginfo.oid[0]; + wq_method[3] = winfo->ginfo.oid[1]; + status = AcpiEvaluateObject(sc->wmi_handle, wq_method, + &wq_input, out); + if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EXPENSIVE) + && ACPI_SUCCESS(wc_status)) { + wc_params[0].Integer.Value = 0; + status = AcpiEvaluateObject(wc_handle, wc_method, + &wc_input, NULL); /* XXX this might be + the wrong status to + return? */ + } + } + ACPI_SERIAL_END(acpi_wmi); + + return (status); +} + +/* + * Write a block of data to the given GUID (using WSxx) + */ +static ACPI_STATUS +acpi_wmi_set_block_method(device_t dev, const char *guid_string, UINT8 instance, + const ACPI_BUFFER *in) +{ + char method[5] = "WSxx"; + ACPI_OBJECT_LIST input; + ACPI_OBJECT params[2]; + struct wmi_info *winfo; + struct acpi_wmi_softc *sc; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + ACPI_SERIAL_BEGIN(acpi_wmi); + if (guid_string == NULL || in == NULL) + status = AE_BAD_DATA; + else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) + == NULL) + status = AE_ERROR; + else if (instance > winfo->ginfo.max_instance) + status = AE_BAD_PARAMETER; + else if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) || + (winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) + status = AE_ERROR; + else { + params[0].Type = ACPI_TYPE_INTEGER; + params[0].Integer.Value = instance; + input.Pointer = params; + input.Count = 2; + params[1].Type = (winfo->ginfo.flags & ACPI_WMI_REGFLAG_STRING) + ?ACPI_TYPE_STRING:ACPI_TYPE_BUFFER; + params[1].Buffer.Length = in->Length; + params[1].Buffer.Pointer = in->Pointer; + method[2] = winfo->ginfo.oid[0]; + method[3] = winfo->ginfo.oid[1]; + status = AcpiEvaluateObject(sc->wmi_handle, method, + &input, NULL); + } + ACPI_SERIAL_END(acpi_wmi); + + return (status); +} + +/* + * Handle events received and dispatch them to + * stakeholders that registered through ACPI_WMI_INSTALL_EVENT_HANDLER + */ +static void +acpi_wmi_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) +{ + ACPI_NOTIFY_HANDLER handler; + void *handler_data; + struct wmi_info *winfo; + + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); + + handler = NULL; + handler_data = NULL; + ACPI_SERIAL_BEGIN(acpi_wmi); + TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && + ((UINT8) winfo->ginfo.oid[0] == notify)) { + if (winfo->event_handler) { + handler = winfo->event_handler; + handler_data = winfo->event_handler_user_data; + break; + } + } + } + ACPI_SERIAL_END(acpi_wmi); + if (handler) { + handler(h, notify, handler_data); + } +} + +/* + * Handle EC address space notifications reveived on the WDG node + * (this mimics EcAddressSpaceHandler in acpi_ec.c) + */ +static ACPI_STATUS +acpi_wmi_ec_handler(UINT32 function, ACPI_PHYSICAL_ADDRESS address, + UINT32 width, ACPI_INTEGER *value, void *context, + void *region_context) +{ + struct acpi_wmi_softc *sc; + int i; + ACPI_INTEGER ec_data; + UINT8 ec_addr; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Address); + + sc = (struct acpi_wmi_softc *)context; + if (width % 8 != 0 || value == NULL || context == NULL) + return (AE_BAD_PARAMETER); + if (address + (width / 8) - 1 > 0xFF) + return (AE_BAD_ADDRESS); + if (function == ACPI_READ) + *value = 0; + ec_addr = address; + status = AE_ERROR; + + for (i = 0; i < width; i += 8, ++ec_addr) { + switch (function) { + case ACPI_READ: + status = ACPI_EC_READ(sc->ec_dev, ec_addr, &ec_data, 1); + if (ACPI_SUCCESS(status)) + *value |= ((ACPI_INTEGER)ec_data) << i; + break; + case ACPI_WRITE: + ec_data = (UINT8)((*value) >> i); + status = ACPI_EC_WRITE(sc->ec_dev, ec_addr, ec_data, 1); + break; + default: + device_printf(sc->wmi_dev, + "invalid acpi_wmi_ec_handler function %d\n", + function); + status = AE_BAD_PARAMETER; + break; + } + if (ACPI_FAILURE(status)) + break; + } + + return (status); +} + +/* + * Read GUID blocks from the _WDG node + * into wmi_info_list. + */ +static ACPI_STATUS +acpi_wmi_read_wdg_blocks(ACPI_HANDLE h) +{ + ACPI_BUFFER out = {ACPI_ALLOCATE_BUFFER, NULL}; + struct guid_info *ginfo; + ACPI_OBJECT *obj; + struct wmi_info *winfo; + UINT32 i; + UINT32 wdg_block_count; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + ACPI_SERIAL_ASSERT(acpi_wmi); + if (ACPI_FAILURE(status = AcpiEvaluateObject(h, "_WDG", NULL, &out))) + return (status); + obj = (ACPI_OBJECT*) out.Pointer; + wdg_block_count = obj->Buffer.Length / sizeof(struct guid_info); + if ((ginfo = malloc(obj->Buffer.Length, M_ACPIWMI, M_NOWAIT)) + == NULL) { + AcpiOsFree(out.Pointer); + return (AE_NO_MEMORY); + } + memcpy(ginfo, obj->Buffer.Pointer, obj->Buffer.Length); + for (i = 0; i < wdg_block_count; ++i) { + if ((winfo = malloc(sizeof(struct wmi_info), M_ACPIWMI, + M_NOWAIT | M_ZERO)) == NULL) { + AcpiOsFree(out.Pointer); + free(ginfo, M_ACPIWMI); + return (AE_NO_MEMORY); + } + winfo->ginfo = ginfo[i]; + TAILQ_INSERT_TAIL(&wmi_info_list, winfo, wmi_list); + } + AcpiOsFree(out.Pointer); + free(ginfo, M_ACPIWMI); + + return (status); +} + +/* + * Toggle event generation in for the given GUID (passed by winfo) + * Turn on to get notified (through acpi_wmi_notify_handler) if events happen + * on the given GUID. + */ +static ACPI_STATUS +acpi_wmi_toggle_we_event_generation(device_t dev, struct wmi_info *winfo, + enum event_generation_state state) +{ + char method[5] = "WExx"; + ACPI_OBJECT_LIST input; + ACPI_OBJECT params[1]; + struct acpi_wmi_softc *sc; + ACPI_STATUS status; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + sc = device_get_softc(dev); + ACPI_SERIAL_ASSERT(acpi_wmi); + params[0].Type = ACPI_TYPE_INTEGER; + params[0].Integer.Value = state==EVENT_GENERATION_ON?1:0; + input.Pointer = params; + input.Count = 1; + + UINT8 hi = ((UINT8) winfo->ginfo.oid[0]) >> 4; + UINT8 lo = ((UINT8) winfo->ginfo.oid[0]) & 0xf; + method[2] = (hi > 9 ? hi + 55: hi + 48); + method[3] = (lo > 9 ? lo + 55: lo + 48); + status = AcpiEvaluateObject(sc->wmi_handle, method, &input, NULL); + if (status == AE_NOT_FOUND) status = AE_OK; + + return (status); +} + +/* + * Convert given two digit hex string (hexin) to an UINT8 referenced + * by byteout. + * Return != 0 if the was a problem (invalid input) + */ +static __inline int acpi_wmi_hex_to_int(const UINT8 *hexin, UINT8 *byteout) +{ + unsigned int hi; + unsigned int lo; + + hi = hexin[0]; + lo = hexin[1]; + if ('0' <= hi && hi <= '9') + hi -= '0'; + else if ('A' <= hi && hi <= 'F') + hi -= ('A' - 10); + else if ('a' <= hi && hi <= 'f') + hi -= ('a' - 10); + else + return (1); + if ('0' <= lo && lo <= '9') + lo -= '0'; + else if ('A' <= lo && lo <= 'F') + lo -= ('A' - 10); + else if ('a' <= lo && lo <= 'f') + lo -= ('a' - 10); + else + return (1); + *byteout = (hi << 4) + lo; + + return (0); +} + +/* + * Convert a human readable 36 character GUID into a 16byte + * machine readable one. + * The basic algorithm looks as follows: + * Input: AABBCCDD-EEFF-GGHH-IIJJ-KKLLMMNNOOPP + * Output: DCBAFEHGIJKLMNOP + * (AA BB CC etc. represent two digit hex numbers == bytes) + * Return != 0 if passed guid string is invalid + */ +static int +acpi_wmi_guid_string_to_guid(const UINT8 *guid_string, UINT8 *guid) +{ + static const int mapping[20] = {3, 2, 1, 0, -1, 5, 4, -1, 7, 6, -1, + 8, 9, -1, 10, 11, 12, 13, 14, 15}; + int i; + + for (i = 0; i < 20; ++i, ++guid_string) { + if (mapping[i] >= 0) { + if (acpi_wmi_hex_to_int(guid_string, + &guid[mapping[i]])) + return (-1); + ++guid_string; + } else if (*guid_string != '-') + return (-1); + } + + return (0); +} + +/* + * Lookup a wmi_info structure in wmi_list based on a + * human readable GUID + * Return NULL if the GUID is unknown in the _WDG + */ +static struct wmi_info* +acpi_wmi_lookup_wmi_info_by_guid_string(const char *guid_string) +{ + char guid[16]; + struct wmi_info *winfo; + + ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); + + ACPI_SERIAL_ASSERT(acpi_wmi); + + if (!acpi_wmi_guid_string_to_guid(guid_string, guid)) { + TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + if (!memcmp(winfo->ginfo.guid, guid, 16)) { + return (winfo); + } + } + } + + return (NULL); +} + +/* + * open wmistat device + */ +static int +acpi_wmi_wmistat_open(struct cdev* dev, int flags, int mode, struct thread *td) +{ + struct acpi_wmi_softc *sc; + int ret; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(acpi_wmi); + if (sc->wmistat_open_pid != 0) { + ret = EBUSY; + } + else { + if (sbuf_new(&sc->wmistat_sbuf, NULL, 4096, SBUF_AUTOEXTEND) + == NULL) { + ret = ENXIO; + } else { + sc->wmistat_open_pid = td->td_proc->p_pid; + sc->wmistat_bufptr = 0; + ret = 0; + } + } + ACPI_SERIAL_END(acpi_wmi); + + return (ret); +} + +/* + * close wmistat device + */ +static int +acpi_wmi_wmistat_close(struct cdev* dev, int flags, int mode, + struct thread *td) +{ + struct acpi_wmi_softc *sc; + int ret; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(acpi_wmi); + if (sc->wmistat_open_pid == 0) { + ret = EBADF; + } + else { + if (sc->wmistat_bufptr != -1) { + sbuf_delete(&sc->wmistat_sbuf); + sc->wmistat_bufptr = -1; + } + sc->wmistat_open_pid = 0; + ret = 0; + } + ACPI_SERIAL_END(acpi_wmi); + + return (ret); +} + +/* + * Read from wmistat guid information + */ +static int +acpi_wmi_wmistat_read(struct cdev *dev, struct uio *buf, int flag) +{ + struct acpi_wmi_softc *sc; + struct wmi_info *winfo; + int l; + int ret; + UINT8* guid; + + if (dev == NULL || dev->si_drv1 == NULL) + return (EBADF); + sc = dev->si_drv1; + + ACPI_SERIAL_BEGIN(acpi_wmi); + if (sc->wmistat_open_pid != buf->uio_td->td_proc->p_pid || + sc->wmistat_bufptr == -1) { + ret = EBADF; + } + else { + if (!sbuf_done(&sc->wmistat_sbuf)) { + sbuf_printf(&sc->wmistat_sbuf, "GUID " + " INST EXPE METH STR " + "EVENT OID\n"); + TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { + guid = (UINT8*)winfo->ginfo.guid; + sbuf_printf(&sc->wmistat_sbuf, + "{%02X%02X%02X%02X-%02X%02X-" + "%02X%02X-%02X%02X-%02X%02X" + "%02X%02X%02X%02X} %3d %-5s", + guid[3], guid[2], guid[1], guid[0], + guid[5], guid[4], + guid[7], guid[6], + guid[8], guid[9], + guid[10], guid[11], guid[12], + guid[13], guid[14], guid[15], + winfo->ginfo.max_instance, + (winfo->ginfo.flags& + ACPI_WMI_REGFLAG_EXPENSIVE)? + "YES":"NO" + ); + if (winfo->ginfo.flags&ACPI_WMI_REGFLAG_METHOD) + sbuf_printf(&sc->wmistat_sbuf, + "WM%c%c ", + winfo->ginfo.oid[0], + winfo->ginfo.oid[1]); + else + sbuf_printf(&sc->wmistat_sbuf, "NO "); + sbuf_printf(&sc->wmistat_sbuf, "%-4s", + (winfo->ginfo.flags& + ACPI_WMI_REGFLAG_STRING)?"YES":"NO" + ); + if (winfo->ginfo.flags&ACPI_WMI_REGFLAG_EVENT) + sbuf_printf(&sc->wmistat_sbuf, + "0x%02X%s -\n", + (UINT8)winfo->ginfo.oid[0], + winfo->event_handler==NULL? + " ":"+"); + else + sbuf_printf(&sc->wmistat_sbuf, + "NO %c%c\n", + winfo->ginfo.oid[0], + winfo->ginfo.oid[1]); + } + sbuf_finish(&sc->wmistat_sbuf); + } + if (sbuf_len(&sc->wmistat_sbuf) <= 0) { + sbuf_delete(&sc->wmistat_sbuf); + sc->wmistat_bufptr = -1; + sc->wmistat_open_pid = 0; + ret = ENOMEM; + } else { + l = min(buf->uio_resid, sbuf_len(&sc->wmistat_sbuf) - + sc->wmistat_bufptr); + ret = (l > 0)?uiomove(sbuf_data(&sc->wmistat_sbuf) + + sc->wmistat_bufptr, l, buf) : 0; + sc->wmistat_bufptr += l; + } + } + ACPI_SERIAL_END(acpi_wmi); + + return (ret); +} --- sys/dev/acpi_support/acpi_wmi_if.m~ 2009-06-21 12:09:58.000000000 +0200 +++ sys/dev/acpi_support/acpi_wmi_if.m 2009-06-21 12:13:23.546375847 +0200 @@ -0,0 +1,144 @@ +#- +# Copyright (c) 2009 Michael Gmelin +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD: src/sys/dev/acpic_support/acpi_wmi_if.m,v 1.0 2008/11/23 16:33:00 rmg Exp $ +# + +#include +#include +#include + +INTERFACE acpi_wmi; + +# +# Default implementation for acpi_wmi_generic_provides_guid_string(). +# +CODE { + static int + acpi_wmi_generic_provides_guid_string(device_t dev, const char* guid_string) + { + return 0; + } +}; + + +# +# Check if given GUID exists in WMI +# +# device_t dev: Device to probe +# const char* guid_string: String form of the GUID +# +METHOD int provides_guid_string { + device_t dev; + const char* guid_string; +} DEFAULT acpi_wmi_generic_provides_guid_string; + +# +# Evaluate a WMI method call +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# UINT8 instance: instance id +# UINT32 method_id: method to call +# const ACPI_BUFFER* in: input data +# ACPI_BUFFER* out: output buffer +# +METHOD ACPI_STATUS evaluate_call { + device_t dev; + const char *guid_string; + UINT8 instance; + UINT32 method_id; + const ACPI_BUFFER *in; + ACPI_BUFFER *out; +}; + +# +# Get content of a WMI block +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# UINT8 instance: instance id +# ACPI_BUFFER* out: output buffer +# +METHOD ACPI_STATUS get_block { + device_t dev; + const char *guid_string; + UINT8 instance; + ACPI_BUFFER *out; +}; +# +# Write to a WMI data block +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# UINT8 instance: instance id +# const ACPI_BUFFER* in: input data +# +METHOD ACPI_STATUS set_block { + device_t dev; + const char *guid_string; + UINT8 instance; + const ACPI_BUFFER *in; +}; + +# +# Install wmi event handler +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# ACPI_NOTIFY_HANDLER handler: Handler +# void* data: Payload +# +METHOD ACPI_STATUS install_event_handler { + device_t dev; + const char *guid_string; + ACPI_NOTIFY_HANDLER handler; + void *data; +}; + +# +# Remove wmi event handler +# +# device_t dev: Device to use +# const char* guid_string: String form of the GUID +# +METHOD ACPI_STATUS remove_event_handler { + device_t dev; + const char *guid_string; +}; + + +# +# Get event data associated to an event +# +# device_t dev: Device to use +# UINT32 event_id: event id +# ACPI_BUFFER* out: output buffer +# +METHOD ACPI_STATUS get_event_data { + device_t dev; + UINT32 event_id; + ACPI_BUFFER *out; +}; --- sys/modules/acpi/acpi_hp/Makefile~ 2009-06-21 12:09:58.000000000 +0200 +++ sys/modules/acpi/acpi_hp/Makefile 2009-06-21 12:10:33.000000000 +0100 @@ -0,0 +1,9 @@ +# $FreeBSD: src/sys/modules/acpi/acpi_hp/Makefile,v 1.3 2004/12/13 04:59:35 imp Exp $ + +.PATH: ${.CURDIR}/../../../dev/acpi_support +KMOD= acpi_hp +CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica +SRCS= acpi_hp.c opt_acpi.h device_if.h bus_if.h acpi_if.h acpi_wmi_if.h +SRCS+= opt_ddb.h + +.include --- sys/modules/acpi/acpi_wmi/Makefile~ 2009-06-21 12:09:58.000000000 +0200 +++ sys/modules/acpi/acpi_wmi/Makefile 2009-06-21 12:10:39.000000000 +0100 @@ -0,0 +1,10 @@ +# $FreeBSD: src/sys/modules/acpi/acpi_wmi/Makefile,v 1.7 2007/06/24 20:36:51 njl Exp $ + +.PATH: ${.CURDIR}/../../../dev/acpi_support + +KMOD= acpi_wmi +CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica +SRCS= acpi_wmi.c +SRCS+= opt_acpi.h acpi_if.h bus_if.h device_if.h acpi_wmi_if.h + +.include --- sys/conf/files.i386~ 2008-12-29 04:46:14.000000000 +0100 +++ sys/conf/files.i386 2009-06-21 12:10:14.000000000 +0100 @@ -226,6 +226,7 @@ dev/syscons/scvtb.c optional sc dev/uart/uart_cpu_i386.c optional uart dev/acpica/acpi_if.m standard +dev/acpi_support/acpi_wmi_if.m standard dev/wpi/if_wpi.c optional wpi i386/acpica/OsdEnvironment.c optional acpi i386/acpica/acpi_machdep.c optional acpi --- sys/conf/files~ 2008-12-29 04:45:44.000000000 +0100 +++ sys/conf/files 2009-06-21 12:10:44.000000000 +0100 @@ -375,9 +375,11 @@ dev/aac/aac_disk.c optional aac dev/aac/aac_linux.c optional aac compat_linux dev/aac/aac_pci.c optional aac pci +dev/acpi_support/acpi_wmi.c optional acpi_wmi acpi dev/acpi_support/acpi_aiboost.c optional acpi_aiboost acpi dev/acpi_support/acpi_asus.c optional acpi_asus acpi dev/acpi_support/acpi_fujitsu.c optional acpi_fujitsu acpi +dev/acpi_support/acpi_hp.c optional acpi_hp acpi dev/acpi_support/acpi_ibm.c optional acpi_ibm acpi dev/acpi_support/acpi_panasonic.c optional acpi_panasonic acpi dev/acpi_support/acpi_sony.c optional acpi_sony acpi --- sys/conf/kmod.mk~ 2008-12-29 04:44:41.000000000 +0100 +++ sys/conf/kmod.mk 2009-06-21 12:10:41.000000000 +0100 @@ -321,7 +321,7 @@ .endfor .endif -MFILES?= dev/acpica/acpi_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \ +MFILES?= dev/acpica/acpi_if.m dev/acpi_support/acpi_wmi_if.m dev/agp/agp_if.m dev/ata/ata_if.m dev/eisa/eisa_if.m \ dev/iicbus/iicbb_if.m dev/iicbus/iicbus_if.m \ dev/mmc/mmcbr_if.m dev/mmc/mmcbus_if.m \ dev/mii/miibus_if.m dev/ofw/ofw_bus_if.m \ --- share/man/man4/man4.i386/Makefile~ 2009-06-21 12:36:50.000000000 +0200 +++ share/man/man4/man4.i386/Makefile 2009-06-21 12:36:50.000000000 +0200 @@ -3,10 +3,12 @@ MAN= acpi_aiboost.4 \ acpi_asus.4 \ acpi_fujitsu.4 \ + acpi_hp.4 \ acpi_ibm.4 \ acpi_panasonic.4 \ acpi_sony.4 \ acpi_toshiba.4 \ + acpi_wmi.4 \ aic.4 \ alpm.4 \ amdpm.4 \ -------------- next part -------------- /*- * Copyright (c) 2009 Michael Gmelin * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); /* * Driver for acpi-wmi mapping, provides an interface for vendor specific * implementations (e.g. HP and Acer laptops). * Inspired by the ACPI-WMI mapping driver (c) 2008-2008 Carlos Corbacho which * implements this functionality for Linux. * * WMI and ACPI: http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx * acpi-wmi for Linux: http://www.kernel.org */ #include "opt_acpi.h" #include #include #include #include #include #include #include #include #include #include #include #include "acpi_wmi_if.h" MALLOC_DEFINE(M_ACPIWMI, "acpiwmi", "ACPI-WMI mapping"); #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("ACPI_WMI"); #define ACPI_WMI_REGFLAG_EXPENSIVE 0x1 /* GUID flag: Expensive operation */ #define ACPI_WMI_REGFLAG_METHOD 0x2 /* GUID flag: Method call */ #define ACPI_WMI_REGFLAG_STRING 0x4 /* GUID flag: String */ #define ACPI_WMI_REGFLAG_EVENT 0x8 /* GUID flag: Event */ /* * acpi_wmi driver private structure */ struct acpi_wmi_softc { device_t wmi_dev; /* wmi device id */ ACPI_HANDLE wmi_handle; /* handle of the PNP0C14 node */ device_t ec_dev; /* acpi_ec0 */ struct cdev *wmistat_dev_t; /* wmistat device handle */ struct sbuf wmistat_sbuf; /* sbuf for /dev/wmistat output */ pid_t wmistat_open_pid; /* pid operating on /dev/wmistat */ int wmistat_bufptr; /* /dev/wmistat ptr to buffer position */ }; /* * Struct that holds information about * about a single GUID entry in _WDG */ struct guid_info { char guid[16]; /* 16 byte non human readable GUID */ char oid[2]; /* object id or event notify id (first byte) */ UINT8 max_instance; /* highest instance known for this GUID */ UINT8 flags; /* ACPI_WMI_REGFLAG_%s */ }; /* WExx event generation state (on/off) */ enum event_generation_state { EVENT_GENERATION_ON = 1, EVENT_GENERATION_OFF = 0 }; /* * Information about one entry in _WDG. * List of those is used to lookup information by GUID. */ struct wmi_info { TAILQ_ENTRY(wmi_info) wmi_list; struct guid_info ginfo; /* information on guid */ ACPI_NOTIFY_HANDLER event_handler;/* client provided event handler */ void *event_handler_user_data; /* ev handler cookie */ }; TAILQ_HEAD(wmi_info_list_head, wmi_info) wmi_info_list = TAILQ_HEAD_INITIALIZER(wmi_info_list); ACPI_SERIAL_DECL(acpi_wmi, "ACPI-WMI Mapping"); /* public interface - declaration */ /* standard device interface*/ static int acpi_wmi_probe(device_t dev); static int acpi_wmi_attach(device_t dev); static int acpi_wmi_detach(device_t dev); /* see acpi_wmi_if.m */ static int acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string); static ACPI_STATUS acpi_wmi_evaluate_call_method(device_t dev, const char *guid_string, UINT8 instance, UINT32 method_id, const ACPI_BUFFER *in, ACPI_BUFFER *out); static ACPI_STATUS acpi_wmi_install_event_handler_method(device_t dev, const char *guid_string, ACPI_NOTIFY_HANDLER handler, void *data); static ACPI_STATUS acpi_wmi_remove_event_handler_method(device_t dev, const char *guid_string); static ACPI_STATUS acpi_wmi_get_event_data_method(device_t dev, UINT32 event_id, ACPI_BUFFER *out); static ACPI_STATUS acpi_wmi_get_block_method(device_t dev, const char *guid_string, UINT8 instance, ACPI_BUFFER *out); static ACPI_STATUS acpi_wmi_set_block_method(device_t dev, const char *guid_string, UINT8 instance, const ACPI_BUFFER *in); /* private interface - declaration */ /* callbacks */ static void acpi_wmi_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context); static ACPI_STATUS acpi_wmi_ec_handler(UINT32 function, ACPI_PHYSICAL_ADDRESS address, UINT32 width, ACPI_INTEGER *value, void *context, void *region_context); /* helpers */ static ACPI_STATUS acpi_wmi_read_wdg_blocks(ACPI_HANDLE h); static ACPI_STATUS acpi_wmi_toggle_we_event_generation(device_t dev, struct wmi_info *winfo, enum event_generation_state state); static int acpi_wmi_guid_string_to_guid(const UINT8 *guid_string, UINT8 *guid); static struct wmi_info* acpi_wmi_lookup_wmi_info_by_guid_string( const char *guid_string); static d_open_t acpi_wmi_wmistat_open; static d_close_t acpi_wmi_wmistat_close; static d_read_t acpi_wmi_wmistat_read; /* handler /dev/wmistat device */ static struct cdevsw wmistat_cdevsw = { .d_version = D_VERSION, .d_open = acpi_wmi_wmistat_open, .d_close = acpi_wmi_wmistat_close, .d_read = acpi_wmi_wmistat_read, .d_name = "wmistat", }; static device_method_t acpi_wmi_methods[] = { /* Device interface */ DEVMETHOD(device_probe, acpi_wmi_probe), DEVMETHOD(device_attach, acpi_wmi_attach), DEVMETHOD(device_detach, acpi_wmi_detach), /* acpi_wmi interface */ DEVMETHOD(acpi_wmi_provides_guid_string, acpi_wmi_provides_guid_string_method), DEVMETHOD(acpi_wmi_evaluate_call, acpi_wmi_evaluate_call_method), DEVMETHOD(acpi_wmi_install_event_handler, acpi_wmi_install_event_handler_method), DEVMETHOD(acpi_wmi_remove_event_handler, acpi_wmi_remove_event_handler_method), DEVMETHOD(acpi_wmi_get_event_data, acpi_wmi_get_event_data_method), DEVMETHOD(acpi_wmi_get_block, acpi_wmi_get_block_method), DEVMETHOD(acpi_wmi_set_block, acpi_wmi_set_block_method), {0, 0} }; static driver_t acpi_wmi_driver = { "acpi_wmi", acpi_wmi_methods, sizeof(struct acpi_wmi_softc), }; static devclass_t acpi_wmi_devclass; DRIVER_MODULE(acpi_wmi, acpi, acpi_wmi_driver, acpi_wmi_devclass, 0, 0); MODULE_VERSION(acpi_wmi, 1); MODULE_DEPEND(acpi_wmi, acpi, 1, 1, 1); static char *wmi_ids[] = {"PNP0C14", "PNP0c14", NULL}; /* * Probe for the PNP0C14 ACPI node */ static int acpi_wmi_probe(device_t dev) { if (acpi_disabled("wmi") || ACPI_ID_PROBE(device_get_parent(dev), dev, wmi_ids) == NULL) return (ENXIO); device_set_desc(dev, "ACPI-WMI mapping"); return (0); } /* * Attach the device by: * - Looking for the first ACPI EC device * - Install the notify handler * - Install the EC address space handler * - Look for the _WDG node and read GUID information blocks */ static int acpi_wmi_attach(device_t dev) { struct acpi_wmi_softc *sc; int ret; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); ret = ENXIO; ACPI_SERIAL_BEGIN(acpi_wmi); sc->wmi_dev = dev; sc->wmi_handle = acpi_get_handle(dev); TAILQ_INIT(&wmi_info_list); /* XXX Only works with one EC, but nearly all systems only have one. */ if ((sc->ec_dev = devclass_get_device(devclass_find("acpi_ec"), 0)) == NULL) device_printf(dev, "cannot find EC device\n"); else if (ACPI_FAILURE((status = AcpiInstallNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler, sc)))) device_printf(sc->wmi_dev, "couldn't install notify handler - %s\n", AcpiFormatException(status)); else if (ACPI_FAILURE((status = AcpiInstallAddressSpaceHandler( sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler, NULL, sc)))) { device_printf(sc->wmi_dev, "couldn't install EC handler - %s\n", AcpiFormatException(status)); AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); } else if (ACPI_FAILURE((status = acpi_wmi_read_wdg_blocks( sc->wmi_handle)))) { device_printf(sc->wmi_dev, "couldn't parse _WDG - %s\n", AcpiFormatException(status)); AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); AcpiRemoveAddressSpaceHandler(sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler); } else { sc->wmistat_dev_t = make_dev(&wmistat_cdevsw, 0, UID_ROOT, GID_WHEEL, 0644, "wmistat"); sc->wmistat_dev_t->si_drv1 = sc; sc->wmistat_open_pid = 0; sc->wmistat_bufptr = -1; ret = 0; } ACPI_SERIAL_END(acpi_wmi); return (ret); } /* * Detach the driver by: * - Removing notification handler * - Removing address space handler * - Turning off event generation for all WExx event activated by * child drivers */ static int acpi_wmi_detach(device_t dev) { struct wmi_info *winfo, *tmp; struct acpi_wmi_softc *sc; int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); ACPI_SERIAL_BEGIN(acpi_wmi); if (sc->wmistat_open_pid != 0) { ret = EBUSY; } else { AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); AcpiRemoveAddressSpaceHandler(sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler); TAILQ_FOREACH_SAFE(winfo, &wmi_info_list, wmi_list, tmp) { if (winfo->event_handler) acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_OFF); TAILQ_REMOVE(&wmi_info_list, winfo, wmi_list); free(winfo, M_ACPIWMI); } if (sc->wmistat_bufptr != -1) { sbuf_delete(&sc->wmistat_sbuf); sc->wmistat_bufptr = -1; } sc->wmistat_open_pid = 0; destroy_dev(sc->wmistat_dev_t); ret = 0; } ACPI_SERIAL_END(acpi_wmi); return (ret); } /* * Check if the given GUID string (human readable format * AABBCCDD-EEFF-GGHH-IIJJ-KKLLMMNNOOPP) * exists within _WDG */ static int acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string) { int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_BEGIN(acpi_wmi); ret = (acpi_wmi_lookup_wmi_info_by_guid_string(guid_string) == NULL)?0:1; ACPI_SERIAL_END(acpi_wmi); return (ret); } /* * Call a method "method_id" on the given GUID block * write result into user provided output buffer */ static ACPI_STATUS acpi_wmi_evaluate_call_method(device_t dev, const char *guid_string, UINT8 instance, UINT32 method_id, const ACPI_BUFFER *in, ACPI_BUFFER *out) { ACPI_OBJECT params[3]; ACPI_OBJECT_LIST input; char method[5] = "WMxx"; struct wmi_info *winfo; struct acpi_wmi_softc *sc; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); ACPI_SERIAL_BEGIN(acpi_wmi); if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) == NULL) status = AE_NOT_FOUND; else if (!(winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) status = AE_BAD_DATA; else if (instance > winfo->ginfo.max_instance) status = AE_BAD_PARAMETER; else { params[0].Type = ACPI_TYPE_INTEGER; params[0].Integer.Value = instance; params[1].Type = ACPI_TYPE_INTEGER; params[1].Integer.Value = method_id; input.Pointer = params; input.Count = 2; if (in) { params[2].Type = (winfo->ginfo.flags & ACPI_WMI_REGFLAG_STRING) ?ACPI_TYPE_STRING:ACPI_TYPE_BUFFER; params[2].Buffer.Length = in->Length; params[2].Buffer.Pointer = in->Pointer; input.Count = 3; } method[2] = winfo->ginfo.oid[0]; method[3] = winfo->ginfo.oid[1]; status = AcpiEvaluateObject(sc->wmi_handle, method, &input, out); } ACPI_SERIAL_END(acpi_wmi); return (status); } /* * Install a user provided event_handler on the given GUID * provided *data will be passed on callback * If there is already an existing event handler registered it will be silently * discarded */ static ACPI_STATUS acpi_wmi_install_event_handler_method(device_t dev, const char *guid_string, ACPI_NOTIFY_HANDLER event_handler, void *data) { struct wmi_info *winfo; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); status = AE_OK; ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string == NULL || event_handler == NULL) status = AE_BAD_PARAMETER; else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) == NULL) status = AE_NOT_EXIST; else if (winfo->event_handler != NULL || (status = acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_ON)) == AE_OK) { winfo->event_handler = event_handler; winfo->event_handler_user_data = data; } ACPI_SERIAL_END(acpi_wmi); return (status); } /* * Remove a previously installed event handler from the given GUID * If there was none installed, this call is silently discarded and * reported as AE_OK */ static ACPI_STATUS acpi_wmi_remove_event_handler_method(device_t dev, const char *guid_string) { struct wmi_info *winfo; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); status = AE_OK; ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string && (winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) != NULL && winfo->event_handler) { status = acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_OFF); winfo->event_handler = NULL; winfo->event_handler_user_data = NULL; } ACPI_SERIAL_END(acpi_wmi); return (status); } /* * Get details on an event received through a callback registered * through ACPI_WMI_REMOVE_EVENT_HANDLER into a user provided output buffer. * (event_id equals "notify" passed in the callback) */ static ACPI_STATUS acpi_wmi_get_event_data_method(device_t dev, UINT32 event_id, ACPI_BUFFER *out) { ACPI_OBJECT_LIST input; ACPI_OBJECT params[1]; struct acpi_wmi_softc *sc; struct wmi_info *winfo; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); status = AE_NOT_FOUND; ACPI_SERIAL_BEGIN(acpi_wmi); params[0].Type = ACPI_TYPE_INTEGER; params[0].Integer.Value = event_id; input.Pointer = params; input.Count = 1; TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && ((UINT8) winfo->ginfo.oid[0] == event_id)) { status = AcpiEvaluateObject(sc->wmi_handle, "_WED", &input, out); break; } } ACPI_SERIAL_END(acpi_wmi); return (status); } /* * Read a block of data from the given GUID (using WQxx (query)) * Will be returned in a user provided buffer (out). * If the method is marked as expensive (ACPI_WMI_REGFLAG_EXPENSIVE) * we will first call the WCxx control method to lock the node to * lock the node for data collection and release it afterwards. * (Failed WCxx calls are ignored to "support" broken implementations) */ static ACPI_STATUS acpi_wmi_get_block_method(device_t dev, const char *guid_string, UINT8 instance, ACPI_BUFFER *out) { char wc_method[5] = "WCxx"; char wq_method[5] = "WQxx"; ACPI_OBJECT_LIST wc_input; ACPI_OBJECT_LIST wq_input; ACPI_OBJECT wc_params[1]; ACPI_OBJECT wq_params[1]; ACPI_HANDLE wc_handle; struct acpi_wmi_softc *sc; struct wmi_info *winfo; ACPI_STATUS status; ACPI_STATUS wc_status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); wc_status = AE_ERROR; ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string == NULL || out == NULL) status = AE_BAD_PARAMETER; else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) == NULL) status = AE_ERROR; else if (instance > winfo->ginfo.max_instance) status = AE_BAD_PARAMETER; else if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) || (winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) status = AE_ERROR; else { wq_params[0].Type = ACPI_TYPE_INTEGER; wq_params[0].Integer.Value = instance; wq_input.Pointer = wq_params; wq_input.Count = 1; if (winfo->ginfo.flags & ACPI_WMI_REGFLAG_EXPENSIVE) { wc_params[0].Type = ACPI_TYPE_INTEGER; wc_params[0].Integer.Value = 1; wc_input.Pointer = wc_params; wc_input.Count = 1; wc_method[2] = winfo->ginfo.oid[0]; wc_method[3] = winfo->ginfo.oid[1]; wc_status = AcpiGetHandle(sc->wmi_handle, wc_method, &wc_handle); if (ACPI_SUCCESS(wc_status)) wc_status = AcpiEvaluateObject(wc_handle, wc_method, &wc_input, NULL); } wq_method[2] = winfo->ginfo.oid[0]; wq_method[3] = winfo->ginfo.oid[1]; status = AcpiEvaluateObject(sc->wmi_handle, wq_method, &wq_input, out); if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EXPENSIVE) && ACPI_SUCCESS(wc_status)) { wc_params[0].Integer.Value = 0; status = AcpiEvaluateObject(wc_handle, wc_method, &wc_input, NULL); /* XXX this might be the wrong status to return? */ } } ACPI_SERIAL_END(acpi_wmi); return (status); } /* * Write a block of data to the given GUID (using WSxx) */ static ACPI_STATUS acpi_wmi_set_block_method(device_t dev, const char *guid_string, UINT8 instance, const ACPI_BUFFER *in) { char method[5] = "WSxx"; ACPI_OBJECT_LIST input; ACPI_OBJECT params[2]; struct wmi_info *winfo; struct acpi_wmi_softc *sc; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); ACPI_SERIAL_BEGIN(acpi_wmi); if (guid_string == NULL || in == NULL) status = AE_BAD_DATA; else if ((winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string)) == NULL) status = AE_ERROR; else if (instance > winfo->ginfo.max_instance) status = AE_BAD_PARAMETER; else if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) || (winfo->ginfo.flags & ACPI_WMI_REGFLAG_METHOD)) status = AE_ERROR; else { params[0].Type = ACPI_TYPE_INTEGER; params[0].Integer.Value = instance; input.Pointer = params; input.Count = 2; params[1].Type = (winfo->ginfo.flags & ACPI_WMI_REGFLAG_STRING) ?ACPI_TYPE_STRING:ACPI_TYPE_BUFFER; params[1].Buffer.Length = in->Length; params[1].Buffer.Pointer = in->Pointer; method[2] = winfo->ginfo.oid[0]; method[3] = winfo->ginfo.oid[1]; status = AcpiEvaluateObject(sc->wmi_handle, method, &input, NULL); } ACPI_SERIAL_END(acpi_wmi); return (status); } /* * Handle events received and dispatch them to * stakeholders that registered through ACPI_WMI_INSTALL_EVENT_HANDLER */ static void acpi_wmi_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) { ACPI_NOTIFY_HANDLER handler; void *handler_data; struct wmi_info *winfo; ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); handler = NULL; handler_data = NULL; ACPI_SERIAL_BEGIN(acpi_wmi); TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { if ((winfo->ginfo.flags & ACPI_WMI_REGFLAG_EVENT) && ((UINT8) winfo->ginfo.oid[0] == notify)) { if (winfo->event_handler) { handler = winfo->event_handler; handler_data = winfo->event_handler_user_data; break; } } } ACPI_SERIAL_END(acpi_wmi); if (handler) { handler(h, notify, handler_data); } } /* * Handle EC address space notifications reveived on the WDG node * (this mimics EcAddressSpaceHandler in acpi_ec.c) */ static ACPI_STATUS acpi_wmi_ec_handler(UINT32 function, ACPI_PHYSICAL_ADDRESS address, UINT32 width, ACPI_INTEGER *value, void *context, void *region_context) { struct acpi_wmi_softc *sc; int i; ACPI_INTEGER ec_data; UINT8 ec_addr; ACPI_STATUS status; ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Address); sc = (struct acpi_wmi_softc *)context; if (width % 8 != 0 || value == NULL || context == NULL) return (AE_BAD_PARAMETER); if (address + (width / 8) - 1 > 0xFF) return (AE_BAD_ADDRESS); if (function == ACPI_READ) *value = 0; ec_addr = address; status = AE_ERROR; for (i = 0; i < width; i += 8, ++ec_addr) { switch (function) { case ACPI_READ: status = ACPI_EC_READ(sc->ec_dev, ec_addr, &ec_data, 1); if (ACPI_SUCCESS(status)) *value |= ((ACPI_INTEGER)ec_data) << i; break; case ACPI_WRITE: ec_data = (UINT8)((*value) >> i); status = ACPI_EC_WRITE(sc->ec_dev, ec_addr, ec_data, 1); break; default: device_printf(sc->wmi_dev, "invalid acpi_wmi_ec_handler function %d\n", function); status = AE_BAD_PARAMETER; break; } if (ACPI_FAILURE(status)) break; } return (status); } /* * Read GUID blocks from the _WDG node * into wmi_info_list. */ static ACPI_STATUS acpi_wmi_read_wdg_blocks(ACPI_HANDLE h) { ACPI_BUFFER out = {ACPI_ALLOCATE_BUFFER, NULL}; struct guid_info *ginfo; ACPI_OBJECT *obj; struct wmi_info *winfo; UINT32 i; UINT32 wdg_block_count; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(acpi_wmi); if (ACPI_FAILURE(status = AcpiEvaluateObject(h, "_WDG", NULL, &out))) return (status); obj = (ACPI_OBJECT*) out.Pointer; wdg_block_count = obj->Buffer.Length / sizeof(struct guid_info); if ((ginfo = malloc(obj->Buffer.Length, M_ACPIWMI, M_NOWAIT)) == NULL) { AcpiOsFree(out.Pointer); return (AE_NO_MEMORY); } memcpy(ginfo, obj->Buffer.Pointer, obj->Buffer.Length); for (i = 0; i < wdg_block_count; ++i) { if ((winfo = malloc(sizeof(struct wmi_info), M_ACPIWMI, M_NOWAIT | M_ZERO)) == NULL) { AcpiOsFree(out.Pointer); free(ginfo, M_ACPIWMI); return (AE_NO_MEMORY); } winfo->ginfo = ginfo[i]; TAILQ_INSERT_TAIL(&wmi_info_list, winfo, wmi_list); } AcpiOsFree(out.Pointer); free(ginfo, M_ACPIWMI); return (status); } /* * Toggle event generation in for the given GUID (passed by winfo) * Turn on to get notified (through acpi_wmi_notify_handler) if events happen * on the given GUID. */ static ACPI_STATUS acpi_wmi_toggle_we_event_generation(device_t dev, struct wmi_info *winfo, enum event_generation_state state) { char method[5] = "WExx"; ACPI_OBJECT_LIST input; ACPI_OBJECT params[1]; struct acpi_wmi_softc *sc; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); ACPI_SERIAL_ASSERT(acpi_wmi); params[0].Type = ACPI_TYPE_INTEGER; params[0].Integer.Value = state==EVENT_GENERATION_ON?1:0; input.Pointer = params; input.Count = 1; UINT8 hi = ((UINT8) winfo->ginfo.oid[0]) >> 4; UINT8 lo = ((UINT8) winfo->ginfo.oid[0]) & 0xf; method[2] = (hi > 9 ? hi + 55: hi + 48); method[3] = (lo > 9 ? lo + 55: lo + 48); status = AcpiEvaluateObject(sc->wmi_handle, method, &input, NULL); if (status == AE_NOT_FOUND) status = AE_OK; return (status); } /* * Convert given two digit hex string (hexin) to an UINT8 referenced * by byteout. * Return != 0 if the was a problem (invalid input) */ static __inline int acpi_wmi_hex_to_int(const UINT8 *hexin, UINT8 *byteout) { unsigned int hi; unsigned int lo; hi = hexin[0]; lo = hexin[1]; if ('0' <= hi && hi <= '9') hi -= '0'; else if ('A' <= hi && hi <= 'F') hi -= ('A' - 10); else if ('a' <= hi && hi <= 'f') hi -= ('a' - 10); else return (1); if ('0' <= lo && lo <= '9') lo -= '0'; else if ('A' <= lo && lo <= 'F') lo -= ('A' - 10); else if ('a' <= lo && lo <= 'f') lo -= ('a' - 10); else return (1); *byteout = (hi << 4) + lo; return (0); } /* * Convert a human readable 36 character GUID into a 16byte * machine readable one. * The basic algorithm looks as follows: * Input: AABBCCDD-EEFF-GGHH-IIJJ-KKLLMMNNOOPP * Output: DCBAFEHGIJKLMNOP * (AA BB CC etc. represent two digit hex numbers == bytes) * Return != 0 if passed guid string is invalid */ static int acpi_wmi_guid_string_to_guid(const UINT8 *guid_string, UINT8 *guid) { static const int mapping[20] = {3, 2, 1, 0, -1, 5, 4, -1, 7, 6, -1, 8, 9, -1, 10, 11, 12, 13, 14, 15}; int i; for (i = 0; i < 20; ++i, ++guid_string) { if (mapping[i] >= 0) { if (acpi_wmi_hex_to_int(guid_string, &guid[mapping[i]])) return (-1); ++guid_string; } else if (*guid_string != '-') return (-1); } return (0); } /* * Lookup a wmi_info structure in wmi_list based on a * human readable GUID * Return NULL if the GUID is unknown in the _WDG */ static struct wmi_info* acpi_wmi_lookup_wmi_info_by_guid_string(const char *guid_string) { char guid[16]; struct wmi_info *winfo; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(acpi_wmi); if (!acpi_wmi_guid_string_to_guid(guid_string, guid)) { TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { if (!memcmp(winfo->ginfo.guid, guid, 16)) { return (winfo); } } } return (NULL); } /* * open wmistat device */ static int acpi_wmi_wmistat_open(struct cdev* dev, int flags, int mode, struct thread *td) { struct acpi_wmi_softc *sc; int ret; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(acpi_wmi); if (sc->wmistat_open_pid != 0) { ret = EBUSY; } else { if (sbuf_new(&sc->wmistat_sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { ret = ENXIO; } else { sc->wmistat_open_pid = td->td_proc->p_pid; sc->wmistat_bufptr = 0; ret = 0; } } ACPI_SERIAL_END(acpi_wmi); return (ret); } /* * close wmistat device */ static int acpi_wmi_wmistat_close(struct cdev* dev, int flags, int mode, struct thread *td) { struct acpi_wmi_softc *sc; int ret; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(acpi_wmi); if (sc->wmistat_open_pid == 0) { ret = EBADF; } else { if (sc->wmistat_bufptr != -1) { sbuf_delete(&sc->wmistat_sbuf); sc->wmistat_bufptr = -1; } sc->wmistat_open_pid = 0; ret = 0; } ACPI_SERIAL_END(acpi_wmi); return (ret); } /* * Read from wmistat guid information */ static int acpi_wmi_wmistat_read(struct cdev *dev, struct uio *buf, int flag) { struct acpi_wmi_softc *sc; struct wmi_info *winfo; int l; int ret; UINT8* guid; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(acpi_wmi); if (sc->wmistat_open_pid != buf->uio_td->td_proc->p_pid || sc->wmistat_bufptr == -1) { ret = EBADF; } else { if (!sbuf_done(&sc->wmistat_sbuf)) { sbuf_printf(&sc->wmistat_sbuf, "GUID " " INST EXPE METH STR " "EVENT OID\n"); TAILQ_FOREACH(winfo, &wmi_info_list, wmi_list) { guid = (UINT8*)winfo->ginfo.guid; sbuf_printf(&sc->wmistat_sbuf, "{%02X%02X%02X%02X-%02X%02X-" "%02X%02X-%02X%02X-%02X%02X" "%02X%02X%02X%02X} %3d %-5s", guid[3], guid[2], guid[1], guid[0], guid[5], guid[4], guid[7], guid[6], guid[8], guid[9], guid[10], guid[11], guid[12], guid[13], guid[14], guid[15], winfo->ginfo.max_instance, (winfo->ginfo.flags& ACPI_WMI_REGFLAG_EXPENSIVE)? "YES":"NO" ); if (winfo->ginfo.flags&ACPI_WMI_REGFLAG_METHOD) sbuf_printf(&sc->wmistat_sbuf, "WM%c%c ", winfo->ginfo.oid[0], winfo->ginfo.oid[1]); else sbuf_printf(&sc->wmistat_sbuf, "NO "); sbuf_printf(&sc->wmistat_sbuf, "%-4s", (winfo->ginfo.flags& ACPI_WMI_REGFLAG_STRING)?"YES":"NO" ); if (winfo->ginfo.flags&ACPI_WMI_REGFLAG_EVENT) sbuf_printf(&sc->wmistat_sbuf, "0x%02X%s -\n", (UINT8)winfo->ginfo.oid[0], winfo->event_handler==NULL? " ":"+"); else sbuf_printf(&sc->wmistat_sbuf, "NO %c%c\n", winfo->ginfo.oid[0], winfo->ginfo.oid[1]); } sbuf_finish(&sc->wmistat_sbuf); } if (sbuf_len(&sc->wmistat_sbuf) <= 0) { sbuf_delete(&sc->wmistat_sbuf); sc->wmistat_bufptr = -1; sc->wmistat_open_pid = 0; ret = ENOMEM; } else { l = min(buf->uio_resid, sbuf_len(&sc->wmistat_sbuf) - sc->wmistat_bufptr); ret = (l > 0)?uiomove(sbuf_data(&sc->wmistat_sbuf) + sc->wmistat_bufptr, l, buf) : 0; sc->wmistat_bufptr += l; } } ACPI_SERIAL_END(acpi_wmi); return (ret); } -------------- next part -------------- /*- * Copyright (c) 2009 Michael Gmelin * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); /* * Driver for extra ACPI-controlled features found on HP laptops * that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). * Allows to control and read status of integrated hardware and read * BIOS settings through CMI. * Inspired by the hp-wmi driver, which implements a subset of these * features (hotkeys) on Linux. * * HP CMI whitepaper: * http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf * wmi-hp for Linux: * http://www.kernel.org * WMI and ACPI: * http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx */ #include "opt_acpi.h" #include #include #include #include #include #include #include #include #include #include #include #include "acpi_wmi_if.h" #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("HP") #define ACPI_HP_WMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C" #define ACPI_HP_WMI_BIOS_GUID "5FB7F034-2C63-45E9-BE91-3D44E2C707E4" #define ACPI_HP_WMI_CMI_GUID "2D114B49-2DFB-4130-B8FE-4A3C09E75133" #define ACPI_HP_WMI_DISPLAY_COMMAND 0x1 #define ACPI_HP_WMI_HDDTEMP_COMMAND 0x2 #define ACPI_HP_WMI_ALS_COMMAND 0x3 #define ACPI_HP_WMI_DOCK_COMMAND 0x4 #define ACPI_HP_WMI_WIRELESS_COMMAND 0x5 #define ACPI_HP_METHOD_WLAN_ENABLED 1 #define ACPI_HP_METHOD_WLAN_RADIO 2 #define ACPI_HP_METHOD_WLAN_ON_AIR 3 #define ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON 4 #define ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF 5 #define ACPI_HP_METHOD_BLUETOOTH_ENABLED 6 #define ACPI_HP_METHOD_BLUETOOTH_RADIO 7 #define ACPI_HP_METHOD_BLUETOOTH_ON_AIR 8 #define ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON 9 #define ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF 10 #define ACPI_HP_METHOD_WWAN_ENABLED 11 #define ACPI_HP_METHOD_WWAN_RADIO 12 #define ACPI_HP_METHOD_WWAN_ON_AIR 13 #define ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON 14 #define ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF 15 #define ACPI_HP_METHOD_ALS 16 #define ACPI_HP_METHOD_DISPLAY 17 #define ACPI_HP_METHOD_HDDTEMP 18 #define ACPI_HP_METHOD_DOCK 19 #define ACPI_HP_METHOD_CMI_DETAIL 20 #define HP_MASK_WWAN_ON_AIR 0x1000000 #define HP_MASK_BLUETOOTH_ON_AIR 0x10000 #define HP_MASK_WLAN_ON_AIR 0x100 #define HP_MASK_WWAN_RADIO 0x8000000 #define HP_MASK_BLUETOOTH_RADIO 0x80000 #define HP_MASK_WLAN_RADIO 0x800 #define HP_MASK_WWAN_ENABLED 0x2000000 #define HP_MASK_BLUETOOTH_ENABLED 0x20000 #define HP_MASK_WLAN_ENABLED 0x200 #define ACPI_HP_CMI_DETAIL_PATHS 0x01 #define ACPI_HP_CMI_DETAIL_ENUMS 0x02 #define ACPI_HP_CMI_DETAIL_FLAGS 0x04 struct acpi_hp_inst_seq_pair { UINT32 sequence; /* sequence number as suggested by cmi bios */ UINT8 instance; /* object instance on guid */ }; struct acpi_hp_softc { device_t dev; ACPI_HANDLE handle; device_t wmi_dev; int has_notify; /* notification GUID found */ int has_cmi; /* CMI GUID found */ int cmi_detail; /* CMI detail level (set by sysctl) */ int wlan_enable_if_radio_on; /* set by sysctl */ int wlan_disable_if_radio_off; /* set by sysctl */ int bluetooth_enable_if_radio_on; /* set by sysctl */ int bluetooth_disable_if_radio_off; /* set by sysctl */ int wwan_enable_if_radio_on; /* set by sysctl */ int wwan_disable_if_radio_off; /* set by sysctl */ int was_wlan_on_air; /* last known WLAN on air status */ int was_bluetooth_on_air; /* last known BT on air status */ int was_wwan_on_air; /* last known WWAN on air status */ struct sysctl_ctx_list *sysctl_ctx; struct sysctl_oid *sysctl_tree; struct cdev *hpcmi_dev_t; /* hpcmi device handle */ struct sbuf hpcmi_sbuf; /* /dev/hpcmi output sbuf */ pid_t hpcmi_open_pid; /* pid operating on /dev/hpcmi */ int hpcmi_bufptr; /* current pointer position in /dev/hpcmi output buffer */ int cmi_order_size; /* size of cmi_order list */ struct acpi_hp_inst_seq_pair cmi_order[128]; /* list of CMI instances ordered by BIOS suggested sequence */ }; static struct { char *name; int method; char *description; int access; } acpi_hp_sysctls[] = { { .name = "wlan_enabled", .method = ACPI_HP_METHOD_WLAN_ENABLED, .description = "Enable/Disable WLAN (WiFi)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wlan_radio", .method = ACPI_HP_METHOD_WLAN_RADIO, .description = "WLAN radio status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wlan_on_air", .method = ACPI_HP_METHOD_WLAN_ON_AIR, .description = "WLAN radio ready to use (enabled and radio)", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wlan_enable_if_radio_on", .method = ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON, .description = "Enable WLAN if radio is turned on", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wlan_disable_if_radio_off", .method = ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF, .description = "Disable WLAN if radio is turned off", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "bt_enabled", .method = ACPI_HP_METHOD_BLUETOOTH_ENABLED, .description = "Enable/Disable Bluetooth", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "bt_radio", .method = ACPI_HP_METHOD_BLUETOOTH_RADIO, .description = "Bluetooth radio status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "bt_on_air", .method = ACPI_HP_METHOD_BLUETOOTH_ON_AIR, .description = "Bluetooth radio ready to use" " (enabled and radio)", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "bt_enable_if_radio_on", .method = ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON, .description = "Enable bluetooth if radio is turned on", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "bt_disable_if_radio_off", .method = ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF, .description = "Disable bluetooth if radio is turned off", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wwan_enabled", .method = ACPI_HP_METHOD_WWAN_ENABLED, .description = "Enable/Disable WWAN (UMTS)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wwan_radio", .method = ACPI_HP_METHOD_WWAN_RADIO, .description = "WWAN radio status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wwan_on_air", .method = ACPI_HP_METHOD_WWAN_ON_AIR, .description = "WWAN radio ready to use (enabled and radio)", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wwan_enable_if_radio_on", .method = ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON, .description = "Enable WWAN if radio is turned on", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wwan_disable_if_radio_off", .method = ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF, .description = "Disable WWAN if radio is turned off", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "als_enabled", .method = ACPI_HP_METHOD_ALS, .description = "Enable/Disable ALS (Ambient light sensor)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "display", .method = ACPI_HP_METHOD_DISPLAY, .description = "Display status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "hdd_temperature", .method = ACPI_HP_METHOD_HDDTEMP, .description = "HDD temperature", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "is_docked", .method = ACPI_HP_METHOD_DOCK, .description = "Docking station status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "cmi_detail", .method = ACPI_HP_METHOD_CMI_DETAIL, .description = "Details shown in CMI output " "(cat /dev/hpcmi)", .access = CTLTYPE_INT | CTLFLAG_RW }, { NULL, 0, NULL, 0 } }; ACPI_SERIAL_DECL(hp, "HP ACPI-WMI Mapping"); static int acpi_hp_probe(device_t dev); static int acpi_hp_attach(device_t dev); static int acpi_hp_detach(device_t dev); static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc* sc); static int acpi_hp_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg); static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method); static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val); static void acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context); static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, char* outbuf, size_t outsize, UINT32* sequence, int detail); static void acpi_hp_hex_decode(char* buffer); static d_open_t acpi_hp_hpcmi_open; static d_close_t acpi_hp_hpcmi_close; static d_read_t acpi_hp_hpcmi_read; /* handler /dev/hpcmi device */ static struct cdevsw hpcmi_cdevsw = { .d_version = D_VERSION, .d_open = acpi_hp_hpcmi_open, .d_close = acpi_hp_hpcmi_close, .d_read = acpi_hp_hpcmi_read, .d_name = "hpcmi", }; static device_method_t acpi_hp_methods[] = { DEVMETHOD(device_probe, acpi_hp_probe), DEVMETHOD(device_attach, acpi_hp_attach), DEVMETHOD(device_detach, acpi_hp_detach), {0, 0} }; static driver_t acpi_hp_driver = { "acpi_hp", acpi_hp_methods, sizeof(struct acpi_hp_softc), }; static devclass_t acpi_hp_devclass; DRIVER_MODULE(acpi_hp, acpi, acpi_hp_driver, acpi_hp_devclass, 0, 0); MODULE_DEPEND(acpi_hp, acpi_wmi, 1, 1, 1); MODULE_DEPEND(acpi_hp, acpi, 1, 1, 1); static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc *sc) { int wireless; int new_wlan_status; int new_bluetooth_status; int new_wwan_status; wireless = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); new_wlan_status = -1; new_bluetooth_status = -1; new_wwan_status = -1; device_printf(sc->wmi_dev, "Wireless status is %x\n", wireless); if (sc->wlan_disable_if_radio_off && !(wireless & HP_MASK_WLAN_RADIO) && (wireless & HP_MASK_WLAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x100); new_wlan_status = 0; } else if (sc->wlan_enable_if_radio_on && (wireless & HP_MASK_WLAN_RADIO) && !(wireless & HP_MASK_WLAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x101); new_wlan_status = 1; } if (sc->bluetooth_disable_if_radio_off && !(wireless & HP_MASK_BLUETOOTH_RADIO) && (wireless & HP_MASK_BLUETOOTH_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x200); new_bluetooth_status = 0; } else if (sc->bluetooth_enable_if_radio_on && (wireless & HP_MASK_BLUETOOTH_RADIO) && !(wireless & HP_MASK_BLUETOOTH_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x202); new_bluetooth_status = 1; } if (sc->wwan_disable_if_radio_off && !(wireless & HP_MASK_WWAN_RADIO) && (wireless & HP_MASK_WWAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x400); new_wwan_status = 0; } else if (sc->wwan_enable_if_radio_on && (wireless & HP_MASK_WWAN_RADIO) && !(wireless & HP_MASK_WWAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x404); new_wwan_status = 1; } if (new_wlan_status == -1) { new_wlan_status = (wireless & HP_MASK_WLAN_ON_AIR); if ((new_wlan_status?1:0) != sc->was_wlan_on_air) { sc->was_wlan_on_air = sc->was_wlan_on_air?0:1; device_printf(sc->wmi_dev, "WLAN on air changed to %i " "(new_wlan_status is %i)\n", sc->was_wlan_on_air, new_wlan_status); acpi_UserNotify("HP", sc->handle, 0xc0+sc->was_wlan_on_air); } } if (new_bluetooth_status == -1) { new_bluetooth_status = (wireless & HP_MASK_BLUETOOTH_ON_AIR); if ((new_bluetooth_status?1:0) != sc->was_bluetooth_on_air) { sc->was_bluetooth_on_air = sc->was_bluetooth_on_air? 0:1; device_printf(sc->wmi_dev, "BLUETOOTH on air changed" " to %i (new_bluetooth_status is %i)\n", sc->was_bluetooth_on_air, new_bluetooth_status); acpi_UserNotify("HP", sc->handle, 0xd0+sc->was_bluetooth_on_air); } } if (new_wwan_status == -1) { new_wwan_status = (wireless & HP_MASK_WWAN_ON_AIR); if ((new_wwan_status?1:0) != sc->was_wwan_on_air) { sc->was_wwan_on_air = sc->was_wwan_on_air?0:1; device_printf(sc->wmi_dev, "WWAN on air changed to %i" " (new_wwan_status is %i)\n", sc->was_wwan_on_air, new_wwan_status); acpi_UserNotify("HP", sc->handle, 0xe0+sc->was_wwan_on_air); } } } static int acpi_hp_probe(device_t dev) { if (acpi_disabled("hp") || device_get_unit(dev) != 0) return (ENXIO); device_set_desc(dev, "HP ACPI-WMI Mapping"); return (0); } static int acpi_hp_attach(device_t dev) { struct acpi_hp_softc *sc; struct acpi_softc *acpi_sc; devclass_t wmi_devclass; int arg; ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); sc = device_get_softc(dev); sc->dev = dev; sc->handle = acpi_get_handle(dev); sc->has_notify = 0; sc->has_cmi = 0; sc->bluetooth_enable_if_radio_on = 0; sc->bluetooth_disable_if_radio_off = 0; sc->wlan_enable_if_radio_on = 0; sc->wlan_disable_if_radio_off = 0; sc->wlan_enable_if_radio_on = 0; sc->wlan_disable_if_radio_off = 0; sc->was_wlan_on_air = 0; sc->was_bluetooth_on_air = 0; sc->was_wwan_on_air = 0; sc->cmi_detail = 0; sc->cmi_order_size = -1; memset(sc->cmi_order, 0, sizeof(sc->cmi_order)); acpi_sc = acpi_device_get_parent_softc(dev); if (!(wmi_devclass = devclass_find ("acpi_wmi"))) { device_printf(dev, "Couldn't find acpi_wmi devclass\n"); return (EINVAL); } if (!(sc->wmi_dev = devclass_get_device(wmi_devclass, 0))) { device_printf(dev, "Couldn't find acpi_wmi device\n"); return (EINVAL); } if (!ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_BIOS_GUID)) { device_printf(dev, "WMI device does not provide the HP BIOS GUID\n"); return (EINVAL); } if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_EVENT_GUID)) { device_printf(dev, "HP event GUID detected, installing event handler\n"); if (ACPI_WMI_INSTALL_EVENT_HANDLER(sc->wmi_dev, ACPI_HP_WMI_EVENT_GUID, acpi_hp_notify, dev)) { device_printf(dev, "Could not install notification handler!\n"); } else { sc->has_notify = 1; } } if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID)) { device_printf(dev, "HP CMI GUID detected\n"); sc->has_cmi = 1; } if (sc->has_cmi) { sc->hpcmi_dev_t = make_dev(&hpcmi_cdevsw, 0, UID_ROOT, GID_WHEEL, 0644, "hpcmi"); sc->hpcmi_dev_t->si_drv1 = sc; sc->hpcmi_open_pid = 0; sc->hpcmi_bufptr = -1; } ACPI_SERIAL_BEGIN(hp); sc->sysctl_ctx = device_get_sysctl_ctx(dev); sc->sysctl_tree = device_get_sysctl_tree(dev); for (int i = 0; acpi_hp_sysctls[i].name != NULL; ++i) { arg = 0; if ((!sc->has_notify && (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF)) || (arg = acpi_hp_sysctl_get(sc, acpi_hp_sysctls[i].method)) < 0) { continue; } if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ON_AIR) { sc->was_wlan_on_air = arg; } else if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_ON_AIR) { sc->was_bluetooth_on_air = arg; } else if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_ON_AIR) { sc->was_wwan_on_air = arg; } SYSCTL_ADD_PROC(sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, acpi_hp_sysctls[i].name, acpi_hp_sysctls[i].access, sc, i, acpi_hp_sysctl, "I", acpi_hp_sysctls[i].description); } ACPI_SERIAL_END(hp); return (0); } static int acpi_hp_detach(device_t dev) { int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); struct acpi_hp_softc *sc = device_get_softc(dev); if (sc->has_cmi && sc->hpcmi_open_pid != 0) { ret = EBUSY; } else { if (sc->has_notify) { ACPI_WMI_REMOVE_EVENT_HANDLER(dev, ACPI_HP_WMI_EVENT_GUID); } if (sc->hpcmi_bufptr != -1) { sbuf_delete(&sc->hpcmi_sbuf); sc->hpcmi_bufptr = -1; } sc->hpcmi_open_pid = 0; destroy_dev(sc->hpcmi_dev_t); ret = 0; } return (ret); } static int acpi_hp_sysctl(SYSCTL_HANDLER_ARGS) { struct acpi_hp_softc *sc; int arg; int oldarg; int error = 0; int function; int method; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = (struct acpi_hp_softc *)oidp->oid_arg1; function = oidp->oid_arg2; method = acpi_hp_sysctls[function].method; ACPI_SERIAL_BEGIN(hp); arg = acpi_hp_sysctl_get(sc, method); oldarg = arg; error = sysctl_handle_int(oidp, &arg, 0, req); if (!error && req->newptr != NULL) { error = acpi_hp_sysctl_set(sc, method, arg, oldarg); } ACPI_SERIAL_END(hp); return (error); } static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) { int val = 0; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(hp); switch (method) { case ACPI_HP_METHOD_WLAN_ENABLED: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WLAN_ENABLED) != 0); break; case ACPI_HP_METHOD_WLAN_RADIO: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WLAN_RADIO) != 0); break; case ACPI_HP_METHOD_WLAN_ON_AIR: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WLAN_ON_AIR) != 0); break; case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: val = sc->wlan_enable_if_radio_on; break; case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: val = sc->wlan_disable_if_radio_off; break; case ACPI_HP_METHOD_BLUETOOTH_ENABLED: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_BLUETOOTH_ENABLED) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_RADIO: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_BLUETOOTH_RADIO) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_ON_AIR: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_BLUETOOTH_ON_AIR) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: val = sc->bluetooth_enable_if_radio_on; break; case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: val = sc->bluetooth_disable_if_radio_off; break; case ACPI_HP_METHOD_WWAN_ENABLED: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WWAN_ENABLED) != 0); break; case ACPI_HP_METHOD_WWAN_RADIO: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WWAN_RADIO) != 0); break; case ACPI_HP_METHOD_WWAN_ON_AIR: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WWAN_ON_AIR) != 0); break; case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: val = sc->wwan_enable_if_radio_on; break; case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: val = sc->wwan_disable_if_radio_off; break; case ACPI_HP_METHOD_ALS: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_ALS_COMMAND, 0, 0); break; case ACPI_HP_METHOD_DISPLAY: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_DISPLAY_COMMAND, 0, 0); break; case ACPI_HP_METHOD_HDDTEMP: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_HDDTEMP_COMMAND, 0, 0); break; case ACPI_HP_METHOD_DOCK: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_DOCK_COMMAND, 0, 0); break; case ACPI_HP_METHOD_CMI_DETAIL: val = sc->cmi_detail; break; } return (val); } static int acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg) { ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(hp); if (method != ACPI_HP_METHOD_CMI_DETAIL) arg = arg?1:0; if (arg != oldarg) { switch (method) { case ACPI_HP_METHOD_WLAN_ENABLED: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x101:0x100)); case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: sc->wlan_enable_if_radio_on = arg; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: sc->wlan_disable_if_radio_off = arg; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_BLUETOOTH_ENABLED: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x202:0x200)); case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: sc->bluetooth_enable_if_radio_on = arg; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: sc->bluetooth_disable_if_radio_off = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WWAN_ENABLED: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x404:0x400)); case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: sc->wwan_enable_if_radio_on = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: sc->wwan_disable_if_radio_off = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_ALS: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_ALS_COMMAND, 1, arg?1:0)); case ACPI_HP_METHOD_CMI_DETAIL: sc->cmi_detail = arg; break; } } return (0); } static __inline void acpi_hp_free_buffer(ACPI_BUFFER* buf) { if (buf && buf->Pointer) { AcpiOsFree(buf->Pointer); } } static void acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context) { device_t dev = context; ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); struct acpi_hp_softc *sc = device_get_softc(dev); ACPI_BUFFER response = { ACPI_ALLOCATE_BUFFER, NULL }; ACPI_OBJECT *obj; ACPI_WMI_GET_EVENT_DATA(sc->wmi_dev, notify, &response); obj = (ACPI_OBJECT*) response.Pointer; if (obj && obj->Type == ACPI_TYPE_BUFFER && obj->Buffer.Length == 8) { if (*((UINT8 *) obj->Buffer.Pointer) == 0x5) { acpi_hp_evaluate_auto_on_off(sc); } } acpi_hp_free_buffer(&response); } static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val) { UINT32 params[5] = { 0x55434553, is_write?2:1, command, is_write?4:0, val}; UINT32* result; ACPI_OBJECT *obj; ACPI_BUFFER in = { sizeof(params), ¶ms }; ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; int retval; if (ACPI_FAILURE(ACPI_WMI_EVALUATE_CALL(wmi_dev, ACPI_HP_WMI_BIOS_GUID, 0, 0x3, &in, &out))) { acpi_hp_free_buffer(&out); return (-EINVAL); } obj = out.Pointer; if (!obj || obj->Type != ACPI_TYPE_BUFFER) { acpi_hp_free_buffer(&out); return (-EINVAL); } result = (UINT32*) obj->Buffer.Pointer; retval = result[2]; if (result[1] > 0) { retval = result[1]; } acpi_hp_free_buffer(&out); return (retval); } static __inline char* acpi_hp_get_string_from_object(ACPI_OBJECT* obj, char* dst, size_t size) { int length; dst[0] = 0; if (obj->Type == ACPI_TYPE_STRING) { length = obj->String.Length+1; if (length > size) { length = size - 1; } strlcpy(dst, obj->String.Pointer, length); acpi_hp_hex_decode(dst); } return (dst); } /* * Read BIOS Setting block in instance "instance". * The block returned is ACPI_TYPE_PACKAGE which should contain the following * elements: * Index Meaning * 0 Setting Name [string] * 1 Value (comma separated, asterisk marks the current value) [string] * 2 Path within the bios hierarchy [string] * 3 IsReadOnly [int] * 4 DisplayInUI [int] * 5 RequiresPhysicalPresence [int] * 6 Sequence for ordering within the bios settings (absolute) [int] * 7 Length of prerequisites array [int] * 8 Prerequisite1 [string] * 9 Prerequisite2 [string] * 10 Prerequisite3 [string] * 11 Current value (in case of enum) [string] / Array length [int] * 12 Enum length [int] / Array values * 13ff Enum value at index x [string] */ static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, char* outbuf, size_t outsize, UINT32* sequence, int detail) { ACPI_OBJECT *obj; ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; int i; int outlen; int size = 255; int has_enums = 0; char string_buffer[size]; int enumbase; outlen = 0; outbuf[0] = 0; if (ACPI_FAILURE(ACPI_WMI_GET_BLOCK(wmi_dev, guid, instance, &out))) { acpi_hp_free_buffer(&out); return (-EINVAL); } obj = out.Pointer; if (!obj && obj->Type != ACPI_TYPE_PACKAGE) { acpi_hp_free_buffer(&out); return (-EINVAL); } /* check if this matches our expectations based on limited knowledge */ if (obj->Package.Count >= 13 && obj->Package.Elements[0].Type == ACPI_TYPE_STRING && obj->Package.Elements[1].Type == ACPI_TYPE_STRING && obj->Package.Elements[2].Type == ACPI_TYPE_STRING && obj->Package.Elements[3].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[4].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[5].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[6].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[7].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[8].Type == ACPI_TYPE_STRING && obj->Package.Elements[9].Type == ACPI_TYPE_STRING && obj->Package.Elements[10].Type == ACPI_TYPE_STRING && ((obj->Package.Elements[11].Type == ACPI_TYPE_STRING && obj->Package.Elements[12].Type == ACPI_TYPE_INTEGER && obj->Package.Count >= 13+obj->Package.Elements[12].Integer.Value) || (obj->Package.Elements[11].Type == ACPI_TYPE_INTEGER && obj->Package.Count >= 12+obj->Package.Elements[11].Integer.Value)) ) { enumbase = obj->Package.Elements[11].Type == ACPI_TYPE_STRING? 12:11; if (detail & ACPI_HP_CMI_DETAIL_PATHS) { strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[2], string_buffer, size), outsize); outlen += 48; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); } strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[0], string_buffer, size), outsize); outlen += 43; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); if (enumbase == 12) strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[11], string_buffer, size), outsize); outlen += 21; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); for (i = 0; i < strlen(outbuf); ++i) if (outbuf[i] == '\\') outbuf[i] = '/'; if (detail & ACPI_HP_CMI_DETAIL_ENUMS) { for (i = enumbase+1; i < enumbase + 1 + obj->Package.Elements[enumbase].Integer.Value; ++i) { acpi_hp_get_string_from_object( &obj->Package.Elements[i], string_buffer, size); if (strlen(string_buffer) > 1 || (strlen(string_buffer) == 1 && string_buffer[0] != ' ')) { if (has_enums) strlcat(outbuf, "/", outsize); else strlcat(outbuf, " (", outsize); strlcat(outbuf, string_buffer, outsize); has_enums = 1; } } } if (has_enums) strlcat(outbuf, ")", outsize); if (detail & ACPI_HP_CMI_DETAIL_FLAGS) { strlcat(outbuf, obj->Package.Elements[3].Integer.Value? " [ReadOnly]":"", outsize); strlcat(outbuf, obj->Package.Elements[4].Integer.Value? "":" [NOUI]", outsize); strlcat(outbuf, obj->Package.Elements[5].Integer.Value? " [RPP]":"", outsize); } *sequence = (UINT32) obj->Package.Elements[6].Integer.Value; } acpi_hp_free_buffer(&out); return (0); } /* * Convert given two digit hex string (hexin) to an UINT8 referenced * by byteout. * Return != 0 if the was a problem (invalid input) */ static __inline int acpi_hp_hex_to_int(const UINT8 *hexin, UINT8 *byteout) { unsigned int hi; unsigned int lo; hi = hexin[0]; lo = hexin[1]; if ('0' <= hi && hi <= '9') hi -= '0'; else if ('A' <= hi && hi <= 'F') hi -= ('A' - 10); else if ('a' <= hi && hi <= 'f') hi -= ('a' - 10); else return (1); if ('0' <= lo && lo <= '9') lo -= '0'; else if ('A' <= lo && lo <= 'F') lo -= ('A' - 10); else if ('a' <= lo && lo <= 'f') lo -= ('a' - 10); else return (1); *byteout = (hi << 4) + lo; return (0); } static void acpi_hp_hex_decode(char* buffer) { int i; int length = strlen(buffer); UINT8 *uin; UINT8 uout; if (((int)length/2)*2 == length || length < 10) return; for (i = 0; i= '0' && buffer[i] <= '9') || (buffer[i] >= 'A' && buffer[i] <= 'F'))) return; } for (i = 0; isi_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(hp); if (sc->hpcmi_open_pid != 0) { ret = EBUSY; } else { if (sbuf_new(&sc->hpcmi_sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { ret = ENXIO; } else { sc->hpcmi_open_pid = td->td_proc->p_pid; sc->hpcmi_bufptr = 0; ret = 0; } } ACPI_SERIAL_END(hp); return (ret); } /* * close hpcmi device */ static int acpi_hp_hpcmi_close(struct cdev* dev, int flags, int mode, struct thread *td) { struct acpi_hp_softc *sc; int ret; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(hp); if (sc->hpcmi_open_pid == 0) { ret = EBADF; } else { if (sc->hpcmi_bufptr != -1) { sbuf_delete(&sc->hpcmi_sbuf); sc->hpcmi_bufptr = -1; } sc->hpcmi_open_pid = 0; ret = 0; } ACPI_SERIAL_END(hp); return (ret); } /* * Read from hpcmi bios information */ static int acpi_hp_hpcmi_read(struct cdev *dev, struct uio *buf, int flag) { struct acpi_hp_softc *sc; int pos, i, l, ret; UINT8 instance; UINT32 sequence; int linesize = 1025; char line[linesize]; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(hp); if (sc->hpcmi_open_pid != buf->uio_td->td_proc->p_pid || sc->hpcmi_bufptr == -1) { ret = EBADF; } else { if (!sbuf_done(&sc->hpcmi_sbuf)) { if (sc->cmi_order_size < 0) { sc->cmi_order_size = 0; for (instance = 0; instance < 128; ++instance) { if (acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, instance, line, linesize, &sequence, sc->cmi_detail)) { instance = 128; } else { pos = sc->cmi_order_size; for (i=0; icmi_order_size && i<127; ++i) { if (sc->cmi_order[i].sequence > sequence) { pos = i; break; } } for (i=sc->cmi_order_size; i>pos; --i) { sc->cmi_order[i].sequence = sc->cmi_order[i-1].sequence; sc->cmi_order[i].instance = sc->cmi_order[i-1].instance; } sc->cmi_order[pos].sequence = sequence; sc->cmi_order[pos].instance = instance; sc->cmi_order_size++; } } } for (i=0; icmi_order_size; ++i) { if (!acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, sc->cmi_order[i].instance, line, linesize, &sequence, sc->cmi_detail)) { sbuf_printf(&sc->hpcmi_sbuf, "%s\n", line); } } sbuf_finish(&sc->hpcmi_sbuf); } if (sbuf_len(&sc->hpcmi_sbuf) <= 0) { sbuf_delete(&sc->hpcmi_sbuf); sc->hpcmi_bufptr = -1; sc->hpcmi_open_pid = 0; ret = ENOMEM; } else { l = min(buf->uio_resid, sbuf_len(&sc->hpcmi_sbuf) - sc->hpcmi_bufptr); ret = (l > 0)?uiomove(sbuf_data(&sc->hpcmi_sbuf) + sc->hpcmi_bufptr, l, buf) : 0; sc->hpcmi_bufptr += l; } } ACPI_SERIAL_END(hp); return (ret); } From rpaulo at freebsd.org Sun Jun 21 16:56:21 2009 From: rpaulo at freebsd.org (Rui Paulo) Date: Sun Jun 21 16:56:28 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <4A3E5F40.4040709@bindone.de> References: <4A3E1784.2050406@bindone.de> <5AFA3C27-D3DB-48DA-9AF3-9E14D11EEC61@freebsd.org> <4A3E5F40.4040709@bindone.de> Message-ID: On 21 Jun 2009, at 17:26, Michael wrote: > Rui Paulo wrote: >> On 21 Jun 2009, at 15:08, Rui Paulo wrote: >> >>> On 21 Jun 2009, at 12:20, Michael wrote: >>> >>>> Hello, >>>> >>>> I wrote two new acpi modules last year and finally found the time >>>> to fix >>>> them, add some missing features and write man pages. >>> >>> Michael, this is great work! I'll review and see if we can ship it >>> with 8.0! >> >> Michael, this looks good, but there are two style nits that we need >> to fix. >> * we should try not going over the 80 column mark >> * add a empty new line before every return >> >> If you could send me a new patch for 8.0 with these fixes, I'll >> commit >> it (unless someone else has objections). >> >> Regards, >> -- >> Rui Paulo >> > > Hi Rui, > > hmm style(9) doesn't say anything about columns or return statements > in > this context (maybe it should be updated?!?). I've been looking again at style(9) and seems like I'm misremembering something. Please ignore this request and sorry for the hassle. -- Rui Paulo From freebsdusb at bindone.de Sun Jun 21 17:03:06 2009 From: freebsdusb at bindone.de (Michael) Date: Sun Jun 21 17:03:13 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <8F2C596E-1B49-4E15-ACC0-84C1A14BD245@freebsd.org> References: <4A3E1784.2050406@bindone.de> <5AFA3C27-D3DB-48DA-9AF3-9E14D11EEC61@freebsd.org> <4A3E6563.7040400@bindone.de> <8F2C596E-1B49-4E15-ACC0-84C1A14BD245@freebsd.org> Message-ID: <4A3E6796.4010501@bindone.de> Rui Paulo wrote: > On 21 Jun 2009, at 17:52, Michael wrote: > >> Rui Paulo wrote: >>> On 21 Jun 2009, at 15:08, Rui Paulo wrote: >>> >>>> On 21 Jun 2009, at 12:20, Michael wrote: >>>> >>>>> Hello, >>>>> >>>>> I wrote two new acpi modules last year and finally found the time >>>>> to fix >>>>> them, add some missing features and write man pages. >>>> >>>> Michael, this is great work! I'll review and see if we can ship it >>>> with 8.0! >>> >>> Michael, this looks good, but there are two style nits that we need >>> to fix. >>> * we should try not going over the 80 column mark >>> * add a empty new line before every return >>> >>> If you could send me a new patch for 8.0 with these fixes, I'll commit >>> it (unless someone else has objections). >>> >>> Regards, >>> -- >>> Rui Paulo >>> >> >> Hi Rui, >> >> I figured that adding newlines in conditional returns makes no sense >> (see my last post), so I did reformat everything to be (close to) 80 >> columns a line add added newlines in front of returns at the end of a >> function. > > Yeah, forget about the newlines before return. > >> Please find attached the complete patch again (against clean >> 7.2-RELEASE) and the files that changed (acpi_hp.c and acpi_wmi.c). > > Can you send it in MIME format or store it at some webserver so I could > fetch it? > >> Btw, what is the normal adoption path for 7-STABLE (I would assume first >> it gets into HEAD and if there's interest there will be a backport to 7? >> It should at least work in there, even so for HP laptops my guess is >> that most users will use 8 anyway because of wireless support). > > > It first goes into 8.0 and then 7-STABLE. > > Thanks, > -- > Rui Paulo > Hmm, that should have been MIME Format (are you using MacMail by any chance - seen issues there before..) I attached it again as an archive, does that work for you? cheers Michael -------------- next part -------------- A non-text attachment was scrubbed... Name: files_for_rui.tgz Type: application/octet-stream Size: 52022 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090621/21886a78/files_for_rui.obj From rpaulo at freebsd.org Sun Jun 21 17:06:23 2009 From: rpaulo at freebsd.org (Rui Paulo) Date: Sun Jun 21 17:06:30 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <4A3E6563.7040400@bindone.de> References: <4A3E1784.2050406@bindone.de> <5AFA3C27-D3DB-48DA-9AF3-9E14D11EEC61@freebsd.org> <4A3E6563.7040400@bindone.de> Message-ID: <8F2C596E-1B49-4E15-ACC0-84C1A14BD245@freebsd.org> On 21 Jun 2009, at 17:52, Michael wrote: > Rui Paulo wrote: >> On 21 Jun 2009, at 15:08, Rui Paulo wrote: >> >>> On 21 Jun 2009, at 12:20, Michael wrote: >>> >>>> Hello, >>>> >>>> I wrote two new acpi modules last year and finally found the time >>>> to fix >>>> them, add some missing features and write man pages. >>> >>> Michael, this is great work! I'll review and see if we can ship it >>> with 8.0! >> >> Michael, this looks good, but there are two style nits that we need >> to fix. >> * we should try not going over the 80 column mark >> * add a empty new line before every return >> >> If you could send me a new patch for 8.0 with these fixes, I'll >> commit >> it (unless someone else has objections). >> >> Regards, >> -- >> Rui Paulo >> > > Hi Rui, > > I figured that adding newlines in conditional returns makes no sense > (see my last post), so I did reformat everything to be (close to) 80 > columns a line add added newlines in front of returns at the end of a > function. Yeah, forget about the newlines before return. > Please find attached the complete patch again (against clean > 7.2-RELEASE) and the files that changed (acpi_hp.c and acpi_wmi.c). Can you send it in MIME format or store it at some webserver so I could fetch it? > Btw, what is the normal adoption path for 7-STABLE (I would assume > first > it gets into HEAD and if there's interest there will be a backport > to 7? > It should at least work in there, even so for HP laptops my guess is > that most users will use 8 anyway because of wireless support). It first goes into 8.0 and then 7-STABLE. Thanks, -- Rui Paulo From robert.moore at intel.com Sun Jun 21 17:50:16 2009 From: robert.moore at intel.com (Moore, Robert) Date: Sun Jun 21 17:50:22 2009 Subject: Resume problem (Motherboard: MSI 790GX-G65) In-Reply-To: <4A3DEEFC.4010204@gmx.de> References: <4A3DEEFC.4010204@gmx.de> Message-ID: <4911F71203A09E4D9981D27F9D8308582E8438B6@orsmsx503.amr.corp.intel.com> There are some nasty issues with this DSDT. Mainly, it uses "module-level" executable code, which has been illegal since ACPI 2.0. The ACPICA interpreter does not support it, nor does the iASL compiler. Once all the instances of this type of code are commented out, the DSDT compiles, although there are 17 warnings. Some of them are potentially serious. Some examples: dsdt.dsl 3499: Release (MLMU) Warning 1099 - Statement is unreachable ^ dsdt.dsl 9069: Add (Local1, 0x80) Warning 1105 - ^ Result is not used, operator has no effect dsdt.dsl 6167: Acquire (MUTE, 0x03E8) Warning 1104 - ^ Possible operator timeout is ignored You probably should check if a new bios is available for this machine. Interesting, the MB is an MSI, but the DSDT contains this: Name (VEND, Buffer (0x05) { "ASUS" }) I will email you updated DSDT source and the output from the compiler. Bob >-----Original Message----- >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >acpi@freebsd.org] On Behalf Of hexanism@gmx.de >Sent: Sunday, June 21, 2009 1:28 AM >To: freebsd-acpi@freebsd.org >Subject: Resume problem (Motherboard: MSI 790GX-G65) > >Hello, > >I am using suspend/resume (S3) a lot in Linux. Unfortunately I could not >get it to work with FreeBSD. I wanted to solve the Problem by trying the >hints in the FreeBSD manual. I could not get it to work. Maybe someone >can point me in the right direction, I do not have any experience with >ACPI/dsdt debugging. > >The motherboard I am using is a MSI 790GX-G65 featuring the AMD 790 >Chipset. This model is quite a new AM3 board. It has an onboard >3D-accelerated AMD graphics card. The Bios is up to date (Revision 1.3). >I am using FreeBSD 7.2-RC2 with the generic kernel (I also did all >the testing with another hardrive using FreeBSD 7.2-RELEASE). > >Suspend and resume work with Linux (Ubuntu 9.04) and Windows XP 64 >flawlessly. > >S1 freezes the screen about two seconds after calling "acpiconf -s 1". >Then I have to press the reset button. S3/suspend seems to work. The >Fans and drives turn off and the power led acts exactly the same way as >it acts under Linux and Windows. Under Linux/Windows I can resume by >Keyboard. Under FreeBSD that does not work, I have to press the power >button to get the computer to react. Unfortunately the screen stays >black (drives and fans do get turned on). I have to press the reset button. > >I inspected the dsdt of my motherboard: > >http://innoits.de/chris-msi790gx65.asl > >There are a lot of errors when recompiling with iasl (about 180 Errors, >most of them "Object does not exist"). I downloaded the ACPI >specifications (3.0a, 3.0b and 4.0) but could not fix the Errors (I >started with the first one ;)) due to my lack of knowledge concerning ACPI. > >What can I do now? Most of the errors are of the same type. I hope that >ther is a simple solution that I just can't solve by myself. Is there a >good beginner friendly dsdt tutorial around? Is it possible that the >dsdt of my motherboard uses a newer ACPI revision (4.0) and thus is >incompatible with the current version of iasl? > >Thank you very much for reading this... > >Chris > From freebsdusb at bindone.de Sun Jun 21 20:39:20 2009 From: freebsdusb at bindone.de (Michael) Date: Sun Jun 21 20:39:26 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <95927F48-2E42-4BD6-AB33-CC21D857AD84@freebsd.org> References: <4A3E1784.2050406@bindone.de> <5AFA3C27-D3DB-48DA-9AF3-9E14D11EEC61@freebsd.org> <4A3E6563.7040400@bindone.de> <8F2C596E-1B49-4E15-ACC0-84C1A14BD245@freebsd.org> <4A3E6796.4010501@bindone.de> <4A3E7F85.8040309@bindone.de> <95927F48-2E42-4BD6-AB33-CC21D857AD84@freebsd.org> Message-ID: <4A3E9A41.3070101@bindone.de> Hi Rui, please find attached a patchset set applies and compiles cleanly on HEAD of today (checked out approx. 2 hours ago). I also attached the patch for 7.2 again (so if somebody stumbles over this post they have both patches attached). I gziped them to avoid MUA madness. I also attached a tgz for the patches against HEAD, just in case. Changes done for HEAD are: - Modified kmod.mk patch (because of agp) - Modified includes in acpi_hp.c acpi_wmi.c and acpi_wmi_if.m because of changes caused by importing ACPICA 20090521 two weeks ago - Moved man pages to share/man/man4 (this is where all acpi_support man pages are in HEAD) - Fixed space-instead-of-tab issues in NOTES Install instructions: mkdir /usr/src/sys/modules/acpi/acpi_hp mkdir /usr/src/sys/modules/acpi/acpi_wmi patch -d /usr/src < acpi_wmi_and_acpi_hp_8.patch Maybe you can drop me a short note when it has been checked in (just for my own pleasure :) cheers Michael From rpaulo at freebsd.org Sun Jun 21 23:20:51 2009 From: rpaulo at freebsd.org (Rui Paulo) Date: Sun Jun 21 23:20:57 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <4A3E9A41.3070101@bindone.de> References: <4A3E1784.2050406@bindone.de> <5AFA3C27-D3DB-48DA-9AF3-9E14D11EEC61@freebsd.org> <4A3E6563.7040400@bindone.de> <8F2C596E-1B49-4E15-ACC0-84C1A14BD245@freebsd.org> <4A3E6796.4010501@bindone.de> <4A3E7F85.8040309@bindone.de> <95927F48-2E42-4BD6-AB33-CC21D857AD84@freebsd.org> <4A3E9A41.3070101@bindone.de> Message-ID: <24E87026-4696-4E59-8CF2-F038FE95A3E7@freebsd.org> I'll have my tree ready and I'll commit this next Tuesday. Regards, -- Rui Paulo From bugmaster at FreeBSD.org Mon Jun 22 11:06:49 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 22 11:07:09 2009 Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org Message-ID: <200906221106.n5MB6m3L017901@freefall.freebsd.org> 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 bin/135349 acpi [patch] teach acpidump(8) to disassemble arbitrary mem o kern/135070 acpi [acpi] [patch] BIOS resource allocation and FreeBSD AC 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 f 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 amd64/121439 acpi [boot] Installation of FreeBSD 7.0 fails: ACPI problem 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 49 problems total. From jkim at FreeBSD.org Mon Jun 22 16:47:00 2009 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Mon Jun 22 16:47:07 2009 Subject: Resume problem (Motherboard: MSI 790GX-G65) In-Reply-To: <4A3DEEFC.4010204@gmx.de> References: <4A3DEEFC.4010204@gmx.de> Message-ID: <200906221246.47751.jkim@FreeBSD.org> On Sunday 21 June 2009 04:27 am, hexanism@gmx.de wrote: > Hello, > > I am using suspend/resume (S3) a lot in Linux. Unfortunately I > could not get it to work with FreeBSD. I wanted to solve the > Problem by trying the hints in the FreeBSD manual. I could not get > it to work. Maybe someone can point me in the right direction, I do > not have any experience with ACPI/dsdt debugging. > > The motherboard I am using is a MSI 790GX-G65 featuring the AMD 790 > Chipset. This model is quite a new AM3 board. It has an onboard > 3D-accelerated AMD graphics card. The Bios is up to date (Revision > 1.3). I am using FreeBSD 7.2-RC2 with the generic kernel (I also > did all the testing with another hardrive using FreeBSD > 7.2-RELEASE). -- >8 --- SNIP!!! --- >8 --- Unfortunately i386/SMP does not support S3. Jung-uk Kim From hexanism at gmx.de Mon Jun 22 20:00:35 2009 From: hexanism at gmx.de (hexanism@gmx.de) Date: Mon Jun 22 20:01:24 2009 Subject: Resume problem (Motherboard: MSI 790GX-G65) In-Reply-To: <4911F71203A09E4D9981D27F9D8308582E8438B7@orsmsx503.amr.corp.intel.com> References: <4A3DEEFC.4010204@gmx.de> <4911F71203A09E4D9981D27F9D8308582E8438B7@orsmsx503.amr.corp.intel.com> Message-ID: <4A3FE2A0.8060409@gmx.de> Hello, thank you very much Robert for patching the dsdt. I compiled it by myself and got five other errors (Use of reserved word: _T_0, _T_1). I don't know if these are severe. I loaded your patched dsdt instead of the original one and I got the same behavior (the pc does not resume). As Jung-uk pointed out, S3 is not supported for i386/SMP which I did not know. I would love to run FreeBSD/amd64. I had it installed some weeks ago (7.0, I think)but unfortunately S3 was missing when executing 'sysctl hw.acpi.supported_sleep_state'. So I decided to check FreeBSD/i386. If I got it right then it does not make sense trying to get S3 working on FreeBSD/i386 because of missing SMP support. On the other hand there is the problem of the missing S3 value in 'hw.acpi.supported_sleep_state'. Is S3 generally not supported in FreeBSD/amd64, or is it because of the buggy BIOS of this specific motherboard? Is there a chance to get S3 working for my machine? Thank you very much for your help. regards, Chris Moore, Robert wrote: > Attached are the updated DSDT and output from iASL, and compiled AML file. > > > > > >> -----Original Message----- >> From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >> acpi@freebsd.org] On Behalf Of hexanism@gmx.de >> Sent: Sunday, June 21, 2009 1:28 AM >> To: freebsd-acpi@freebsd.org >> Subject: Resume problem (Motherboard: MSI 790GX-G65) >> >> Hello, >> >> I am using suspend/resume (S3) a lot in Linux. Unfortunately I could not >> get it to work with FreeBSD. I wanted to solve the Problem by trying the >> hints in the FreeBSD manual. I could not get it to work. Maybe someone >> can point me in the right direction, I do not have any experience with >> ACPI/dsdt debugging. >> >> The motherboard I am using is a MSI 790GX-G65 featuring the AMD 790 >> Chipset. This model is quite a new AM3 board. It has an onboard >> 3D-accelerated AMD graphics card. The Bios is up to date (Revision 1.3). >> I am using FreeBSD 7.2-RC2 with the generic kernel (I also did all >> the testing with another hardrive using FreeBSD 7.2-RELEASE). >> >> Suspend and resume work with Linux (Ubuntu 9.04) and Windows XP 64 >> flawlessly. >> >> S1 freezes the screen about two seconds after calling "acpiconf -s 1". >> Then I have to press the reset button. S3/suspend seems to work. The >> Fans and drives turn off and the power led acts exactly the same way as >> it acts under Linux and Windows. Under Linux/Windows I can resume by >> Keyboard. Under FreeBSD that does not work, I have to press the power >> button to get the computer to react. Unfortunately the screen stays >> black (drives and fans do get turned on). I have to press the reset button. >> >> I inspected the dsdt of my motherboard: >> >> http://innoits.de/chris-msi790gx65.asl >> >> There are a lot of errors when recompiling with iasl (about 180 Errors, >> most of them "Object does not exist"). I downloaded the ACPI >> specifications (3.0a, 3.0b and 4.0) but could not fix the Errors (I >> started with the first one ;)) due to my lack of knowledge concerning ACPI. >> >> What can I do now? Most of the errors are of the same type. I hope that >> ther is a simple solution that I just can't solve by myself. Is there a >> good beginner friendly dsdt tutorial around? Is it possible that the >> dsdt of my motherboard uses a newer ACPI revision (4.0) and thus is >> incompatible with the current version of iasl? >> >> Thank you very much for reading this... >> >> Chris >> >> > > -------------- next part -------------- Intel ACPI Component Architecture ASL Optimizing Compiler version 20070320 [Apr 23 2009] Copyright (C) 2000 - 2007 Intel Corporation Supports ACPI Specification Revision 3.0a acpi/fix_from_robert/dsdt.dsl 518: Name (_T_0, Zero) Error 4081 - Use of reserved word ^ (_T_0) acpi/fix_from_robert/dsdt.dsl 3463: Acquire (ECMU, 0x5000) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 3483: Acquire (ECMU, 0x1388) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 3484: Acquire (MLMU, 0x1388) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 3499: Release (MLMU) Warning 1098 - Statement is unreachable ^ acpi/fix_from_robert/dsdt.dsl 3505: Acquire (ECMU, 0x1388) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 3506: Acquire (MLMU, 0x1388) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 3672: Acquire (ECMU, 0x1388) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 3742: Acquire (ECMU, 0x1388) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 6167: Acquire (MUTE, 0x03E8) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 6181: Acquire (MUTE, 0x03E8) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 6196: Acquire (MUTE, 0x03E8) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 6211: Acquire (MUTE, 0x0FFF) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 6225: Acquire (MUTE, 0x03E8) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 6240: Acquire (MUTE, 0x03E8) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 6255: Acquire (MUTE, 0x03E8) Warning 1103 - Possible operator timeout is ignored ^ acpi/fix_from_robert/dsdt.dsl 9069: Add (Local1, 0x80) Warning 1104 - Result is not used, operator has no effect ^ acpi/fix_from_robert/dsdt.dsl 9519: Method (WMAA, 3, NotSerialized) Warning 1086 - Not all control paths return a value ^ (WMAA) acpi/fix_from_robert/dsdt.dsl 10615: Name (_T_0, Zero) Error 4081 - Use of reserved word ^ (_T_0) acpi/fix_from_robert/dsdt.dsl 10750: Name (_T_1, Zero) Error 4081 - Use of reserved word ^ (_T_1) acpi/fix_from_robert/dsdt.dsl 10821: Name (_T_0, Zero) Error 4081 - Use of reserved word ^ (_T_0) acpi/fix_from_robert/dsdt.dsl 10956: Name (_T_1, Zero) Error 4081 - Use of reserved word ^ (_T_1) ASL Input: acpi/fix_from_robert/dsdt.dsl - 11631 lines, 381904 bytes, 3743 keywords Compilation complete. 5 Errors, 17 Warnings, 0 Remarks, 98 Optimizations From jkim at FreeBSD.org Mon Jun 22 20:21:09 2009 From: jkim at FreeBSD.org (Jung-uk Kim) Date: Mon Jun 22 20:21:16 2009 Subject: Resume problem (Motherboard: MSI 790GX-G65) In-Reply-To: <4A3FE2A0.8060409@gmx.de> References: <4A3DEEFC.4010204@gmx.de> <4911F71203A09E4D9981D27F9D8308582E8438B7@orsmsx503.amr.corp.intel.com> <4A3FE2A0.8060409@gmx.de> Message-ID: <200906221620.55619.jkim@FreeBSD.org> On Monday 22 June 2009 03:59 pm, hexanism@gmx.de wrote: > If I got it right then it does not make sense trying to get S3 > working on FreeBSD/i386 because of missing SMP support. On the > other hand there is the problem of the missing S3 value in > 'hw.acpi.supported_sleep_state'. Is S3 generally not supported in > FreeBSD/amd64, or is it because of the buggy BIOS of this specific > motherboard? Is there a chance to get S3 working for my machine? FreeBSD -CURRENT support S3 on amd64 for both UP and SMP. 7.x does not have necessary code. Jung-uk Kim From peter.piggybox at virgin.net Mon Jun 22 20:21:40 2009 From: peter.piggybox at virgin.net (Peter Harrison) Date: Mon Jun 22 20:21:47 2009 Subject: [PATCH] Lenovo S10(e) ACPI In-Reply-To: <200906211400.19033.naylor.b.david@gmail.com> References: <200906181407.11607.naylor.b.david@gmail.com> <200906182100.15817.naylor.b.david@gmail.com> <20090620130403.GA1051@ideapad.piggybox> <200906211400.19033.naylor.b.david@gmail.com> Message-ID: <20090622192034.GA1059@ideapad.piggybox> Sunday, 21 June 2009 at 14:00:14 +0200, David Naylor said: > On Saturday 20 June 2009 15:04:03 Peter Harrison wrote: > > Thursday, 18 June 2009 at 21:00:11 +0200, David Naylor said: > > > On Thursday 18 June 2009 19:40:28 Peter Harrison wrote: > > > > Thursday, 18 June 2009 at 14:07:07 +0200, David Naylor said: > > > > > Hi, > > > > > > > > > > ((Short version: apply patch and add 'debug.acpi.ec.gpe=1' > > > > > and 'debug.acpi.ec.timeout=100' to loader.conf and EC (battery, > > > > > thermal) ?should? work)) > > > > > > > > > > P.S. If this doesn't work please include details (and dmesg output) > > > > > and I'll try to help. > > > > David, > > > > The patch applied cleanly, and I've rebuilt and installed. System seems to > > work fine and I'm getting battery time reported properly. It still won't > > poweroff on shutdown though... > > > > uname -a: > > FreeBSD ideapad.piggybox 7.2-RELEASE-p1 FreeBSD 7.2-RELEASE-p1 #0: Sat Jun > > 20 11:03:21 BST 2009 > > peter@ideapad.piggybox:/usr/obj/usr/src/sys/GENERIC i386 > > > > dmesg: > I can't see anything that shouts out as being wrong, EC attaches correctly and > no timeout errors. > > Please see attached for a new patch, it fixes a potential (but unlikely) race > condition that could freeze the EC. It also 'fixes' the timeout problem > (well, the workaround seems more stable). > > This adds another tunable/sysctl called ``debug.acpi.ec.delay''. It defaults > to 0 (no change) but when set to a value it adds a delay (in microseconds) > after each successful request. This delay (at about ~200) appears to fix the > problem. I'll still recommend having debug.acpi.ec.gpe and > debug.acpi.ec.timeout set (just in case). So you should have in loader.conf: > > debug.acpi.ec.delay="200" # (us) > debug.acpi.ec.gpe="1" # Optional but recommended > debug.acpi.ec.timeout="100" # (ms) Optional but recommended > > If you are getting some `wait timeout' messages you can try increasing > debug.acpi.ec.delay. > > I'm not sure what is stopping your computer from shutting down (have you tried > `halt -p`?). The only difference that I can spot if that I'm using -current > (with the new acpi code). The patch may work, otherwise you could > give -current a try (it is probably easy enough to backport the ACPI > import...). > > Regards, > > David Hi David, Thanks for coming back to me - I haven't had a chance to test the new patch yet, but will get on to it as soon as I can. Is just a kernel rebuild enough after patching? Last time a did kernel + world to pick up the last security advisory too and it was a bit painful (even slower than my old Celeron M based Dell laptop). I'm still reeling from a packaged based upgrade of Firefox (still took a while, even using packages). Thanks again for your help. Peter. From robert.moore at intel.com Mon Jun 22 20:44:24 2009 From: robert.moore at intel.com (Moore, Robert) Date: Mon Jun 22 20:44:31 2009 Subject: Resume problem (Motherboard: MSI 790GX-G65) In-Reply-To: <4A3FE2A0.8060409@gmx.de> References: <4A3DEEFC.4010204@gmx.de> <4911F71203A09E4D9981D27F9D8308582E8438B7@orsmsx503.amr.corp.intel.com> <4A3FE2A0.8060409@gmx.de> Message-ID: <4911F71203A09E4D9981D27F9D8308582E843FA2@orsmsx503.amr.corp.intel.com> >thank you very much Robert for patching the dsdt. I compiled it by >myself and got five other errors (Use of reserved word: _T_0, _T_1). I >don't know if these are severe. I loaded your patched dsdt instead of This error has been reduced to a remark in newer versions of the compiler. They are compiler temporary variables that are introduced during the compilation of the original source by the bios vendor. They appear when the original (compiled) code is disassembled. >-----Original Message----- >From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >acpi@freebsd.org] On Behalf Of hexanism@gmx.de >Sent: Monday, June 22, 2009 12:59 PM >To: freebsd-acpi@freebsd.org >Subject: Re: Resume problem (Motherboard: MSI 790GX-G65) > >Hello, > >thank you very much Robert for patching the dsdt. I compiled it by >myself and got five other errors (Use of reserved word: _T_0, _T_1). I >don't know if these are severe. I loaded your patched dsdt instead of >the original one and I got the same behavior (the pc does not resume). >As Jung-uk pointed out, S3 is not supported for i386/SMP which I did not >know. I would love to run FreeBSD/amd64. I had it installed some weeks >ago (7.0, I think)but unfortunately S3 was missing when executing >'sysctl hw.acpi.supported_sleep_state'. So I decided to check FreeBSD/i386. > >If I got it right then it does not make sense trying to get S3 working >on FreeBSD/i386 because of missing SMP support. On the other hand there >is the problem of the missing S3 value in >'hw.acpi.supported_sleep_state'. Is S3 generally not supported in >FreeBSD/amd64, or is it because of the buggy BIOS of this specific >motherboard? Is there a chance to get S3 working for my machine? > >Thank you very much for your help. > >regards, > >Chris > > > > >Moore, Robert wrote: >> Attached are the updated DSDT and output from iASL, and compiled AML >file. >> >> >> >> >> >>> -----Original Message----- >>> From: owner-freebsd-acpi@freebsd.org [mailto:owner-freebsd- >>> acpi@freebsd.org] On Behalf Of hexanism@gmx.de >>> Sent: Sunday, June 21, 2009 1:28 AM >>> To: freebsd-acpi@freebsd.org >>> Subject: Resume problem (Motherboard: MSI 790GX-G65) >>> >>> Hello, >>> >>> I am using suspend/resume (S3) a lot in Linux. Unfortunately I could not >>> get it to work with FreeBSD. I wanted to solve the Problem by trying the >>> hints in the FreeBSD manual. I could not get it to work. Maybe someone >>> can point me in the right direction, I do not have any experience with >>> ACPI/dsdt debugging. >>> >>> The motherboard I am using is a MSI 790GX-G65 featuring the AMD 790 >>> Chipset. This model is quite a new AM3 board. It has an onboard >>> 3D-accelerated AMD graphics card. The Bios is up to date (Revision 1.3). >>> I am using FreeBSD 7.2-RC2 with the generic kernel (I also did all >>> the testing with another hardrive using FreeBSD 7.2-RELEASE). >>> >>> Suspend and resume work with Linux (Ubuntu 9.04) and Windows XP 64 >>> flawlessly. >>> >>> S1 freezes the screen about two seconds after calling "acpiconf -s 1". >>> Then I have to press the reset button. S3/suspend seems to work. The >>> Fans and drives turn off and the power led acts exactly the same way as >>> it acts under Linux and Windows. Under Linux/Windows I can resume by >>> Keyboard. Under FreeBSD that does not work, I have to press the power >>> button to get the computer to react. Unfortunately the screen stays >>> black (drives and fans do get turned on). I have to press the reset >button. >>> >>> I inspected the dsdt of my motherboard: >>> >>> http://innoits.de/chris-msi790gx65.asl >>> >>> There are a lot of errors when recompiling with iasl (about 180 Errors, >>> most of them "Object does not exist"). I downloaded the ACPI >>> specifications (3.0a, 3.0b and 4.0) but could not fix the Errors (I >>> started with the first one ;)) due to my lack of knowledge concerning >ACPI. >>> >>> What can I do now? Most of the errors are of the same type. I hope that >>> ther is a simple solution that I just can't solve by myself. Is there a >>> good beginner friendly dsdt tutorial around? Is it possible that the >>> dsdt of my motherboard uses a newer ACPI revision (4.0) and thus is >>> incompatible with the current version of iasl? >>> >>> Thank you very much for reading this... >>> >>> Chris >>> >>> >> >> From rea-fbsd at codelabs.ru Tue Jun 23 12:47:12 2009 From: rea-fbsd at codelabs.ru (rea-fbsd@codelabs.ru) Date: Tue Jun 23 12:47:21 2009 Subject: [PATCH] acpidump: teach to disassemble arbitrary memory locations as AML code In-Reply-To: <4911F71203A09E4D9981D27F9D8308582E7E4C93@orsmsx503.amr.corp.intel.com> References: <4A32CA38.4020806@root.org> <4911F71203A09E4D9981D27F9D8308582E76D375@orsmsx503.amr.corp.intel.com> <4911F71203A09E4D9981D27F9D8308582E76D4A3@orsmsx503.amr.corp.intel.com> <4A3B6761.4030503@icyb.net.ua> <4A3B6DB7.9050408@icyb.net.ua> <4911F71203A09E4D9981D27F9D8308582E7E4C93@orsmsx503.amr.corp.intel.com> Message-ID: <0wbH8rW09IccaqMqHobLApUP2FQ@hJhSod24P8TdBWT2Rda0vGnf2ew> Robert, good day. Fri, Jun 19, 2009 at 09:04:50AM -0700, Moore, Robert wrote: > I actually already have an os-independent, acpica-compatible version > of acpidump.c. I can send it out if people want to work on it. Yes, please -- this will be great: I had already started to play with pmtools' acpidump, but spent not too much time, so the newer utility version will be a better playground. > The main thing that still needs to be done is to define how the > os-independent part interacts with the os-dependent part. I thinks that we will be able to settle this ;)) Thanks! -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ # From niktychina at gmail.com Tue Jun 23 13:07:31 2009 From: niktychina at gmail.com (Nikolay Tychina) Date: Tue Jun 23 13:07:37 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <24E87026-4696-4E59-8CF2-F038FE95A3E7@freebsd.org> References: <4A3E1784.2050406@bindone.de> <4A3E6563.7040400@bindone.de> <8F2C596E-1B49-4E15-ACC0-84C1A14BD245@freebsd.org> <4A3E6796.4010501@bindone.de> <4A3E7F85.8040309@bindone.de> <95927F48-2E42-4BD6-AB33-CC21D857AD84@freebsd.org> <4A3E9A41.3070101@bindone.de> <24E87026-4696-4E59-8CF2-F038FE95A3E7@freebsd.org> Message-ID: Hi, do these modules work for ACER laptops? Thanks 2009/6/22 Rui Paulo > I'll have my tree ready and I'll commit this next Tuesday. > > Regards, > > -- > Rui Paulo > > _______________________________________________ > 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" > From naylor.b.david at gmail.com Tue Jun 23 14:54:09 2009 From: naylor.b.david at gmail.com (David Naylor) Date: Tue Jun 23 14:54:16 2009 Subject: [PATCH] Lenovo S10(e) ACPI In-Reply-To: <20090622192034.GA1059@ideapad.piggybox> References: <200906181407.11607.naylor.b.david@gmail.com> <200906211400.19033.naylor.b.david@gmail.com> <20090622192034.GA1059@ideapad.piggybox> Message-ID: <200906231655.23010.naylor.b.david@gmail.com> On Monday 22 June 2009 21:20:34 Peter Harrison wrote: > > David > > Hi David, > > Thanks for coming back to me - I haven't had a chance to test the new patch > yet, but will get on to it as soon as I can. > > Is just a kernel rebuild enough after patching? Last time a did kernel + > world to pick up the last security advisory too and it was a bit painful > (even slower than my old Celeron M based Dell laptop). If you don't have ACPI compiled into the kernel then only that module needs to be rebuilt, otherwise only the kernel needs to be rebuilt. > I'm still reeling from a packaged based upgrade of Firefox (still took a > while, even using packages). > > Thanks again for your help. I'll be away for the next 3 weeks so can only help you after that. Good luck, David -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: This is a digitally signed message part. Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090623/671243ea/attachment.pgp From freebsdusb at bindone.de Tue Jun 23 16:00:24 2009 From: freebsdusb at bindone.de (Michael) Date: Tue Jun 23 16:00:39 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: References: <4A3E1784.2050406@bindone.de> <4A3E6563.7040400@bindone.de> <8F2C596E-1B49-4E15-ACC0-84C1A14BD245@freebsd.org> <4A3E6796.4010501@bindone.de> <4A3E7F85.8040309@bindone.de> <95927F48-2E42-4BD6-AB33-CC21D857AD84@freebsd.org> <4A3E9A41.3070101@bindone.de> <24E87026-4696-4E59-8CF2-F038FE95A3E7@freebsd.org> Message-ID: <4A40FBDA.70705@bindone.de> Nikolay Tychina wrote: > Hi, do these modules work for ACER laptops? > Thanks > > 2009/6/22 Rui Paulo > >> I'll have my tree ready and I'll commit this next Tuesday. >> >> Regards, >> >> -- >> Rui Paulo >> >> _______________________________________________ >> 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" >> > _______________________________________________ > 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" Nope, but acpi_wmi could be the foundation for implementing this. UNfortunately I have no Acer hardware around, so I cannot do this. From freebsdusb at bindone.de Wed Jun 24 06:09:13 2009 From: freebsdusb at bindone.de (Michael) Date: Wed Jun 24 06:09:20 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <3a142e750906232257y4b1e255en9374c05079f04520@mail.gmail.com> References: <4A3E1784.2050406@bindone.de> <3a142e750906232257y4b1e255en9374c05079f04520@mail.gmail.com> Message-ID: <4A41C2CF.4020205@bindone.de> Paul B. Mahol wrote: > On 6/21/09, Michael wrote: >> Hello, >> >> I wrote two new acpi modules last year and finally found the time to fix >> them, add some missing features and write man pages. >> >> This is the first time I'm writing kernel code for FreeBSD, so please >> excuse me if I failed to apply to all style conventions (I tried to >> follow style(9) as closely as possible). >> >> acpi_wmi is an ACPI to WMI mapping driver (this is used by HP and Acer >> notebooks and potentially others), so this could also be used to >> implement additional drivers on (see for more details on WMI and ACPI: >> http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx). >> It provides /dev/wmistat, example output: >> cat /dev/wmistat >> GUID INST EXPE METH STR EVENT OID >> {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA >> {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - >> {2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - >> {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB >> {1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA >> {2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC >> {988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD >> {14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE >> {322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF >> {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG >> {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH >> {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI >> >> acpi_hp is a driver that uses acpi_wmi to provide HP specific features. >> These include: >> - Activate/deactivate WLAN >> - Activate/deactivate WWAN >> - Activate/deactivate Bluetooth >> - Auto activate/deactiavte based on hw radio status >> - Devd notifications >> - On air status for different >> - Controls ambient light sensor >> - Get docking status >> - Read BIOS settings through /dev/hpcmi, example output: >> Flash Media Reader Disable >> USB Ports including Express Card slot Enable >> 1394 Port Enable >> Cardbus Slot Disable >> Express Card Slot Disable >> F9, F10 and F12 Delay(Sec) 0 >> USB Device Detection Delay (Sec) 0 >> Multiboot Enable >> Express Boot Popup Delay(Sec) 0 >> CD-ROM Boot Enable >> Floppy Boot Disable >> Internal Network Adapter Boot Disable >> Internal Network Adapter Boot Mode PXE >> Swap Fn/Ctrl Key Disable >> USB Legacy Support Disable >> Parallel Port Mode ECP >> ... >> >> The man pages included in the patch (man acpi_hp / man acpi_wmi) give >> you detailed information about all sysctls and devices. >> >> The patch attached (acpi_wmi_and_acpi_hp.patch) has been tested against >> 7.2-RELEASE and everything compiles cleanly, although my tests have been >> on 8-CURRENT (but the snapshot is older than 7.2), so I expect this to >> work ok on 7.2. The patch might fail against CURRENT though, this is why >> I also attached patches.tgz, which contains individual patches per file. >> I only tested this on i386 and the patch only changes i386 specific >> things (I have no idea if this could possibly work on amd64, especially >> because all the other acpi_support modules seem to be i386 only). Also >> note, that I could only test this on my own machine (HP Compaq 8510p), >> which features WLAN/BT/WLAN, so I don't know if the readings will be >> sane if your machine doesn't feature a WWAN chip. In theory this should >> work for many different HP models. >> >> Installation instructions (replace MYKERNEL with your kernel name): >> >> mkdir /usr/src/sys/modules/acpi/acpi_wmi >> mkdir /usr/src/sys/modules/acpi/acpi_hp >> patch -d /usr/src < acpi_wmi_and_acpi_hp.patch >> cd /usr/src/share/man/man4/man4.i386 >> make all && make install >> cd /usr/src/sys/i386/conf >> config MYKERNEL >> cd ../compile/MYKERNEL >> make cleandepend && make depend >> make all >> make install >> reboot >> . >> . >> . >> kldload acpi_hp >> cat /dev/wmistat >> sysctl -a | grep acpi_hp.0 >> sysctl dev.acpi_hp.0.als = 0 >> cat /dev/hpcmi >> sysctl dev.acpi_hp.0.cmi_detail=7 >> cat /dev/hpcmi >> >> It would be nice to get some feedback on this and maybe someone else can >> implement vendor specific ACPI modules for other WMI based laptops now. > > I tested committed version on 8.0. > What about making following verbose device_printfs optional: > Wireless status is 0xXXXX , (new_wlan_status is 0xXXXX), > (new_wwan_status is 0xXXXX) > > > # cat /dev/hpcmi > > doesn't show Enabled/Disabled/Values. > What does cat /dev/hpcmi show on your system? Did you try modifying dev.acpi_hp.0.cmi_detail (see man acpi_hp(4))? What is in /var/log/messages when loading the driver? From onemda at gmail.com Wed Jun 24 06:21:33 2009 From: onemda at gmail.com (Paul B. Mahol) Date: Wed Jun 24 06:21:39 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <4A3E1784.2050406@bindone.de> References: <4A3E1784.2050406@bindone.de> Message-ID: <3a142e750906232257y4b1e255en9374c05079f04520@mail.gmail.com> On 6/21/09, Michael wrote: > Hello, > > I wrote two new acpi modules last year and finally found the time to fix > them, add some missing features and write man pages. > > This is the first time I'm writing kernel code for FreeBSD, so please > excuse me if I failed to apply to all style conventions (I tried to > follow style(9) as closely as possible). > > acpi_wmi is an ACPI to WMI mapping driver (this is used by HP and Acer > notebooks and potentially others), so this could also be used to > implement additional drivers on (see for more details on WMI and ACPI: > http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx). > It provides /dev/wmistat, example output: > cat /dev/wmistat > GUID INST EXPE METH STR EVENT OID > {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA > {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - > {2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - > {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB > {1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA > {2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC > {988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD > {14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE > {322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF > {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG > {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH > {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI > > acpi_hp is a driver that uses acpi_wmi to provide HP specific features. > These include: > - Activate/deactivate WLAN > - Activate/deactivate WWAN > - Activate/deactivate Bluetooth > - Auto activate/deactiavte based on hw radio status > - Devd notifications > - On air status for different > - Controls ambient light sensor > - Get docking status > - Read BIOS settings through /dev/hpcmi, example output: > Flash Media Reader Disable > USB Ports including Express Card slot Enable > 1394 Port Enable > Cardbus Slot Disable > Express Card Slot Disable > F9, F10 and F12 Delay(Sec) 0 > USB Device Detection Delay (Sec) 0 > Multiboot Enable > Express Boot Popup Delay(Sec) 0 > CD-ROM Boot Enable > Floppy Boot Disable > Internal Network Adapter Boot Disable > Internal Network Adapter Boot Mode PXE > Swap Fn/Ctrl Key Disable > USB Legacy Support Disable > Parallel Port Mode ECP > ... > > The man pages included in the patch (man acpi_hp / man acpi_wmi) give > you detailed information about all sysctls and devices. > > The patch attached (acpi_wmi_and_acpi_hp.patch) has been tested against > 7.2-RELEASE and everything compiles cleanly, although my tests have been > on 8-CURRENT (but the snapshot is older than 7.2), so I expect this to > work ok on 7.2. The patch might fail against CURRENT though, this is why > I also attached patches.tgz, which contains individual patches per file. > I only tested this on i386 and the patch only changes i386 specific > things (I have no idea if this could possibly work on amd64, especially > because all the other acpi_support modules seem to be i386 only). Also > note, that I could only test this on my own machine (HP Compaq 8510p), > which features WLAN/BT/WLAN, so I don't know if the readings will be > sane if your machine doesn't feature a WWAN chip. In theory this should > work for many different HP models. > > Installation instructions (replace MYKERNEL with your kernel name): > > mkdir /usr/src/sys/modules/acpi/acpi_wmi > mkdir /usr/src/sys/modules/acpi/acpi_hp > patch -d /usr/src < acpi_wmi_and_acpi_hp.patch > cd /usr/src/share/man/man4/man4.i386 > make all && make install > cd /usr/src/sys/i386/conf > config MYKERNEL > cd ../compile/MYKERNEL > make cleandepend && make depend > make all > make install > reboot > . > . > . > kldload acpi_hp > cat /dev/wmistat > sysctl -a | grep acpi_hp.0 > sysctl dev.acpi_hp.0.als = 0 > cat /dev/hpcmi > sysctl dev.acpi_hp.0.cmi_detail=7 > cat /dev/hpcmi > > It would be nice to get some feedback on this and maybe someone else can > implement vendor specific ACPI modules for other WMI based laptops now. I tested committed version on 8.0. What about making following verbose device_printfs optional: Wireless status is 0xXXXX , (new_wlan_status is 0xXXXX), (new_wwan_status is 0xXXXX) # cat /dev/hpcmi doesn't show Enabled/Disabled/Values. -- Paul From onemda at gmail.com Wed Jun 24 06:53:17 2009 From: onemda at gmail.com (Paul B. Mahol) Date: Wed Jun 24 06:53:23 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <4A41C2CF.4020205@bindone.de> References: <4A3E1784.2050406@bindone.de> <3a142e750906232257y4b1e255en9374c05079f04520@mail.gmail.com> <4A41C2CF.4020205@bindone.de> Message-ID: <3a142e750906232353g37b5f001p89948a2fe6a3e66e@mail.gmail.com> On 6/24/09, Michael wrote: > Paul B. Mahol wrote: >> On 6/21/09, Michael wrote: >>> Hello, >>> >>> I wrote two new acpi modules last year and finally found the time to fix >>> them, add some missing features and write man pages. >>> >>> This is the first time I'm writing kernel code for FreeBSD, so please >>> excuse me if I failed to apply to all style conventions (I tried to >>> follow style(9) as closely as possible). >>> >>> acpi_wmi is an ACPI to WMI mapping driver (this is used by HP and Acer >>> notebooks and potentially others), so this could also be used to >>> implement additional drivers on (see for more details on WMI and ACPI: >>> http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx). >>> It provides /dev/wmistat, example output: >>> cat /dev/wmistat >>> GUID INST EXPE METH STR EVENT OID >>> {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA >>> {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - >>> {2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - >>> {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB >>> {1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA >>> {2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC >>> {988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD >>> {14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE >>> {322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF >>> {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG >>> {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH >>> {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI >>> >>> acpi_hp is a driver that uses acpi_wmi to provide HP specific features. >>> These include: >>> - Activate/deactivate WLAN >>> - Activate/deactivate WWAN >>> - Activate/deactivate Bluetooth >>> - Auto activate/deactiavte based on hw radio status >>> - Devd notifications >>> - On air status for different >>> - Controls ambient light sensor >>> - Get docking status >>> - Read BIOS settings through /dev/hpcmi, example output: >>> Flash Media Reader Disable >>> USB Ports including Express Card slot Enable >>> 1394 Port Enable >>> Cardbus Slot Disable >>> Express Card Slot Disable >>> F9, F10 and F12 Delay(Sec) 0 >>> USB Device Detection Delay (Sec) 0 >>> Multiboot Enable >>> Express Boot Popup Delay(Sec) 0 >>> CD-ROM Boot Enable >>> Floppy Boot Disable >>> Internal Network Adapter Boot Disable >>> Internal Network Adapter Boot Mode PXE >>> Swap Fn/Ctrl Key Disable >>> USB Legacy Support Disable >>> Parallel Port Mode ECP >>> ... >>> >>> The man pages included in the patch (man acpi_hp / man acpi_wmi) give >>> you detailed information about all sysctls and devices. >>> >>> The patch attached (acpi_wmi_and_acpi_hp.patch) has been tested against >>> 7.2-RELEASE and everything compiles cleanly, although my tests have been >>> on 8-CURRENT (but the snapshot is older than 7.2), so I expect this to >>> work ok on 7.2. The patch might fail against CURRENT though, this is why >>> I also attached patches.tgz, which contains individual patches per file. >>> I only tested this on i386 and the patch only changes i386 specific >>> things (I have no idea if this could possibly work on amd64, especially >>> because all the other acpi_support modules seem to be i386 only). Also >>> note, that I could only test this on my own machine (HP Compaq 8510p), >>> which features WLAN/BT/WLAN, so I don't know if the readings will be >>> sane if your machine doesn't feature a WWAN chip. In theory this should >>> work for many different HP models. >>> >>> Installation instructions (replace MYKERNEL with your kernel name): >>> >>> mkdir /usr/src/sys/modules/acpi/acpi_wmi >>> mkdir /usr/src/sys/modules/acpi/acpi_hp >>> patch -d /usr/src < acpi_wmi_and_acpi_hp.patch >>> cd /usr/src/share/man/man4/man4.i386 >>> make all && make install >>> cd /usr/src/sys/i386/conf >>> config MYKERNEL >>> cd ../compile/MYKERNEL >>> make cleandepend && make depend >>> make all >>> make install >>> reboot >>> . >>> . >>> . >>> kldload acpi_hp >>> cat /dev/wmistat >>> sysctl -a | grep acpi_hp.0 >>> sysctl dev.acpi_hp.0.als = 0 >>> cat /dev/hpcmi >>> sysctl dev.acpi_hp.0.cmi_detail=7 >>> cat /dev/hpcmi >>> >>> It would be nice to get some feedback on this and maybe someone else can >>> implement vendor specific ACPI modules for other WMI based laptops now. >> >> I tested committed version on 8.0. >> What about making following verbose device_printfs optional: >> Wireless status is 0xXXXX , (new_wlan_status is 0xXXXX), >> (new_wwan_status is 0xXXXX) >> >> >> # cat /dev/hpcmi >> >> doesn't show Enabled/Disabled/Values. >> > What does cat /dev/hpcmi show on your system? > Did you try modifying dev.acpi_hp.0.cmi_detail (see man acpi_hp(4))? > What is in /var/log/messages when loading the driver? > cat /dev/wmistat GUID INST EXPE METH STR EVENT OID {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - {2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB {1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA {2D114B49-2DFB-4130-B8FE-4A3C09E75133} 41 NO NO NO NO BC {988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 14 NO NO NO NO BD {14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE {322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI > cat /dev/hpcmi Serial Port Infrared Port Parallel Port Flash Media Reader USB Ports 1394 Port Cardbus Slot Express Card Slot F9, F10 and F12 Delay(Sec) Multiboot Express Boot Popup Delay(Sec) CD-ROM Boot Floppy Boot Internal Network Adapter Boot Internal Network Adapter Boot Mode Swap Fn/Ctrl Key HDD Translation Mode Virtualization Technology USB Legacy Support Parallel Port Mode BIOS DMA Data Transfers Fan Always on while on AC Power Data Execution Prevention LAN Power Saving SATA Native Mode Dual Core CPU Secondary Battery Fast Charge Embedded WLAN Device Radio Embedded WWAN Device Radio Ambient Light Sensor Embedded Bluetooth Device Radio LAN/WLAN Switching Wake on LAN acpi_wmi0: on acpi0 acpi_hp0: on acpi0 acpi_hp0: HP event GUID detected, installing event handler acpi_hp0: HP CMI GUID detected acpi_wmi0: Wireless status is c0a0f2b acpi_wmi0: WLAN on air changed to 1 (new_wlan_status is 256) acpi_wmi0: Wireless status is c02062b acpi_wmi0: WLAN on air changed to 0 (new_wlan_status is 0) acpi_wmi0: Wireless status is c0a0f2b acpi_wmi0: WLAN on air changed to 1 (new_wlan_status is 256) ACPI Error: Field [C2CA] at 336 exceeds Buffer [C281] size 328 (bits) 20090521 dsopcode-697 ACPI Error (psparse-0633): Method parse/execution failed [\\_SB_.C241.WQBC] (Node 0xc3dceb20), AE_AML_BUFFER_LIMIT -- Paul From freebsdusb at bindone.de Wed Jun 24 08:29:29 2009 From: freebsdusb at bindone.de (Michael) Date: Wed Jun 24 08:29:35 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <3a142e750906232353g37b5f001p89948a2fe6a3e66e@mail.gmail.com> References: <4A3E1784.2050406@bindone.de> <3a142e750906232257y4b1e255en9374c05079f04520@mail.gmail.com> <4A41C2CF.4020205@bindone.de> <3a142e750906232353g37b5f001p89948a2fe6a3e66e@mail.gmail.com> Message-ID: <4A41E39E.1090208@bindone.de> Paul B. Mahol wrote: > On 6/24/09, Michael wrote: >> Paul B. Mahol wrote: >>> On 6/21/09, Michael wrote: >>>> Hello, >>>> >>>> I wrote two new acpi modules last year and finally found the time to fix >>>> them, add some missing features and write man pages. >>>> >>>> This is the first time I'm writing kernel code for FreeBSD, so please >>>> excuse me if I failed to apply to all style conventions (I tried to >>>> follow style(9) as closely as possible). >>>> >>>> acpi_wmi is an ACPI to WMI mapping driver (this is used by HP and Acer >>>> notebooks and potentially others), so this could also be used to >>>> implement additional drivers on (see for more details on WMI and ACPI: >>>> http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx). >>>> It provides /dev/wmistat, example output: >>>> cat /dev/wmistat >>>> GUID INST EXPE METH STR EVENT OID >>>> {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA >>>> {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - >>>> {2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - >>>> {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB >>>> {1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA >>>> {2D114B49-2DFB-4130-B8FE-4A3C09E75133} 57 NO NO NO NO BC >>>> {988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 20 NO NO NO NO BD >>>> {14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE >>>> {322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF >>>> {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG >>>> {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH >>>> {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI >>>> >>>> acpi_hp is a driver that uses acpi_wmi to provide HP specific features. >>>> These include: >>>> - Activate/deactivate WLAN >>>> - Activate/deactivate WWAN >>>> - Activate/deactivate Bluetooth >>>> - Auto activate/deactiavte based on hw radio status >>>> - Devd notifications >>>> - On air status for different >>>> - Controls ambient light sensor >>>> - Get docking status >>>> - Read BIOS settings through /dev/hpcmi, example output: >>>> Flash Media Reader Disable >>>> USB Ports including Express Card slot Enable >>>> 1394 Port Enable >>>> Cardbus Slot Disable >>>> Express Card Slot Disable >>>> F9, F10 and F12 Delay(Sec) 0 >>>> USB Device Detection Delay (Sec) 0 >>>> Multiboot Enable >>>> Express Boot Popup Delay(Sec) 0 >>>> CD-ROM Boot Enable >>>> Floppy Boot Disable >>>> Internal Network Adapter Boot Disable >>>> Internal Network Adapter Boot Mode PXE >>>> Swap Fn/Ctrl Key Disable >>>> USB Legacy Support Disable >>>> Parallel Port Mode ECP >>>> ... >>>> >>>> The man pages included in the patch (man acpi_hp / man acpi_wmi) give >>>> you detailed information about all sysctls and devices. >>>> >>>> The patch attached (acpi_wmi_and_acpi_hp.patch) has been tested against >>>> 7.2-RELEASE and everything compiles cleanly, although my tests have been >>>> on 8-CURRENT (but the snapshot is older than 7.2), so I expect this to >>>> work ok on 7.2. The patch might fail against CURRENT though, this is why >>>> I also attached patches.tgz, which contains individual patches per file. >>>> I only tested this on i386 and the patch only changes i386 specific >>>> things (I have no idea if this could possibly work on amd64, especially >>>> because all the other acpi_support modules seem to be i386 only). Also >>>> note, that I could only test this on my own machine (HP Compaq 8510p), >>>> which features WLAN/BT/WLAN, so I don't know if the readings will be >>>> sane if your machine doesn't feature a WWAN chip. In theory this should >>>> work for many different HP models. >>>> >>>> Installation instructions (replace MYKERNEL with your kernel name): >>>> >>>> mkdir /usr/src/sys/modules/acpi/acpi_wmi >>>> mkdir /usr/src/sys/modules/acpi/acpi_hp >>>> patch -d /usr/src < acpi_wmi_and_acpi_hp.patch >>>> cd /usr/src/share/man/man4/man4.i386 >>>> make all && make install >>>> cd /usr/src/sys/i386/conf >>>> config MYKERNEL >>>> cd ../compile/MYKERNEL >>>> make cleandepend && make depend >>>> make all >>>> make install >>>> reboot >>>> . >>>> . >>>> . >>>> kldload acpi_hp >>>> cat /dev/wmistat >>>> sysctl -a | grep acpi_hp.0 >>>> sysctl dev.acpi_hp.0.als = 0 >>>> cat /dev/hpcmi >>>> sysctl dev.acpi_hp.0.cmi_detail=7 >>>> cat /dev/hpcmi >>>> >>>> It would be nice to get some feedback on this and maybe someone else can >>>> implement vendor specific ACPI modules for other WMI based laptops now. >>> I tested committed version on 8.0. >>> What about making following verbose device_printfs optional: >>> Wireless status is 0xXXXX , (new_wlan_status is 0xXXXX), >>> (new_wwan_status is 0xXXXX) >>> >>> >>> # cat /dev/hpcmi >>> >>> doesn't show Enabled/Disabled/Values. >>> >> What does cat /dev/hpcmi show on your system? >> Did you try modifying dev.acpi_hp.0.cmi_detail (see man acpi_hp(4))? >> What is in /var/log/messages when loading the driver? > >> cat /dev/wmistat > GUID INST EXPE METH STR EVENT OID > {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAA NO NO AA > {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - > {2B814318-4BE8-4707-9D84-A190A859B5D0} 1 NO NO NO 0xA0 - > {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AB > {1F4C91EB-DC5C-460B-951D-C7CB9B4B8D5E} 1 NO WMBA NO NO BA > {2D114B49-2DFB-4130-B8FE-4A3C09E75133} 41 NO NO NO NO BC > {988D08E3-68F4-4C35-AF3E-6A1B8106F83C} 14 NO NO NO NO BD > {14EA9746-CE1F-4098-A0E0-7045CB4DA745} 1 NO NO NO NO BE > {322F2028-0F84-4901-988E-015176049E2D} 2 NO NO NO NO BF > {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG > {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH > {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI > >> cat /dev/hpcmi > Serial Port > Infrared Port > Parallel Port > Flash Media Reader > USB Ports > 1394 Port > Cardbus Slot > Express Card Slot > F9, F10 and F12 Delay(Sec) > Multiboot > Express Boot Popup Delay(Sec) > CD-ROM Boot > Floppy Boot > Internal Network Adapter Boot > Internal Network Adapter Boot Mode > Swap Fn/Ctrl Key > HDD Translation Mode > Virtualization Technology > USB Legacy Support > Parallel Port Mode > BIOS DMA Data Transfers > Fan Always on while on AC Power > Data Execution Prevention > LAN Power Saving > SATA Native Mode > Dual Core CPU > Secondary Battery Fast Charge > Embedded WLAN Device Radio > Embedded WWAN Device Radio > Ambient Light Sensor > Embedded Bluetooth Device Radio > LAN/WLAN Switching > Wake on LAN > > > acpi_wmi0: on acpi0 > acpi_hp0: on acpi0 > acpi_hp0: HP event GUID detected, installing event handler > acpi_hp0: HP CMI GUID detected > acpi_wmi0: Wireless status is c0a0f2b > acpi_wmi0: WLAN on air changed to 1 (new_wlan_status is 256) > acpi_wmi0: Wireless status is c02062b > acpi_wmi0: WLAN on air changed to 0 (new_wlan_status is 0) > acpi_wmi0: Wireless status is c0a0f2b > acpi_wmi0: WLAN on air changed to 1 (new_wlan_status is 256) > ACPI Error: Field [C2CA] at 336 exceeds Buffer [C281] size 328 (bits) > 20090521 dsopcode-697 > ACPI Error (psparse-0633): Method parse/execution failed > [\\_SB_.C241.WQBC] (Node 0xc3dceb20), AE_AML_BUFFER_LIMIT > Interesting... can you send me your DSDT? The last error message is definitely caused by a bug in the DSDT, but that that shouldn't prevent the values from showing up (I assume you tried on a wide terminal). Can you send me the following informations: 1. Output of cat /dev/wmistat (cat /dev/wmistat >/tmp/wmistat.out) 2. Output of cat /dev/hpcmi with cmi_detail set to 7 (sysctl dev.acpi_hp.0.cmi_detail=7; cat /dev/hpcmi >/tmp/hpcmi.out) 3. Your DSDT (acpidump -dt > /tmp/my_computer.asl) thanks Michael From linimon at FreeBSD.org Wed Jun 24 17:44:39 2009 From: linimon at FreeBSD.org (linimon@FreeBSD.org) Date: Wed Jun 24 17:44:45 2009 Subject: i386/136008: [acpi] Dell Vostro 1310 will not shutdown (Requires user intervention) Message-ID: <200906241744.n5OHidnh037607@freefall.freebsd.org> Old Synopsis: Dell Vostro 1310 will not shutdown (Requires user intervention) New Synopsis: [acpi] Dell Vostro 1310 will not shutdown (Requires user intervention) Responsible-Changed-From-To: freebsd-bugs->freebsd-acpi Responsible-Changed-By: linimon Responsible-Changed-When: Wed Jun 24 17:43:59 UTC 2009 Responsible-Changed-Why: Sounds like an ACPI problem. http://www.freebsd.org/cgi/query-pr.cgi?pr=136008 From robert.moore at intel.com Thu Jun 25 19:43:46 2009 From: robert.moore at intel.com (Moore, Robert) Date: Fri Jun 26 08:09:21 2009 Subject: ACPICA version 20090625 released Message-ID: <4911F71203A09E4D9981D27F9D8308582E926C8A@orsmsx503.amr.corp.intel.com> 25 June 2009. Summary of changes for version 20090625: This release is available at www.acpica.org/downloads The ACPI 4.0 Specification was released on June 16 and is available at www.acpi.info. ACPICA implementation of ACPI 4.0 is underway and will continue for the next few releases. 1) ACPI CA Core Subsystem: ACPI 4.0: Implemented interpreter support for the IPMI operation region address space. Includes support for bi-directional data buffers and an IPMI address space handler (to be installed by an IPMI device driver.) ACPICA BZ 773. Lin Ming. ACPI 4.0: Added changes for existing ACPI tables - FACS and SRAT. Includes support in both the header files and the disassembler. Completed a major update for the AcpiGetObjectInfo external interface. Changes include: - Support for variable, unlimited length HID, UID, and CID strings. - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) - Call the _SxW power methods on behalf of a device object. - Determine if a device is a PCI root bridge. - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. These changes will require an update to all callers of this interface. See the updated ACPICA Programmer Reference for details. One new source file has been added - utilities/utids.c. ACPICA BZ 368, 780. Updated the AcpiRead and AcpiWrite external interfaces to support 64-bit transfers. The Value parameter has been extended from 32 bits to 64 bits in order to support new ACPI 4.0 tables. These changes will require an update to all callers of these interfaces. See the ACPICA Programmer Reference for details. ACPICA BZ 768. Fixed several problems with AcpiAttachData. The handler was not invoked when the host node was deleted. The data sub-object was not automatically deleted when the host node was deleted. The interface to the handler had an unused parameter, this was removed. ACPICA BZ 778. Enhanced the function that dumps ACPI table headers. All non-printable characters in the string fields are now replaced with '?' (Signature, OemId, OemTableId, and CompilerId.) ACPI tables with non-printable characters in these fields are occasionally seen in the field. ACPICA BZ 788. Fixed a problem with predefined method repair code where the code that attempts to repair/convert an object of incorrect type is only executed on the first time the predefined method is called. The mechanism that disables warnings on subsequent calls was interfering with the repair mechanism. ACPICA BZ 781. Fixed a possible memory leak in the predefined validation/repair code when a buffer is automatically converted to an expected string object. Removed obsolete 16-bit files from the distribution and from the current git tree head. ACPICA BZ 776. Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Previous Release: Non-Debug Version: 83.4K Code, 17.5K Data, 100.9K Total Debug Version: 158.9K Code, 50.0K Data, 208.9K Total Current Release: Non-Debug Version: 84.7K Code, 17.8K Data, 102.5K Total Debug Version: 160.5K Code, 50.6K Data, 211.1K Total 2) iASL Compiler/Disassembler and Tools: ACPI 4.0: iASL and Disassembler - implemented support for the new IPMI operation region keyword. ACPICA BZ 771, 772. Lin Ming. ACPI 4.0: iASL - implemented compile-time validation support for all new predefined names and control methods (31 total). ACPICA BZ 769. From patttern at gmail.com Fri Jun 26 08:43:19 2009 From: patttern at gmail.com (Pattern) Date: Fri Jun 26 08:43:25 2009 Subject: i386/136008: [acpi] Dell Vostro 1310 will not shutdown Message-ID: <107cc88f0906260115y61785babhfd7f36ec7d0aa082@mail.gmail.com> Can you show iasl log? # iasl dburkland-DellVostro1310.asl > iasl.log 2009/6/25 > http://www.freebsd.org/cgi/query-pr.cgi?pr=136008 > > From dan at dburkland.com Fri Jun 26 16:39:04 2009 From: dan at dburkland.com (Daniel Burkland) Date: Fri Jun 26 16:39:10 2009 Subject: i386/136008: [acpi] Dell Vostro 1310 will not shutdown Message-ID: <9BF0E9EFFF8AD245AAB6AAB1542D95967CF975D1@mail> Here is the output from "iasl dburkland-DellVostro1310.asl > iasl.log" http://jperzel.net/vostro1310/current/iasl.log http://jperzel.net/vostro1310/current/iasl.core Thanks again. Dan From freebsdusb at bindone.de Sat Jun 27 11:25:06 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Sat Jun 27 11:25:14 2009 Subject: Patches to acpi_hp Message-ID: <4A46018B.90709@bindone.de> Hello, please find attached a patch to acpi_hp.c and acpi_hp.4 (and the complete files as well). This patch brings: - sysctl dev.acpi_hp.0.verbose to toggle debug output - A modification so this can deal with different array lengths when reading the CMI BIOS - now it works ok on HP Compaq nx7300 as well. - Document sysctl in man page - Add a section to manpage about hardware that has been reported to work ok Installation instructions (against latest CURRENT): patch -d /usr/src < /path/to/acpi_hp.patch cd /usr/src/sys/modules/acpi/acpi_hp make all && make install cd /usr/src/share/man/man4 make all && make install cheers Michael -------------- next part -------------- .\" Copyright (c) 2009 Michael Gmelin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd June 21, 2009 .Dt ACPI_HP 4 i386 .Os .Sh NAME .Nm acpi_hp .Nd "ACPI extras driver for HP laptops" .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device acpi_hp" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent acpi_hp_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for ACPI-controlled features found on HP laptops that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). .Pp The main purpose of this driver is to provide an interface, accessible via .Xr sysctl 8 , .Xr devd 8 and .Xr devfs 8 , through which applications can determine and change the status of various laptop components and BIOS settings. .Pp .Ss Xr devd 8 Ss Events Devd events received by .Xr devd 8 provide the following information: .Pp .Bl -tag -width "subsystem" -offset indent -compact .It system .Qq Li ACPI .It subsystem .Qq Li HP .It type The source of the event in the ACPI namespace. The value depends on the model. .It notify Event code (see below). .El .Pp Event codes: .Pp .Bl -tag -width "0xc0" -offset indent -compact .It Li 0xc0 WLAN on air status changed to 0 (not on air) .It Li 0xc1 WLAN on air status changed to 1 (on air) .It Li 0xd0 Bluetooth on air status changed to 0 (not on air) .It Li 0xd1 Bluetooth on air status changed to 1 (on air) .It Li 0xe0 WWAN on air status changed to 0 (not on air) .It Li 0xe1 WWAN on air status changed to 1 (on air) .El .Ss Xr devfs 8 Ss Device You can read /dev/hpcmi to see your current BIOS settings. The detail level can be adjusted by setting the sysctl .Va cmi_detail as described below. .Sh SYSCTL VARIABLES The following sysctls are currently implemented: .Ss WLAN: .Bl -tag -width indent .It Va dev.acpi_hp.0.wlan_enabled Toggle WLAN chip activity. .It Va dev.acpi_hp.0.wlan_radio (read-only) WLAN radio status (controlled by hardware switch) .It Va dev.acpi_hp.0.wlan_on_air (read-only) WLAN on air (chip enabled, hardware switch enabled + enabled in BIOS) .It Va dev.acpi_hp.0.wlan_enabled_if_radio_on If set to 1, the WLAN chip will be enabled if the radio is turned on .It Va dev.acpi_hp.0.wlan_disable_if_radio_off If set to 1, the WLAN chip will be disabled if the radio is turned off .El .Ss Bluetooth: .Bl -tag -width indent .It Va dev.acpi_hp.0.bt_enabled Toggle Bluetooth chip activity. .It Va dev.acpi_hp.0.bt_radio (read-only) Bluetooth radio status (controlled by hardware switch) .It Va dev.acpi_hp.0.bt_on_air (read-only) Bluetooth on air (chip enabled, hardware switch enabled + enabled in BIOS) .It Va dev.acpi_hp.0.bt_enabled_if_radio_on If set to 1, the Bluetooth chip will be enabled if the radio is turned on .It Va dev.acpi_hp.0.bt_disable_if_radio_off If set to 1, the Bluetooth chip will be disabled if the radio is turned off .El .Ss WWAN: .Bl -tag -width indent .It Va dev.acpi_hp.0.wwan_enabled Toggle WWAN chip activity. .It Va dev.acpi_hp.0.wwan_radio (read-only) WWAN radio status (controlled by hardware switch) .It Va dev.acpi_hp.0.wwan_on_air (read-only) WWAN on air (chip enabled, hardware switch enabled + enabled in BIOS) .It Va dev.acpi_hp.0.wwan_enabled_if_radio_on If set to 1, the WWAN chip will be enabled if the radio is turned on .It Va dev.acpi_hp.0.wwan_disable_if_radio_off If set to 1, the WWAN chip will be disabled if the radio is turned off .El .Ss Misc: .Bl -tag -width indent .It Va dev.acpi_hp.0.als_enabled Toggle ambient light sensor (ALS) .It Va dev.acpi_hp.0.display (read-only) Display status (bitmask) .It Va dev.acpi_hp.0.hdd_temperature (read-only) HDD temperature .It Va dev.acpi_hp.0.is_docked (read-only) Docking station status (1 if docked) .It Va dev.acpi_hp.0.cmi_detail Bitmask to control detail level in /dev/hpcmi output (values can be ORed). .Bl -tag -width "0x01" -offset indent -compact .It Li 0x01 Show path component of BIOS setting .It Li 0x02 Show a list of valid options for the BIOS setting .It Li 0x04 Show additional flags of BIOS setting (ReadOnly etc.) .El .It Va dev.acpi_hp.0.verbose (read-only) Set verbosity level .El .Pp Defaults for these sysctls can be set in .Xr sysctl.conf 5 . .Sh HARDWARE The .Nm driver has been reported to support the following hardware: .Pp .Bl -bullet -compact .It HP Compaq 8510p .It HP Compaq nx7300 .El .Pp It should work on most HP laptops that feature a WMI enabled BIOS. .Sh FILES .Bl -tag -width ".Pa /dev/hpcmi" .It Pa /dev/hpcmi Interface to read BIOS settings .El .Sh EXAMPLES The following can be added to .Xr devd.conf 5 in order disable the LAN interface when WLAN on air and reenable if it's not: .Bd -literal -offset indent notify 0 { match "system" "ACPI"; match "subsystem" "HP"; match "notify" "0xc0"; action "ifconfig em0 up"; }; notify 0 { match "system" "ACPI"; match "subsystem" "HP"; match "notify" "0xc1"; action "ifconfig em0 down"; }; .Ed .Pp Enable the ambient light sensor: .Bd -literal -offset indent sysctl dev.acpi_hp.0.als_enabled=1 .Ed .Pp Enable Bluetooth: .Bd -literal -offset indent sysctl dev.acpi_hp.0.bt_enabled=1 .Ed .Pp Get BIOS settings: .Bd -literal -offset indent cat /dev/hpcmi Serial Port Disable Infrared Port Enable Parallel Port Disable Flash Media Reader Disable USB Ports including Express Card slot Enable 1394 Port Enable Cardbus Slot Disable Express Card Slot Disable (...) .Ed .Pp Set maximum detail level for /dev/hpcmi output: .Bd -literal -offset indent sysctl dev.acpi_hp.0.cmi_detail=7 .Ed .Pp .Sh SEE ALSO .Xr acpi 4 , .Xr acpi_wmi 4 , .Xr sysctl.conf 5 , .Xr devd 8 , .Xr devfs 8 , .Xr sysctl 8 .Sh HISTORY The .Nm device driver first appeared in .Fx CURRENT . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Michael Gmelin Aq freebsd@grem.de .Pp It has been inspired by hp-wmi driver, which implements a subset of these features (hotkeys) on Linux. .Pp .Bl -tag -width indent .It HP CMI whitepaper: http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf .It wmi-hp for Linux: http://www.kernel.org .It WMI and ACPI: http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx .El .Pp This manual page was written by .An Michael Gmelin Aq freebsd@grem.de .Sh BUGS This driver is experimental and has only been tested on CURRENT i386 on an HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). Expect undefined results when operating on different hardware. .Pp Loading the driver is slow. Reading from /dev/hpcmi is even slower. .Pp Additional features like HP specific sensor readings or writing BIOS settings are not supported. -------------- next part -------------- /*- * Copyright (c) 2009 Michael Gmelin * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); /* * Driver for extra ACPI-controlled features found on HP laptops * that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). * Allows to control and read status of integrated hardware and read * BIOS settings through CMI. * Inspired by the hp-wmi driver, which implements a subset of these * features (hotkeys) on Linux. * * HP CMI whitepaper: * http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf * wmi-hp for Linux: * http://www.kernel.org * WMI and ACPI: * http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx */ #include "opt_acpi.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "acpi_wmi_if.h" #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("HP") #define ACPI_HP_WMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C" #define ACPI_HP_WMI_BIOS_GUID "5FB7F034-2C63-45E9-BE91-3D44E2C707E4" #define ACPI_HP_WMI_CMI_GUID "2D114B49-2DFB-4130-B8FE-4A3C09E75133" #define ACPI_HP_WMI_DISPLAY_COMMAND 0x1 #define ACPI_HP_WMI_HDDTEMP_COMMAND 0x2 #define ACPI_HP_WMI_ALS_COMMAND 0x3 #define ACPI_HP_WMI_DOCK_COMMAND 0x4 #define ACPI_HP_WMI_WIRELESS_COMMAND 0x5 #define ACPI_HP_METHOD_WLAN_ENABLED 1 #define ACPI_HP_METHOD_WLAN_RADIO 2 #define ACPI_HP_METHOD_WLAN_ON_AIR 3 #define ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON 4 #define ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF 5 #define ACPI_HP_METHOD_BLUETOOTH_ENABLED 6 #define ACPI_HP_METHOD_BLUETOOTH_RADIO 7 #define ACPI_HP_METHOD_BLUETOOTH_ON_AIR 8 #define ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON 9 #define ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF 10 #define ACPI_HP_METHOD_WWAN_ENABLED 11 #define ACPI_HP_METHOD_WWAN_RADIO 12 #define ACPI_HP_METHOD_WWAN_ON_AIR 13 #define ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON 14 #define ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF 15 #define ACPI_HP_METHOD_ALS 16 #define ACPI_HP_METHOD_DISPLAY 17 #define ACPI_HP_METHOD_HDDTEMP 18 #define ACPI_HP_METHOD_DOCK 19 #define ACPI_HP_METHOD_CMI_DETAIL 20 #define ACPI_HP_METHOD_VERBOSE 21 #define HP_MASK_WWAN_ON_AIR 0x1000000 #define HP_MASK_BLUETOOTH_ON_AIR 0x10000 #define HP_MASK_WLAN_ON_AIR 0x100 #define HP_MASK_WWAN_RADIO 0x8000000 #define HP_MASK_BLUETOOTH_RADIO 0x80000 #define HP_MASK_WLAN_RADIO 0x800 #define HP_MASK_WWAN_ENABLED 0x2000000 #define HP_MASK_BLUETOOTH_ENABLED 0x20000 #define HP_MASK_WLAN_ENABLED 0x200 #define ACPI_HP_CMI_DETAIL_PATHS 0x01 #define ACPI_HP_CMI_DETAIL_ENUMS 0x02 #define ACPI_HP_CMI_DETAIL_FLAGS 0x04 struct acpi_hp_inst_seq_pair { UINT32 sequence; /* sequence number as suggested by cmi bios */ UINT8 instance; /* object instance on guid */ }; struct acpi_hp_softc { device_t dev; ACPI_HANDLE handle; device_t wmi_dev; int has_notify; /* notification GUID found */ int has_cmi; /* CMI GUID found */ int cmi_detail; /* CMI detail level (set by sysctl) */ int verbose; /* add debug output */ int wlan_enable_if_radio_on; /* set by sysctl */ int wlan_disable_if_radio_off; /* set by sysctl */ int bluetooth_enable_if_radio_on; /* set by sysctl */ int bluetooth_disable_if_radio_off; /* set by sysctl */ int wwan_enable_if_radio_on; /* set by sysctl */ int wwan_disable_if_radio_off; /* set by sysctl */ int was_wlan_on_air; /* last known WLAN on air status */ int was_bluetooth_on_air; /* last known BT on air status */ int was_wwan_on_air; /* last known WWAN on air status */ struct sysctl_ctx_list *sysctl_ctx; struct sysctl_oid *sysctl_tree; struct cdev *hpcmi_dev_t; /* hpcmi device handle */ struct sbuf hpcmi_sbuf; /* /dev/hpcmi output sbuf */ pid_t hpcmi_open_pid; /* pid operating on /dev/hpcmi */ int hpcmi_bufptr; /* current pointer position in /dev/hpcmi output buffer */ int cmi_order_size; /* size of cmi_order list */ struct acpi_hp_inst_seq_pair cmi_order[128]; /* list of CMI instances ordered by BIOS suggested sequence */ }; static struct { char *name; int method; char *description; int access; } acpi_hp_sysctls[] = { { .name = "wlan_enabled", .method = ACPI_HP_METHOD_WLAN_ENABLED, .description = "Enable/Disable WLAN (WiFi)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wlan_radio", .method = ACPI_HP_METHOD_WLAN_RADIO, .description = "WLAN radio status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wlan_on_air", .method = ACPI_HP_METHOD_WLAN_ON_AIR, .description = "WLAN radio ready to use (enabled and radio)", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wlan_enable_if_radio_on", .method = ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON, .description = "Enable WLAN if radio is turned on", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wlan_disable_if_radio_off", .method = ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF, .description = "Disable WLAN if radio is turned off", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "bt_enabled", .method = ACPI_HP_METHOD_BLUETOOTH_ENABLED, .description = "Enable/Disable Bluetooth", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "bt_radio", .method = ACPI_HP_METHOD_BLUETOOTH_RADIO, .description = "Bluetooth radio status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "bt_on_air", .method = ACPI_HP_METHOD_BLUETOOTH_ON_AIR, .description = "Bluetooth radio ready to use" " (enabled and radio)", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "bt_enable_if_radio_on", .method = ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON, .description = "Enable bluetooth if radio is turned on", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "bt_disable_if_radio_off", .method = ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF, .description = "Disable bluetooth if radio is turned off", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wwan_enabled", .method = ACPI_HP_METHOD_WWAN_ENABLED, .description = "Enable/Disable WWAN (UMTS)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wwan_radio", .method = ACPI_HP_METHOD_WWAN_RADIO, .description = "WWAN radio status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wwan_on_air", .method = ACPI_HP_METHOD_WWAN_ON_AIR, .description = "WWAN radio ready to use (enabled and radio)", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wwan_enable_if_radio_on", .method = ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON, .description = "Enable WWAN if radio is turned on", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wwan_disable_if_radio_off", .method = ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF, .description = "Disable WWAN if radio is turned off", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "als_enabled", .method = ACPI_HP_METHOD_ALS, .description = "Enable/Disable ALS (Ambient light sensor)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "display", .method = ACPI_HP_METHOD_DISPLAY, .description = "Display status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "hdd_temperature", .method = ACPI_HP_METHOD_HDDTEMP, .description = "HDD temperature", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "is_docked", .method = ACPI_HP_METHOD_DOCK, .description = "Docking station status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "cmi_detail", .method = ACPI_HP_METHOD_CMI_DETAIL, .description = "Details shown in CMI output " "(cat /dev/hpcmi)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "verbose", .method = ACPI_HP_METHOD_VERBOSE, .description = "Verbosity level", .access = CTLTYPE_INT | CTLFLAG_RW }, { NULL, 0, NULL, 0 } }; ACPI_SERIAL_DECL(hp, "HP ACPI-WMI Mapping"); static int acpi_hp_probe(device_t dev); static int acpi_hp_attach(device_t dev); static int acpi_hp_detach(device_t dev); static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc* sc); static int acpi_hp_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg); static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method); static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val); static void acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context); static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, char* outbuf, size_t outsize, UINT32* sequence, int detail); static void acpi_hp_hex_decode(char* buffer); static d_open_t acpi_hp_hpcmi_open; static d_close_t acpi_hp_hpcmi_close; static d_read_t acpi_hp_hpcmi_read; /* handler /dev/hpcmi device */ static struct cdevsw hpcmi_cdevsw = { .d_version = D_VERSION, .d_open = acpi_hp_hpcmi_open, .d_close = acpi_hp_hpcmi_close, .d_read = acpi_hp_hpcmi_read, .d_name = "hpcmi", }; static device_method_t acpi_hp_methods[] = { DEVMETHOD(device_probe, acpi_hp_probe), DEVMETHOD(device_attach, acpi_hp_attach), DEVMETHOD(device_detach, acpi_hp_detach), {0, 0} }; static driver_t acpi_hp_driver = { "acpi_hp", acpi_hp_methods, sizeof(struct acpi_hp_softc), }; static devclass_t acpi_hp_devclass; DRIVER_MODULE(acpi_hp, acpi, acpi_hp_driver, acpi_hp_devclass, 0, 0); MODULE_DEPEND(acpi_hp, acpi_wmi, 1, 1, 1); MODULE_DEPEND(acpi_hp, acpi, 1, 1, 1); static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc *sc) { int wireless; int new_wlan_status; int new_bluetooth_status; int new_wwan_status; wireless = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); new_wlan_status = -1; new_bluetooth_status = -1; new_wwan_status = -1; if (sc->verbose) device_printf(sc->wmi_dev, "Wireless status is %x\n", wireless); if (sc->wlan_disable_if_radio_off && !(wireless & HP_MASK_WLAN_RADIO) && (wireless & HP_MASK_WLAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x100); new_wlan_status = 0; } else if (sc->wlan_enable_if_radio_on && (wireless & HP_MASK_WLAN_RADIO) && !(wireless & HP_MASK_WLAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x101); new_wlan_status = 1; } if (sc->bluetooth_disable_if_radio_off && !(wireless & HP_MASK_BLUETOOTH_RADIO) && (wireless & HP_MASK_BLUETOOTH_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x200); new_bluetooth_status = 0; } else if (sc->bluetooth_enable_if_radio_on && (wireless & HP_MASK_BLUETOOTH_RADIO) && !(wireless & HP_MASK_BLUETOOTH_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x202); new_bluetooth_status = 1; } if (sc->wwan_disable_if_radio_off && !(wireless & HP_MASK_WWAN_RADIO) && (wireless & HP_MASK_WWAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x400); new_wwan_status = 0; } else if (sc->wwan_enable_if_radio_on && (wireless & HP_MASK_WWAN_RADIO) && !(wireless & HP_MASK_WWAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x404); new_wwan_status = 1; } if (new_wlan_status == -1) { new_wlan_status = (wireless & HP_MASK_WLAN_ON_AIR); if ((new_wlan_status?1:0) != sc->was_wlan_on_air) { sc->was_wlan_on_air = sc->was_wlan_on_air?0:1; if (sc->verbose) device_printf(sc->wmi_dev, "WLAN on air changed to %i " "(new_wlan_status is %i)\n", sc->was_wlan_on_air, new_wlan_status); acpi_UserNotify("HP", sc->handle, 0xc0+sc->was_wlan_on_air); } } if (new_bluetooth_status == -1) { new_bluetooth_status = (wireless & HP_MASK_BLUETOOTH_ON_AIR); if ((new_bluetooth_status?1:0) != sc->was_bluetooth_on_air) { sc->was_bluetooth_on_air = sc->was_bluetooth_on_air? 0:1; if (sc->verbose) device_printf(sc->wmi_dev, "BLUETOOTH on air changed" " to %i (new_bluetooth_status is %i)\n", sc->was_bluetooth_on_air, new_bluetooth_status); acpi_UserNotify("HP", sc->handle, 0xd0+sc->was_bluetooth_on_air); } } if (new_wwan_status == -1) { new_wwan_status = (wireless & HP_MASK_WWAN_ON_AIR); if ((new_wwan_status?1:0) != sc->was_wwan_on_air) { sc->was_wwan_on_air = sc->was_wwan_on_air?0:1; if (sc->verbose) device_printf(sc->wmi_dev, "WWAN on air changed to %i" " (new_wwan_status is %i)\n", sc->was_wwan_on_air, new_wwan_status); acpi_UserNotify("HP", sc->handle, 0xe0+sc->was_wwan_on_air); } } } static int acpi_hp_probe(device_t dev) { if (acpi_disabled("hp") || device_get_unit(dev) != 0) return (ENXIO); device_set_desc(dev, "HP ACPI-WMI Mapping"); return (0); } static int acpi_hp_attach(device_t dev) { struct acpi_hp_softc *sc; struct acpi_softc *acpi_sc; devclass_t wmi_devclass; int arg; ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); sc = device_get_softc(dev); sc->dev = dev; sc->handle = acpi_get_handle(dev); sc->has_notify = 0; sc->has_cmi = 0; sc->bluetooth_enable_if_radio_on = 0; sc->bluetooth_disable_if_radio_off = 0; sc->wlan_enable_if_radio_on = 0; sc->wlan_disable_if_radio_off = 0; sc->wlan_enable_if_radio_on = 0; sc->wlan_disable_if_radio_off = 0; sc->was_wlan_on_air = 0; sc->was_bluetooth_on_air = 0; sc->was_wwan_on_air = 0; sc->cmi_detail = 0; sc->cmi_order_size = -1; sc->verbose = 0; memset(sc->cmi_order, 0, sizeof(sc->cmi_order)); acpi_sc = acpi_device_get_parent_softc(dev); if (!(wmi_devclass = devclass_find ("acpi_wmi"))) { device_printf(dev, "Couldn't find acpi_wmi devclass\n"); return (EINVAL); } if (!(sc->wmi_dev = devclass_get_device(wmi_devclass, 0))) { device_printf(dev, "Couldn't find acpi_wmi device\n"); return (EINVAL); } if (!ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_BIOS_GUID)) { device_printf(dev, "WMI device does not provide the HP BIOS GUID\n"); return (EINVAL); } if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_EVENT_GUID)) { device_printf(dev, "HP event GUID detected, installing event handler\n"); if (ACPI_WMI_INSTALL_EVENT_HANDLER(sc->wmi_dev, ACPI_HP_WMI_EVENT_GUID, acpi_hp_notify, dev)) { device_printf(dev, "Could not install notification handler!\n"); } else { sc->has_notify = 1; } } if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID)) { device_printf(dev, "HP CMI GUID detected\n"); sc->has_cmi = 1; } if (sc->has_cmi) { sc->hpcmi_dev_t = make_dev(&hpcmi_cdevsw, 0, UID_ROOT, GID_WHEEL, 0644, "hpcmi"); sc->hpcmi_dev_t->si_drv1 = sc; sc->hpcmi_open_pid = 0; sc->hpcmi_bufptr = -1; } ACPI_SERIAL_BEGIN(hp); sc->sysctl_ctx = device_get_sysctl_ctx(dev); sc->sysctl_tree = device_get_sysctl_tree(dev); for (int i = 0; acpi_hp_sysctls[i].name != NULL; ++i) { arg = 0; if ((!sc->has_notify && (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF)) || (arg = acpi_hp_sysctl_get(sc, acpi_hp_sysctls[i].method)) < 0) { continue; } if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ON_AIR) { sc->was_wlan_on_air = arg; } else if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_ON_AIR) { sc->was_bluetooth_on_air = arg; } else if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_ON_AIR) { sc->was_wwan_on_air = arg; } SYSCTL_ADD_PROC(sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, acpi_hp_sysctls[i].name, acpi_hp_sysctls[i].access, sc, i, acpi_hp_sysctl, "I", acpi_hp_sysctls[i].description); } ACPI_SERIAL_END(hp); return (0); } static int acpi_hp_detach(device_t dev) { int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); struct acpi_hp_softc *sc = device_get_softc(dev); if (sc->has_cmi && sc->hpcmi_open_pid != 0) { ret = EBUSY; } else { if (sc->has_notify) { ACPI_WMI_REMOVE_EVENT_HANDLER(dev, ACPI_HP_WMI_EVENT_GUID); } if (sc->hpcmi_bufptr != -1) { sbuf_delete(&sc->hpcmi_sbuf); sc->hpcmi_bufptr = -1; } sc->hpcmi_open_pid = 0; destroy_dev(sc->hpcmi_dev_t); ret = 0; } return (ret); } static int acpi_hp_sysctl(SYSCTL_HANDLER_ARGS) { struct acpi_hp_softc *sc; int arg; int oldarg; int error = 0; int function; int method; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = (struct acpi_hp_softc *)oidp->oid_arg1; function = oidp->oid_arg2; method = acpi_hp_sysctls[function].method; ACPI_SERIAL_BEGIN(hp); arg = acpi_hp_sysctl_get(sc, method); oldarg = arg; error = sysctl_handle_int(oidp, &arg, 0, req); if (!error && req->newptr != NULL) { error = acpi_hp_sysctl_set(sc, method, arg, oldarg); } ACPI_SERIAL_END(hp); return (error); } static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) { int val = 0; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(hp); switch (method) { case ACPI_HP_METHOD_WLAN_ENABLED: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WLAN_ENABLED) != 0); break; case ACPI_HP_METHOD_WLAN_RADIO: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WLAN_RADIO) != 0); break; case ACPI_HP_METHOD_WLAN_ON_AIR: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WLAN_ON_AIR) != 0); break; case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: val = sc->wlan_enable_if_radio_on; break; case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: val = sc->wlan_disable_if_radio_off; break; case ACPI_HP_METHOD_BLUETOOTH_ENABLED: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_BLUETOOTH_ENABLED) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_RADIO: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_BLUETOOTH_RADIO) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_ON_AIR: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_BLUETOOTH_ON_AIR) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: val = sc->bluetooth_enable_if_radio_on; break; case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: val = sc->bluetooth_disable_if_radio_off; break; case ACPI_HP_METHOD_WWAN_ENABLED: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WWAN_ENABLED) != 0); break; case ACPI_HP_METHOD_WWAN_RADIO: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WWAN_RADIO) != 0); break; case ACPI_HP_METHOD_WWAN_ON_AIR: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WWAN_ON_AIR) != 0); break; case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: val = sc->wwan_enable_if_radio_on; break; case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: val = sc->wwan_disable_if_radio_off; break; case ACPI_HP_METHOD_ALS: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_ALS_COMMAND, 0, 0); break; case ACPI_HP_METHOD_DISPLAY: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_DISPLAY_COMMAND, 0, 0); break; case ACPI_HP_METHOD_HDDTEMP: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_HDDTEMP_COMMAND, 0, 0); break; case ACPI_HP_METHOD_DOCK: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_DOCK_COMMAND, 0, 0); break; case ACPI_HP_METHOD_CMI_DETAIL: val = sc->cmi_detail; break; case ACPI_HP_METHOD_VERBOSE: val = sc->verbose; break; } return (val); } static int acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg) { ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(hp); if (method != ACPI_HP_METHOD_CMI_DETAIL && method != ACPI_HP_METHOD_VERBOSE) arg = arg?1:0; if (arg != oldarg) { switch (method) { case ACPI_HP_METHOD_WLAN_ENABLED: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x101:0x100)); case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: sc->wlan_enable_if_radio_on = arg; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: sc->wlan_disable_if_radio_off = arg; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_BLUETOOTH_ENABLED: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x202:0x200)); case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: sc->bluetooth_enable_if_radio_on = arg; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: sc->bluetooth_disable_if_radio_off = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WWAN_ENABLED: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x404:0x400)); case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: sc->wwan_enable_if_radio_on = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: sc->wwan_disable_if_radio_off = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_ALS: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_ALS_COMMAND, 1, arg?1:0)); case ACPI_HP_METHOD_CMI_DETAIL: sc->cmi_detail = arg; break; case ACPI_HP_METHOD_VERBOSE: sc->verbose = arg; break; } } return (0); } static __inline void acpi_hp_free_buffer(ACPI_BUFFER* buf) { if (buf && buf->Pointer) { AcpiOsFree(buf->Pointer); } } static void acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context) { device_t dev = context; ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); struct acpi_hp_softc *sc = device_get_softc(dev); ACPI_BUFFER response = { ACPI_ALLOCATE_BUFFER, NULL }; ACPI_OBJECT *obj; ACPI_WMI_GET_EVENT_DATA(sc->wmi_dev, notify, &response); obj = (ACPI_OBJECT*) response.Pointer; if (obj && obj->Type == ACPI_TYPE_BUFFER && obj->Buffer.Length == 8) { if (*((UINT8 *) obj->Buffer.Pointer) == 0x5) { acpi_hp_evaluate_auto_on_off(sc); } } acpi_hp_free_buffer(&response); } static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val) { UINT32 params[5] = { 0x55434553, is_write?2:1, command, is_write?4:0, val}; UINT32* result; ACPI_OBJECT *obj; ACPI_BUFFER in = { sizeof(params), ¶ms }; ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; int retval; if (ACPI_FAILURE(ACPI_WMI_EVALUATE_CALL(wmi_dev, ACPI_HP_WMI_BIOS_GUID, 0, 0x3, &in, &out))) { acpi_hp_free_buffer(&out); return (-EINVAL); } obj = out.Pointer; if (!obj || obj->Type != ACPI_TYPE_BUFFER) { acpi_hp_free_buffer(&out); return (-EINVAL); } result = (UINT32*) obj->Buffer.Pointer; retval = result[2]; if (result[1] > 0) { retval = result[1]; } acpi_hp_free_buffer(&out); return (retval); } static __inline char* acpi_hp_get_string_from_object(ACPI_OBJECT* obj, char* dst, size_t size) { int length; dst[0] = 0; if (obj->Type == ACPI_TYPE_STRING) { length = obj->String.Length+1; if (length > size) { length = size - 1; } strlcpy(dst, obj->String.Pointer, length); acpi_hp_hex_decode(dst); } return (dst); } /* * Read BIOS Setting block in instance "instance". * The block returned is ACPI_TYPE_PACKAGE which should contain the following * elements: * Index Meaning * 0 Setting Name [string] * 1 Value (comma separated, asterisk marks the current value) [string] * 2 Path within the bios hierarchy [string] * 3 IsReadOnly [int] * 4 DisplayInUI [int] * 5 RequiresPhysicalPresence [int] * 6 Sequence for ordering within the bios settings (absolute) [int] * 7 Length of prerequisites array [int] * 8..8+[7] PrerequisiteN [string] * 9+[7] Current value (in case of enum) [string] / Array length [int] * 10+[7] Enum length [int] / Array values * 11+[7]ff Enum value at index x [string] */ static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, char* outbuf, size_t outsize, UINT32* sequence, int detail) { ACPI_OBJECT *obj; ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; int i; int outlen; int size = 255; int has_enums = 0; int valuebase = 0; char string_buffer[size]; int enumbase; outlen = 0; outbuf[0] = 0; if (ACPI_FAILURE(ACPI_WMI_GET_BLOCK(wmi_dev, guid, instance, &out))) { acpi_hp_free_buffer(&out); return (-EINVAL); } obj = out.Pointer; if (!obj && obj->Type != ACPI_TYPE_PACKAGE) { acpi_hp_free_buffer(&out); return (-EINVAL); } if (obj->Package.Count >= 8 && obj->Package.Elements[7].Type == ACPI_TYPE_INTEGER) { valuebase = 8 + obj->Package.Elements[7].Integer.Value; } /* check if this matches our expectations based on limited knowledge */ if (valuebase > 7 && obj->Package.Count > valuebase + 1 && obj->Package.Elements[0].Type == ACPI_TYPE_STRING && obj->Package.Elements[1].Type == ACPI_TYPE_STRING && obj->Package.Elements[2].Type == ACPI_TYPE_STRING && obj->Package.Elements[3].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[4].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[5].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[6].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[valuebase].Type == ACPI_TYPE_STRING && obj->Package.Elements[valuebase+1].Type == ACPI_TYPE_INTEGER && obj->Package.Count > valuebase + obj->Package.Elements[valuebase+1].Integer.Value ) { enumbase = valuebase + 1; if (detail & ACPI_HP_CMI_DETAIL_PATHS) { strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[2], string_buffer, size), outsize); outlen += 48; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); } strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[0], string_buffer, size), outsize); outlen += 43; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[valuebase], string_buffer, size), outsize); outlen += 21; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); for (i = 0; i < strlen(outbuf); ++i) if (outbuf[i] == '\\') outbuf[i] = '/'; if (detail & ACPI_HP_CMI_DETAIL_ENUMS) { for (i = enumbase + 1; i < enumbase + 1 + obj->Package.Elements[enumbase].Integer.Value; ++i) { acpi_hp_get_string_from_object( &obj->Package.Elements[i], string_buffer, size); if (strlen(string_buffer) > 1 || (strlen(string_buffer) == 1 && string_buffer[0] != ' ')) { if (has_enums) strlcat(outbuf, "/", outsize); else strlcat(outbuf, " (", outsize); strlcat(outbuf, string_buffer, outsize); has_enums = 1; } } } if (has_enums) strlcat(outbuf, ")", outsize); if (detail & ACPI_HP_CMI_DETAIL_FLAGS) { strlcat(outbuf, obj->Package.Elements[3].Integer.Value? " [ReadOnly]":"", outsize); strlcat(outbuf, obj->Package.Elements[4].Integer.Value? "":" [NOUI]", outsize); strlcat(outbuf, obj->Package.Elements[5].Integer.Value? " [RPP]":"", outsize); } *sequence = (UINT32) obj->Package.Elements[6].Integer.Value; } acpi_hp_free_buffer(&out); return (0); } /* * Convert given two digit hex string (hexin) to an UINT8 referenced * by byteout. * Return != 0 if the was a problem (invalid input) */ static __inline int acpi_hp_hex_to_int(const UINT8 *hexin, UINT8 *byteout) { unsigned int hi; unsigned int lo; hi = hexin[0]; lo = hexin[1]; if ('0' <= hi && hi <= '9') hi -= '0'; else if ('A' <= hi && hi <= 'F') hi -= ('A' - 10); else if ('a' <= hi && hi <= 'f') hi -= ('a' - 10); else return (1); if ('0' <= lo && lo <= '9') lo -= '0'; else if ('A' <= lo && lo <= 'F') lo -= ('A' - 10); else if ('a' <= lo && lo <= 'f') lo -= ('a' - 10); else return (1); *byteout = (hi << 4) + lo; return (0); } static void acpi_hp_hex_decode(char* buffer) { int i; int length = strlen(buffer); UINT8 *uin; UINT8 uout; if (((int)length/2)*2 == length || length < 10) return; for (i = 0; i= '0' && buffer[i] <= '9') || (buffer[i] >= 'A' && buffer[i] <= 'F'))) return; } for (i = 0; isi_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(hp); if (sc->hpcmi_open_pid != 0) { ret = EBUSY; } else { if (sbuf_new(&sc->hpcmi_sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { ret = ENXIO; } else { sc->hpcmi_open_pid = td->td_proc->p_pid; sc->hpcmi_bufptr = 0; ret = 0; } } ACPI_SERIAL_END(hp); return (ret); } /* * close hpcmi device */ static int acpi_hp_hpcmi_close(struct cdev* dev, int flags, int mode, struct thread *td) { struct acpi_hp_softc *sc; int ret; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(hp); if (sc->hpcmi_open_pid == 0) { ret = EBADF; } else { if (sc->hpcmi_bufptr != -1) { sbuf_delete(&sc->hpcmi_sbuf); sc->hpcmi_bufptr = -1; } sc->hpcmi_open_pid = 0; ret = 0; } ACPI_SERIAL_END(hp); return (ret); } /* * Read from hpcmi bios information */ static int acpi_hp_hpcmi_read(struct cdev *dev, struct uio *buf, int flag) { struct acpi_hp_softc *sc; int pos, i, l, ret; UINT8 instance; UINT32 sequence; int linesize = 1025; char line[linesize]; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(hp); if (sc->hpcmi_open_pid != buf->uio_td->td_proc->p_pid || sc->hpcmi_bufptr == -1) { ret = EBADF; } else { if (!sbuf_done(&sc->hpcmi_sbuf)) { if (sc->cmi_order_size < 0) { sc->cmi_order_size = 0; for (instance = 0; instance < 128; ++instance) { if (acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, instance, line, linesize, &sequence, sc->cmi_detail)) { instance = 128; } else { pos = sc->cmi_order_size; for (i=0; icmi_order_size && i<127; ++i) { if (sc->cmi_order[i].sequence > sequence) { pos = i; break; } } for (i=sc->cmi_order_size; i>pos; --i) { sc->cmi_order[i].sequence = sc->cmi_order[i-1].sequence; sc->cmi_order[i].instance = sc->cmi_order[i-1].instance; } sc->cmi_order[pos].sequence = sequence; sc->cmi_order[pos].instance = instance; sc->cmi_order_size++; } } } for (i=0; icmi_order_size; ++i) { if (!acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, sc->cmi_order[i].instance, line, linesize, &sequence, sc->cmi_detail)) { sbuf_printf(&sc->hpcmi_sbuf, "%s\n", line); } } sbuf_finish(&sc->hpcmi_sbuf); } if (sbuf_len(&sc->hpcmi_sbuf) <= 0) { sbuf_delete(&sc->hpcmi_sbuf); sc->hpcmi_bufptr = -1; sc->hpcmi_open_pid = 0; ret = ENOMEM; } else { l = min(buf->uio_resid, sbuf_len(&sc->hpcmi_sbuf) - sc->hpcmi_bufptr); ret = (l > 0)?uiomove(sbuf_data(&sc->hpcmi_sbuf) + sc->hpcmi_bufptr, l, buf) : 0; sc->hpcmi_bufptr += l; } } ACPI_SERIAL_END(hp); return (ret); } -------------- next part -------------- --- share/man/man4/acpi_hp.4.orig 2009-06-26 12:50:30.005708266 +0200 +++ share/man/man4/acpi_hp.4 2009-06-26 13:03:16.331066657 +0200 @@ -166,10 +166,26 @@ .It Li 0x04 Show additional flags of BIOS setting (ReadOnly etc.) .El +.It Va dev.acpi_hp.0.verbose +(read-only) +Set verbosity level .El .Pp Defaults for these sysctls can be set in .Xr sysctl.conf 5 . +.Sh HARDWARE +The +.Nm +driver has been reported to support the following hardware: +.Pp +.Bl -bullet -compact +.It +HP Compaq 8510p +.It +HP Compaq nx7300 +.El +.Pp +It should work on most HP laptops that feature a WMI enabled BIOS. .Sh FILES .Bl -tag -width ".Pa /dev/hpcmi" .It Pa /dev/hpcmi --- sys/dev/acpi_support/acpi_hp.c.orig 2009-06-26 12:43:35.676585431 +0200 +++ sys/dev/acpi_support/acpi_hp.c 2009-06-26 12:54:46.509994426 +0200 @@ -92,6 +92,7 @@ #define ACPI_HP_METHOD_HDDTEMP 18 #define ACPI_HP_METHOD_DOCK 19 #define ACPI_HP_METHOD_CMI_DETAIL 20 +#define ACPI_HP_METHOD_VERBOSE 21 #define HP_MASK_WWAN_ON_AIR 0x1000000 #define HP_MASK_BLUETOOTH_ON_AIR 0x10000 @@ -120,6 +121,7 @@ int has_cmi; /* CMI GUID found */ int cmi_detail; /* CMI detail level (set by sysctl) */ + int verbose; /* add debug output */ int wlan_enable_if_radio_on; /* set by sysctl */ int wlan_disable_if_radio_off; /* set by sysctl */ int bluetooth_enable_if_radio_on; /* set by sysctl */ @@ -274,6 +276,12 @@ "(cat /dev/hpcmi)", .access = CTLTYPE_INT | CTLFLAG_RW }, + { + .name = "verbose", + .method = ACPI_HP_METHOD_VERBOSE, + .description = "Verbosity level", + .access = CTLTYPE_INT | CTLFLAG_RW + }, { NULL, 0, NULL, 0 } }; @@ -333,10 +341,10 @@ static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc *sc) { - int wireless; - int new_wlan_status; - int new_bluetooth_status; - int new_wwan_status; + int wireless; + int new_wlan_status; + int new_bluetooth_status; + int new_wwan_status; wireless = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); @@ -344,7 +352,8 @@ new_bluetooth_status = -1; new_wwan_status = -1; - device_printf(sc->wmi_dev, "Wireless status is %x\n", wireless); + if (sc->verbose) + device_printf(sc->wmi_dev, "Wireless status is %x\n", wireless); if (sc->wlan_disable_if_radio_off && !(wireless & HP_MASK_WLAN_RADIO) && (wireless & HP_MASK_WLAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, @@ -390,10 +399,11 @@ new_wlan_status = (wireless & HP_MASK_WLAN_ON_AIR); if ((new_wlan_status?1:0) != sc->was_wlan_on_air) { sc->was_wlan_on_air = sc->was_wlan_on_air?0:1; - device_printf(sc->wmi_dev, - "WLAN on air changed to %i " - "(new_wlan_status is %i)\n", - sc->was_wlan_on_air, new_wlan_status); + if (sc->verbose) + device_printf(sc->wmi_dev, + "WLAN on air changed to %i " + "(new_wlan_status is %i)\n", + sc->was_wlan_on_air, new_wlan_status); acpi_UserNotify("HP", sc->handle, 0xc0+sc->was_wlan_on_air); } @@ -403,9 +413,12 @@ if ((new_bluetooth_status?1:0) != sc->was_bluetooth_on_air) { sc->was_bluetooth_on_air = sc->was_bluetooth_on_air? 0:1; - device_printf(sc->wmi_dev, "BLUETOOTH on air changed" - " to %i (new_bluetooth_status is %i)\n", - sc->was_bluetooth_on_air, new_bluetooth_status); + if (sc->verbose) + device_printf(sc->wmi_dev, + "BLUETOOTH on air changed" + " to %i (new_bluetooth_status is %i)\n", + sc->was_bluetooth_on_air, + new_bluetooth_status); acpi_UserNotify("HP", sc->handle, 0xd0+sc->was_bluetooth_on_air); } @@ -414,9 +427,11 @@ new_wwan_status = (wireless & HP_MASK_WWAN_ON_AIR); if ((new_wwan_status?1:0) != sc->was_wwan_on_air) { sc->was_wwan_on_air = sc->was_wwan_on_air?0:1; - device_printf(sc->wmi_dev, "WWAN on air changed to %i" - " (new_wwan_status is %i)\n", - sc->was_wwan_on_air, new_wwan_status); + if (sc->verbose) + device_printf(sc->wmi_dev, + "WWAN on air changed to %i" + " (new_wwan_status is %i)\n", + sc->was_wwan_on_air, new_wwan_status); acpi_UserNotify("HP", sc->handle, 0xe0+sc->was_wwan_on_air); } @@ -439,7 +454,7 @@ struct acpi_hp_softc *sc; struct acpi_softc *acpi_sc; devclass_t wmi_devclass; - int arg; + int arg; ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); @@ -459,6 +474,7 @@ sc->was_wwan_on_air = 0; sc->cmi_detail = 0; sc->cmi_order_size = -1; + sc->verbose = 0; memset(sc->cmi_order, 0, sizeof(sc->cmi_order)); acpi_sc = acpi_device_get_parent_softc(dev); @@ -551,7 +567,7 @@ static int acpi_hp_detach(device_t dev) { - int ret; + int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); struct acpi_hp_softc *sc = device_get_softc(dev); @@ -578,12 +594,12 @@ static int acpi_hp_sysctl(SYSCTL_HANDLER_ARGS) { - struct acpi_hp_softc *sc; - int arg; - int oldarg; - int error = 0; - int function; - int method; + struct acpi_hp_softc *sc; + int arg; + int oldarg; + int error = 0; + int function; + int method; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -606,7 +622,7 @@ static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) { - int val = 0; + int val = 0; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(hp); @@ -694,6 +710,9 @@ case ACPI_HP_METHOD_CMI_DETAIL: val = sc->cmi_detail; break; + case ACPI_HP_METHOD_VERBOSE: + val = sc->verbose; + break; } return (val); @@ -705,7 +724,8 @@ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(hp); - if (method != ACPI_HP_METHOD_CMI_DETAIL) + if (method != ACPI_HP_METHOD_CMI_DETAIL && + method != ACPI_HP_METHOD_VERBOSE) arg = arg?1:0; if (arg != oldarg) { @@ -753,6 +773,9 @@ case ACPI_HP_METHOD_CMI_DETAIL: sc->cmi_detail = arg; break; + case ACPI_HP_METHOD_VERBOSE: + sc->verbose = arg; + break; } } @@ -788,15 +811,15 @@ static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val) { - UINT32 params[5] = { 0x55434553, - is_write?2:1, - command, - is_write?4:0, - val}; - UINT32* result; - ACPI_OBJECT *obj; - ACPI_BUFFER in = { sizeof(params), ¶ms }; - ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; + UINT32 params[5] = { 0x55434553, + is_write?2:1, + command, + is_write?4:0, + val}; + UINT32* result; + ACPI_OBJECT *obj; + ACPI_BUFFER in = { sizeof(params), ¶ms }; + ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; int retval; if (ACPI_FAILURE(ACPI_WMI_EVALUATE_CALL(wmi_dev, ACPI_HP_WMI_BIOS_GUID, @@ -821,7 +844,8 @@ static __inline char* acpi_hp_get_string_from_object(ACPI_OBJECT* obj, char* dst, size_t size) { - int length; + int length; + dst[0] = 0; if (obj->Type == ACPI_TYPE_STRING) { length = obj->String.Length+1; @@ -841,33 +865,32 @@ * The block returned is ACPI_TYPE_PACKAGE which should contain the following * elements: * Index Meaning - * 0 Setting Name [string] - * 1 Value (comma separated, asterisk marks the current value) [string] - * 2 Path within the bios hierarchy [string] - * 3 IsReadOnly [int] - * 4 DisplayInUI [int] - * 5 RequiresPhysicalPresence [int] - * 6 Sequence for ordering within the bios settings (absolute) [int] - * 7 Length of prerequisites array [int] - * 8 Prerequisite1 [string] - * 9 Prerequisite2 [string] - * 10 Prerequisite3 [string] - * 11 Current value (in case of enum) [string] / Array length [int] - * 12 Enum length [int] / Array values - * 13ff Enum value at index x [string] + * 0 Setting Name [string] + * 1 Value (comma separated, asterisk marks the current value) [string] + * 2 Path within the bios hierarchy [string] + * 3 IsReadOnly [int] + * 4 DisplayInUI [int] + * 5 RequiresPhysicalPresence [int] + * 6 Sequence for ordering within the bios settings (absolute) [int] + * 7 Length of prerequisites array [int] + * 8..8+[7] PrerequisiteN [string] + * 9+[7] Current value (in case of enum) [string] / Array length [int] + * 10+[7] Enum length [int] / Array values + * 11+[7]ff Enum value at index x [string] */ static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, char* outbuf, size_t outsize, UINT32* sequence, int detail) { - ACPI_OBJECT *obj; - ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; - int i; - int outlen; - int size = 255; - int has_enums = 0; - char string_buffer[size]; - int enumbase; + ACPI_OBJECT *obj; + ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; + int i; + int outlen; + int size = 255; + int has_enums = 0; + int valuebase = 0; + char string_buffer[size]; + int enumbase; outlen = 0; outbuf[0] = 0; @@ -881,8 +904,13 @@ return (-EINVAL); } + if (obj->Package.Count >= 8 && + obj->Package.Elements[7].Type == ACPI_TYPE_INTEGER) { + valuebase = 8 + obj->Package.Elements[7].Integer.Value; + } + /* check if this matches our expectations based on limited knowledge */ - if (obj->Package.Count >= 13 && + if (valuebase > 7 && obj->Package.Count > valuebase + 1 && obj->Package.Elements[0].Type == ACPI_TYPE_STRING && obj->Package.Elements[1].Type == ACPI_TYPE_STRING && obj->Package.Elements[2].Type == ACPI_TYPE_STRING && @@ -890,20 +918,12 @@ obj->Package.Elements[4].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[5].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[6].Type == ACPI_TYPE_INTEGER && - obj->Package.Elements[7].Type == ACPI_TYPE_INTEGER && - obj->Package.Elements[8].Type == ACPI_TYPE_STRING && - obj->Package.Elements[9].Type == ACPI_TYPE_STRING && - obj->Package.Elements[10].Type == ACPI_TYPE_STRING && - ((obj->Package.Elements[11].Type == ACPI_TYPE_STRING && - obj->Package.Elements[12].Type == ACPI_TYPE_INTEGER && - obj->Package.Count >= - 13+obj->Package.Elements[12].Integer.Value) || - (obj->Package.Elements[11].Type == ACPI_TYPE_INTEGER && - obj->Package.Count >= - 12+obj->Package.Elements[11].Integer.Value)) - ) { - enumbase = obj->Package.Elements[11].Type == ACPI_TYPE_STRING? - 12:11; + obj->Package.Elements[valuebase].Type == ACPI_TYPE_STRING && + obj->Package.Elements[valuebase+1].Type == ACPI_TYPE_INTEGER && + obj->Package.Count > valuebase + + obj->Package.Elements[valuebase+1].Integer.Value + ) { + enumbase = valuebase + 1; if (detail & ACPI_HP_CMI_DETAIL_PATHS) { strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[2], string_buffer, size), @@ -918,11 +938,10 @@ outlen += 43; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); - if (enumbase == 12) - strlcat(outbuf, acpi_hp_get_string_from_object( - &obj->Package.Elements[11], - string_buffer, size), - outsize); + strlcat(outbuf, acpi_hp_get_string_from_object( + &obj->Package.Elements[valuebase], string_buffer, + size), + outsize); outlen += 21; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); @@ -930,7 +949,7 @@ if (outbuf[i] == '\\') outbuf[i] = '/'; if (detail & ACPI_HP_CMI_DETAIL_ENUMS) { - for (i = enumbase+1; i < enumbase + 1 + + for (i = enumbase + 1; i < enumbase + 1 + obj->Package.Elements[enumbase].Integer.Value; ++i) { acpi_hp_get_string_from_object( @@ -974,8 +993,8 @@ */ static __inline int acpi_hp_hex_to_int(const UINT8 *hexin, UINT8 *byteout) { - unsigned int hi; - unsigned int lo; + unsigned int hi; + unsigned int lo; hi = hexin[0]; lo = hexin[1]; @@ -1004,10 +1023,10 @@ static void acpi_hp_hex_decode(char* buffer) { - int i; - int length = strlen(buffer); - UINT8 *uin; - UINT8 uout; + int i; + int length = strlen(buffer); + UINT8 *uin; + UINT8 uout; if (((int)length/2)*2 == length || length < 10) return; @@ -1038,8 +1057,8 @@ static int acpi_hp_hpcmi_open(struct cdev* dev, int flags, int mode, struct thread *td) { - struct acpi_hp_softc *sc; - int ret; + struct acpi_hp_softc *sc; + int ret; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); @@ -1070,8 +1089,8 @@ static int acpi_hp_hpcmi_close(struct cdev* dev, int flags, int mode, struct thread *td) { - struct acpi_hp_softc *sc; - int ret; + struct acpi_hp_softc *sc; + int ret; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); @@ -1100,12 +1119,12 @@ static int acpi_hp_hpcmi_read(struct cdev *dev, struct uio *buf, int flag) { - struct acpi_hp_softc *sc; - int pos, i, l, ret; - UINT8 instance; - UINT32 sequence; - int linesize = 1025; - char line[linesize]; + struct acpi_hp_softc *sc; + int pos, i, l, ret; + UINT8 instance; + UINT32 sequence; + int linesize = 1025; + char line[linesize]; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.tgz Type: application/octet-stream Size: 12651 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090627/e1d989ca/patch.obj From patttern at gmail.com Sat Jun 27 12:42:31 2009 From: patttern at gmail.com (Pattern) Date: Sat Jun 27 12:42:37 2009 Subject: i386/136008: [acpi] Dell Vostro 1310 will not shutdown Message-ID: <107cc88f0906270542n572b6e90y88e59db2695e920@mail.gmail.com> Try to replace this strings in dburkland-DellVostro1310.asl DefinitionBlock ("/tmp/acpidump.aml", "DSDT", 2, "TOSCPL", "CRESTLNE", 0x06040000) { External (_PSS, IntObj) External (^CPU0._PPC) with new DefinitionBlock ("dburkland-DellVostro1310.aml", "DSDT", 2, "TOSCPL", "CRESTLNE", 0x06040000) { External (_PSS, IntObj) External (\_PR.CPU0._PPC) After this change i've got a working aml dburkland-DellVostro1310.aml. Use it for acpi_dsdt. http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/acpi-debug.html #11.16.5.3 Overriding the Default AML Here is the output from "iasl dburkland-DellVostro1310.asl > iasl.log" > > http://jperzel.net/vostro1310/current/iasl.log > > http://jperzel.net/vostro1310/current/iasl.core > > Thanks again. > > Dan > > From freebsdusb at bindone.de Sat Jun 27 16:05:29 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Sat Jun 27 16:05:36 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <3a142e750906270839x41686881j13c7a73ae38586e4@mail.gmail.com> References: <4A3E1784.2050406@bindone.de> <3a142e750906232257y4b1e255en9374c05079f04520@mail.gmail.com> <4A41C2CF.4020205@bindone.de> <3a142e750906232353g37b5f001p89948a2fe6a3e66e@mail.gmail.com> <4A41E39E.1090208@bindone.de> <4A41E66D.2080504@bindone.de> <3a142e750906240347o393ea738i54fc9ce215bebab2@mail.gmail.com> <4A44AC9B.504@bindone.de> <3a142e750906270327t765077f8ta4dffed054f70c53@mail.gmail.com> <4A45FF8C.1070604@bindone.de> <3a142e750906270839x41686881j13c7a73ae38586e4@mail.gmail.com> Message-ID: <4A464343.8090502@bindone.de> Paul B. Mahol wrote: > On 6/27/09, Michael wrote: >> Paul B. Mahol wrote: >>> On 6/26/09, Michael wrote: >>>> Paul B. Mahol wrote: >>>>> On 6/24/09, Michael wrote: >>>>>> Besides the other information requested, maybe you can also tell me >>>>>> your >>>>>> exact HP model number >>>>> Here is information you requested. >>>>> >>>> Hi Paul, >>>> >>>> please find attached a patch against the current version of the acpi_hp >>>> driver in CURRENT (source and manpage). It might need some tweaking if >>>> you're testing on 7.2 (headers). I also provided the full acpi_hp.c and >>>> acpi_hp.4 versions in case you can't patch. >>>> >>>> Patch: >>>> patch -d /usr/src < /path/to/acpi_hp.patch >>>> >>>> This patch adds the sysctl dev.acpi_hp.0.verbose (as you suggested) and >>>> should fix /dev/hpcmi on your machine. >>>> >>>> Please tell me if this works, so I can send it to Raul. >>> It works. >>> But I still get acpica error: >>> >>> ACPI Error: Field [C2CA] at 336 exceeds Buffer [C281] size 328 (bits) >>> 20090521 dsopcode-697 >>> ACPI Error (psparse-0633): Method parse/execution failed >>> [\\_SB_.C241.WQBC] (Node 0xc3dcfb60), AE_AML_BUFFER_LIMIT >>> >> This is a bug in the DSDT provided by HP. The error is emitted in the >> underlying acpi layers while reading a buffer that contains more data >> then it should. The only thing you could do about this is patching your >> DSDT. > > How, what to modify? > I already modified and use custom DSTD, because one of thermal sensors > reported absurd temperature most of time ... > > Search for the field C281. Modify C281 to say 336 bits instead of 328. (this should be line 7498 in your DSDT: Name (C281, Buffer (0x29) {}) should be changed to Name (C281, Buffer (0x2A) {}) ) That's the theory, I can't tell if that has any negative side effects. It seems like that's the last BIOS entry instance in the DSDT (same here, my machine provides 57, yours 41 if I recall correctly). So changing this is absolutely your own risk + I don't think it make sense to require all users to change their DSDT anyway. If I had more evidence that this is happening with all HPs I could change the acpi_wmi kernel interface to allow querying the number of instances of the GUID and iterate only over numberofinstances-1 instances to avoid this error. What do you think of the following plan: - Extend acpi_emi to provide a method to query the number of instances of a GUID. This way acpi_hp could know the number of instances and avoid hitting the last instance - Make acpi_hp only iterate over maxinstances-1 instances - Extend cmi_detail to have an additional bit that disables this behaviour (so it behaves like it did before, assuming that there are HP notebooks that don't have these issues) - Document all of this in the man page cheers Michael From onemda at gmail.com Sun Jun 28 09:13:30 2009 From: onemda at gmail.com (Paul B. Mahol) Date: Sun Jun 28 09:13:36 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <4A464343.8090502@bindone.de> References: <4A3E1784.2050406@bindone.de> <3a142e750906232353g37b5f001p89948a2fe6a3e66e@mail.gmail.com> <4A41E39E.1090208@bindone.de> <4A41E66D.2080504@bindone.de> <3a142e750906240347o393ea738i54fc9ce215bebab2@mail.gmail.com> <4A44AC9B.504@bindone.de> <3a142e750906270327t765077f8ta4dffed054f70c53@mail.gmail.com> <4A45FF8C.1070604@bindone.de> <3a142e750906270839x41686881j13c7a73ae38586e4@mail.gmail.com> <4A464343.8090502@bindone.de> Message-ID: <3a142e750906280213l2931a573r9479c111742bcfa0@mail.gmail.com> On 6/27/09, Michael Gmelin wrote: > Paul B. Mahol wrote: >> On 6/27/09, Michael wrote: >>> Paul B. Mahol wrote: >>>> On 6/26/09, Michael wrote: >>>>> Paul B. Mahol wrote: >>>>>> On 6/24/09, Michael wrote: >>>>>>> Besides the other information requested, maybe you can also tell me >>>>>>> your >>>>>>> exact HP model number >>>>>> Here is information you requested. >>>>>> >>>>> Hi Paul, >>>>> >>>>> please find attached a patch against the current version of the acpi_hp >>>>> driver in CURRENT (source and manpage). It might need some tweaking if >>>>> you're testing on 7.2 (headers). I also provided the full acpi_hp.c and >>>>> acpi_hp.4 versions in case you can't patch. >>>>> >>>>> Patch: >>>>> patch -d /usr/src < /path/to/acpi_hp.patch >>>>> >>>>> This patch adds the sysctl dev.acpi_hp.0.verbose (as you suggested) and >>>>> should fix /dev/hpcmi on your machine. >>>>> >>>>> Please tell me if this works, so I can send it to Raul. >>>> It works. >>>> But I still get acpica error: >>>> >>>> ACPI Error: Field [C2CA] at 336 exceeds Buffer [C281] size 328 (bits) >>>> 20090521 dsopcode-697 >>>> ACPI Error (psparse-0633): Method parse/execution failed >>>> [\\_SB_.C241.WQBC] (Node 0xc3dcfb60), AE_AML_BUFFER_LIMIT >>>> >>> This is a bug in the DSDT provided by HP. The error is emitted in the >>> underlying acpi layers while reading a buffer that contains more data >>> then it should. The only thing you could do about this is patching your >>> DSDT. >> >> How, what to modify? >> I already modified and use custom DSTD, because one of thermal sensors >> reported absurd temperature most of time ... >> >> > > Search for the field C281. > Modify C281 to say 336 bits instead of 328. > (this should be line 7498 in your DSDT: > Name (C281, Buffer (0x29) {}) > should be changed to > Name (C281, Buffer (0x2A) {}) > ) > > That's the theory, I can't tell if that has any negative side effects. > It seems like that's the last BIOS entry instance in the DSDT (same > here, my machine provides 57, yours 41 if I recall correctly). So > changing this is absolutely your own risk + I don't think it make sense > to require all users to change their DSDT anyway. > > If I had more evidence that this is happening with all HPs I could > change the acpi_wmi kernel interface to allow querying the number of > instances of the GUID and iterate only over numberofinstances-1 > instances to avoid this error. I think this is best solution on long run. > What do you think of the following plan: > - Extend acpi_emi to provide a method to query the number of instances > of a GUID. This way acpi_hp could know the number of instances > and avoid hitting the last instance If querying number of instances of GUID is possible go for it. > - Make acpi_hp only iterate over maxinstances-1 instances > - Extend cmi_detail to have an additional bit that disables this > behaviour (so it behaves like it did before, assuming that there > are HP notebooks that don't have these issues) > - Document all of this in the man page Also if possible, it would be nice if acpi_hp doesn't output entries which are not available on certain laptops. -- Paul From freebsdusb at bindone.de Sun Jun 28 11:15:37 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Sun Jun 28 11:15:44 2009 Subject: Two new acpi modules, acpi_wmi and acpi_hp In-Reply-To: <3a142e750906280213l2931a573r9479c111742bcfa0@mail.gmail.com> References: <4A3E1784.2050406@bindone.de> <3a142e750906232353g37b5f001p89948a2fe6a3e66e@mail.gmail.com> <4A41E39E.1090208@bindone.de> <4A41E66D.2080504@bindone.de> <3a142e750906240347o393ea738i54fc9ce215bebab2@mail.gmail.com> <4A44AC9B.504@bindone.de> <3a142e750906270327t765077f8ta4dffed054f70c53@mail.gmail.com> <4A45FF8C.1070604@bindone.de> <3a142e750906270839x41686881j13c7a73ae38586e4@mail.gmail.com> <4A464343.8090502@bindone.de> <3a142e750906280213l2931a573r9479c111742bcfa0@mail.gmail.com> Message-ID: <4A4750D1.9040505@bindone.de> Paul B. Mahol wrote: > On 6/27/09, Michael Gmelin wrote: >> Paul B. Mahol wrote: >>> On 6/27/09, Michael wrote: >>>> Paul B. Mahol wrote: >>>>> On 6/26/09, Michael wrote: >>>>>> Paul B. Mahol wrote: >>>>>>> On 6/24/09, Michael wrote: >>>>>>>> Besides the other information requested, maybe you can also tell me >>>>>>>> your >>>>>>>> exact HP model number >>>>>>> Here is information you requested. >>>>>>> >>>>>> Hi Paul, >>>>>> >>>>>> please find attached a patch against the current version of the acpi_hp >>>>>> driver in CURRENT (source and manpage). It might need some tweaking if >>>>>> you're testing on 7.2 (headers). I also provided the full acpi_hp.c and >>>>>> acpi_hp.4 versions in case you can't patch. >>>>>> >>>>>> Patch: >>>>>> patch -d /usr/src < /path/to/acpi_hp.patch >>>>>> >>>>>> This patch adds the sysctl dev.acpi_hp.0.verbose (as you suggested) and >>>>>> should fix /dev/hpcmi on your machine. >>>>>> >>>>>> Please tell me if this works, so I can send it to Raul. >>>>> It works. >>>>> But I still get acpica error: >>>>> >>>>> ACPI Error: Field [C2CA] at 336 exceeds Buffer [C281] size 328 (bits) >>>>> 20090521 dsopcode-697 >>>>> ACPI Error (psparse-0633): Method parse/execution failed >>>>> [\\_SB_.C241.WQBC] (Node 0xc3dcfb60), AE_AML_BUFFER_LIMIT >>>>> >>>> This is a bug in the DSDT provided by HP. The error is emitted in the >>>> underlying acpi layers while reading a buffer that contains more data >>>> then it should. The only thing you could do about this is patching your >>>> DSDT. >>> How, what to modify? >>> I already modified and use custom DSTD, because one of thermal sensors >>> reported absurd temperature most of time ... >>> >>> >> Search for the field C281. >> Modify C281 to say 336 bits instead of 328. >> (this should be line 7498 in your DSDT: >> Name (C281, Buffer (0x29) {}) >> should be changed to >> Name (C281, Buffer (0x2A) {}) >> ) >> >> That's the theory, I can't tell if that has any negative side effects. >> It seems like that's the last BIOS entry instance in the DSDT (same >> here, my machine provides 57, yours 41 if I recall correctly). So >> changing this is absolutely your own risk + I don't think it make sense >> to require all users to change their DSDT anyway. >> >> If I had more evidence that this is happening with all HPs I could >> change the acpi_wmi kernel interface to allow querying the number of >> instances of the GUID and iterate only over numberofinstances-1 >> instances to avoid this error. > > I think this is best solution on long run. > >> What do you think of the following plan: >> - Extend acpi_emi to provide a method to query the number of instances >> of a GUID. This way acpi_hp could know the number of instances >> and avoid hitting the last instance > > If querying number of instances of GUID is possible go for it. > >> - Make acpi_hp only iterate over maxinstances-1 instances >> - Extend cmi_detail to have an additional bit that disables this >> behaviour (so it behaves like it did before, assuming that there >> are HP notebooks that don't have these issues) >> - Document all of this in the man page > > Also if possible, it would be nice if acpi_hp doesn't output > entries which are not available on certain laptops. > Do you mean BIOS entries? Can you give me an example? From rfreidel at gmail.com Sun Jun 28 14:32:03 2009 From: rfreidel at gmail.com (Ron Freidel) Date: Sun Jun 28 14:32:10 2009 Subject: acpi/cpu scaling probs? Dell D820 FreeBSD current Message-ID: I hope I am posting to the correct list... I have updated to FreeBSD current to try out acpi sleep, which works great by the way, and the improvements to wifi and the addition of sleep are enough to keep current on the laptop. Here's the problem, the cpu is maxed out, no scaling at all. Here's the output of powerd -v load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz load 109%, current freq 2000 MHz ( 0), wanted freq 4000 MHz load 102%, current freq 2000 MHz ( 0), wanted freq 4000 MHz load 124%, current freq 2000 MHz ( 0), wanted freq 4000 MHz load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz leroy# dmesg | grep -i cpu CPU: Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz (1997.34-MHz K8-class CPU) FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu0: on acpi0 coretemp0: on cpu0 est0: on cpu0 p4tcc0: on cpu0 cpu1: on acpi0 coretemp1: on cpu1 est1: on cpu1 p4tcc1: on cpu1 SMP: AP CPU #1 Launched! leroy# sysctl dev.cpu.0.freq dev.cpu.0.freq: 2000 Plugged in or not. Hope this is enough info. -- Ron From mav at FreeBSD.org Sun Jun 28 20:05:59 2009 From: mav at FreeBSD.org (Alexander Motin) Date: Sun Jun 28 20:06:05 2009 Subject: acpi/cpu scaling probs? Dell D820 FreeBSD current In-Reply-To: <1246213381.00133032.1246200002@10.7.7.3> References: <1246213381.00133032.1246200002@10.7.7.3> Message-ID: <4A47BCB4.2040701@FreeBSD.org> Ron Freidel wrote: > I hope I am posting to the correct list... > > I have updated to FreeBSD current to try out acpi sleep, which works great > by the way, and the improvements to wifi and the addition of sleep are > enough to keep current on the laptop. > > Here's the problem, the cpu is maxed out, no scaling at all. > > Here's the output of powerd -v > > load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > load 109%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > load 102%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > load 124%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > ^^^ This is the reason. powerd sees that one of your CPUs is constantly busy. You should investigate why and what that CPU does. -- Alexander Motin From oberman at es.net Sun Jun 28 20:32:47 2009 From: oberman at es.net (Kevin Oberman) Date: Sun Jun 28 20:32:53 2009 Subject: acpi/cpu scaling probs? Dell D820 FreeBSD current In-Reply-To: Your message of "Sun, 28 Jun 2009 21:55:48 +0300." <4A47BCB4.2040701@FreeBSD.org> Message-ID: <20090628203245.B10F01CC2E@ptavv.es.net> > Date: Sun, 28 Jun 2009 21:55:48 +0300 > From: Alexander Motin > Sender: owner-freebsd-acpi@freebsd.org > > Ron Freidel wrote: > > I hope I am posting to the correct list... > > > > I have updated to FreeBSD current to try out acpi sleep, which works great > > by the way, and the improvements to wifi and the addition of sleep are > > enough to keep current on the laptop. > > > > Here's the problem, the cpu is maxed out, no scaling at all. > > > > Here's the output of powerd -v > > > > load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > load 109%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > load 102%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > load 124%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > > ^^^ > This is the reason. powerd sees that one of your CPUs is constantly > busy. You should investigate why and what that CPU does. Agreed, but that still does not explain why it keeps trying to set the clock to 4 GHz on a 2 GHz system. Not too surprising that it does not work. :-) You have been much more involved in powerd than I have been in recent times, so maybe there is a good reason for this that I don't understand. I have not looked at the powerd sources in at least three years. I really wish more people would monitor their systems with gkrellm2, gnome-system-monitor or some KDE tool. I like gkrellm2 because it is very compact and I can leave it on my screen all of the time. When some process takes off and tries the eat the system, at least I notice it right away. (My CPU graph is currently solid green, but I am transcoding some video, so I expect if to be.) -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 From mav at FreeBSD.org Sun Jun 28 20:42:59 2009 From: mav at FreeBSD.org (Alexander Motin) Date: Sun Jun 28 20:43:18 2009 Subject: acpi/cpu scaling probs? Dell D820 FreeBSD current In-Reply-To: <20090628203245.B10F01CC2E@ptavv.es.net> References: <20090628203245.B10F01CC2E@ptavv.es.net> Message-ID: <4A47D5C8.4090701@FreeBSD.org> Kevin Oberman wrote: >> Date: Sun, 28 Jun 2009 21:55:48 +0300 >> From: Alexander Motin >> Sender: owner-freebsd-acpi@freebsd.org >> >> Ron Freidel wrote: >>> I hope I am posting to the correct list... >>> >>> I have updated to FreeBSD current to try out acpi sleep, which works great >>> by the way, and the improvements to wifi and the addition of sleep are >>> enough to keep current on the laptop. >>> >>> Here's the problem, the cpu is maxed out, no scaling at all. >>> >>> Here's the output of powerd -v >>> >>> load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz >>> load 109%, current freq 2000 MHz ( 0), wanted freq 4000 MHz >>> load 102%, current freq 2000 MHz ( 0), wanted freq 4000 MHz >>> load 124%, current freq 2000 MHz ( 0), wanted freq 4000 MHz >>> load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz >>> >> ^^^ >> This is the reason. powerd sees that one of your CPUs is constantly >> busy. You should investigate why and what that CPU does. > > Agreed, but that still does not explain why it keeps trying to set the > clock to 4 GHz on a 2 GHz system. Not too surprising that it does not > work. :-) It is not a bug, but feature. It is specific of the "hiadaptive" mode. It means that CPU is too busy now and should not drop frequency immediately after load drops to not loose system interactivity and performance. -- Alexander Motin From oberman at es.net Sun Jun 28 20:58:02 2009 From: oberman at es.net (Kevin Oberman) Date: Sun Jun 28 20:58:08 2009 Subject: acpi/cpu scaling probs? Dell D820 FreeBSD current In-Reply-To: Your message of "Sun, 28 Jun 2009 23:42:48 +0300." <4A47D5C8.4090701@FreeBSD.org> Message-ID: <20090628205800.DF09A1CC09@ptavv.es.net> > Date: Sun, 28 Jun 2009 23:42:48 +0300 > From: Alexander Motin > > Kevin Oberman wrote: > >> Date: Sun, 28 Jun 2009 21:55:48 +0300 > >> From: Alexander Motin > >> Sender: owner-freebsd-acpi@freebsd.org > >> > >> Ron Freidel wrote: > >>> I hope I am posting to the correct list... > >>> > >>> I have updated to FreeBSD current to try out acpi sleep, which works great > >>> by the way, and the improvements to wifi and the addition of sleep are > >>> enough to keep current on the laptop. > >>> > >>> Here's the problem, the cpu is maxed out, no scaling at all. > >>> > >>> Here's the output of powerd -v > >>> > >>> load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > >>> load 109%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > >>> load 102%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > >>> load 124%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > >>> load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > >>> > >> ^^^ > >> This is the reason. powerd sees that one of your CPUs is constantly > >> busy. You should investigate why and what that CPU does. > > > > Agreed, but that still does not explain why it keeps trying to set the > > clock to 4 GHz on a 2 GHz system. Not too surprising that it does not > > work. :-) > > It is not a bug, but feature. It is specific of the "hiadaptive" mode. > It means that CPU is too busy now and should not drop frequency > immediately after load drops to not loose system interactivity and > performance. Thanks! This makes excellent sense. I think I need to switch mine to hiadaptive, at least on AC. Now, it Ron can get his CPU under control, I think things will be normal on his system. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 From mav at FreeBSD.org Sun Jun 28 21:10:21 2009 From: mav at FreeBSD.org (Alexander Motin) Date: Sun Jun 28 21:10:26 2009 Subject: acpi/cpu scaling probs? Dell D820 FreeBSD current In-Reply-To: <20090628205800.DF09A1CC09@ptavv.es.net> References: <20090628205800.DF09A1CC09@ptavv.es.net> Message-ID: <4A47DC32.90408@FreeBSD.org> Kevin Oberman wrote: > Thanks! This makes excellent sense. I think I need to switch mine to > hiadaptive, at least on AC. Now, it Ron can get his CPU under control, I > think things will be normal on his system. It is actually default now: adaptive on battery, hiadaptive on AC. -- Alexander Motin From bugmaster at FreeBSD.org Mon Jun 29 11:06:52 2009 From: bugmaster at FreeBSD.org (FreeBSD bugmaster) Date: Mon Jun 29 11:07:09 2009 Subject: Current problem reports assigned to freebsd-acpi@FreeBSD.org Message-ID: <200906291106.n5TB6pUR046208@freefall.freebsd.org> 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 i386/136008 acpi [acpi] Dell Vostro 1310 will not shutdown (Requires us o bin/135349 acpi [patch] teach acpidump(8) to disassemble arbitrary mem o kern/135070 acpi [acpi] [patch] BIOS resource allocation and FreeBSD AC 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 f 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 amd64/121439 acpi [boot] Installation of FreeBSD 7.0 fails: ACPI problem 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 50 problems total. From rfreidel at gmail.com Mon Jun 29 14:49:39 2009 From: rfreidel at gmail.com (Ron Freidel) Date: Mon Jun 29 14:49:46 2009 Subject: acpi/cpu scaling probs? Dell D820 FreeBSD current In-Reply-To: <20090628205800.DF09A1CC09@ptavv.es.net> References: <4A47D5C8.4090701@FreeBSD.org> <20090628205800.DF09A1CC09@ptavv.es.net> Message-ID: On Sun, Jun 28, 2009 at 1:58 PM, Kevin Oberman wrote: > > Date: Sun, 28 Jun 2009 23:42:48 +0300 > > From: Alexander Motin > > > > Kevin Oberman wrote: > > >> Date: Sun, 28 Jun 2009 21:55:48 +0300 > > >> From: Alexander Motin > > >> Sender: owner-freebsd-acpi@freebsd.org > > >> > > >> Ron Freidel wrote: > > >>> I hope I am posting to the correct list... > > >>> > > >>> I have updated to FreeBSD current to try out acpi sleep, which works > great > > >>> by the way, and the improvements to wifi and the addition of sleep > are > > >>> enough to keep current on the laptop. > > >>> > > >>> Here's the problem, the cpu is maxed out, no scaling at all. > > >>> > > >>> Here's the output of powerd -v > > >>> > > >>> load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > >>> load 109%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > >>> load 102%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > >>> load 124%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > >>> load 108%, current freq 2000 MHz ( 0), wanted freq 4000 MHz > > >>> > > > I feel so inept... but I did almost all my usual "debugging" all except for running top, if I had then I would have seen hald was running cpu1 at 100%. There was nothing in /var/log, dmesg didn't reveal anything, no boot errors, but when I did load current I used mainly the console, just wanted to see if acpi sleep really worked, but got to liking the improvements, so then I ran X/gnome to copy/paste to my email. Gnome from 7.2 ran on current all except for hald and fuse. Need to do a full upgrade now... Thanks everyone. -- Ron From freebsdusb at bindone.de Mon Jun 29 15:33:23 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Mon Jun 29 15:33:31 2009 Subject: New patchset for acpi_wmi/acpi_hp Message-ID: <4A48DEB8.1040808@bindone.de> Hello, please find attached more patches against CURRENT of today. These patches include the patches I've sent on the 27th. So the complete feature list of this patchset is: acpi_wmi_if: Document different semantics for ACPI_WMI_PROVIDES_GUID_STRING_METHOD acpi_wmi.c: Modify acpi_wmi_provides_guid_string_method to return absolut number of instances known for the given GUID. acpi_hp.c: - sysctl dev.acpi_hp.0.verbose to toggle debug output - A modification so this can deal with different array lengths when reading the CMI BIOS - now it works ok on HP Compaq nx7300 as well. - Change behaviour to query only max_instance-1 CMI BIOS instances, because all HPs seen so far are broken in that respect (or there is a fundamental misunderstanding on my side, possible as well). This way a disturbing ACPI Error Field exceeds Buffer message is avoided. - New bit to set on dev.acpi_hp.0.cmi_detail (0x8) to also query the highest guid instance of CMI bios acpi_hp.4: - Document dev.acpi_hp.0.verbose sysctl in man page - Document new bit for dev.acpi_hp.0.cmi_detail - Add a section to manpage about hardware that has been reported to work ok Installation instructions (against latest CURRENT): patch -d /usr/src < /path/to/acpi_wmi_acpi_hp.patch cd /usr/src/sys/modules/acpi/acpi_wmi make all && make install cd /usr/src/sys/modules/acpi/acpi_hp make all && make install cd /usr/src/share/man/man4 make all && make install cheers Michael -------------- next part -------------- --- share/man/man4/acpi_hp.4.orig 2009-06-26 13:03:16.331066657 +0200 +++ share/man/man4/acpi_hp.4 2009-06-29 17:19:18.544247949 +0200 @@ -165,6 +165,9 @@ Show a list of valid options for the BIOS setting .It Li 0x04 Show additional flags of BIOS setting (ReadOnly etc.) +.It Li 0x08 +Query highest BIOS entry instance. This is broken on many HP models and +therefore disabled by default. .El .It Va dev.acpi_hp.0.verbose (read-only) --- sys/dev/acpi_support/acpi_hp.c.orig 2009-06-26 12:54:46.509994426 +0200 +++ sys/dev/acpi_support/acpi_hp.c 2009-06-29 17:18:30.928244238 +0200 @@ -107,6 +107,7 @@ #define ACPI_HP_CMI_DETAIL_PATHS 0x01 #define ACPI_HP_CMI_DETAIL_ENUMS 0x02 #define ACPI_HP_CMI_DETAIL_FLAGS 0x04 +#define ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE 0x08 struct acpi_hp_inst_seq_pair { UINT32 sequence; /* sequence number as suggested by cmi bios */ @@ -505,9 +506,10 @@ sc->has_notify = 1; } } - if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID)) { + if ((sc->has_cmi = + ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID) + )) { device_printf(dev, "HP CMI GUID detected\n"); - sc->has_cmi = 1; } if (sc->has_cmi) { @@ -772,6 +774,10 @@ arg?1:0)); case ACPI_HP_METHOD_CMI_DETAIL: sc->cmi_detail = arg; + if ((arg & ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE) != + (oldarg & ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE)) { + sc->cmi_order_size = -1; + } break; case ACPI_HP_METHOD_VERBOSE: sc->verbose = arg; @@ -1122,6 +1128,7 @@ struct acpi_hp_softc *sc; int pos, i, l, ret; UINT8 instance; + UINT8 maxInstance; UINT32 sequence; int linesize = 1025; char line[linesize]; @@ -1138,14 +1145,20 @@ else { if (!sbuf_done(&sc->hpcmi_sbuf)) { if (sc->cmi_order_size < 0) { + maxInstance = sc->has_cmi; + if (!(sc->cmi_detail & + ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE) && + maxInstance > 0) { + maxInstance--; + } sc->cmi_order_size = 0; - for (instance = 0; instance < 128; + for (instance = 0; instance < maxInstance; ++instance) { if (acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, instance, line, linesize, &sequence, sc->cmi_detail)) { - instance = 128; + instance = maxInstance; } else { pos = sc->cmi_order_size; --- sys/dev/acpi_support/acpi_wmi.c.orig 2009-06-21 22:27:26.897414000 +0200 +++ sys/dev/acpi_support/acpi_wmi.c 2009-06-29 17:17:39.554824991 +0200 @@ -326,11 +326,13 @@ static int acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string) { + struct wmi_info *winfo; int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_BEGIN(acpi_wmi); - ret = (acpi_wmi_lookup_wmi_info_by_guid_string(guid_string) == NULL)?0:1; + winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string); + ret = (winfo == NULL)?0:winfo->ginfo.max_instance+1; ACPI_SERIAL_END(acpi_wmi); return (ret); --- sys/dev/acpi_support/acpi_wmi_if.m.orig 2009-06-21 22:27:31.119098000 +0200 +++ sys/dev/acpi_support/acpi_wmi_if.m 2009-06-29 17:18:38.217246332 +0200 @@ -46,6 +46,7 @@ # # Check if given GUID exists in WMI +# Returns number of instances (max_instace+1) or 0 if guid doesn't exist # # device_t dev: Device to probe # const char* guid_string: String form of the GUID -------------- next part -------------- A non-text attachment was scrubbed... Name: patchset.tgz Type: application/octet-stream Size: 1785 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090629/0b852c45/patchset.obj From dan at dburkland.com Mon Jun 29 17:40:28 2009 From: dan at dburkland.com (Daniel Burkland) Date: Mon Jun 29 17:40:33 2009 Subject: i386/136008: [acpi] Dell Vostro 1310 will not shutdown Message-ID: <9BF0E9EFFF8AD245AAB6AAB1542D95967CF975D8@mail> I perform the tasks listed and made sure to enable dsdt in loader.conf and it still produces the same AE_NO_HARDWARE_RESPONSE errors upon shutdown -p. Again I appreciate your help! Dan From rpaulo at freebsd.org Tue Jun 30 09:52:11 2009 From: rpaulo at freebsd.org (Rui Paulo) Date: Tue Jun 30 09:52:43 2009 Subject: New patchset for acpi_wmi/acpi_hp In-Reply-To: <4A48DEB8.1040808@bindone.de> References: <4A48DEB8.1040808@bindone.de> Message-ID: <83012DEA-D524-49CA-A8D2-6B03E69C4ED5@freebsd.org> On 29 Jun 2009, at 16:33, Michael Gmelin wrote: > Hello, > > please find attached more patches against CURRENT of today. These > patches include the patches I've sent on the 27th. Committed, thanks. -- Rui Paulo From freebsdusb at bindone.de Tue Jun 30 10:08:29 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Tue Jun 30 10:08:35 2009 Subject: New patchset for acpi_wmi/acpi_hp In-Reply-To: <83012DEA-D524-49CA-A8D2-6B03E69C4ED5@freebsd.org> References: <4A48DEB8.1040808@bindone.de> <83012DEA-D524-49CA-A8D2-6B03E69C4ED5@freebsd.org> Message-ID: <4A49E411.1060509@bindone.de> Rui Paulo wrote: > > On 29 Jun 2009, at 16:33, Michael Gmelin wrote: > >> Hello, >> >> please find attached more patches against CURRENT of today. These >> patches include the patches I've sent on the 27th. > > Committed, thanks. > > -- > Rui Paulo > cool thanks, this should be pretty stable and clean enough so I don't expect any changes besides adding supported hardware to the man page in the near future (keeping my fingers crossed :) From freebsdusb at bindone.de Tue Jun 30 12:16:07 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Tue Jun 30 12:16:13 2009 Subject: Patches to acpi_hp In-Reply-To: <25cb30906300503g4e11290xd18818238c5a4bb3@mail.gmail.com> References: <4A46018B.90709@bindone.de> <25cb30906300118idb4a3avb5cf1633cdebc460@mail.gmail.com> <4A49CBEB.3030007@bindone.de> <25cb30906300135v20db01ecre0dd103c3a7651c@mail.gmail.com> <4A49D498.600@bindone.de> <25cb30906300212p43a7127q2ce92f95c1fcb64@mail.gmail.com> <4A49E9F4.5010803@bindone.de> <25cb30906300423q2d61bbf6t6bb42f6c362fef2e@mail.gmail.com> <25cb30906300441y4eb862abk9e12313d6b257354@mail.gmail.com> <4A49FD78.90405@bindone.de> <25cb30906300503g4e11290xd18818238c5a4bb3@mail.gmail.com> Message-ID: <4A4A01F3.1080004@bindone.de> Kevin Foo wrote: > On Tue, Jun 30, 2009 at 7:56 PM, Michael Gmelin wrote: > >> It seems like all acpi stuff is disabled on amd64. >> >> Could you try kldloading acpi_ibm (should give the same results) >> >> > acpi seems ok on amd64.I have acpi_video and acpi_ibm loaded without any > issue. > > zeus# uname -a > FreeBSD zeus.m0m0.org 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #0: Tue Jun 30 > 18:29:59 MYT 2009 chflags@zeus.m0m0.org:/usr/obj/usr/src/sys/ZEUS amd64 > zeus# kldload acpi_ibm > zeus# kldstat | grep acpi > 8 1 0xffffffff808bd000 5cc8 acpi_video.ko > 35 1 0xffffffff80c4b000 1dfe acpi_ibm.ko > > It's GENERIC amd64 with most devices commented out. > Interesting. Did you do this on the same machine? Have acpi_wmi and acpi_hp been really updated on make install (timestamps approx. the same as for acpi_ibm)? I hereby post this to the general mailing list, because I have no amd64 system to test on and I'm pretty sure I'm not aware of some nuts and bolts required to get that up and running on AMD64. Just for the records: On i386 the module also works on 7.2-RELEASE and HP Compaq Presario V3400 is supported as well. From freebsdusb at bindone.de Tue Jun 30 12:33:17 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Tue Jun 30 12:33:23 2009 Subject: Patches to acpi_hp In-Reply-To: <25cb30906300525j650a601cr77f0740f56168e53@mail.gmail.com> References: <4A46018B.90709@bindone.de> <25cb30906300135v20db01ecre0dd103c3a7651c@mail.gmail.com> <4A49D498.600@bindone.de> <25cb30906300212p43a7127q2ce92f95c1fcb64@mail.gmail.com> <4A49E9F4.5010803@bindone.de> <25cb30906300423q2d61bbf6t6bb42f6c362fef2e@mail.gmail.com> <25cb30906300441y4eb862abk9e12313d6b257354@mail.gmail.com> <4A49FD78.90405@bindone.de> <25cb30906300503g4e11290xd18818238c5a4bb3@mail.gmail.com> <4A4A01F3.1080004@bindone.de> <25cb30906300525j650a601cr77f0740f56168e53@mail.gmail.com> Message-ID: <4A4A05FA.8000305@bindone.de> Kevin Foo wrote: > On Tue, Jun 30, 2009 at 8:15 PM, Michael Gmelin wrote: > >> Interesting. Did you do this on the same machine? Have acpi_wmi and >> acpi_hp been really updated on make install (timestamps approx. the same >> as for acpi_ibm)? >> >> I hereby post this to the general mailing list, because I have no amd64 >> system to test on and I'm pretty sure I'm not aware of some nuts and >> bolts required to get that up and running on AMD64. >> >> Just for the records: >> On i386 the module also works on 7.2-RELEASE and HP Compaq Presario >> V3400 is supported as well. >> > > > Tiny missing nut attached. :) > > > %dmesg | grep ACPI > ACPI APIC Table: > Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > pcib1: at device 2.0 on pci0 > pci1: on pcib1 > pcib2: at device 3.0 on pci0 > pci3: on pcib2 > acpi_video0: on vgapci0 > pcib3: at device 16.0 on pci0 > pci5: on pcib3 > battery0: on acpi0 > cpu0: on acpi0 > cpu1: on acpi0 > acpi_wmi0: on acpi0 > acpi_hp0: on acpi0 > %kldstat | grep acpi > 8 1 0xffffffff808bd000 5cc8 acpi_video.ko > 32 1 0xffffffff80c4b000 26c8 acpi_hp.ko > 33 1 0xffffffff80c4e000 1c08 acpi_wmi.ko > > Michael, thank for the excellent work and kind help. > Ah.. actually that has been done on CURRENT, so I just missed it. Thanks for pointing that out. Did you try all the major features on amd64? If yes, I will update the manpage accordingly saying that it has been tested successfully on amd64 (and HP PCompaq Presario V3400). Michael From chflags at gmail.com Tue Jun 30 12:38:01 2009 From: chflags at gmail.com (Kevin Foo) Date: Tue Jun 30 12:38:08 2009 Subject: Patches to acpi_hp In-Reply-To: <4A4A05FA.8000305@bindone.de> References: <4A46018B.90709@bindone.de> <25cb30906300212p43a7127q2ce92f95c1fcb64@mail.gmail.com> <4A49E9F4.5010803@bindone.de> <25cb30906300423q2d61bbf6t6bb42f6c362fef2e@mail.gmail.com> <25cb30906300441y4eb862abk9e12313d6b257354@mail.gmail.com> <4A49FD78.90405@bindone.de> <25cb30906300503g4e11290xd18818238c5a4bb3@mail.gmail.com> <4A4A01F3.1080004@bindone.de> <25cb30906300525j650a601cr77f0740f56168e53@mail.gmail.com> <4A4A05FA.8000305@bindone.de> Message-ID: <25cb30906300537y5fae18afo7c34d5fda170fff3@mail.gmail.com> On Tue, Jun 30, 2009 at 8:32 PM, Michael Gmelin wrote: > > Ah.. actually that has been done on CURRENT, so I just missed it. Thanks > for pointing that out. > > Did you try all the major features on amd64? If yes, I will update the > manpage accordingly saying that it has been tested successfully on amd64 > (and HP PCompaq Presario V3400). > > Michael > Hi Michael, I'm currently exploring it. So far, it was good on HP compaq presario V3400 both i386 and amd64 arch, # sysctl dev.acpi_hp.0.bt_enabled=1 dmesg :- ugen0: on uhub0 # sysctl dev.acpi_hp.0.bt_enabled=0 dmesg :- ugen0: at uhub0 port 4 (addr 2) disconnected ugen0: detached Thanks! -- Regards Kevin Foo From chflags at gmail.com Tue Jun 30 12:54:02 2009 From: chflags at gmail.com (Kevin Foo) Date: Tue Jun 30 12:54:09 2009 Subject: Patches to acpi_hp In-Reply-To: <25cb30906300537y5fae18afo7c34d5fda170fff3@mail.gmail.com> References: <4A46018B.90709@bindone.de> <4A49E9F4.5010803@bindone.de> <25cb30906300423q2d61bbf6t6bb42f6c362fef2e@mail.gmail.com> <25cb30906300441y4eb862abk9e12313d6b257354@mail.gmail.com> <4A49FD78.90405@bindone.de> <25cb30906300503g4e11290xd18818238c5a4bb3@mail.gmail.com> <4A4A01F3.1080004@bindone.de> <25cb30906300525j650a601cr77f0740f56168e53@mail.gmail.com> <4A4A05FA.8000305@bindone.de> <25cb30906300537y5fae18afo7c34d5fda170fff3@mail.gmail.com> Message-ID: <25cb30906300554u4ef7e638naa0dfe51bac3e83f@mail.gmail.com> On Tue, Jun 30, 2009 at 8:37 PM, Kevin Foo wrote: > Hi Michael, > > I'm currently exploring it. So far, it was good on HP compaq presario V3400 > both i386 and amd64 arch, > > # sysctl dev.acpi_hp.0.bt_enabled=1 > > dmesg :- > ugen0: addr 2> on uhub0 > > # sysctl dev.acpi_hp.0.bt_enabled=0 > > dmesg :- > ugen0: at uhub0 port 4 (addr 2) disconnected > ugen0: detached > > Thanks! > > -- > Regards > Kevin Foo Michael, Controlling via sysctl works well so far. The hpcmi device is missing though. Perhaps I missed any patch for that? zeus# cat /dev/hpcmi cat: /dev/hpcmi: No such file or directory zeus# sysctl -a | grep dev.acpi dev.acpi.0.%desc: HPQOEM SLIC-MPC dev.acpi.0.%driver: acpi dev.acpi.0.%parent: nexus0 dev.acpi_sysresource.0.%desc: System Resource dev.acpi_sysresource.0.%driver: acpi_sysresource dev.acpi_sysresource.0.%location: handle=\_SB_.PCI0.LPC0.MBRD dev.acpi_sysresource.0.%pnpinfo: _HID=PNP0C02 _UID=31 dev.acpi_sysresource.0.%parent: acpi0 dev.acpi_sysresource.1.%desc: System Resource dev.acpi_sysresource.1.%driver: acpi_sysresource dev.acpi_sysresource.1.%location: handle=\_SB_.PCI0.LPC0.PMIO dev.acpi_sysresource.1.%pnpinfo: _HID=PNP0C02 _UID=3 dev.acpi_sysresource.1.%parent: acpi0 dev.acpi_sysresource.2.%desc: System Resource dev.acpi_sysresource.2.%driver: acpi_sysresource dev.acpi_sysresource.2.%location: handle=\_SB_.PCI0.SYS0 dev.acpi_sysresource.2.%pnpinfo: _HID=PNP0C02 _UID=1 dev.acpi_sysresource.2.%parent: acpi0 dev.acpi_timer.0.%desc: 24-bit timer at 3.579545MHz dev.acpi_timer.0.%driver: acpi_timer dev.acpi_timer.0.%location: unknown dev.acpi_timer.0.%pnpinfo: unknown dev.acpi_timer.0.%parent: acpi0 dev.acpi_ec.0.%desc: Embedded Controller: GPE 0x1 dev.acpi_ec.0.%driver: acpi_ec dev.acpi_ec.0.%location: handle=\_SB_.PCI0.EC0_ dev.acpi_ec.0.%pnpinfo: _HID=PNP0C09 _UID=0 dev.acpi_ec.0.%parent: acpi0 dev.acpi_hpet.0.%desc: High Precision Event Timer dev.acpi_hpet.0.%driver: acpi_hpet dev.acpi_hpet.0.%location: unknown dev.acpi_hpet.0.%pnpinfo: unknown dev.acpi_hpet.0.%parent: acpi0 dev.acpi_lid.0.%desc: Control Method Lid Switch dev.acpi_lid.0.%driver: acpi_lid dev.acpi_lid.0.%location: handle=\_SB_.LID0 dev.acpi_lid.0.%pnpinfo: _HID=PNP0C0D _UID=0 dev.acpi_lid.0.%parent: acpi0 dev.acpi_lid.0.wake: 1 dev.acpi_button.0.%desc: Sleep Button dev.acpi_button.0.%driver: acpi_button dev.acpi_button.0.%location: handle=\_SB_.SLPB dev.acpi_button.0.%pnpinfo: _HID=PNP0C0E _UID=0 dev.acpi_button.0.%parent: acpi0 dev.acpi_button.0.wake: 1 dev.acpi_button.1.%desc: Power Button dev.acpi_button.1.%driver: acpi_button dev.acpi_button.1.%location: handle=\_SB_.PWRB dev.acpi_button.1.%pnpinfo: _HID=PNP0C0C _UID=0 dev.acpi_button.1.%parent: acpi0 dev.acpi_video.0.%desc: ACPI video extension dev.acpi_video.0.%driver: acpi_video dev.acpi_video.0.%parent: vgapci0 dev.acpi_tz.0.%desc: Thermal Zone dev.acpi_tz.0.%driver: acpi_tz dev.acpi_tz.0.%location: handle=\_TZ_.TZS0 dev.acpi_tz.0.%pnpinfo: _HID=none _UID=0 dev.acpi_tz.0.%parent: acpi0 dev.acpi_tz.1.%desc: Thermal Zone dev.acpi_tz.1.%driver: acpi_tz dev.acpi_tz.1.%location: handle=\_TZ_.TZS1 dev.acpi_tz.1.%pnpinfo: _HID=none _UID=0 dev.acpi_tz.1.%parent: acpi0 dev.acpi_acad.0.%desc: AC Adapter dev.acpi_acad.0.%driver: acpi_acad dev.acpi_acad.0.%location: handle=\_SB_.PCI0.EC0_.ADP1 dev.acpi_acad.0.%pnpinfo: _HID=ACPI0003 _UID=0 dev.acpi_acad.0.%parent: acpi0 dev.acpi_perf.0.%driver: acpi_perf dev.acpi_perf.0.%parent: cpu0 dev.acpi_perf.1.%driver: acpi_perf dev.acpi_perf.1.%parent: cpu1 dev.acpi_wmi.0.%desc: ACPI-WMI mapping dev.acpi_wmi.0.%driver: acpi_wmi dev.acpi_wmi.0.%location: handle=\_SB_.WMID dev.acpi_wmi.0.%pnpinfo: _HID=PNP0C14 _UID=0 dev.acpi_wmi.0.%parent: acpi0 dev.acpi_hp.0.%desc: HP ACPI-WMI Mapping dev.acpi_hp.0.%driver: acpi_hp dev.acpi_hp.0.%location: handle=\_SB_.QLBD dev.acpi_hp.0.%pnpinfo: _HID=HPQ0006 _UID=0 dev.acpi_hp.0.%parent: acpi0 dev.acpi_hp.0.wlan_enabled: 1 dev.acpi_hp.0.wlan_radio: 1 dev.acpi_hp.0.wlan_on_air: 1 dev.acpi_hp.0.wlan_enable_if_radio_on: 0 dev.acpi_hp.0.wlan_disable_if_radio_off: 0 dev.acpi_hp.0.bt_enabled: 0 dev.acpi_hp.0.bt_radio: 1 dev.acpi_hp.0.bt_on_air: 0 dev.acpi_hp.0.bt_enable_if_radio_on: 0 dev.acpi_hp.0.bt_disable_if_radio_off: 0 dev.acpi_hp.0.wwan_enabled: 0 dev.acpi_hp.0.wwan_radio: 0 dev.acpi_hp.0.wwan_on_air: 0 dev.acpi_hp.0.wwan_enable_if_radio_on: 0 dev.acpi_hp.0.wwan_disable_if_radio_off: 0 dev.acpi_hp.0.als_enabled: 4 dev.acpi_hp.0.display: 1 dev.acpi_hp.0.hdd_temperature: 4 dev.acpi_hp.0.is_docked: 4 dev.acpi_hp.0.cmi_detail: 0 zeus# sysctl dev.acpi_hp.0.cmi_detail=7 dev.acpi_hp.0.cmi_detail: 0 -> 7 -- Regards Kevin Foo From chflags at gmail.com Tue Jun 30 12:58:21 2009 From: chflags at gmail.com (Kevin Foo) Date: Tue Jun 30 12:58:27 2009 Subject: Patches to acpi_hp In-Reply-To: <4A4A01F3.1080004@bindone.de> References: <4A46018B.90709@bindone.de> <25cb30906300135v20db01ecre0dd103c3a7651c@mail.gmail.com> <4A49D498.600@bindone.de> <25cb30906300212p43a7127q2ce92f95c1fcb64@mail.gmail.com> <4A49E9F4.5010803@bindone.de> <25cb30906300423q2d61bbf6t6bb42f6c362fef2e@mail.gmail.com> <25cb30906300441y4eb862abk9e12313d6b257354@mail.gmail.com> <4A49FD78.90405@bindone.de> <25cb30906300503g4e11290xd18818238c5a4bb3@mail.gmail.com> <4A4A01F3.1080004@bindone.de> Message-ID: <25cb30906300525j650a601cr77f0740f56168e53@mail.gmail.com> On Tue, Jun 30, 2009 at 8:15 PM, Michael Gmelin wrote: > Interesting. Did you do this on the same machine? Have acpi_wmi and > acpi_hp been really updated on make install (timestamps approx. the same > as for acpi_ibm)? > > I hereby post this to the general mailing list, because I have no amd64 > system to test on and I'm pretty sure I'm not aware of some nuts and > bolts required to get that up and running on AMD64. > > Just for the records: > On i386 the module also works on 7.2-RELEASE and HP Compaq Presario > V3400 is supported as well. > Tiny missing nut attached. :) %dmesg | grep ACPI ACPI APIC Table: Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 2.0 on pci0 pci1: on pcib1 pcib2: at device 3.0 on pci0 pci3: on pcib2 acpi_video0: on vgapci0 pcib3: at device 16.0 on pci0 pci5: on pcib3 battery0: on acpi0 cpu0: on acpi0 cpu1: on acpi0 acpi_wmi0: on acpi0 acpi_hp0: on acpi0 %kldstat | grep acpi 8 1 0xffffffff808bd000 5cc8 acpi_video.ko 32 1 0xffffffff80c4b000 26c8 acpi_hp.ko 33 1 0xffffffff80c4e000 1c08 acpi_wmi.ko Michael, thank for the excellent work and kind help. -- Regards Kevin Foo -------------- next part -------------- A non-text attachment was scrubbed... Name: files.amd64.patch Type: application/octet-stream Size: 478 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20090630/767b3110/files.amd64.obj From freebsdusb at bindone.de Tue Jun 30 13:11:40 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Tue Jun 30 13:11:47 2009 Subject: Patches to acpi_hp In-Reply-To: <25cb30906300554u4ef7e638naa0dfe51bac3e83f@mail.gmail.com> References: <4A46018B.90709@bindone.de> <4A49E9F4.5010803@bindone.de> <25cb30906300423q2d61bbf6t6bb42f6c362fef2e@mail.gmail.com> <25cb30906300441y4eb862abk9e12313d6b257354@mail.gmail.com> <4A49FD78.90405@bindone.de> <25cb30906300503g4e11290xd18818238c5a4bb3@mail.gmail.com> <4A4A01F3.1080004@bindone.de> <25cb30906300525j650a601cr77f0740f56168e53@mail.gmail.com> <4A4A05FA.8000305@bindone.de> <25cb30906300537y5fae18afo7c34d5fda170fff3@mail.gmail.com> <25cb30906300554u4ef7e638naa0dfe51bac3e83f@mail.gmail.com> Message-ID: <4A4A0EF6.1080800@bindone.de> Kevin Foo wrote: > On Tue, Jun 30, 2009 at 8:37 PM, Kevin Foo wrote: > >> Hi Michael, >> >> I'm currently exploring it. So far, it was good on HP compaq presario V3400 >> both i386 and amd64 arch, >> >> # sysctl dev.acpi_hp.0.bt_enabled=1 >> >> dmesg :- >> ugen0: > addr 2> on uhub0 >> >> # sysctl dev.acpi_hp.0.bt_enabled=0 >> >> dmesg :- >> ugen0: at uhub0 port 4 (addr 2) disconnected >> ugen0: detached >> >> Thanks! >> >> -- >> Regards >> Kevin Foo > > > > Michael, > > Controlling via sysctl works well so far. The hpcmi device is missing > though. Perhaps I missed any patch for that? > > zeus# cat /dev/hpcmi > cat: /dev/hpcmi: No such file or directory > > zeus# sysctl -a | grep dev.acpi > dev.acpi.0.%desc: HPQOEM SLIC-MPC > dev.acpi.0.%driver: acpi > dev.acpi.0.%parent: nexus0 > dev.acpi_sysresource.0.%desc: System Resource > dev.acpi_sysresource.0.%driver: acpi_sysresource > dev.acpi_sysresource.0.%location: handle=\_SB_.PCI0.LPC0.MBRD > dev.acpi_sysresource.0.%pnpinfo: _HID=PNP0C02 _UID=31 > dev.acpi_sysresource.0.%parent: acpi0 > dev.acpi_sysresource.1.%desc: System Resource > dev.acpi_sysresource.1.%driver: acpi_sysresource > dev.acpi_sysresource.1.%location: handle=\_SB_.PCI0.LPC0.PMIO > dev.acpi_sysresource.1.%pnpinfo: _HID=PNP0C02 _UID=3 > dev.acpi_sysresource.1.%parent: acpi0 > dev.acpi_sysresource.2.%desc: System Resource > dev.acpi_sysresource.2.%driver: acpi_sysresource > dev.acpi_sysresource.2.%location: handle=\_SB_.PCI0.SYS0 > dev.acpi_sysresource.2.%pnpinfo: _HID=PNP0C02 _UID=1 > dev.acpi_sysresource.2.%parent: acpi0 > dev.acpi_timer.0.%desc: 24-bit timer at 3.579545MHz > dev.acpi_timer.0.%driver: acpi_timer > dev.acpi_timer.0.%location: unknown > dev.acpi_timer.0.%pnpinfo: unknown > dev.acpi_timer.0.%parent: acpi0 > dev.acpi_ec.0.%desc: Embedded Controller: GPE 0x1 > dev.acpi_ec.0.%driver: acpi_ec > dev.acpi_ec.0.%location: handle=\_SB_.PCI0.EC0_ > dev.acpi_ec.0.%pnpinfo: _HID=PNP0C09 _UID=0 > dev.acpi_ec.0.%parent: acpi0 > dev.acpi_hpet.0.%desc: High Precision Event Timer > dev.acpi_hpet.0.%driver: acpi_hpet > dev.acpi_hpet.0.%location: unknown > dev.acpi_hpet.0.%pnpinfo: unknown > dev.acpi_hpet.0.%parent: acpi0 > dev.acpi_lid.0.%desc: Control Method Lid Switch > dev.acpi_lid.0.%driver: acpi_lid > dev.acpi_lid.0.%location: handle=\_SB_.LID0 > dev.acpi_lid.0.%pnpinfo: _HID=PNP0C0D _UID=0 > dev.acpi_lid.0.%parent: acpi0 > dev.acpi_lid.0.wake: 1 > dev.acpi_button.0.%desc: Sleep Button > dev.acpi_button.0.%driver: acpi_button > dev.acpi_button.0.%location: handle=\_SB_.SLPB > dev.acpi_button.0.%pnpinfo: _HID=PNP0C0E _UID=0 > dev.acpi_button.0.%parent: acpi0 > dev.acpi_button.0.wake: 1 > dev.acpi_button.1.%desc: Power Button > dev.acpi_button.1.%driver: acpi_button > dev.acpi_button.1.%location: handle=\_SB_.PWRB > dev.acpi_button.1.%pnpinfo: _HID=PNP0C0C _UID=0 > dev.acpi_button.1.%parent: acpi0 > dev.acpi_video.0.%desc: ACPI video extension > dev.acpi_video.0.%driver: acpi_video > dev.acpi_video.0.%parent: vgapci0 > dev.acpi_tz.0.%desc: Thermal Zone > dev.acpi_tz.0.%driver: acpi_tz > dev.acpi_tz.0.%location: handle=\_TZ_.TZS0 > dev.acpi_tz.0.%pnpinfo: _HID=none _UID=0 > dev.acpi_tz.0.%parent: acpi0 > dev.acpi_tz.1.%desc: Thermal Zone > dev.acpi_tz.1.%driver: acpi_tz > dev.acpi_tz.1.%location: handle=\_TZ_.TZS1 > dev.acpi_tz.1.%pnpinfo: _HID=none _UID=0 > dev.acpi_tz.1.%parent: acpi0 > dev.acpi_acad.0.%desc: AC Adapter > dev.acpi_acad.0.%driver: acpi_acad > dev.acpi_acad.0.%location: handle=\_SB_.PCI0.EC0_.ADP1 > dev.acpi_acad.0.%pnpinfo: _HID=ACPI0003 _UID=0 > dev.acpi_acad.0.%parent: acpi0 > dev.acpi_perf.0.%driver: acpi_perf > dev.acpi_perf.0.%parent: cpu0 > dev.acpi_perf.1.%driver: acpi_perf > dev.acpi_perf.1.%parent: cpu1 > dev.acpi_wmi.0.%desc: ACPI-WMI mapping > dev.acpi_wmi.0.%driver: acpi_wmi > dev.acpi_wmi.0.%location: handle=\_SB_.WMID > dev.acpi_wmi.0.%pnpinfo: _HID=PNP0C14 _UID=0 > dev.acpi_wmi.0.%parent: acpi0 > dev.acpi_hp.0.%desc: HP ACPI-WMI Mapping > dev.acpi_hp.0.%driver: acpi_hp > dev.acpi_hp.0.%location: handle=\_SB_.QLBD > dev.acpi_hp.0.%pnpinfo: _HID=HPQ0006 _UID=0 > dev.acpi_hp.0.%parent: acpi0 > dev.acpi_hp.0.wlan_enabled: 1 > dev.acpi_hp.0.wlan_radio: 1 > dev.acpi_hp.0.wlan_on_air: 1 > dev.acpi_hp.0.wlan_enable_if_radio_on: 0 > dev.acpi_hp.0.wlan_disable_if_radio_off: 0 > dev.acpi_hp.0.bt_enabled: 0 > dev.acpi_hp.0.bt_radio: 1 > dev.acpi_hp.0.bt_on_air: 0 > dev.acpi_hp.0.bt_enable_if_radio_on: 0 > dev.acpi_hp.0.bt_disable_if_radio_off: 0 > dev.acpi_hp.0.wwan_enabled: 0 > dev.acpi_hp.0.wwan_radio: 0 > dev.acpi_hp.0.wwan_on_air: 0 > dev.acpi_hp.0.wwan_enable_if_radio_on: 0 > dev.acpi_hp.0.wwan_disable_if_radio_off: 0 > dev.acpi_hp.0.als_enabled: 4 > dev.acpi_hp.0.display: 1 > dev.acpi_hp.0.hdd_temperature: 4 > dev.acpi_hp.0.is_docked: 4 > dev.acpi_hp.0.cmi_detail: 0 > > zeus# sysctl dev.acpi_hp.0.cmi_detail=7 > dev.acpi_hp.0.cmi_detail: 0 -> 7 > Can you send me the output you get when kldloading acpi_hp + the output of cat /dev/wmistat. In addition the output of acpidump -dt would be useful. It's possible that your laptop doesn't support CMI. From freebsdusb at bindone.de Tue Jun 30 17:32:29 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Tue Jun 30 17:32:36 2009 Subject: Patches to acpi_hp In-Reply-To: <25cb30906300943k4871313ao69595498c1758730@mail.gmail.com> References: <4A46018B.90709@bindone.de> <25cb30906300441y4eb862abk9e12313d6b257354@mail.gmail.com> <4A49FD78.90405@bindone.de> <25cb30906300503g4e11290xd18818238c5a4bb3@mail.gmail.com> <4A4A01F3.1080004@bindone.de> <25cb30906300525j650a601cr77f0740f56168e53@mail.gmail.com> <4A4A05FA.8000305@bindone.de> <25cb30906300537y5fae18afo7c34d5fda170fff3@mail.gmail.com> <25cb30906300554u4ef7e638naa0dfe51bac3e83f@mail.gmail.com> <4A4A0EF6.1080800@bindone.de> <25cb30906300943k4871313ao69595498c1758730@mail.gmail.com> Message-ID: <4A4A4C19.6000407@bindone.de> Kevin Foo wrote: > On Tue, Jun 30, 2009 at 9:11 PM, Michael Gmelin wrote: > >> Can you send me the output you get when kldloading acpi_hp + the output >> of cat /dev/wmistat. >> >> In addition the output of >> acpidump -dt >> >> would be useful. >> >> It's possible that your laptop doesn't support CMI. >> > > When kldloading acpi_hp, dmesg showed up these line. > > acpi_wmi0: on acpi0 > acpi_hp0: on acpi0 > acpi_hp0: HP event GUID detected, installing event handler > > zeus# cat /dev/wmistat > GUID INST EXPE METH STR EVENT OID > {5FB7F034-2C63-45E9-BE91-3D44E2C707E4} 1 NO WMAD NO NO AD > {95F24279-4D7B-4334-9387-ACCDC67EF61C} 1 NO NO NO 0x80+ - > {05901221-D566-11D1-B2F0-00A0C9062910} 1 NO NO NO NO AE > {D0992BD4-A47C-4EFE-B072-324AEC92296C} 1 NO NO NO NO BC > > Please find the attached acpidump output.If you need further info, please > let me know. Thank you. > Hi Kevin, it seems like your model doesn't support this feature, sorry. Michael From onemda at gmail.com Tue Jun 30 18:22:17 2009 From: onemda at gmail.com (Paul B. Mahol) Date: Tue Jun 30 18:22:23 2009 Subject: New patchset for acpi_wmi/acpi_hp In-Reply-To: <4A49E411.1060509@bindone.de> References: <4A48DEB8.1040808@bindone.de> <83012DEA-D524-49CA-A8D2-6B03E69C4ED5@freebsd.org> <4A49E411.1060509@bindone.de> Message-ID: <3a142e750906301122j792fb80qeb07783cbf8ea1c2@mail.gmail.com> On 6/30/09, Michael Gmelin wrote: > Rui Paulo wrote: >> >> On 29 Jun 2009, at 16:33, Michael Gmelin wrote: >> >>> Hello, >>> >>> please find attached more patches against CURRENT of today. These >>> patches include the patches I've sent on the 27th. Everything points they do not. >> >> Committed, thanks. >> >> -- >> Rui Paulo >> > cool thanks, this should be pretty stable and clean enough so I don't > expect any changes besides adding supported hardware to the man page in > the near future (keeping my fingers crossed :) > For some reason patches used for this commit do not have anywhere "verbose" sysctl in code, and cat /dev/hpcmi doesnt work for me using code from CURRENT. Better side of story is that acpica no longer complains about DTD. Sorry, I really should noticed and reported this much before ... -- Paul From freebsdusb at bindone.de Tue Jun 30 18:46:08 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Tue Jun 30 18:46:14 2009 Subject: New patchset for acpi_wmi/acpi_hp In-Reply-To: <3a142e750906301122j792fb80qeb07783cbf8ea1c2@mail.gmail.com> References: <4A48DEB8.1040808@bindone.de> <83012DEA-D524-49CA-A8D2-6B03E69C4ED5@freebsd.org> <4A49E411.1060509@bindone.de> <3a142e750906301122j792fb80qeb07783cbf8ea1c2@mail.gmail.com> Message-ID: <4A4A5D5C.3000400@bindone.de> Paul B. Mahol wrote: > On 6/30/09, Michael Gmelin wrote: >> Rui Paulo wrote: >>> On 29 Jun 2009, at 16:33, Michael Gmelin wrote: >>> >>>> Hello, >>>> >>>> please find attached more patches against CURRENT of today. These >>>> patches include the patches I've sent on the 27th. > > Everything points they do not. > >>> Committed, thanks. >>> >>> -- >>> Rui Paulo >>> >> cool thanks, this should be pretty stable and clean enough so I don't >> expect any changes besides adding supported hardware to the man page in >> the near future (keeping my fingers crossed :) >> > > For some reason patches used for this commit do not have anywhere "verbose" > sysctl in code, and cat /dev/hpcmi doesnt work for me using code from CURRENT. > Better side of story is that acpica no longer complains about DTD. > > > Sorry, I really should noticed and reported this much before ... > Damnit, you're right. Don't know what actually happened. Sorry Rui, can you help me out? Thanks Michael From rpaulo at freebsd.org Tue Jun 30 18:48:45 2009 From: rpaulo at freebsd.org (Rui Paulo) Date: Tue Jun 30 18:48:51 2009 Subject: New patchset for acpi_wmi/acpi_hp In-Reply-To: <4A4A5D5C.3000400@bindone.de> References: <4A48DEB8.1040808@bindone.de> <83012DEA-D524-49CA-A8D2-6B03E69C4ED5@freebsd.org> <4A49E411.1060509@bindone.de> <3a142e750906301122j792fb80qeb07783cbf8ea1c2@mail.gmail.com> <4A4A5D5C.3000400@bindone.de> Message-ID: <569A23CD-0CDE-454D-BF8A-A37BA3BE1020@freebsd.org> On 30 Jun 2009, at 19:45, Michael Gmelin wrote: > Paul B. Mahol wrote: >> On 6/30/09, Michael Gmelin wrote: >>> Rui Paulo wrote: >>>> On 29 Jun 2009, at 16:33, Michael Gmelin wrote: >>>> >>>>> Hello, >>>>> >>>>> please find attached more patches against CURRENT of today. These >>>>> patches include the patches I've sent on the 27th. >> >> Everything points they do not. >> >>>> Committed, thanks. >>>> >>>> -- >>>> Rui Paulo >>>> >>> cool thanks, this should be pretty stable and clean enough so I >>> don't >>> expect any changes besides adding supported hardware to the man >>> page in >>> the near future (keeping my fingers crossed :) >>> >> >> For some reason patches used for this commit do not have anywhere >> "verbose" >> sysctl in code, and cat /dev/hpcmi doesnt work for me using code >> from CURRENT. >> Better side of story is that acpica no longer complains about DTD. >> >> >> Sorry, I really should noticed and reported this much before ... >> > Damnit, you're right. Don't know what actually happened. > > Sorry Rui, can you help me out? Yes. Send me the correct patch. -- Rui Paulo From freebsdusb at bindone.de Tue Jun 30 18:52:24 2009 From: freebsdusb at bindone.de (Michael Gmelin) Date: Tue Jun 30 18:52:32 2009 Subject: New patchset for acpi_wmi/acpi_hp In-Reply-To: <4A4A5D5C.3000400@bindone.de> References: <4A48DEB8.1040808@bindone.de> <83012DEA-D524-49CA-A8D2-6B03E69C4ED5@freebsd.org> <4A49E411.1060509@bindone.de> <3a142e750906301122j792fb80qeb07783cbf8ea1c2@mail.gmail.com> <4A4A5D5C.3000400@bindone.de> Message-ID: <4A4A5ED1.2060600@bindone.de> Michael Gmelin wrote: > Paul B. Mahol wrote: >> On 6/30/09, Michael Gmelin wrote: >>> Rui Paulo wrote: >>>> On 29 Jun 2009, at 16:33, Michael Gmelin wrote: >>>> >>>>> Hello, >>>>> >>>>> please find attached more patches against CURRENT of today. These >>>>> patches include the patches I've sent on the 27th. >> Everything points they do not. >> >>>> Committed, thanks. >>>> >>>> -- >>>> Rui Paulo >>>> >>> cool thanks, this should be pretty stable and clean enough so I don't >>> expect any changes besides adding supported hardware to the man page in >>> the near future (keeping my fingers crossed :) >>> >> For some reason patches used for this commit do not have anywhere "verbose" >> sysctl in code, and cat /dev/hpcmi doesnt work for me using code from CURRENT. >> Better side of story is that acpica no longer complains about DTD. >> >> >> Sorry, I really should noticed and reported this much before ... >> > Damnit, you're right. Don't know what actually happened. > > Sorry Rui, can you help me out? > > Thanks > Michael > > _______________________________________________ > 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" Please find attached the sources the way the should look like. Again big sorry, seems like I've been very confused doing that. Tell me if I should try to make a new patchset against these files based on current. /&!$%"?! :( @Paulo: Maybe you can verify if these files compile ok and provide everything promised (background: My machine runs a very old current and I basically have to "port" that stuff into a current sourcetree to create patchsets.. seems like I missed a generation in there). Michael -------------- next part -------------- .\" Copyright (c) 2009 Michael Gmelin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" $FreeBSD$ .\" .Dd June 21, 2009 .Dt ACPI_HP 4 i386 .Os .Sh NAME .Nm acpi_hp .Nd "ACPI extras driver for HP laptops" .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: .Bd -ragged -offset indent .Cd "device acpi_hp" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent acpi_hp_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for ACPI-controlled features found on HP laptops that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). .Pp The main purpose of this driver is to provide an interface, accessible via .Xr sysctl 8 , .Xr devd 8 and .Xr devfs 8 , through which applications can determine and change the status of various laptop components and BIOS settings. .Pp .Ss Xr devd 8 Ss Events Devd events received by .Xr devd 8 provide the following information: .Pp .Bl -tag -width "subsystem" -offset indent -compact .It system .Qq Li ACPI .It subsystem .Qq Li HP .It type The source of the event in the ACPI namespace. The value depends on the model. .It notify Event code (see below). .El .Pp Event codes: .Pp .Bl -tag -width "0xc0" -offset indent -compact .It Li 0xc0 WLAN on air status changed to 0 (not on air) .It Li 0xc1 WLAN on air status changed to 1 (on air) .It Li 0xd0 Bluetooth on air status changed to 0 (not on air) .It Li 0xd1 Bluetooth on air status changed to 1 (on air) .It Li 0xe0 WWAN on air status changed to 0 (not on air) .It Li 0xe1 WWAN on air status changed to 1 (on air) .El .Ss Xr devfs 8 Ss Device You can read /dev/hpcmi to see your current BIOS settings. The detail level can be adjusted by setting the sysctl .Va cmi_detail as described below. .Sh SYSCTL VARIABLES The following sysctls are currently implemented: .Ss WLAN: .Bl -tag -width indent .It Va dev.acpi_hp.0.wlan_enabled Toggle WLAN chip activity. .It Va dev.acpi_hp.0.wlan_radio (read-only) WLAN radio status (controlled by hardware switch) .It Va dev.acpi_hp.0.wlan_on_air (read-only) WLAN on air (chip enabled, hardware switch enabled + enabled in BIOS) .It Va dev.acpi_hp.0.wlan_enabled_if_radio_on If set to 1, the WLAN chip will be enabled if the radio is turned on .It Va dev.acpi_hp.0.wlan_disable_if_radio_off If set to 1, the WLAN chip will be disabled if the radio is turned off .El .Ss Bluetooth: .Bl -tag -width indent .It Va dev.acpi_hp.0.bt_enabled Toggle Bluetooth chip activity. .It Va dev.acpi_hp.0.bt_radio (read-only) Bluetooth radio status (controlled by hardware switch) .It Va dev.acpi_hp.0.bt_on_air (read-only) Bluetooth on air (chip enabled, hardware switch enabled + enabled in BIOS) .It Va dev.acpi_hp.0.bt_enabled_if_radio_on If set to 1, the Bluetooth chip will be enabled if the radio is turned on .It Va dev.acpi_hp.0.bt_disable_if_radio_off If set to 1, the Bluetooth chip will be disabled if the radio is turned off .El .Ss WWAN: .Bl -tag -width indent .It Va dev.acpi_hp.0.wwan_enabled Toggle WWAN chip activity. .It Va dev.acpi_hp.0.wwan_radio (read-only) WWAN radio status (controlled by hardware switch) .It Va dev.acpi_hp.0.wwan_on_air (read-only) WWAN on air (chip enabled, hardware switch enabled + enabled in BIOS) .It Va dev.acpi_hp.0.wwan_enabled_if_radio_on If set to 1, the WWAN chip will be enabled if the radio is turned on .It Va dev.acpi_hp.0.wwan_disable_if_radio_off If set to 1, the WWAN chip will be disabled if the radio is turned off .El .Ss Misc: .Bl -tag -width indent .It Va dev.acpi_hp.0.als_enabled Toggle ambient light sensor (ALS) .It Va dev.acpi_hp.0.display (read-only) Display status (bitmask) .It Va dev.acpi_hp.0.hdd_temperature (read-only) HDD temperature .It Va dev.acpi_hp.0.is_docked (read-only) Docking station status (1 if docked) .It Va dev.acpi_hp.0.cmi_detail Bitmask to control detail level in /dev/hpcmi output (values can be ORed). .Bl -tag -width "0x01" -offset indent -compact .It Li 0x01 Show path component of BIOS setting .It Li 0x02 Show a list of valid options for the BIOS setting .It Li 0x04 Show additional flags of BIOS setting (ReadOnly etc.) .It Li 0x08 Query highest BIOS entry instance. This is broken on many HP models and therefore disabled by default. .El .It Va dev.acpi_hp.0.verbose (read-only) Set verbosity level .El .Pp Defaults for these sysctls can be set in .Xr sysctl.conf 5 . .Sh HARDWARE The .Nm driver has been reported to support the following hardware: .Pp .Bl -bullet -compact .It HP Compaq 8510p .It HP Compaq nx7300 .El .Pp It should work on most HP laptops that feature a WMI enabled BIOS. .Sh FILES .Bl -tag -width ".Pa /dev/hpcmi" .It Pa /dev/hpcmi Interface to read BIOS settings .El .Sh EXAMPLES The following can be added to .Xr devd.conf 5 in order disable the LAN interface when WLAN on air and reenable if it's not: .Bd -literal -offset indent notify 0 { match "system" "ACPI"; match "subsystem" "HP"; match "notify" "0xc0"; action "ifconfig em0 up"; }; notify 0 { match "system" "ACPI"; match "subsystem" "HP"; match "notify" "0xc1"; action "ifconfig em0 down"; }; .Ed .Pp Enable the ambient light sensor: .Bd -literal -offset indent sysctl dev.acpi_hp.0.als_enabled=1 .Ed .Pp Enable Bluetooth: .Bd -literal -offset indent sysctl dev.acpi_hp.0.bt_enabled=1 .Ed .Pp Get BIOS settings: .Bd -literal -offset indent cat /dev/hpcmi Serial Port Disable Infrared Port Enable Parallel Port Disable Flash Media Reader Disable USB Ports including Express Card slot Enable 1394 Port Enable Cardbus Slot Disable Express Card Slot Disable (...) .Ed .Pp Set maximum detail level for /dev/hpcmi output: .Bd -literal -offset indent sysctl dev.acpi_hp.0.cmi_detail=7 .Ed .Pp .Sh SEE ALSO .Xr acpi 4 , .Xr acpi_wmi 4 , .Xr sysctl.conf 5 , .Xr devd 8 , .Xr devfs 8 , .Xr sysctl 8 .Sh HISTORY The .Nm device driver first appeared in .Fx CURRENT . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Michael Gmelin Aq freebsd@grem.de .Pp It has been inspired by hp-wmi driver, which implements a subset of these features (hotkeys) on Linux. .Pp .Bl -tag -width indent .It HP CMI whitepaper: http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf .It wmi-hp for Linux: http://www.kernel.org .It WMI and ACPI: http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx .El .Pp This manual page was written by .An Michael Gmelin Aq freebsd@grem.de .Sh BUGS This driver is experimental and has only been tested on CURRENT i386 on an HP Compaq 8510p which featured all supported wireless devices (WWAN/BT/WLAN). Expect undefined results when operating on different hardware. .Pp Loading the driver is slow. Reading from /dev/hpcmi is even slower. .Pp Additional features like HP specific sensor readings or writing BIOS settings are not supported. -------------- next part -------------- /*- * Copyright (c) 2009 Michael Gmelin * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); /* * Driver for extra ACPI-controlled features found on HP laptops * that use a WMI enabled BIOS (e.g. HP Compaq 8510p and 6510p). * Allows to control and read status of integrated hardware and read * BIOS settings through CMI. * Inspired by the hp-wmi driver, which implements a subset of these * features (hotkeys) on Linux. * * HP CMI whitepaper: * http://h20331.www2.hp.com/Hpsub/downloads/cmi_whitepaper.pdf * wmi-hp for Linux: * http://www.kernel.org * WMI and ACPI: * http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx */ #include "opt_acpi.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "acpi_wmi_if.h" #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("HP") #define ACPI_HP_WMI_EVENT_GUID "95F24279-4D7B-4334-9387-ACCDC67EF61C" #define ACPI_HP_WMI_BIOS_GUID "5FB7F034-2C63-45E9-BE91-3D44E2C707E4" #define ACPI_HP_WMI_CMI_GUID "2D114B49-2DFB-4130-B8FE-4A3C09E75133" #define ACPI_HP_WMI_DISPLAY_COMMAND 0x1 #define ACPI_HP_WMI_HDDTEMP_COMMAND 0x2 #define ACPI_HP_WMI_ALS_COMMAND 0x3 #define ACPI_HP_WMI_DOCK_COMMAND 0x4 #define ACPI_HP_WMI_WIRELESS_COMMAND 0x5 #define ACPI_HP_METHOD_WLAN_ENABLED 1 #define ACPI_HP_METHOD_WLAN_RADIO 2 #define ACPI_HP_METHOD_WLAN_ON_AIR 3 #define ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON 4 #define ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF 5 #define ACPI_HP_METHOD_BLUETOOTH_ENABLED 6 #define ACPI_HP_METHOD_BLUETOOTH_RADIO 7 #define ACPI_HP_METHOD_BLUETOOTH_ON_AIR 8 #define ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON 9 #define ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF 10 #define ACPI_HP_METHOD_WWAN_ENABLED 11 #define ACPI_HP_METHOD_WWAN_RADIO 12 #define ACPI_HP_METHOD_WWAN_ON_AIR 13 #define ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON 14 #define ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF 15 #define ACPI_HP_METHOD_ALS 16 #define ACPI_HP_METHOD_DISPLAY 17 #define ACPI_HP_METHOD_HDDTEMP 18 #define ACPI_HP_METHOD_DOCK 19 #define ACPI_HP_METHOD_CMI_DETAIL 20 #define ACPI_HP_METHOD_VERBOSE 21 #define HP_MASK_WWAN_ON_AIR 0x1000000 #define HP_MASK_BLUETOOTH_ON_AIR 0x10000 #define HP_MASK_WLAN_ON_AIR 0x100 #define HP_MASK_WWAN_RADIO 0x8000000 #define HP_MASK_BLUETOOTH_RADIO 0x80000 #define HP_MASK_WLAN_RADIO 0x800 #define HP_MASK_WWAN_ENABLED 0x2000000 #define HP_MASK_BLUETOOTH_ENABLED 0x20000 #define HP_MASK_WLAN_ENABLED 0x200 #define ACPI_HP_CMI_DETAIL_PATHS 0x01 #define ACPI_HP_CMI_DETAIL_ENUMS 0x02 #define ACPI_HP_CMI_DETAIL_FLAGS 0x04 #define ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE 0x08 struct acpi_hp_inst_seq_pair { UINT32 sequence; /* sequence number as suggested by cmi bios */ UINT8 instance; /* object instance on guid */ }; struct acpi_hp_softc { device_t dev; ACPI_HANDLE handle; device_t wmi_dev; int has_notify; /* notification GUID found */ int has_cmi; /* CMI GUID found */ int cmi_detail; /* CMI detail level (set by sysctl) */ int verbose; /* add debug output */ int wlan_enable_if_radio_on; /* set by sysctl */ int wlan_disable_if_radio_off; /* set by sysctl */ int bluetooth_enable_if_radio_on; /* set by sysctl */ int bluetooth_disable_if_radio_off; /* set by sysctl */ int wwan_enable_if_radio_on; /* set by sysctl */ int wwan_disable_if_radio_off; /* set by sysctl */ int was_wlan_on_air; /* last known WLAN on air status */ int was_bluetooth_on_air; /* last known BT on air status */ int was_wwan_on_air; /* last known WWAN on air status */ struct sysctl_ctx_list *sysctl_ctx; struct sysctl_oid *sysctl_tree; struct cdev *hpcmi_dev_t; /* hpcmi device handle */ struct sbuf hpcmi_sbuf; /* /dev/hpcmi output sbuf */ pid_t hpcmi_open_pid; /* pid operating on /dev/hpcmi */ int hpcmi_bufptr; /* current pointer position in /dev/hpcmi output buffer */ int cmi_order_size; /* size of cmi_order list */ struct acpi_hp_inst_seq_pair cmi_order[128]; /* list of CMI instances ordered by BIOS suggested sequence */ }; static struct { char *name; int method; char *description; int access; } acpi_hp_sysctls[] = { { .name = "wlan_enabled", .method = ACPI_HP_METHOD_WLAN_ENABLED, .description = "Enable/Disable WLAN (WiFi)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wlan_radio", .method = ACPI_HP_METHOD_WLAN_RADIO, .description = "WLAN radio status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wlan_on_air", .method = ACPI_HP_METHOD_WLAN_ON_AIR, .description = "WLAN radio ready to use (enabled and radio)", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wlan_enable_if_radio_on", .method = ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON, .description = "Enable WLAN if radio is turned on", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wlan_disable_if_radio_off", .method = ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF, .description = "Disable WLAN if radio is turned off", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "bt_enabled", .method = ACPI_HP_METHOD_BLUETOOTH_ENABLED, .description = "Enable/Disable Bluetooth", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "bt_radio", .method = ACPI_HP_METHOD_BLUETOOTH_RADIO, .description = "Bluetooth radio status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "bt_on_air", .method = ACPI_HP_METHOD_BLUETOOTH_ON_AIR, .description = "Bluetooth radio ready to use" " (enabled and radio)", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "bt_enable_if_radio_on", .method = ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON, .description = "Enable bluetooth if radio is turned on", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "bt_disable_if_radio_off", .method = ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF, .description = "Disable bluetooth if radio is turned off", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wwan_enabled", .method = ACPI_HP_METHOD_WWAN_ENABLED, .description = "Enable/Disable WWAN (UMTS)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wwan_radio", .method = ACPI_HP_METHOD_WWAN_RADIO, .description = "WWAN radio status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wwan_on_air", .method = ACPI_HP_METHOD_WWAN_ON_AIR, .description = "WWAN radio ready to use (enabled and radio)", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "wwan_enable_if_radio_on", .method = ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON, .description = "Enable WWAN if radio is turned on", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "wwan_disable_if_radio_off", .method = ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF, .description = "Disable WWAN if radio is turned off", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "als_enabled", .method = ACPI_HP_METHOD_ALS, .description = "Enable/Disable ALS (Ambient light sensor)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "display", .method = ACPI_HP_METHOD_DISPLAY, .description = "Display status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "hdd_temperature", .method = ACPI_HP_METHOD_HDDTEMP, .description = "HDD temperature", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "is_docked", .method = ACPI_HP_METHOD_DOCK, .description = "Docking station status", .access = CTLTYPE_INT | CTLFLAG_RD }, { .name = "cmi_detail", .method = ACPI_HP_METHOD_CMI_DETAIL, .description = "Details shown in CMI output " "(cat /dev/hpcmi)", .access = CTLTYPE_INT | CTLFLAG_RW }, { .name = "verbose", .method = ACPI_HP_METHOD_VERBOSE, .description = "Verbosity level", .access = CTLTYPE_INT | CTLFLAG_RW }, { NULL, 0, NULL, 0 } }; ACPI_SERIAL_DECL(hp, "HP ACPI-WMI Mapping"); static int acpi_hp_probe(device_t dev); static int acpi_hp_attach(device_t dev); static int acpi_hp_detach(device_t dev); static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc* sc); static int acpi_hp_sysctl(SYSCTL_HANDLER_ARGS); static int acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg); static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method); static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val); static void acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context); static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, char* outbuf, size_t outsize, UINT32* sequence, int detail); static void acpi_hp_hex_decode(char* buffer); static d_open_t acpi_hp_hpcmi_open; static d_close_t acpi_hp_hpcmi_close; static d_read_t acpi_hp_hpcmi_read; /* handler /dev/hpcmi device */ static struct cdevsw hpcmi_cdevsw = { .d_version = D_VERSION, .d_open = acpi_hp_hpcmi_open, .d_close = acpi_hp_hpcmi_close, .d_read = acpi_hp_hpcmi_read, .d_name = "hpcmi", }; static device_method_t acpi_hp_methods[] = { DEVMETHOD(device_probe, acpi_hp_probe), DEVMETHOD(device_attach, acpi_hp_attach), DEVMETHOD(device_detach, acpi_hp_detach), {0, 0} }; static driver_t acpi_hp_driver = { "acpi_hp", acpi_hp_methods, sizeof(struct acpi_hp_softc), }; static devclass_t acpi_hp_devclass; DRIVER_MODULE(acpi_hp, acpi, acpi_hp_driver, acpi_hp_devclass, 0, 0); MODULE_DEPEND(acpi_hp, acpi_wmi, 1, 1, 1); MODULE_DEPEND(acpi_hp, acpi, 1, 1, 1); static void acpi_hp_evaluate_auto_on_off(struct acpi_hp_softc *sc) { int wireless; int new_wlan_status; int new_bluetooth_status; int new_wwan_status; wireless = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); new_wlan_status = -1; new_bluetooth_status = -1; new_wwan_status = -1; if (sc->verbose) device_printf(sc->wmi_dev, "Wireless status is %x\n", wireless); if (sc->wlan_disable_if_radio_off && !(wireless & HP_MASK_WLAN_RADIO) && (wireless & HP_MASK_WLAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x100); new_wlan_status = 0; } else if (sc->wlan_enable_if_radio_on && (wireless & HP_MASK_WLAN_RADIO) && !(wireless & HP_MASK_WLAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x101); new_wlan_status = 1; } if (sc->bluetooth_disable_if_radio_off && !(wireless & HP_MASK_BLUETOOTH_RADIO) && (wireless & HP_MASK_BLUETOOTH_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x200); new_bluetooth_status = 0; } else if (sc->bluetooth_enable_if_radio_on && (wireless & HP_MASK_BLUETOOTH_RADIO) && !(wireless & HP_MASK_BLUETOOTH_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x202); new_bluetooth_status = 1; } if (sc->wwan_disable_if_radio_off && !(wireless & HP_MASK_WWAN_RADIO) && (wireless & HP_MASK_WWAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x400); new_wwan_status = 0; } else if (sc->wwan_enable_if_radio_on && (wireless & HP_MASK_WWAN_RADIO) && !(wireless & HP_MASK_WWAN_ENABLED)) { acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, 0x404); new_wwan_status = 1; } if (new_wlan_status == -1) { new_wlan_status = (wireless & HP_MASK_WLAN_ON_AIR); if ((new_wlan_status?1:0) != sc->was_wlan_on_air) { sc->was_wlan_on_air = sc->was_wlan_on_air?0:1; if (sc->verbose) device_printf(sc->wmi_dev, "WLAN on air changed to %i " "(new_wlan_status is %i)\n", sc->was_wlan_on_air, new_wlan_status); acpi_UserNotify("HP", sc->handle, 0xc0+sc->was_wlan_on_air); } } if (new_bluetooth_status == -1) { new_bluetooth_status = (wireless & HP_MASK_BLUETOOTH_ON_AIR); if ((new_bluetooth_status?1:0) != sc->was_bluetooth_on_air) { sc->was_bluetooth_on_air = sc->was_bluetooth_on_air? 0:1; if (sc->verbose) device_printf(sc->wmi_dev, "BLUETOOTH on air changed" " to %i (new_bluetooth_status is %i)\n", sc->was_bluetooth_on_air, new_bluetooth_status); acpi_UserNotify("HP", sc->handle, 0xd0+sc->was_bluetooth_on_air); } } if (new_wwan_status == -1) { new_wwan_status = (wireless & HP_MASK_WWAN_ON_AIR); if ((new_wwan_status?1:0) != sc->was_wwan_on_air) { sc->was_wwan_on_air = sc->was_wwan_on_air?0:1; if (sc->verbose) device_printf(sc->wmi_dev, "WWAN on air changed to %i" " (new_wwan_status is %i)\n", sc->was_wwan_on_air, new_wwan_status); acpi_UserNotify("HP", sc->handle, 0xe0+sc->was_wwan_on_air); } } } static int acpi_hp_probe(device_t dev) { if (acpi_disabled("hp") || device_get_unit(dev) != 0) return (ENXIO); device_set_desc(dev, "HP ACPI-WMI Mapping"); return (0); } static int acpi_hp_attach(device_t dev) { struct acpi_hp_softc *sc; struct acpi_softc *acpi_sc; devclass_t wmi_devclass; int arg; ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); sc = device_get_softc(dev); sc->dev = dev; sc->handle = acpi_get_handle(dev); sc->has_notify = 0; sc->has_cmi = 0; sc->bluetooth_enable_if_radio_on = 0; sc->bluetooth_disable_if_radio_off = 0; sc->wlan_enable_if_radio_on = 0; sc->wlan_disable_if_radio_off = 0; sc->wlan_enable_if_radio_on = 0; sc->wlan_disable_if_radio_off = 0; sc->was_wlan_on_air = 0; sc->was_bluetooth_on_air = 0; sc->was_wwan_on_air = 0; sc->cmi_detail = 0; sc->cmi_order_size = -1; sc->verbose = 0; memset(sc->cmi_order, 0, sizeof(sc->cmi_order)); acpi_sc = acpi_device_get_parent_softc(dev); if (!(wmi_devclass = devclass_find ("acpi_wmi"))) { device_printf(dev, "Couldn't find acpi_wmi devclass\n"); return (EINVAL); } if (!(sc->wmi_dev = devclass_get_device(wmi_devclass, 0))) { device_printf(dev, "Couldn't find acpi_wmi device\n"); return (EINVAL); } if (!ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_BIOS_GUID)) { device_printf(dev, "WMI device does not provide the HP BIOS GUID\n"); return (EINVAL); } if (ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_EVENT_GUID)) { device_printf(dev, "HP event GUID detected, installing event handler\n"); if (ACPI_WMI_INSTALL_EVENT_HANDLER(sc->wmi_dev, ACPI_HP_WMI_EVENT_GUID, acpi_hp_notify, dev)) { device_printf(dev, "Could not install notification handler!\n"); } else { sc->has_notify = 1; } } if ((sc->has_cmi = ACPI_WMI_PROVIDES_GUID_STRING(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID) )) { device_printf(dev, "HP CMI GUID detected\n"); } if (sc->has_cmi) { sc->hpcmi_dev_t = make_dev(&hpcmi_cdevsw, 0, UID_ROOT, GID_WHEEL, 0644, "hpcmi"); sc->hpcmi_dev_t->si_drv1 = sc; sc->hpcmi_open_pid = 0; sc->hpcmi_bufptr = -1; } ACPI_SERIAL_BEGIN(hp); sc->sysctl_ctx = device_get_sysctl_ctx(dev); sc->sysctl_tree = device_get_sysctl_tree(dev); for (int i = 0; acpi_hp_sysctls[i].name != NULL; ++i) { arg = 0; if ((!sc->has_notify && (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON || acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF)) || (arg = acpi_hp_sysctl_get(sc, acpi_hp_sysctls[i].method)) < 0) { continue; } if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WLAN_ON_AIR) { sc->was_wlan_on_air = arg; } else if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_BLUETOOTH_ON_AIR) { sc->was_bluetooth_on_air = arg; } else if (acpi_hp_sysctls[i].method == ACPI_HP_METHOD_WWAN_ON_AIR) { sc->was_wwan_on_air = arg; } SYSCTL_ADD_PROC(sc->sysctl_ctx, SYSCTL_CHILDREN(sc->sysctl_tree), OID_AUTO, acpi_hp_sysctls[i].name, acpi_hp_sysctls[i].access, sc, i, acpi_hp_sysctl, "I", acpi_hp_sysctls[i].description); } ACPI_SERIAL_END(hp); return (0); } static int acpi_hp_detach(device_t dev) { int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__); struct acpi_hp_softc *sc = device_get_softc(dev); if (sc->has_cmi && sc->hpcmi_open_pid != 0) { ret = EBUSY; } else { if (sc->has_notify) { ACPI_WMI_REMOVE_EVENT_HANDLER(dev, ACPI_HP_WMI_EVENT_GUID); } if (sc->hpcmi_bufptr != -1) { sbuf_delete(&sc->hpcmi_sbuf); sc->hpcmi_bufptr = -1; } sc->hpcmi_open_pid = 0; destroy_dev(sc->hpcmi_dev_t); ret = 0; } return (ret); } static int acpi_hp_sysctl(SYSCTL_HANDLER_ARGS) { struct acpi_hp_softc *sc; int arg; int oldarg; int error = 0; int function; int method; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = (struct acpi_hp_softc *)oidp->oid_arg1; function = oidp->oid_arg2; method = acpi_hp_sysctls[function].method; ACPI_SERIAL_BEGIN(hp); arg = acpi_hp_sysctl_get(sc, method); oldarg = arg; error = sysctl_handle_int(oidp, &arg, 0, req); if (!error && req->newptr != NULL) { error = acpi_hp_sysctl_set(sc, method, arg, oldarg); } ACPI_SERIAL_END(hp); return (error); } static int acpi_hp_sysctl_get(struct acpi_hp_softc *sc, int method) { int val = 0; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(hp); switch (method) { case ACPI_HP_METHOD_WLAN_ENABLED: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WLAN_ENABLED) != 0); break; case ACPI_HP_METHOD_WLAN_RADIO: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WLAN_RADIO) != 0); break; case ACPI_HP_METHOD_WLAN_ON_AIR: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WLAN_ON_AIR) != 0); break; case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: val = sc->wlan_enable_if_radio_on; break; case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: val = sc->wlan_disable_if_radio_off; break; case ACPI_HP_METHOD_BLUETOOTH_ENABLED: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_BLUETOOTH_ENABLED) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_RADIO: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_BLUETOOTH_RADIO) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_ON_AIR: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_BLUETOOTH_ON_AIR) != 0); break; case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: val = sc->bluetooth_enable_if_radio_on; break; case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: val = sc->bluetooth_disable_if_radio_off; break; case ACPI_HP_METHOD_WWAN_ENABLED: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WWAN_ENABLED) != 0); break; case ACPI_HP_METHOD_WWAN_RADIO: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WWAN_RADIO) != 0); break; case ACPI_HP_METHOD_WWAN_ON_AIR: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 0, 0); val = ((val & HP_MASK_WWAN_ON_AIR) != 0); break; case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: val = sc->wwan_enable_if_radio_on; break; case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: val = sc->wwan_disable_if_radio_off; break; case ACPI_HP_METHOD_ALS: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_ALS_COMMAND, 0, 0); break; case ACPI_HP_METHOD_DISPLAY: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_DISPLAY_COMMAND, 0, 0); break; case ACPI_HP_METHOD_HDDTEMP: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_HDDTEMP_COMMAND, 0, 0); break; case ACPI_HP_METHOD_DOCK: val = acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_DOCK_COMMAND, 0, 0); break; case ACPI_HP_METHOD_CMI_DETAIL: val = sc->cmi_detail; break; case ACPI_HP_METHOD_VERBOSE: val = sc->verbose; break; } return (val); } static int acpi_hp_sysctl_set(struct acpi_hp_softc *sc, int method, int arg, int oldarg) { ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(hp); if (method != ACPI_HP_METHOD_CMI_DETAIL && method != ACPI_HP_METHOD_VERBOSE) arg = arg?1:0; if (arg != oldarg) { switch (method) { case ACPI_HP_METHOD_WLAN_ENABLED: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x101:0x100)); case ACPI_HP_METHOD_WLAN_ENABLE_IF_RADIO_ON: sc->wlan_enable_if_radio_on = arg; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WLAN_DISABLE_IF_RADIO_OFF: sc->wlan_disable_if_radio_off = arg; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_BLUETOOTH_ENABLED: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x202:0x200)); case ACPI_HP_METHOD_BLUETOOTH_ENABLE_IF_RADIO_ON: sc->bluetooth_enable_if_radio_on = arg; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_BLUETOOTH_DISABLE_IF_RADIO_OFF: sc->bluetooth_disable_if_radio_off = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WWAN_ENABLED: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_WIRELESS_COMMAND, 1, arg?0x404:0x400)); case ACPI_HP_METHOD_WWAN_ENABLE_IF_RADIO_ON: sc->wwan_enable_if_radio_on = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_WWAN_DISABLE_IF_RADIO_OFF: sc->wwan_disable_if_radio_off = arg?1:0; acpi_hp_evaluate_auto_on_off(sc); break; case ACPI_HP_METHOD_ALS: return (acpi_hp_exec_wmi_command(sc->wmi_dev, ACPI_HP_WMI_ALS_COMMAND, 1, arg?1:0)); case ACPI_HP_METHOD_CMI_DETAIL: sc->cmi_detail = arg; if ((arg & ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE) != (oldarg & ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE)) { sc->cmi_order_size = -1; } break; case ACPI_HP_METHOD_VERBOSE: sc->verbose = arg; break; } } return (0); } static __inline void acpi_hp_free_buffer(ACPI_BUFFER* buf) { if (buf && buf->Pointer) { AcpiOsFree(buf->Pointer); } } static void acpi_hp_notify(ACPI_HANDLE h, UINT32 notify, void *context) { device_t dev = context; ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify); struct acpi_hp_softc *sc = device_get_softc(dev); ACPI_BUFFER response = { ACPI_ALLOCATE_BUFFER, NULL }; ACPI_OBJECT *obj; ACPI_WMI_GET_EVENT_DATA(sc->wmi_dev, notify, &response); obj = (ACPI_OBJECT*) response.Pointer; if (obj && obj->Type == ACPI_TYPE_BUFFER && obj->Buffer.Length == 8) { if (*((UINT8 *) obj->Buffer.Pointer) == 0x5) { acpi_hp_evaluate_auto_on_off(sc); } } acpi_hp_free_buffer(&response); } static int acpi_hp_exec_wmi_command(device_t wmi_dev, int command, int is_write, int val) { UINT32 params[5] = { 0x55434553, is_write?2:1, command, is_write?4:0, val}; UINT32* result; ACPI_OBJECT *obj; ACPI_BUFFER in = { sizeof(params), ¶ms }; ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; int retval; if (ACPI_FAILURE(ACPI_WMI_EVALUATE_CALL(wmi_dev, ACPI_HP_WMI_BIOS_GUID, 0, 0x3, &in, &out))) { acpi_hp_free_buffer(&out); return (-EINVAL); } obj = out.Pointer; if (!obj || obj->Type != ACPI_TYPE_BUFFER) { acpi_hp_free_buffer(&out); return (-EINVAL); } result = (UINT32*) obj->Buffer.Pointer; retval = result[2]; if (result[1] > 0) { retval = result[1]; } acpi_hp_free_buffer(&out); return (retval); } static __inline char* acpi_hp_get_string_from_object(ACPI_OBJECT* obj, char* dst, size_t size) { int length; dst[0] = 0; if (obj->Type == ACPI_TYPE_STRING) { length = obj->String.Length+1; if (length > size) { length = size - 1; } strlcpy(dst, obj->String.Pointer, length); acpi_hp_hex_decode(dst); } return (dst); } /* * Read BIOS Setting block in instance "instance". * The block returned is ACPI_TYPE_PACKAGE which should contain the following * elements: * Index Meaning * 0 Setting Name [string] * 1 Value (comma separated, asterisk marks the current value) [string] * 2 Path within the bios hierarchy [string] * 3 IsReadOnly [int] * 4 DisplayInUI [int] * 5 RequiresPhysicalPresence [int] * 6 Sequence for ordering within the bios settings (absolute) [int] * 7 Length of prerequisites array [int] * 8..8+[7] PrerequisiteN [string] * 9+[7] Current value (in case of enum) [string] / Array length [int] * 10+[7] Enum length [int] / Array values * 11+[7]ff Enum value at index x [string] */ static int acpi_hp_get_cmi_block(device_t wmi_dev, const char* guid, UINT8 instance, char* outbuf, size_t outsize, UINT32* sequence, int detail) { ACPI_OBJECT *obj; ACPI_BUFFER out = { ACPI_ALLOCATE_BUFFER, NULL }; int i; int outlen; int size = 255; int has_enums = 0; int valuebase = 0; char string_buffer[size]; int enumbase; outlen = 0; outbuf[0] = 0; if (ACPI_FAILURE(ACPI_WMI_GET_BLOCK(wmi_dev, guid, instance, &out))) { acpi_hp_free_buffer(&out); return (-EINVAL); } obj = out.Pointer; if (!obj && obj->Type != ACPI_TYPE_PACKAGE) { acpi_hp_free_buffer(&out); return (-EINVAL); } if (obj->Package.Count >= 8 && obj->Package.Elements[7].Type == ACPI_TYPE_INTEGER) { valuebase = 8 + obj->Package.Elements[7].Integer.Value; } /* check if this matches our expectations based on limited knowledge */ if (valuebase > 7 && obj->Package.Count > valuebase + 1 && obj->Package.Elements[0].Type == ACPI_TYPE_STRING && obj->Package.Elements[1].Type == ACPI_TYPE_STRING && obj->Package.Elements[2].Type == ACPI_TYPE_STRING && obj->Package.Elements[3].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[4].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[5].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[6].Type == ACPI_TYPE_INTEGER && obj->Package.Elements[valuebase].Type == ACPI_TYPE_STRING && obj->Package.Elements[valuebase+1].Type == ACPI_TYPE_INTEGER && obj->Package.Count > valuebase + obj->Package.Elements[valuebase+1].Integer.Value ) { enumbase = valuebase + 1; if (detail & ACPI_HP_CMI_DETAIL_PATHS) { strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[2], string_buffer, size), outsize); outlen += 48; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); } strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[0], string_buffer, size), outsize); outlen += 43; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); strlcat(outbuf, acpi_hp_get_string_from_object( &obj->Package.Elements[valuebase], string_buffer, size), outsize); outlen += 21; while (strlen(outbuf) < outlen) strlcat(outbuf, " ", outsize); for (i = 0; i < strlen(outbuf); ++i) if (outbuf[i] == '\\') outbuf[i] = '/'; if (detail & ACPI_HP_CMI_DETAIL_ENUMS) { for (i = enumbase + 1; i < enumbase + 1 + obj->Package.Elements[enumbase].Integer.Value; ++i) { acpi_hp_get_string_from_object( &obj->Package.Elements[i], string_buffer, size); if (strlen(string_buffer) > 1 || (strlen(string_buffer) == 1 && string_buffer[0] != ' ')) { if (has_enums) strlcat(outbuf, "/", outsize); else strlcat(outbuf, " (", outsize); strlcat(outbuf, string_buffer, outsize); has_enums = 1; } } } if (has_enums) strlcat(outbuf, ")", outsize); if (detail & ACPI_HP_CMI_DETAIL_FLAGS) { strlcat(outbuf, obj->Package.Elements[3].Integer.Value? " [ReadOnly]":"", outsize); strlcat(outbuf, obj->Package.Elements[4].Integer.Value? "":" [NOUI]", outsize); strlcat(outbuf, obj->Package.Elements[5].Integer.Value? " [RPP]":"", outsize); } *sequence = (UINT32) obj->Package.Elements[6].Integer.Value; } acpi_hp_free_buffer(&out); return (0); } /* * Convert given two digit hex string (hexin) to an UINT8 referenced * by byteout. * Return != 0 if the was a problem (invalid input) */ static __inline int acpi_hp_hex_to_int(const UINT8 *hexin, UINT8 *byteout) { unsigned int hi; unsigned int lo; hi = hexin[0]; lo = hexin[1]; if ('0' <= hi && hi <= '9') hi -= '0'; else if ('A' <= hi && hi <= 'F') hi -= ('A' - 10); else if ('a' <= hi && hi <= 'f') hi -= ('a' - 10); else return (1); if ('0' <= lo && lo <= '9') lo -= '0'; else if ('A' <= lo && lo <= 'F') lo -= ('A' - 10); else if ('a' <= lo && lo <= 'f') lo -= ('a' - 10); else return (1); *byteout = (hi << 4) + lo; return (0); } static void acpi_hp_hex_decode(char* buffer) { int i; int length = strlen(buffer); UINT8 *uin; UINT8 uout; if (((int)length/2)*2 == length || length < 10) return; for (i = 0; i= '0' && buffer[i] <= '9') || (buffer[i] >= 'A' && buffer[i] <= 'F'))) return; } for (i = 0; isi_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(hp); if (sc->hpcmi_open_pid != 0) { ret = EBUSY; } else { if (sbuf_new(&sc->hpcmi_sbuf, NULL, 4096, SBUF_AUTOEXTEND) == NULL) { ret = ENXIO; } else { sc->hpcmi_open_pid = td->td_proc->p_pid; sc->hpcmi_bufptr = 0; ret = 0; } } ACPI_SERIAL_END(hp); return (ret); } /* * close hpcmi device */ static int acpi_hp_hpcmi_close(struct cdev* dev, int flags, int mode, struct thread *td) { struct acpi_hp_softc *sc; int ret; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(hp); if (sc->hpcmi_open_pid == 0) { ret = EBADF; } else { if (sc->hpcmi_bufptr != -1) { sbuf_delete(&sc->hpcmi_sbuf); sc->hpcmi_bufptr = -1; } sc->hpcmi_open_pid = 0; ret = 0; } ACPI_SERIAL_END(hp); return (ret); } /* * Read from hpcmi bios information */ static int acpi_hp_hpcmi_read(struct cdev *dev, struct uio *buf, int flag) { struct acpi_hp_softc *sc; int pos, i, l, ret; UINT8 instance; UINT8 maxInstance; UINT32 sequence; int linesize = 1025; char line[linesize]; if (dev == NULL || dev->si_drv1 == NULL) return (EBADF); sc = dev->si_drv1; ACPI_SERIAL_BEGIN(hp); if (sc->hpcmi_open_pid != buf->uio_td->td_proc->p_pid || sc->hpcmi_bufptr == -1) { ret = EBADF; } else { if (!sbuf_done(&sc->hpcmi_sbuf)) { if (sc->cmi_order_size < 0) { maxInstance = sc->has_cmi; if (!(sc->cmi_detail & ACPI_HP_CMI_DETAIL_SHOW_MAX_INSTANCE) && maxInstance > 0) { maxInstance--; } sc->cmi_order_size = 0; for (instance = 0; instance < maxInstance; ++instance) { if (acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, instance, line, linesize, &sequence, sc->cmi_detail)) { instance = maxInstance; } else { pos = sc->cmi_order_size; for (i=0; icmi_order_size && i<127; ++i) { if (sc->cmi_order[i].sequence > sequence) { pos = i; break; } } for (i=sc->cmi_order_size; i>pos; --i) { sc->cmi_order[i].sequence = sc->cmi_order[i-1].sequence; sc->cmi_order[i].instance = sc->cmi_order[i-1].instance; } sc->cmi_order[pos].sequence = sequence; sc->cmi_order[pos].instance = instance; sc->cmi_order_size++; } } } for (i=0; icmi_order_size; ++i) { if (!acpi_hp_get_cmi_block(sc->wmi_dev, ACPI_HP_WMI_CMI_GUID, sc->cmi_order[i].instance, line, linesize, &sequence, sc->cmi_detail)) { sbuf_printf(&sc->hpcmi_sbuf, "%s\n", line); } } sbuf_finish(&sc->hpcmi_sbuf); } if (sbuf_len(&sc->hpcmi_sbuf) <= 0) { sbuf_delete(&sc->hpcmi_sbuf); sc->hpcmi_bufptr = -1; sc->hpcmi_open_pid = 0; ret = ENOMEM; } else { l = min(buf->uio_resid, sbuf_len(&sc->hpcmi_sbuf) - sc->hpcmi_bufptr); ret = (l > 0)?uiomove(sbuf_data(&sc->hpcmi_sbuf) + sc->hpcmi_bufptr, l, buf) : 0; sc->hpcmi_bufptr += l; } } ACPI_SERIAL_END(hp); return (ret); } -------------- next part -------------- /*- * Copyright (c) 2009 Michael Gmelin * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include __FBSDID("$FreeBSD$"); /* * Driver for acpi-wmi mapping, provides an interface for vendor specific * implementations (e.g. HP and Acer laptops). * Inspired by the ACPI-WMI mapping driver (c) 2008-2008 Carlos Corbacho which * implements this functionality for Linux. * * WMI and ACPI: http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx * acpi-wmi for Linux: http://www.kernel.org */ #include "opt_acpi.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "acpi_wmi_if.h" MALLOC_DEFINE(M_ACPIWMI, "acpiwmi", "ACPI-WMI mapping"); #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("ACPI_WMI"); #define ACPI_WMI_REGFLAG_EXPENSIVE 0x1 /* GUID flag: Expensive operation */ #define ACPI_WMI_REGFLAG_METHOD 0x2 /* GUID flag: Method call */ #define ACPI_WMI_REGFLAG_STRING 0x4 /* GUID flag: String */ #define ACPI_WMI_REGFLAG_EVENT 0x8 /* GUID flag: Event */ /* * acpi_wmi driver private structure */ struct acpi_wmi_softc { device_t wmi_dev; /* wmi device id */ ACPI_HANDLE wmi_handle; /* handle of the PNP0C14 node */ device_t ec_dev; /* acpi_ec0 */ struct cdev *wmistat_dev_t; /* wmistat device handle */ struct sbuf wmistat_sbuf; /* sbuf for /dev/wmistat output */ pid_t wmistat_open_pid; /* pid operating on /dev/wmistat */ int wmistat_bufptr; /* /dev/wmistat ptr to buffer position */ }; /* * Struct that holds information about * about a single GUID entry in _WDG */ struct guid_info { char guid[16]; /* 16 byte non human readable GUID */ char oid[2]; /* object id or event notify id (first byte) */ UINT8 max_instance; /* highest instance known for this GUID */ UINT8 flags; /* ACPI_WMI_REGFLAG_%s */ }; /* WExx event generation state (on/off) */ enum event_generation_state { EVENT_GENERATION_ON = 1, EVENT_GENERATION_OFF = 0 }; /* * Information about one entry in _WDG. * List of those is used to lookup information by GUID. */ struct wmi_info { TAILQ_ENTRY(wmi_info) wmi_list; struct guid_info ginfo; /* information on guid */ ACPI_NOTIFY_HANDLER event_handler;/* client provided event handler */ void *event_handler_user_data; /* ev handler cookie */ }; TAILQ_HEAD(wmi_info_list_head, wmi_info) wmi_info_list = TAILQ_HEAD_INITIALIZER(wmi_info_list); ACPI_SERIAL_DECL(acpi_wmi, "ACPI-WMI Mapping"); /* public interface - declaration */ /* standard device interface*/ static int acpi_wmi_probe(device_t dev); static int acpi_wmi_attach(device_t dev); static int acpi_wmi_detach(device_t dev); /* see acpi_wmi_if.m */ static int acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string); static ACPI_STATUS acpi_wmi_evaluate_call_method(device_t dev, const char *guid_string, UINT8 instance, UINT32 method_id, const ACPI_BUFFER *in, ACPI_BUFFER *out); static ACPI_STATUS acpi_wmi_install_event_handler_method(device_t dev, const char *guid_string, ACPI_NOTIFY_HANDLER handler, void *data); static ACPI_STATUS acpi_wmi_remove_event_handler_method(device_t dev, const char *guid_string); static ACPI_STATUS acpi_wmi_get_event_data_method(device_t dev, UINT32 event_id, ACPI_BUFFER *out); static ACPI_STATUS acpi_wmi_get_block_method(device_t dev, const char *guid_string, UINT8 instance, ACPI_BUFFER *out); static ACPI_STATUS acpi_wmi_set_block_method(device_t dev, const char *guid_string, UINT8 instance, const ACPI_BUFFER *in); /* private interface - declaration */ /* callbacks */ static void acpi_wmi_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context); static ACPI_STATUS acpi_wmi_ec_handler(UINT32 function, ACPI_PHYSICAL_ADDRESS address, UINT32 width, ACPI_INTEGER *value, void *context, void *region_context); /* helpers */ static ACPI_STATUS acpi_wmi_read_wdg_blocks(ACPI_HANDLE h); static ACPI_STATUS acpi_wmi_toggle_we_event_generation(device_t dev, struct wmi_info *winfo, enum event_generation_state state); static int acpi_wmi_guid_string_to_guid(const UINT8 *guid_string, UINT8 *guid); static struct wmi_info* acpi_wmi_lookup_wmi_info_by_guid_string( const char *guid_string); static d_open_t acpi_wmi_wmistat_open; static d_close_t acpi_wmi_wmistat_close; static d_read_t acpi_wmi_wmistat_read; /* handler /dev/wmistat device */ static struct cdevsw wmistat_cdevsw = { .d_version = D_VERSION, .d_open = acpi_wmi_wmistat_open, .d_close = acpi_wmi_wmistat_close, .d_read = acpi_wmi_wmistat_read, .d_name = "wmistat", }; static device_method_t acpi_wmi_methods[] = { /* Device interface */ DEVMETHOD(device_probe, acpi_wmi_probe), DEVMETHOD(device_attach, acpi_wmi_attach), DEVMETHOD(device_detach, acpi_wmi_detach), /* acpi_wmi interface */ DEVMETHOD(acpi_wmi_provides_guid_string, acpi_wmi_provides_guid_string_method), DEVMETHOD(acpi_wmi_evaluate_call, acpi_wmi_evaluate_call_method), DEVMETHOD(acpi_wmi_install_event_handler, acpi_wmi_install_event_handler_method), DEVMETHOD(acpi_wmi_remove_event_handler, acpi_wmi_remove_event_handler_method), DEVMETHOD(acpi_wmi_get_event_data, acpi_wmi_get_event_data_method), DEVMETHOD(acpi_wmi_get_block, acpi_wmi_get_block_method), DEVMETHOD(acpi_wmi_set_block, acpi_wmi_set_block_method), {0, 0} }; static driver_t acpi_wmi_driver = { "acpi_wmi", acpi_wmi_methods, sizeof(struct acpi_wmi_softc), }; static devclass_t acpi_wmi_devclass; DRIVER_MODULE(acpi_wmi, acpi, acpi_wmi_driver, acpi_wmi_devclass, 0, 0); MODULE_VERSION(acpi_wmi, 1); MODULE_DEPEND(acpi_wmi, acpi, 1, 1, 1); static char *wmi_ids[] = {"PNP0C14", "PNP0c14", NULL}; /* * Probe for the PNP0C14 ACPI node */ static int acpi_wmi_probe(device_t dev) { if (acpi_disabled("wmi") || ACPI_ID_PROBE(device_get_parent(dev), dev, wmi_ids) == NULL) return (ENXIO); device_set_desc(dev, "ACPI-WMI mapping"); return (0); } /* * Attach the device by: * - Looking for the first ACPI EC device * - Install the notify handler * - Install the EC address space handler * - Look for the _WDG node and read GUID information blocks */ static int acpi_wmi_attach(device_t dev) { struct acpi_wmi_softc *sc; int ret; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); ret = ENXIO; ACPI_SERIAL_BEGIN(acpi_wmi); sc->wmi_dev = dev; sc->wmi_handle = acpi_get_handle(dev); TAILQ_INIT(&wmi_info_list); /* XXX Only works with one EC, but nearly all systems only have one. */ if ((sc->ec_dev = devclass_get_device(devclass_find("acpi_ec"), 0)) == NULL) device_printf(dev, "cannot find EC device\n"); else if (ACPI_FAILURE((status = AcpiInstallNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler, sc)))) device_printf(sc->wmi_dev, "couldn't install notify handler - %s\n", AcpiFormatException(status)); else if (ACPI_FAILURE((status = AcpiInstallAddressSpaceHandler( sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler, NULL, sc)))) { device_printf(sc->wmi_dev, "couldn't install EC handler - %s\n", AcpiFormatException(status)); AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); } else if (ACPI_FAILURE((status = acpi_wmi_read_wdg_blocks( sc->wmi_handle)))) { device_printf(sc->wmi_dev, "couldn't parse _WDG - %s\n", AcpiFormatException(status)); AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); AcpiRemoveAddressSpaceHandler(sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler); } else { sc->wmistat_dev_t = make_dev(&wmistat_cdevsw, 0, UID_ROOT, GID_WHEEL, 0644, "wmistat"); sc->wmistat_dev_t->si_drv1 = sc; sc->wmistat_open_pid = 0; sc->wmistat_bufptr = -1; ret = 0; } ACPI_SERIAL_END(acpi_wmi); return (ret); } /* * Detach the driver by: * - Removing notification handler * - Removing address space handler * - Turning off event generation for all WExx event activated by * child drivers */ static int acpi_wmi_detach(device_t dev) { struct wmi_info *winfo, *tmp; struct acpi_wmi_softc *sc; int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); ACPI_SERIAL_BEGIN(acpi_wmi); if (sc->wmistat_open_pid != 0) { ret = EBUSY; } else { AcpiRemoveNotifyHandler(sc->wmi_handle, ACPI_DEVICE_NOTIFY, acpi_wmi_notify_handler); AcpiRemoveAddressSpaceHandler(sc->wmi_handle, ACPI_ADR_SPACE_EC, acpi_wmi_ec_handler); TAILQ_FOREACH_SAFE(winfo, &wmi_info_list, wmi_list, tmp) { if (winfo->event_handler) acpi_wmi_toggle_we_event_generation(dev, winfo, EVENT_GENERATION_OFF); TAILQ_REMOVE(&wmi_info_list, winfo, wmi_list); free(winfo, M_ACPIWMI); } if (sc->wmistat_bufptr != -1) { sbuf_delete(&sc->wmistat_sbuf); sc->wmistat_bufptr = -1; } sc->wmistat_open_pid = 0; destroy_dev(sc->wmistat_dev_t); ret = 0; } ACPI_SERIAL_END(acpi_wmi); return (ret); } /* * Check if the given GUID string (human readable format * AABBCCDD-EEFF-GGHH-IIJJ-KKLLMMNNOOPP) * exists within _WDG */ static int acpi_wmi_provides_guid_string_method(device_t dev, const char *guid_string) { struct wmi_info *winfo; int ret; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_BEGIN(acpi_wmi); winfo = acpi_wmi_lookup_wmi_info_by_guid_string(guid_string); ret = (winfo == NULL)?0:winfo->ginfo.max_instance+1; ACPI_SERIAL_END(acpi_wmi); return (ret); } /* * Call a method "method_id" on the given GUID block * write result into user provided output buffer */ static ACPI_STATUS acpi_wmi_evaluate_call_method(device_t dev, const char *guid_string, UINT8 instance, UINT32 method_id, const ACPI_BUFFER *in, ACPI_BUFFER *out) { ACPI_OBJECT params[3]; ACPI_OBJECT_LIST input; char method[5] = "WMxx"; struct wmi_info *winfo; struct acpi_wmi_softc *sc; ACPI_STATUS status; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); sc = device_get_softc(dev); ACPI_SERIAL_BEGIN(acpi_wmi); if ((winfo = acpi_wmi_