View Single Post
 
Old 03-13-2010, 01:21 PM
uman uman is offline
Panther
 
Join Date: May 2009
Location: USA
Posts: 103
Quote:
Originally Posted by kizwan View Post
Hi uman,

I'm successfully compiled AMW0.kext for SL but got kernel panic while initializing some MethodTerm at boot. Since AMW0.kext project is not finished, I think I'm going to try ACPI4ASUS.kext instead. If ACPI4ASUS.kext developed to works with AMW0 v2 interface (AMW0 and WMID), it should works with other laptop model too.
So does Asus use AMW0, or do you need to add that code from AMW0. A WMID kext would be useful as many PC vendors use that interface. uninc's DSDT was hideously intertwined with WMID.

Quote:
I'm trying to enable battery icon by patching DSDT. It is being done by adjusting ADP1 & BAT0 code according to DSDT from MBP4,1. Not successful yet, but the battery indicator did show up. It said battery is not detected & current power source is power adapter. Do you think it is possible to make it working by just patching the DSDT?
I'm not sure, but given that the ACPI 4.0 spec devotes pages and pages to battery and power issues, I think it is at least possible. I also intend to try to solve this (but it's a lower priority for me because my laptop battery is toast anyway). I tried VoodooBattery, which worked great (it told me my battery was toast, lol), but then it kernel panic'ed HARD and I had to repair my disk, so I won't be using that again.

Quote:
EDIT: I have found the right "query method" to automatically turn ON Bluetooth device during boot-up. I just tried all of the "query method" in the DSDT until I found the right one.
Code:
                    Method (_Q3F, 0, NotSerialized)
                    {
                        // start
                        // auto turn ON Bluetooth device during computer startup
                        Store (0x01, \_SB.PCI0.LPCB.EC0.BTEN)
                        Store (0x01, \_SB.PCI0.LPCB.EC0.BTLD)
                        // end
                        HKEY (0x3F)
                    }
kizwan
I still don't understand how query methods are executed, nor how they are bound to some device. ACPI says:
Quote:
"For an embedded controller event, OSPM will queue the control method of the name _QXX, where XX is the hex format of the query code. Notice that each embedded controller device can have query event control methods. Similarly, for an SMBus driver, if no driver registers for SMBus alarms, the SMBus driver will queue control methods to handle these. Methods must be placed under the SMBus device with the name _QXX where XX is the hex format of the SMBus address of the device sending the alarm."
And then they discuss it more with a completely unhelpful example. Oh wait, the acpi implementers guide is more helpful:

Quote:
What’s the trap? Using decimal instead of hexadecimal numbers in _Lxx, _Exx, and _Qxx names in your ASL code. When the number (xx) in the _Lxx, _Exx, or _Qxx event handler object name in the ASL code does not match the number of the bit in the GPE register block (or match the number of the embedded controller query number in the case of _Qxx), then the OS loses events. For more information about the relationship of event handler object names and bits on the GPE register block, see section 5.6.2.2.

Tip: The xx in the event handler name is a hexadecimal number that corresponds to the GPE register bit or EC query number the event is tied to. For example, the level-triggered event tied to bit 11 of the GPEx register block must be named _L0B, not _L11.
DSDT is fun but time consuming!

--
MacBook Pro - have allergy to nickel in the aluminum casing. So my kid gets an expensive toy!

Gateway MX 8738 - Retail, vanilla Snow Leopard 10.6.2 (thanks kizwan!) with Chameleon RC4, modified DSDT. Upgraded to Core 2 CPU (easy to do). Upgraded to 640GB drive. Everything but SD card working. Minor niggles. GMA950 with QE/CI and *no* artifacts.

iMac (luxo/lamp) G4 with Tiger.

Last edited by uman; 03-13-2010 at 01:24 PM.
Reply With Quote