#Maintained by: RehabMan for: Laptop Patches #battery_Samsung-NP900X5T.txt # created by MegaStood 2020-01-18 # works for: # Samsung NP900X5T into method label B1B2 remove_entry; into definitionblock code_regex . insert begin Method (B1B2, 2, NotSerialized) { Return (Or (Arg0, ShiftLeft (Arg1, 8))) }\n end; # 16-bit EC registers to 8-bit into scope label _SB.PCI0.LPCB.H_EC code_regex BTPC,\s+16 replace_matched begin BPC0,8,BPC1,8 end; into scope label _SB.PCI0.LPCB.H_EC code_regex CYLC,\s+16 replace_matched begin CYC0,8,CYC1,8 end; #the following 3 patches could be deleted cause VERS,CPUP,CFSP only appear once. into scope label _SB.PCI0.LPCB.H_EC code_regex VERS,\s+16 replace_matched begin VES0,8,VES1,8 end; into scope label _SB.PCI0.LPCB.H_EC code_regex CPUP,\s+16 replace_matched begin XPU0,8,XPU1,8 end; into scope label _SB.PCI0.LPCB.H_EC code_regex CFSP,\s+16 replace_matched begin CFS0,8,CFS1,8 end; into method label B1B4 remove_entry; into definitionblock code_regex . insert begin Method (B1B4, 4, NotSerialized)\n {\n Store(Arg3, Local0)\n Or(Arg2, ShiftLeft(Local0, 8), Local0)\n Or(Arg1, ShiftLeft(Local0, 8), Local0)\n Or(Arg0, ShiftLeft(Local0, 8), Local0)\n Return(Local0)\n }\n end; # 32-bit EC registers into scope label _SB.PCI0.LPCB.H_EC code_regex B1RR,\s+32 replace_matched begin BRR0,8,BRR1,8,BRR2,8,BRR3,8 end; into scope label _SB.PCI0.LPCB.H_EC code_regex B1PV,\s+32 replace_matched begin BPV0,8,BPV1,8,BPV2,8,BPV3,8 end; into scope label _SB.PCI0.LPCB.H_EC code_regex B1AF,\s+32 replace_matched begin BAF0,8,BAF1,8,BAF2,8,BAF3,8 end; into scope label _SB.PCI0.LPCB.H_EC code_regex B1VL,\s+32 replace_matched begin BVL0,8,BVL1,8,BVL2,8,BVL3,8 end; # the following 4 patches could be deleted cause B2RR, B2PV, B2AF, B2VL only appear once into scope label _SB.PCI0.LPCB.H_EC code_regex B2RR,\s+32 replace_matched begin BRR5,8,BRR6,8,BRR7,8,BRR8,8 end; into scope label _SB.PCI0.LPCB.H_EC code_regex B2PV,\s+32 replace_matched begin BPV5,8,BPV6,8,BPV7,8,BPV8,8 end; into scope label _SB.PCI0.LPCB.H_EC code_regex B2AF,\s+32 replace_matched begin BAF5,8,BAF6,8,BAF7,8,BAF8,8 end; into scope label _SB.PCI0.LPCB.H_EC code_regex B2VL,\s+32 replace_matched begin BVL5,8,BVL6,8,BVL7,8,BVL8,8 end; into method label _BST code_regex \(\^\^PCI0\.LPCB\.H_EC\.B1RR, replace_matched begin (B1B4(^^PCI0.LPCB.H_EC.BRR0,^^PCI0.LPCB.H_EC.BRR1,^^PCI0.LPCB.H_EC.BRR2,^^PCI0.LPCB.H_EC.BRR3), end; into method label _BST code_regex \(\^\^PCI0\.LPCB\.H_EC\.B1PV, replace_matched begin (B1B4(^^PCI0.LPCB.H_EC.BPV0,^^PCI0.LPCB.H_EC.BPV1,^^PCI0.LPCB.H_EC.BPV2,^^PCI0.LPCB.H_EC.BPV3), end; into method label PPTS code_regex \(\^PCI0\.LPCB\.H_EC\.B1AF, replace_matched begin (B1B4(^PCI0.LPCB.H_EC.BAF0,^PCI0.LPCB.H_EC.BAF1,^PCI0.LPCB.H_EC.BAF2,^PCI0.LPCB.H_EC.BAF3), end; into method label PWAK code_regex \(\^PCI0\.LPCB\.H_EC\.B1AF, replace_matched begin (B1B4(^PCI0.LPCB.H_EC.BAF0,^PCI0.LPCB.H_EC.BAF1,^PCI0.LPCB.H_EC.BAF2,^PCI0.LPCB.H_EC.BAF3), end; into method label SBIX code_regex \(\^\^PCI0\.LPCB\.H_EC\.B1AF, replace_matched begin (B1B4(^^PCI0.LPCB.H_EC.BAF0,^^PCI0.LPCB.H_EC.BAF1,^^PCI0.LPCB.H_EC.BAF2,^^PCI0.LPCB.H_EC.BAF3), end; into method label SBIX code_regex \(\^\^PCI0\.LPCB\.H_EC\.B1VL, replace_matched begin (B1B4(^^PCI0.LPCB.H_EC.BVL0,^^PCI0.LPCB.H_EC.BVL1,^^PCI0.LPCB.H_EC.BVL2,^^PCI0.LPCB.H_EC.BVL3), end; into method label SBIX code_regex \(\^\^PCI0\.LPCB\.H_EC\.CYLC, replace_matched begin (B1B2(^^PCI0.LPCB.H_EC.CYC0,^^PCI0.LPCB.H_EC.CYC1), end; into method label _BTP code_regex Store\s\((.*),\s\^\^PCI0\.LPCB\.H_EC\.BTPC\) replace_matched begin Store(%1, ^^PCI0.LPCB.H_EC.BPC0) Store(ShiftRight(%1,8), ^^PCI0.LPCB.H_EC.BPC1) end;