Page MenuHomeFreeBSD

sysutils/devcpu-data: Use new microcode format
ClosedPublic

Authored by sbruno on May 15 2018, 3:46 PM.
Tags
None
Referenced Files
F81662369: D15443.diff
Fri, Apr 19, 3:24 PM
Unknown Object (File)
Tue, Apr 16, 3:41 PM
Unknown Object (File)
Fri, Mar 29, 7:49 PM
Unknown Object (File)
Mar 5 2024, 3:27 PM
Unknown Object (File)
Mar 5 2024, 3:27 PM
Unknown Object (File)
Mar 5 2024, 3:27 PM
Unknown Object (File)
Mar 5 2024, 3:27 PM
Unknown Object (File)
Mar 5 2024, 3:27 PM

Details

Summary

Use new microcode format processing tools from Ed.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 16633
Build 16538: arc lint + arc unit

Event Timeline

sbruno added inline comments.
sysutils/devcpu-data/files/make_ucodes.sh
9 ↗(On Diff #42579)

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.

sysutils/devcpu-data/files/make_ucodes.sh
9 ↗(On Diff #42579)

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; \
        done

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 "make_ucode.sh" 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.
sysutils/devcpu-data/files/Makefile
3

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

sysutils/devcpu-data/files/ucode-split.c
80

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.

120

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

sysutils/devcpu-data/files/ucode-split.c
80

done in rS333742

120

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.

sysutils/devcpu-data/files/ucode-split.c
206

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.