GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: 更新Pro版本4.2.5 新增大量功能 · CrackerCat/linuxKernelRoot@14e1e0b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Pro(众测开放中)/sources/testModule/module_fake_thermal
    • patch_thermal_zone_get_temp.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Pro(众测开放中)/sources/testModule/module_fake_thermal/patch_thermal_zone_get_temp.cpp‎

Copy file name to clipboardExpand all lines: Pro(众测开放中)/sources/testModule/module_fake_thermal/patch_thermal_zone_get_temp.cpp
+9-9Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ KModErr PatchThermalZoneGetTemp::patch_thermal_zone_get_temp() {
4949

5050
a->ldr(w10, ptr(x1)); // 读取内核即将要输出的温度。
5151

52-
aarch64_asm_mov_w(a, w11, 38000); // 低温区放行
52+
aarch64_asm_mov_w(a, w11, 35000); // 低温区放行
5353
a->cmp(w10, w11);
5454
a->b(CondCode::kLE, L_end);
5555

@@ -58,26 +58,26 @@ KModErr PatchThermalZoneGetTemp::patch_thermal_zone_get_temp() {
5858
a->b(CondCode::kGE, L_end);
5959

6060
// 精细化系数 0.37 (37%)
61-
// 逻辑:(Real - 38) * 0.37 + 38
61+
// 逻辑:(Real - 35) * 0.37 + 35
6262
// 效果:95度(真实) -> 59.1度(伪装)。
6363
// 这是一个巧妙的数值:平时奔放,极限时触发轻度温控保护主板。
64-
// int fake = 38000 + ((real - 38000) * 37 / 100);
64+
// int fake = 35000 + ((real - 35000) * 37 / 100);
6565
// kernel_module::export_symbol::printk(a, err, "[!!!] thermal_zone_get_temp real val: %d\n", w10);
6666

67-
// (real - 38000)
68-
aarch64_asm_mov_w(a, w11, 38000);
67+
// (real - 35000)
68+
aarch64_asm_mov_w(a, w11, 35000);
6969
a->sub(w12, w10, w11);
7070

71-
// (real - 38000) * 35
71+
// (real - 35000) * 35
7272
aarch64_asm_mov_w(a, w11, 35);
7373
a->mul(w12, w12, w11);
7474

75-
// (real - 38000) * 35 / 100
75+
// (real - 35000) * 35 / 100
7676
aarch64_asm_mov_w(a, w11, 100);
7777
a->sdiv(w12, w12, w11);
7878

79-
// 38000 + ((real - 38000) * 35 / 100)
80-
aarch64_asm_mov_w(a, w11, 38000);
79+
// 35000 + ((real - 35000) * 35 / 100)
80+
aarch64_asm_mov_w(a, w11, 35000);
8181
a->add(w12, w12, w11);
8282

8383
// kernel_module::export_symbol::printk(a, err, "[!!!] thermal_zone_get_temp fake val: %d\n", w12);

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.