Page MenuHomeFreeBSD

sysutils/devcpu-data: Migrate our microcode update on Intel to use precreated files.
ClosedPublic

Authored by sbruno on Jan 15 2018, 5:42 PM.

Details

Summary

Stop using legacy microcode.dat file to build individual update files.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sbruno created this revision.Jan 15 2018, 5:42 PM

Surprisingly, this seems to work for us.

Jan 15 09:52:15 nfstest kernel: cpuctl: access to MSR registers/cpuid info.
Jan 15 09:52:16 nfstest microcode_update: /usr/local/share/cpucontrol/06-3c-03: updating cpu /dev/cpuctl0 from rev 0x17 to rev 0x22... done.
Jan 15 09:52:18 nfstest microcode_update: /usr/local/share/cpucontrol/06-3c-03: updating cpu /dev/cpuctl2 from rev 0x17 to rev 0x22... done.
Jan 15 09:52:18 nfstest microcode_update: /usr/local/share/cpucontrol/06-3c-03: updating cpu /dev/cpuctl4 from rev 0x17 to rev 0x22... done.
Jan 15 09:52:18 nfstest microcode_update: /usr/local/share/cpucontrol/06-3c-03: updating cpu /dev/cpuctl6 from rev 0x17 to rev 0x22... done.
Jan 15 09:52:19 nfstest kernel: CPU: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (2993.14-MHz K8-class CPU)
swills accepted this revision.Jan 15 2018, 6:04 PM

LGTM

This revision is now accepted and ready to land.Jan 15 2018, 6:04 PM
cem accepted this revision.Jan 15 2018, 6:04 PM

No objection, although my blessing is meaningless in ports.

sysutils/devcpu-data/Makefile
5 ↗(On Diff #37981)

What's the distinction here? What version number are we tracking?

sbruno marked an inline comment as done.Jan 15 2018, 8:00 PM
sbruno added inline comments.
sysutils/devcpu-data/Makefile
5 ↗(On Diff #37981)

AFAIK this is meaningless.

I bump a minor when we get new f/w from either vendor. I add a PORTREVISION when we cleanup port issues.

I have no idea when I would bump the major rev. Maybe if I add a new CPU microcode ARCH, then I'd do that.

In case anyone is wondering why there are fewer files installed as compared to the files extracted from microcode.dat, the old ucode-tool wrote each microcode update into a separate file, whereas the new files combine all the updates for a given family-model-stepping combination into their own files. Multiple updates in the same file will each have a different processor_flags value. Using the iucode-tool program to dump each set of files shows that they both include the same number of updates:

$ iucode_tool -L microcode.dat | awk '/bundle/ { files++; } /sig/ { updates++; } END { printf "%d files, %d updates\n",files,updates }' 
1 files, 164 updates
$ iucode_tool -L intel-ucode/* | awk '/bundle/ { files++; } /sig/ { updates++; } END { printf "%d files, %d updates\n",files,updates }'
94 files, 164 updates
This revision was automatically updated to reflect the committed changes.
sbruno marked an inline comment as done.