iucode_tool unable to handle specific microcode
Please see the following microcode for which iucode_tool says it is invalid:
$ iucode_tool --verbose --list /tmp/CPUMicrocodes/Intel/cpu106C0_plat01_ver000000
07_2007-08-24_PRD_923CDFA3.bin
microcode bundle 1: /tmp/CPUMicrocodes/Intel/cpu106C0_plat01_ver00000007_2007-08-24_PRD_923CDFA3.bin
iucode_tool: microcode 001/001: invalid microcode data
However, MCE says it is valid:
cpu106C0_plat01_ver00000007_2007-08-24_PRD_923CDFA3.bin (1/1)
+---+-------+-------------+----------+------------+------+--------+--------+------+
| # | CPUID | Platform ID | Revision | Date | Type | Size | Offset | Last |
+---+-------+-------------+----------+------------+------+--------+--------+------+
| 1 | 106C0 | 01 (0) | 7 | 2007-08-24 | PRD | 0x1430 | 0x0 | Yes |
+---+-------+-------------+----------+------------+------+--------+--------+------+
Looks like iucode_tool breaks out at https://gitlab.com/iucode-tool/iucode-tool/blob/master/intel_microcode.c#L736
So is this a problem within iucode_tool or is MCE wrong or microcode somehow garbage/broken?
When I use --no-strict-checks
option iucode_tool is able to write a file,
$ iucode_tool -vvvv --no-strict-checks --list -tr --write-firmware=/tmp/fixed/ /tmp/CPUMicrocodes/Intel/cpu106C0_plat01_ver00000007_2007-08-24_PRD_923CDFA3.bin
iucode_tool: /tmp/CPUMicrocodes/Intel/cpu106C0_plat01_ver00000007_2007-08-24_PRD_923CDFA3.bin: loading (microcode recovery binary mode)
iucode_tool: microcode scan: microcode block at position 0 with 1 microcode(s), size 5168 bytes
iucode_tool: microcode scan: found 1 microcode block(s) with 1 microcode(s), total size: 5168 bytes
iucode_tool: loaded microcode bundle 1: /tmp/CPUMicrocodes/Intel/cpu106C0_plat01_ver00000007_2007-08-24_PRD_923CDFA3.bin (5168 bytes)
microcode bundle 1: /tmp/CPUMicrocodes/Intel/cpu106C0_plat01_ver00000007_2007-08-24_PRD_923CDFA3.bin
iucode_tool: processed 1 valid microcode(s), 1 signature(s), 1 unique signature(s)
selected microcodes:
001/001: sig 0x000106c0, pf_mask 0x01, 2007-08-24, rev 0x0007, size 5168
iucode_tool: selected 1 microcode(s), 1 signature(s)
iucode_tool: Writing microcode firmware file(s) into /tmp/fixed/
iucode_tool: 06-1c-00: writing microcode 001/001 (sig 0x000106c0, pf_mask 0x01, rev 0x0007)
iucode_tool: 06-1c-00: 1 microcode entries written, 5168 bytes
iucode_tool: 1 file(s) were written into /tmp/fixed/
However, that written file is still broken
$ iucode_tool -vvvv --list /tmp/fixed/06-1c-00
iucode_tool: /tmp/fixed/06-1c-00: loading (binary mode)
iucode_tool: loaded microcode bundle 1: /tmp/fixed/06-1c-00 (5168 bytes)
microcode bundle 1: /tmp/fixed/06-1c-00
iucode_tool: microcode 001/001: invalid microcode data
Is there any way to recover the microcode and write to a valid new file?
Crosspost: https://github.com/platomav/CPUMicrocodes/issues/6