Page MenuHomeFreeBSD

sysutils/devcpu-data: Use new microcode format

Authored by sbruno on May 15 2018, 3:46 PM.



Use new microcode format processing tools from Ed.

Diff Detail

rP FreeBSD ports repository
No Linters Available
No Unit Test Coverage
Build Status
Buildable 16602
Build 16512: arc lint + arc unit

Event Timeline

sbruno added inline comments.

I'm not happy with this shell script being here. I'd rather have the Makefile do the work but I couldn't figure out how to do it. Looking for suggestions.

We have four fewer files in %%DATADIR%% now, which at first seems troubling. But, microcode_amd*.bin have disappeared, so from the perspective of the Intel ucode files at least it appears sensible. What's the story with the amd ucode files?

Can you try sha256 -q *-*-*.* against the new files and sha256 -q *.fw against the old files to confirm that we have the same content in both cases?

I posted the tool in D15433 for experimentation / testing, and it should probably be part of cpucontrol (either splitting or the ability to load one of n blobs in an unsplit ucode file). That said, for actually deploying new ucode updates to our users it's best to have the tool in the port (as here) and process the ucode files at build time. Otherwise we'd had a dependency on an EN and everyone upgrading.


Something like this in the Makefile ought to work:

ucode:        ucode-split
        mkdir -p ${OUTPUT_DIR}
        cd ${OUTPUT_DIR}
        for file in ../${INTEL_UCODE}/*; do \
                ../ucode-split $$file; \

Restore delete AMD cpu files.

Delete old mcode tool for breaking apart microcode.dat

Drop the uneeded shell script and DTRT in Make to get a for
loop. :-)

I committed D15433 to tools/tools/intel-ucode-update/ and also updated it somewhat - you may want to pick up a new version from tools/tools. It has some warning fixes and a few improvements in the header printing/parsing, and also doesn't print anything by default now unless you pass -v.

I think this change is good; ideally folks who encountered the failure on the original attempt to switch to new-style updates can test and confirm.

Remove "" from a previous incarnation of the port.

Synch ucode-split.c to svn r333661

For reasons that I don't understand, poudriere testport seems to
invoke Makefile commands differently than poudriere bulk commands.

Execute the ucode-split binary in the same shell as the change dir
to the location of the intel ucode bits.

This revision is now accepted and ready to land.May 16 2018, 10:57 PM
delphij added inline comments.

Minor style nit: Maybe move INTEL_UCODE one line above, and add a blank line between the variables and before all:?


I'd probably change 16 to sizeof("ff-ff-ff"), or use asprintf in format_signature to make the code easier to follow, but no action requested for now.


Can we use e.g. PATH_MAX instead of 128 here?


done in rS333742


done in rS333742

Synchronize intel-ucode-split to svn r333742

This revision now requires review to proceed.May 17 2018, 6:10 PM

I think you should exit(EX_OK) or return 0 in main(); without it the compiler would give a warning and caller may or may not get wrong exit status (of whatever was left in %rax) at the point. The change otherwise looks good to me.


Technically you should exit(EX_OK) or return 0 here?

This revision is now accepted and ready to land.May 17 2018, 6:39 PM
This revision was automatically updated to reflect the committed changes.