super_hkg 发表于 2018-8-29 15:24

【原创】在T6x/X6x 上修改SPD 教学(无需编程器)

在T6x/X6x 上修改SPD 教学(无需编程器)

简介
是咁的,小弟常为此站的CD-ROM (只读不回),有见各位研讨技术之高超,小弟super_hkg亦把自己的小小研究分享一下,望能帮助各位折腾



入正题,如果你想知改RAM 的SPD 有何作用,可看以下连结
[笔记本整机] 【原创】X61、X61S超频不用割脉【申精】
https://www.ibmnb.com/thread-1598685-1-1.html
[笔记本整机] 亲测DW1705、DW1506在T61上的超频
https://www.ibmnb.com/thread-1665155-1-1.html
小弟已成功把X61 T8300 超频至外频1066MHz



***更改SPD 为危险动作,有可能会损坏你的硬件,你必先懂你在做什么,发生什么问题只怪你手残,小弟不会负责***

工具
1. U盘一只(能放入一个linux iso 的大小)
2. 网路 (有线无线皆可)
3. 一台X60/T60/X61/T61 (废话)
4. 可刷SPD 的DDR2 SO-DIMM (废话)


做法
1. 把U盘制成Ubuntu 开机盘 (网上很多教学),如果你已有Linux 可跳到3.
2. 把RAM 插入小黑之后,以Ubuntu 开入Linux,接上网路
3. 打开Terminal
4. 安装i2c-tools
$ su
# apt-get update
# apt-get install i2c-tools

5. 在网上有一德国人(参考1)发现 GPIO 42 打通之后可以让Thinkpad 能读SPD
# modprobe -r eeprom
# modprobe -r i2c-dev
# modprobe -r i2c-i801
# cd /sys/class/gpio
# ls
export gpiochip462 unexport
export    "># echo 504 > export
那个504 ...就是那个gpiochip462 的462再加42
gpio504/direction"># echo high > gpio504/direction

6. 试一下读取SPD
# modprobe eeprom
# decode-dimms

Memory Serial Presence Detect Decoder

By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,

Jean Delvare, Trent Piepho and others



<span title="Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0050 Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0050 <============

Guessing DIMM is in bank 1


---=== SPD EEPROM Information ===---

EEPROM Checksum of bytes 0-62 OK (0x7B)

# of bytes written to SDRAM EEPROM 128

... 有野出,代表成功了

7. 把eeprom 内的SPD 抄出来
# modprobe -r eeprom
# modprobe i2c-dev
# modprobe i2c-i801
# i2cdump -y 0 0x50 b
   0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 80 08 08 0e 0a 61 40 00 05 30 45 00 82 08 00 00 ?????a@.?0E.??..
<span title="10: 0c 08 38 01 04 00 03 3d 50 50 60 3c 1e 3c 2d 01 ??8??.?=PP`<?10: 0c 08 38 01 04 00 03 3d 50 50 60 3c 1e 3c 2d 01 ??8??.?=PP`<?<-?
<span title="20: 20 27 10 17 3c 1e 1e 00 06 3c 7f 80 18 22 00 00 '??<??.?20: 20 27 10 17 3c 1e 1e 00 06 3c 7f 80 18 22 00 00 '??<??.?<???"..
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 15 ..............??
40: 7f 98 00 00 00 00 00 00 03 39 39 30 35 32 39 35 ??......?9905295
50: 2d 30 35 32 2e 41 48 30 4c 46 00 00 00 08 0f 8f -052.AH0LF...???
60: 10 99 3a 00 00 00 00 00 00 00 00 00 00 00 00 00 ??:.............
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 39 39 30 35 32 39 35 2d 30 35 32 2e 41 48 30 4c 9905295-052.AH0L
那个 -y 0 是刚刚0-0050 的第一个零,0x50不用说,就是后面的那个0050
左边是十六进显示,右边的是ASCII

8. 改SPD,要最小心,任你改,一日不reboot一日都不会有问题,更改那一个位,那一个数值,请看
参考2
读取0x01 Byte

# i2cget -y 0 0x50 0x01 b
08
写入0x01 Byte (例,写入0x08 去 i2c 0 0x51 的0x01 地址)
# i2cset -y 0 0x50 0x01 0x08 b

9. 更改校验值
改好之后一定要把校验值(checksum)的那一byte (Byte 63 0x3F) 都改,用参考3 计出校验值
Input 是0x00 至0x3E
Byte 63 (i.e. 0x3F)
Checksum for Byte 0 to 62

例子:
Hex Input:
8008080e0a61400005304500820800000c0838010400033d5050603c1e3c2d01202710173c1e1e00063c7f8018220000000000000000000000000000000012
CheckSum8 Modulo 256
Sum of Bytes % 256
Normal
<span title="15 15 <----十六进的校验值

# i2cset -y 0 0x51 0x3F 0x15 b

10. 用decode-dimm 看看是否正常
# modprobe eeprom
# decode-dimms

如果改错了校验值,decode-dimms 是不会见到参数的,只要改对了﹐就可以见到参数。每一次用i2c 工具,必先把eeprom 模组移除(modprobe -r eeprom)

后记:
一定有人会问点样在Windows 环境内改SPD,如果你懂用RWeverything 把GPIO42 设为高,那应该spdtool 都可以用,小弟曾看过ICH8的Datasheet 及研究RWEverything不果,希望有高手能指点一二
参考:
1.T61/T60: SPD EEPROM Zugriff mit Linux
https://thinkpad-forum.de/threads/132639-T61-T60-SPD-EEPROM-Zugriff-mit-Linux
2.DDR2 DIMM SPD Definition (注意: 入面的Byte 数是十进制,
http://www.simmtester.com/page/news/showpubnews.asp?num=139
3.Online Checksum Calculator
https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/

AlexFlying 发表于 2018-8-29 15:35

感谢LZ这么努力,,其实有更简单的方法:
https://www.ibmnb.com/forum.php?mod=viewthread&tid=1740244

94724000 发表于 2018-8-29 15:55

自古二楼出真理

super_hkg 发表于 2018-8-29 16:06

AlexFlying 发表于 2018-8-29 15:35
感谢LZ这么努力,,其实有更简单的方法:
https://www.ibmnb.com/forum.php?mod=viewthread&tid=1740244
...

So sad

之前我研究到 "1680" 就卡關了,所以才去看Linux

geode 发表于 2018-8-29 20:16

自古二楼出真理

j515worry 发表于 2018-8-29 22:37

mark呗

ivex 发表于 2018-8-29 23:01

被二楼抢台词了。

bsssss 发表于 2019-6-22 19:13

支持
页: [1]
查看完整版本: 【原创】在T6x/X6x 上修改SPD 教学(无需编程器)