Core2系CPUのerrata (3)
さらに続き。
問題があるのは確定だったけど、サーバの方も一応出ていた。
http://h50222.www5.hp.com/support/403111-405/experts/73836.html
更新テストをしてみようということで、マイクロコードを以下から落としてきた。
http://www.urbanmyth.org/microcode/
intel-ia32microcode-23April2007.txt
が、kernelバージョン2.6.20以上のみという不吉な事が書いてある。
対象環境はRHEL4なのでkernelは2.6.9となっている。
これに対しての更新は以下のエラーで終わった。
# microcode_ctl -f intel-ia32microcode-23April2007.txt # dmesg microcode: error! Bad data in microcode data file microcode: Error in the microcode data
該当箇所は以下。DEFAULT_UCODE_TOTALSIZE以下のコードが合った場合はエラーになる模様。
@arch/i386/kernel/microcode.c:find_matching_ucodes total_size = get_totalsize(&mc_header); if ((cursor + total_size > user_buffer_size) || (total_size < DEFAULT_UCODE_TOTALSIZE)) { printk(KERN_ERR "microcode: error! Bad data in microcode data file\n"); error = -EINVAL; goto out; }
一つでもNGだとエラーになる様なので、以下の通り適当に読み飛ばすようにして対応。
@arch/i386/kernel/microcode.c:find_matching_ucodes total_size = get_totalsize(&mc_header); if ((cursor + total_size > user_buffer_size) || (total_size < DEFAULT_UCODE_TOTALSIZE)) { printk(KERN_ERR "microcode: error! Bad data in microcode data file\n"); + printk(KERN_ERR "microcode: skip Bad data\n"); + cursor += total_size; + continue; - error = -EINVAL; - goto out; }
これを以下の通り再コンパイルしてロードしなおす。
# cat Makefile obj-m += microcode.o # make -C /usr/src/kernels/2.6.9-XXXXX SUBDIRS=$PWD modules # rmmod microcode # insmod microcode.ko
で、適用リトライ。今度は成功。
# microcode_ctl -f intel-ia32microcode-23April2007.txt # dmesg microcode: error! Bad data in microcode data file microcode: skip Bad data microcode: CPU0 updated from revision 0x44 to 0xc6, date = 03072007 microcode: CPU3 updated from revision 0x44 to 0xc6, date = 03072007 microcode: CPU2 updated from revision 0x44 to 0xc6, date = 03072007 microcode: CPU1 updated from revision 0x44 to 0xc6, date = 03072007
再起動すると消えるので以下の設定をして起動時に毎回自動適用を行うようにする。
- /etc/firmware/microcode.datの置き換え
- chkconfig で microcode_ctl を有効化
- /lib/modules/2.6.9-XXXXX/kernel/arch/i386/kernel/microcode.ko を置き換え
後は、RHEL3(linux 2.4.21系)でのmicrocodeドライバの確認と、ベンダー純正のBIOS経由での
アップデートのリビジョン確認かな。