Advertisement
kradnozd

RehabMan Asus N55SL Battery

Jan 27th, 2015
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.13 KB | None | 0 0
  1. #Maintained by: RehabMan for: Laptop Patches
  2. #battery_ASUS-N55SL.txt
  3.  
  4. # created by RehabMan 8/12/2013
  5. # created originally for jesselid
  6.  
  7. # works for:
  8. # ASUS N55SL, BIOS rev. 204
  9. # ASUS VivoBook series
  10. # ASUS Zenbook UX31A
  11. # ASUS UX301LA
  12. # ASUS X553E-SX399V
  13. # ASUS F501A
  14. # ASUS K55VM
  15. # ASUS U46SV, BIOS rev. 2.04
  16. # ASUS N43
  17. # ASUS PU500CA (90NB00F1-M01120)
  18. # ASUS N73SV
  19. # ASUS X401A-WX108
  20. # ASUS F551CA Bios rev. 207
  21. # ASUS S551LB VivoBook
  22. # ASUS ZenBook UX32VD
  23. # ASUS F550L-X455H
  24. # ASUS X53S
  25. # ASUS K550JD-XX003H
  26. # ASUS G53SX
  27.  
  28. into method label B1B2 remove_entry;
  29. into definitionblock code_regex . insert
  30. begin
  31. Method (B1B2, 2, NotSerialized) { Return (Or (Arg0, ShiftLeft (Arg1, 8))) }\n
  32. end;
  33.  
  34. # not really for battery, but might come in handy to read fan speed(s)
  35. into device label EC0 code_regex TAH0,\s+16 replace_matched begin TH00,8,TH01,8 end;
  36. into device label EC0 code_regex TAH1,\s+16 replace_matched begin TH10,8,TH11,8 end;
  37. into method label TACH code_regex \(TAH0, replace_matched begin (B1B2(TH00,TH01), end;
  38. into method label TACH code_regex \(TAH1, replace_matched begin (B1B2(TH10,TH11), end;
  39. into method label GFAN code_regex \(\\_SB\.PCI0\.LPCB\.EC0\.TAH0, replace_matched begin (B1B2(\\_SB.PCI0.LPCB.EC0.TH00,\\_SB.PCI0.LPCB.EC0.TH01), end;
  40.  
  41. # battery EC
  42. into device label EC0 code_regex B0SN,\s+16 replace_matched begin B0S0,8,B0S1,8 end;
  43. into device label EC0 code_regex B1SN,\s+16 replace_matched begin B1S0,8,B1S1,8 end;
  44. into method label BIFA code_regex \(B0SN, replace_matched begin (B1B2(B0S0,B0S1), end;
  45. into method label BIFA code_regex \(B1SN, replace_matched begin (B1B2(B1S0,B1S1), end;
  46. into device label EC0 code_regex DT2B,\s+16 replace_matched begin T2B0,8,T2B1,8 end;
  47. into method label SMBR code_regex \(DT2B, replace_matched begin (B1B2(T2B0,T2B1), end;
  48. into method label SMBW code_regex Store\s+\(([^,]*),\s+DT2B\) replace_matched
  49. begin
  50. Store(ShiftRight(%1,8),T2B1) Store(%1,T2B0)
  51. end;
  52.  
  53. into device label EC0 insert
  54. begin
  55. Method (RDBA, 0, Serialized)\n
  56. {\n
  57. Name (TEMP, Buffer(0x20) { })\n
  58. Store (BA00, Index(TEMP, 0x00))\n
  59. Store (BA01, Index(TEMP, 0x01))\n
  60. Store (BA02, Index(TEMP, 0x02))\n
  61. Store (BA03, Index(TEMP, 0x03))\n
  62. Store (BA04, Index(TEMP, 0x04))\n
  63. Store (BA05, Index(TEMP, 0x05))\n
  64. Store (BA06, Index(TEMP, 0x06))\n
  65. Store (BA07, Index(TEMP, 0x07))\n
  66. Store (BA08, Index(TEMP, 0x08))\n
  67. Store (BA09, Index(TEMP, 0x09))\n
  68. Store (BA0A, Index(TEMP, 0x0A))\n
  69. Store (BA0B, Index(TEMP, 0x0B))\n
  70. Store (BA0C, Index(TEMP, 0x0C))\n
  71. Store (BA0D, Index(TEMP, 0x0D))\n
  72. Store (BA0E, Index(TEMP, 0x0E))\n
  73. Store (BA0F, Index(TEMP, 0x0F))\n
  74. Store (BA10, Index(TEMP, 0x10))\n
  75. Store (BA11, Index(TEMP, 0x11))\n
  76. Store (BA12, Index(TEMP, 0x12))\n
  77. Store (BA13, Index(TEMP, 0x13))\n
  78. Store (BA14, Index(TEMP, 0x14))\n
  79. Store (BA15, Index(TEMP, 0x15))\n
  80. Store (BA16, Index(TEMP, 0x16))\n
  81. Store (BA17, Index(TEMP, 0x17))\n
  82. Store (BA18, Index(TEMP, 0x18))\n
  83. Store (BA19, Index(TEMP, 0x19))\n
  84. Store (BA1A, Index(TEMP, 0x1A))\n
  85. Store (BA1B, Index(TEMP, 0x1B))\n
  86. Store (BA1C, Index(TEMP, 0x1C))\n
  87. Store (BA1D, Index(TEMP, 0x1D))\n
  88. Store (BA1E, Index(TEMP, 0x1E))\n
  89. Store (BA1F, Index(TEMP, 0x1F))\n
  90. Return (TEMP)\n
  91. }\n
  92. end;
  93.  
  94. into device label EC0 insert
  95. begin
  96. Method (WRBA, 1, Serialized)\n
  97. {\n
  98. Name (TEMP, Buffer(0x20) { })\n
  99. Store (Arg0, TEMP)\n
  100. Store (DerefOf(Index(TEMP, 0x00)), BA00)\n
  101. Store (DerefOf(Index(TEMP, 0x01)), BA01)\n
  102. Store (DerefOf(Index(TEMP, 0x02)), BA02)\n
  103. Store (DerefOf(Index(TEMP, 0x03)), BA03)\n
  104. Store (DerefOf(Index(TEMP, 0x04)), BA04)\n
  105. Store (DerefOf(Index(TEMP, 0x05)), BA05)\n
  106. Store (DerefOf(Index(TEMP, 0x06)), BA06)\n
  107. Store (DerefOf(Index(TEMP, 0x07)), BA07)\n
  108. Store (DerefOf(Index(TEMP, 0x08)), BA08)\n
  109. Store (DerefOf(Index(TEMP, 0x09)), BA09)\n
  110. Store (DerefOf(Index(TEMP, 0x0A)), BA0A)\n
  111. Store (DerefOf(Index(TEMP, 0x0B)), BA0B)\n
  112. Store (DerefOf(Index(TEMP, 0x0C)), BA0C)\n
  113. Store (DerefOf(Index(TEMP, 0x0D)), BA0D)\n
  114. Store (DerefOf(Index(TEMP, 0x0E)), BA0E)\n
  115. Store (DerefOf(Index(TEMP, 0x0F)), BA0F)\n
  116. Store (DerefOf(Index(TEMP, 0x10)), BA10)\n
  117. Store (DerefOf(Index(TEMP, 0x11)), BA11)\n
  118. Store (DerefOf(Index(TEMP, 0x12)), BA12)\n
  119. Store (DerefOf(Index(TEMP, 0x13)), BA13)\n
  120. Store (DerefOf(Index(TEMP, 0x14)), BA14)\n
  121. Store (DerefOf(Index(TEMP, 0x15)), BA15)\n
  122. Store (DerefOf(Index(TEMP, 0x16)), BA16)\n
  123. Store (DerefOf(Index(TEMP, 0x17)), BA17)\n
  124. Store (DerefOf(Index(TEMP, 0x18)), BA18)\n
  125. Store (DerefOf(Index(TEMP, 0x19)), BA19)\n
  126. Store (DerefOf(Index(TEMP, 0x1A)), BA1A)\n
  127. Store (DerefOf(Index(TEMP, 0x1B)), BA1B)\n
  128. Store (DerefOf(Index(TEMP, 0x1C)), BA1C)\n
  129. Store (DerefOf(Index(TEMP, 0x1D)), BA1D)\n
  130. Store (DerefOf(Index(TEMP, 0x1E)), BA1E)\n
  131. Store (DerefOf(Index(TEMP, 0x1F)), BA1F)\n
  132. }\n
  133. end;
  134.  
  135. into device label EC0 code_regex BDAT,\s+256 replace_matched
  136. begin
  137. //BDAT, 256,\n
  138. BA00,8,BA01,8,BA02,8,BA03,8,\n
  139. BA04,8,BA05,8,BA06,8,BA07,8,\n
  140. BA08,8,BA09,8,BA0A,8,BA0B,8,\n
  141. BA0C,8,BA0D,8,BA0E,8,BA0F,8,\n
  142. BA10,8,BA11,8,BA12,8,BA13,8,\n
  143. BA14,8,BA15,8,BA16,8,BA17,8,\n
  144. BA18,8,BA19,8,BA1A,8,BA1B,8,\n
  145. BA1C,8,BA1D,8,BA1E,8,BA1F,8\n
  146. end;
  147.  
  148. into method label SMBR code_regex \(BDAT, replaceall_matched begin (RDBA(), end;
  149. into method label SMBR code_regex Store\s\((.*),\sBDAT\) replaceall_matched begin WRBA(%1) end;
  150. into method label SMBW code_regex Store\s\((.*),\sBDAT\) replaceall_matched begin WRBA(%1) end;
  151. into method label ECSB code_regex Store\s\((.*),\sBDAT\) replaceall_matched begin WRBA(%1) end;
  152. into method label ECSB code_regex \(BDAT, replaceall_matched begin (RDBA(), end;
  153.  
  154.  
  155. into device label EC0 insert
  156. begin
  157. Method (RDBB, 0, Serialized)\n
  158. {\n
  159. Name (TEMP, Buffer(0x20) { })\n
  160. Store (BB00, Index(TEMP, 0x00))\n
  161. Store (BB01, Index(TEMP, 0x01))\n
  162. Store (BB02, Index(TEMP, 0x02))\n
  163. Store (BB03, Index(TEMP, 0x03))\n
  164. Store (BB04, Index(TEMP, 0x04))\n
  165. Store (BB05, Index(TEMP, 0x05))\n
  166. Store (BB06, Index(TEMP, 0x06))\n
  167. Store (BB07, Index(TEMP, 0x07))\n
  168. Store (BB08, Index(TEMP, 0x08))\n
  169. Store (BB09, Index(TEMP, 0x09))\n
  170. Store (BB0A, Index(TEMP, 0x0A))\n
  171. Store (BB0B, Index(TEMP, 0x0B))\n
  172. Store (BB0C, Index(TEMP, 0x0C))\n
  173. Store (BB0D, Index(TEMP, 0x0D))\n
  174. Store (BB0E, Index(TEMP, 0x0E))\n
  175. Store (BB0F, Index(TEMP, 0x0F))\n
  176. Store (BB10, Index(TEMP, 0x10))\n
  177. Store (BB11, Index(TEMP, 0x11))\n
  178. Store (BB12, Index(TEMP, 0x12))\n
  179. Store (BB13, Index(TEMP, 0x13))\n
  180. Store (BB14, Index(TEMP, 0x14))\n
  181. Store (BB15, Index(TEMP, 0x15))\n
  182. Store (BB16, Index(TEMP, 0x16))\n
  183. Store (BB17, Index(TEMP, 0x17))\n
  184. Store (BB18, Index(TEMP, 0x18))\n
  185. Store (BB19, Index(TEMP, 0x19))\n
  186. Store (BB1A, Index(TEMP, 0x1A))\n
  187. Store (BB1B, Index(TEMP, 0x1B))\n
  188. Store (BB1C, Index(TEMP, 0x1C))\n
  189. Store (BB1D, Index(TEMP, 0x1D))\n
  190. Store (BB1E, Index(TEMP, 0x1E))\n
  191. Store (BB1F, Index(TEMP, 0x1F))\n
  192. Return (TEMP)\n
  193. }\n
  194. end;
  195.  
  196. into device label EC0 insert
  197. begin
  198. Method (WRBB, 1, Serialized)\n
  199. {\n
  200. Name (TEMP, Buffer(0x20) { })\n
  201. Store (Arg0, TEMP)\n
  202. Store (DerefOf(Index(TEMP, 0x00)), BB00)\n
  203. Store (DerefOf(Index(TEMP, 0x01)), BB01)\n
  204. Store (DerefOf(Index(TEMP, 0x02)), BB02)\n
  205. Store (DerefOf(Index(TEMP, 0x03)), BB03)\n
  206. Store (DerefOf(Index(TEMP, 0x04)), BB04)\n
  207. Store (DerefOf(Index(TEMP, 0x05)), BB05)\n
  208. Store (DerefOf(Index(TEMP, 0x06)), BB06)\n
  209. Store (DerefOf(Index(TEMP, 0x07)), BB07)\n
  210. Store (DerefOf(Index(TEMP, 0x08)), BB08)\n
  211. Store (DerefOf(Index(TEMP, 0x09)), BB09)\n
  212. Store (DerefOf(Index(TEMP, 0x0A)), BB0A)\n
  213. Store (DerefOf(Index(TEMP, 0x0B)), BB0B)\n
  214. Store (DerefOf(Index(TEMP, 0x0C)), BB0C)\n
  215. Store (DerefOf(Index(TEMP, 0x0D)), BB0D)\n
  216. Store (DerefOf(Index(TEMP, 0x0E)), BB0E)\n
  217. Store (DerefOf(Index(TEMP, 0x0F)), BB0F)\n
  218. Store (DerefOf(Index(TEMP, 0x10)), BB10)\n
  219. Store (DerefOf(Index(TEMP, 0x11)), BB11)\n
  220. Store (DerefOf(Index(TEMP, 0x12)), BB12)\n
  221. Store (DerefOf(Index(TEMP, 0x13)), BB13)\n
  222. Store (DerefOf(Index(TEMP, 0x14)), BB14)\n
  223. Store (DerefOf(Index(TEMP, 0x15)), BB15)\n
  224. Store (DerefOf(Index(TEMP, 0x16)), BB16)\n
  225. Store (DerefOf(Index(TEMP, 0x17)), BB17)\n
  226. Store (DerefOf(Index(TEMP, 0x18)), BB18)\n
  227. Store (DerefOf(Index(TEMP, 0x19)), BB19)\n
  228. Store (DerefOf(Index(TEMP, 0x1A)), BB1A)\n
  229. Store (DerefOf(Index(TEMP, 0x1B)), BB1B)\n
  230. Store (DerefOf(Index(TEMP, 0x1C)), BB1C)\n
  231. Store (DerefOf(Index(TEMP, 0x1D)), BB1D)\n
  232. Store (DerefOf(Index(TEMP, 0x1E)), BB1E)\n
  233. Store (DerefOf(Index(TEMP, 0x1F)), BB1F)\n
  234. }\n
  235. end;
  236.  
  237. into device label EC0 code_regex BDA2,\s+256 replace_matched
  238. begin
  239. //BDA2, 256,\n
  240. BB00,8,BB01,8,BB02,8,BB03,8,\n
  241. BB04,8,BB05,8,BB06,8,BB07,8,\n
  242. BB08,8,BB09,8,BB0A,8,BB0B,8,\n
  243. BB0C,8,BB0D,8,BB0E,8,BB0F,8,\n
  244. BB10,8,BB11,8,BB12,8,BB13,8,\n
  245. BB14,8,BB15,8,BB16,8,BB17,8,\n
  246. BB18,8,BB19,8,BB1A,8,BB1B,8,\n
  247. BB1C,8,BB1D,8,BB1E,8,BB1F,8\n
  248. end;
  249.  
  250. into method label SMBR code_regex \(BDA2, replaceall_matched begin (RDBB(), end;
  251. into method label SMBR code_regex Store\s\((.*),\sBDA2\) replaceall_matched begin WRBB(%1) end;
  252. into method label SMBW code_regex Store\s\((.*),\sBDA2\) replaceall_matched begin WRBB(%1) end;
  253. into method label ECSB code_regex Store\s\((.*),\sBDA2\) replaceall_matched begin WRBB(%1) end;
  254. into method label ECSB code_regex \(BDA2, replaceall_matched begin (RDBB(), end;
  255.  
  256. # additional work for _BIX method present in some ASUS laptops
  257.  
  258. into device label EC0 code_regex B0C3,\s+16 replace_matched begin XC30,8,XC31,8 end;
  259. into device label EC0 code_regex B1C3,\s+16 replace_matched begin YC30,8,YC31,8 end;
  260. into_all method label _BIX code_regex \(\^\^LPCB\.EC0\.B0C3, replaceall_matched begin (B1B2(^^LPCB.EC0.XC30,^^LPCB.EC0.XC31), end;
  261. into_all method label _BIX code_regex \(\^\^LPCB\.EC0\.B1C3, replaceall_matched begin (B1B2(^^LPCB.EC0.YC30,^^LPCB.EC0.YC31), end;
  262.  
  263. # or could remove the _BIX method if it turns out not to work
  264.  
  265. #into_all method label _BIX remove_entry;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement