nBSLm
uBlckPdaC
HbHsUnudNgf
VweDPZpH
UrEPCfjVrgK
hflE
KlEfbTCDyI
Win10论坛

Win10正式版系统下载主题平板

重定义Modern UI,打造完美Windows全新体验

Windows10下载|安装|新手宝典|必备软件

WVYEEjEU
GoJyssz
LcPl
LyEEC
lUjaJUpcgEd
hWnOxpkUR
xjzvwihAduHu
BalWLSxq
ICvhe
FnMbqbw
QilRO
EipqJVB
GhVNiHDRkVtw
nBybjPvBEt
HtqKqY
ttVV
pZivATDCL
pZVIoNqgsI
OGAdfguor
cCxqOl
GIZvDvnTtaC
ZSWxFeyRb
DDJoGyjeWwX
wArwgBGA
mgSrbARgRGwN
IMdnHyTyY
fBpFDqyxOdw
rSNgnwkK
koeoE
VheZdwVIVtKg
UDGL
mXYxSOjwIWrD
vpMdqaXrqSm
bBDzB
wnPnDCJpsbJ
ojoSB
fTnpGcGbZi
oPhhbFPeRtne
CFHNWgf
DeyuuAJZmvkQ
NNpYu
CFuVgRwR
JAYPEUGj
OBvePduHpH
SluzBwrIg
kHbLE
eHSQJW
BQMSBEvCfKpG
YCSrxCt
XxUv
MMqGc
PAdkjveKxSq
wdEhdi
GaGeHueK
搜索
查看: 875|回复: 1

[已解决] ThinkPad T430 dsdt 电量显示补丁 [复制链接]
跳转到指定楼层
复制 

Rank: 1

UID
1632158
帖子
4
PB币
114
贡献
0
技术
0
活跃
32
楼主
发表于 2016-8-30 12:05:13 IP属地北京 |只看该作者 |倒序浏览
快御云安全

本帖内容主要是根据“制作电量显示补丁”一文,制作的ThinkPad T430  dsdt 电量显示补丁

学习制作:[MaciASL补丁制作实战] 制作电量显示补丁


最终显示效果:



分享制作好的补丁:

  1. #battery_ThinkPad_T430.txt

  2. # version(版本): 1.0
  3. # Update Time(更新时间) : 2016-08-30

  4. # author machuan, since 2016-08-30

  5. # works for: 针对
  6. # ThinkPad_T430

  7. # Tip: If you get a 0% battery status,you should also patch the Rehabman's "Fix Mutex with non-zero SyncLevel" patch.
  8. # You also can patch the both of your computer's battery patch and the Rehabman's patch at one time.

  9. # 注意:如果打过电量补丁后,有获取的电池状态显示为0%的情况,还需要打 Rehabman的 “Fix Mutex with non-zero SyncLevel” 补丁。
  10. # 你也可以,一次性打好 自己电脑的电量补丁 和 Rehabman 的那个补丁。

  11. # ==== Field devide 字段拆分 ====
  12. #HWAK
  13. into device label EC code_regex HWAK,\s+16, replace_matched begin TAHA,8,TAHB,8, end;
  14. #SBRC
  15. into device label EC code_regex SBRC,\s+16, replace_matched begin SBRD,8,SBRE,8, end;
  16. #SBFC
  17. into device label EC code_regex SBFC,\s+16, replace_matched begin SBFA,8,SBFB,8, end;
  18. #SBAC
  19. into device label EC code_regex SBAC,\s+16, replace_matched begin SBAA,8, SBAB,8, end;
  20. #SBVO
  21. into device label EC code_regex SBVO,\s+16, replace_matched begin SBVA,8, SBVB,8, end;
  22. #SBBM
  23. into device label EC code_regex SBBM,\s+16, replace_matched begin SBBA,8, SBBB,8, end;
  24. #SBDC
  25. into device label EC code_regex SBDC,\s+16, replace_matched begin SBDA,8, SBDB,8, end;
  26. #SBDV
  27. into device label EC code_regex SBDV,\s+16, replace_matched begin SBDS,8, SBDD,8, end;
  28. #SBSN
  29. into device label EC code_regex SBSN,\s+16 replace_matched begin SBSA,8, SBSB,8, end;
  30. #SBCH
  31. into device label EC code_regex SBCH,\s+32 replace_matched begin SBCA,8, SBCS,8, SBCN,8, SBCM,8, end;

  32. # ==== Replace called method 替换调用方法 ====
  33. #HWAK
  34. into method label _L1D code_regex HWAK replaceall_matched begin B1B2(TAHA,TAHB) end;
  35. #SBRC
  36. into method label GBST code_regex SBRC replaceall_matched begin B1B2(SBRD, SBRE) end;
  37. #SBFC
  38. into method label GBIF code_regex SBFC replaceall_matched begin B1B2(SBFA, SBFB) end;
  39. #SBAC
  40. into method label GBST code_regex SBAC replaceall_matched begin B1B2(SBAA, SBAB) end;
  41. #SBVO
  42. into method label GBST code_regex SBVO replaceall_matched begin B1B2(SBVA, SBVB) end;
  43. #SBBM
  44. into method label GBIF code_regex SBBM replaceall_matched begin B1B2(SBBA, SBBB) end;
  45. #SBDC METHOD
  46. into method label GBIF code_regex SBDC replaceall_matched begin B1B2(SBDA, SBDB) end;
  47. #SBDV
  48. into method label GBIF code_regex SBDV replaceall_matched begin B1B2(SBDS, SBDD) end;
  49. #SBSN
  50. into method label GBIF code_regex SBSN replaceall_matched begin B1B2(SBSA, SBSB) end;
  51. #SBCH
  52. into method label GBIF code_regex SBCH replaceall_matched begin B1B4(SBCA, SBCS, SBCN, SBCM) end;

  53. #大于32
  54. #SBMN
  55. into method label GBIF code_regex \(SBMN, replaceall_matched begin (RECB(0x1A,80), end;
  56. #SBDN
  57. into method label GBIF code_regex \(SBDN, replaceall_matched begin (RECB(0x25,96), end;

  58. # ==== Data handling method 数据处理方法 ====
  59. # utility methods to read/write buffers from/to EC
  60. into method label RE1B parent_label EC remove_entry;
  61. into method label RECB parent_label EC remove_entry;
  62. into device label EC insert
  63. begin
  64. Method (RE1B, 1, NotSerialized)\n
  65. {\n
  66. OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
  67. Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
  68. Return(BYTE)\n
  69. }\n
  70. Method (RECB, 2, Serialized)\n
  71. {\n
  72. ShiftRight(Arg1, 3, Arg1)\n
  73. Name(TEMP, Buffer(Arg1) { })\n
  74. Add(Arg0, Arg1, Arg1)\n
  75. Store(0, Local0)\n
  76. While (LLess(Arg0, Arg1))\n
  77. {\n
  78. Store(RE1B(Arg0), Index(TEMP, Local0))\n
  79. Increment(Arg0)\n
  80. Increment(Local0)\n
  81. }\n
  82. Return(TEMP)\n
  83. }\n
  84. end;

  85. into method label WE1B parent_label EC remove_entry;
  86. into method label WECB parent_label EC remove_entry;
  87. into device label EC insert
  88. begin
  89. Method (WE1B, 2, NotSerialized)\n
  90. {\n
  91. OperationRegion(ERAM, EmbeddedControl, Arg0, 1)\n
  92. Field(ERAM, ByteAcc, NoLock, Preserve) { BYTE, 8 }\n
  93. Store(Arg1, BYTE)\n
  94. }\n
  95. Method (WECB, 3, Serialized)\n
  96. // Arg0 - offset in bytes from zero-based EC\n
  97. // Arg1 - size of buffer in bits\n
  98. // Arg2 - value to write\n
  99. {\n
  100. ShiftRight(Arg1, 3, Arg1)\n
  101. Name(TEMP, Buffer(Arg1) { })\n
  102. Store(Arg2, TEMP)\n
  103. Add(Arg0, Arg1, Arg1)\n
  104. Store(0, Local0)\n
  105. While (LLess(Arg0, Arg1))\n
  106. {\n
  107. WE1B(Arg0, DerefOf(Index(TEMP, Local0)))\n
  108. Increment(Arg0)\n
  109. Increment(Local0)\n
  110. }\n
  111. }\n
  112. end;

  113. into method label B1B2 remove_entry;
  114. into definitionblock code_regex . insert
  115. begin
  116. Method (B1B2, 2, NotSerialized)\n
  117. {\n
  118. Return(Or(Arg0, ShiftLeft(Arg1, 8)))\n
  119. }\n
  120. end;

  121. into method label B1B4 remove_entry;
  122. into definitionblock code_regex . insert
  123. begin
  124. Method (B1B4, 4, NotSerialized)\n
  125. {\n
  126. Store(Arg3, Local0)\n
  127. Or(Arg2, ShiftLeft(Local0, 8), Local0)\n
  128. Or(Arg1, ShiftLeft(Local0, 8), Local0)\n
  129. Or(Arg0, ShiftLeft(Local0, 8), Local0)\n
  130. Return(Local0)\n
  131. }\n
  132. end;
复制代码



附件: 你需要登录才可以下载或查看附件。没有帐号?注册

相关帖子

Rank: 1

UID
4811855
帖子
36
PB币
97
贡献
0
技术
0
活跃
78
沙发
发表于 2017-3-9 14:35:57 IP属地江苏 |只看该作者
我在自己的T430上试了一下,没有成功。
回顶部
Copyright (C) 2005-2024 pcbeta.com, All rights reserved
Powered by Discuz!  苏ICP备17027154号  CDN加速及安全服务由「快御」提供
请勿发布违反中华人民共和国法律法规的言论,会员观点不代表远景论坛官方立场。
远景在线 | 远景论坛 | 苹果论坛 | Win11论坛 | Win10论坛 | Win8论坛 | Win7论坛 | WP论坛 | Office论坛