intel / Intel-Linux-Processor-Microcode-Data-Files

Other
668 stars 71 forks source link

Consider adding a stable file to link platform identifiers with file names #5

Closed raphaelcohn closed 5 years ago

raphaelcohn commented 5 years ago

Whilst releasenote could be parsed to obtain a mapping of platform identifiers to file names, it's hardly elegant and would be very brittle.

It would be much more useful to have a machine readable TSV (or the like) file, with details such as

Family Model Stepping Folder Platform Identifier(s) [comma separated if more than one apply]\*
06       67       1               intel-ucode-with-caveats  PI1,PI2

\* eg 6-37-8 has 02 and 0C.

esyr-rh commented 5 years ago

It is possible to parse microcode files themselves (with a tool like [1], for example) in order to obtain signatures and Platform ID masks of each microcode.

[1] https://gitlab.com/iucode-tool/iucode-tool

raphaelcohn commented 5 years ago

Yes, it is. It's just a lot more work and more dependencies for a build system.

I'll write my own parser and embed it into a Rust build.rs build script.

esyr-rh commented 5 years ago

It's better to rely on microcode files themselves anyway, considering 1dd14da6d1ea5cfbd95923653f31c04aac3aa655.

Regarding dependencies, it can be done with programs from coreutils only, like [1] (strictly speaking, hexdump has to be replaced with multiple calls to od in order to depend only on coreutils).

[1] https://git.centos.org/rpms/microcode_ctl/blob/c7/f/SOURCES/gen_provides.sh#_30

raphaelcohn commented 5 years ago

Ta. Wrote my own parser and put into my own build script. Interesting the platform id mask isn't correctly documented - apparently it can be zero for some very old microcode files...

hmh commented 5 years ago

Obnote: I am not affiliated with Intel.

@raphaelcohn: Platform masks being zero on ancient processors was very much a well documented fact. It used to be documented properly somewhere in The Intel 64 and IA‐32 Architectures Software Developer's Manual, Volume 3A: System Programming Guide, Part 1 (order number 253668), section 9.11..

There are other caveats, the rarely used extended signature table being one.

(edit: could not find this information in the SDM anymore, maybe it is still there, but in a quick re-read I could not locate it).

raphaelcohn commented 5 years ago

Yep - not in my edition from Jan 2019 as well.