Mark0's software support board
February 22, 2018, 04:09:09 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the new forum! Guests can posts without registration.
   Home   Help Search Login Register  
Pages: [1]
Author Topic: fw-v1.trid.xml for binary Intel CPU Microcode  (Read 68 times)
Posts: 48

« on: February 12, 2018, 10:36:30 pm »


some days ago i checked my systems for spectre and meltdown vulnerability.
To protect me i follow instructions to install CPU microcodes.

When i run trid on such microcode files found for examples downloaded as
Linux Processor Microcode Data File on Intel site these examples are
described wrong like as "Unknown!" (see appended output/trid-old.txt).

A patched file(2) command identifies such files correctly as "Intel CPU
microcode" ( see output/file-new.txt).

Unfortunately there exist at least 3 different file format. So i started
to handle binary Intel CPU microcode here. Luckily this file format is
described as "Microcode Update" in Section 9.11 of Volume 3a, IA-32
Intel Architecture Software Developer's Manual found as PDF with name
like 64-ia-32-architectures-software-developer-vol-3a-part-1-manual.pdf
on Intel site.
Alternative the file format can be seen in source file intel_microcode.c
of software iucode-tool found for example at github. So i add this URL
as reference by line

According to documentation file start with Header Version variable. At
the moment this is always one. This is expressed by XML construct:


Unfortunately this magic is not unique enough. To skip bad example
AMPBOOT.SYS16 look for reserved 12 bytes at end of header, which are nulls
for microcode examples. This is expressed by XML construct:

At this point identification is still not unique enough. To skip bad
examples like PUZ10, MAP2.9, etc. test for valid loader version number.
At the moment this seems to be always one. This is expressed by:

The total size of micro code entry is stored as 4 byte little endian at
offset 32. According to manual this value is always a multiple of
1024. This is expressed by construct:

The processor flags mask is stored as 4 byte little endian at offset
24. According to manual platform type information is encoded in the lower 8
bits of this field. The other bits seems to be unused (that are
null-bits). This is expressed by construct:


Mention these facts in remark line.

The microcode file have no name extension or "fw" for firmware i assume.
This is expressed by

More information about such files can be obtained by executing command like
   iucode_tool --verbose --list *.fw

With new trid definition files now all inspected microcode firmware files are
now recognized (see appended output/trid-new.txt). TrID definition, some
examples and output are stored in archive I hope that the XML file
can be used in future version of triddefs.

With best wishes
Jörg Jenderek

Hero Member
Posts: 1600

« Reply #1 on: February 13, 2018, 05:31:23 pm »


It seems that the XML definitions are missing from the ZIP archive.
Posts: 48

« Reply #2 on: February 13, 2018, 05:38:37 pm »


sorry! i forgot to add trid definition fw-v1.trid.xml.

Appended now!
Hero Member
Posts: 1600

« Reply #3 on: February 16, 2018, 03:14:46 pm »

Perfect, thanks!
Pages: [1]

Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2001-2010, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.157 seconds with 17 queries.