RehabMan
Moderator
- Joined
- May 2, 2012
- Messages
- 181,058
- Motherboard
- Intel DH67BL
- CPU
- i7-2600K
- Graphics
- HD 3000
- Mac
- Mobile Phone
So I'm working to fix my DSDT for battery status.
Following the guide I've found 3 items larger than 8 bits and which are accessed.
Here they are:
- VER, 24, [line 3363] = 24 bits fix (3x8 bits)
- Accessed at line 18318, method WMAB: Store (VER, Local0)
- Fixing with these 3 patches:
- Result:Code:into device label EC code_regex VER,\s+24, replace_matched begin ER00,8,ER01,8,ER02,8, end; into method label B1B3 remove_entry; into definitionblock code_regex . insert begin Method (B1B3, 3, NotSerialized)\n {\n Store(Arg2, Local0)\n Or(Arg1, ShiftLeft(Local0, 8), Local0)\n Or(Arg0, ShiftLeft(Local0, 8), Local0)\n Return(Local0)\n }\n end; into method label WMAB code_regex \(VER, replaceall_matched begin B1B3(ER00,ER01,ER02), end;
Code:[line 3363] ER00,8,ER01,8,ER02,8, [line 18318] Store (B1B3(ER00,ER01,ER02), Local0)
- CBT, 16, [line 3518] = 16 bits fix (2x8 bits)
- Accessed at line 17741, method WMBB: S_DW (Local0, 0x14, CBT)
- Fixing with these 3 patches:
- Result:Code:into device label EC code_regex CBT,\s+16, replace_matched begin BT00,8,BT01,8, end; into method label B1B2 remove_entry; into definitionblock code_regex . insert begin Method (B1B2, 2, NotSerialized) { Return(Or(Arg0, ShiftLeft(Arg1, 8))) }\n end; into method label WMBB code_regex \CBT\) replaceall_matched begin B1B2(BT00,BT01)) end;
Code:[line 3518] BT00,8,BT01,8, [line 17741] S_DW (Local0, 0x14, B1B2(BT00,BT01))
- BMFG, 72, [line 3519] = 72 bits buffer field (need help here)
- Accessed at line 4406, method XBIF: Store (ToString (BMFG, Ones), Index (PBIF, 0x09))
- I only have this 1 patch yet:
- Note: I can't figure out the offset which this field is placed. Here's a screenshot from the code: http://i.imgur.com/sa0kz19.pngCode:into device label EC code_regex (BMFG,)\s+(72) replace_matched begin MFGX,%2,//%1%2 end;
Can someone help me with this? This is my first try patching the DSDT, if something is wrong please tell me.
Offset calculation for BMFG:
Code:
Offset (0x83),
BTY, 8, //83
BDCH, 8, //84
BDCL, 8, //85
BFCH, 8, //86
BFCL, 8, //87
BDVH, 8, //88
BDVL, 8, //89
BWCH, 8, //8a
BWCL, 8, //8b
BLCH, 8, //8c
BLCL, 8, //8d
BCG1, 16, //8e
BCG2, 16, //90
BSNH, 8, //92
BSNL, 8, //93
BPRH, 8, //94
BPRL, 8, //95
BRCH, 8, //96
BRCL, 8, //97
BPVH, 8, //98
BPVL, 8, //99
BTP, 16, //9a
CBT, 16, //9c
BMFG, 72, //9e
Also, is it possible to use both ACPI hotpatches and DSDT static patches? My HD4400 config.plist from RehabMan's repo has some hotpatches that seems to be working fine, I can boot my Hackintosh with them and also with the unmodified DSDT.aml.
Yes.
Since entries in config.plist/ACPI/DSDT/Patches apply to ACPI/patched/DSDT.aml, there is no issue...