sysutils/devcpu-data follow up commit to 20180108 Intel microcode update.

Run cpucontrol -e after microcode update to refresh cpu flags.  If running
on an older system without -e, fail silently.

Log any upgrade output via logger to /var/log/messages.

Add an instructional pkg-message for users.

Intel Release Notes:
Intel Processor Microcode Package for Linux
20180108 Release

-- Updates upon 20171117 release --
IVT C0          (06-3e-04:ed) 428->42a
SKL-U/Y D0      (06-4e-03:c0) ba->c2
BDW-U/Y E/F     (06-3d-04:c0) 25->28
HSW-ULT Cx/Dx   (06-45-01:72) 20->21
Crystalwell Cx  (06-46-01:32) 17->18
BDW-H E/G       (06-47-01:22) 17->1b
HSX-EX E0       (06-3f-04:80) 0f->10
SKL-H/S R0      (06-5e-03:36) ba->c2
HSW Cx/Dx       (06-3c-03:32) 22->23
HSX C0          (06-3f-02:6f) 3a->3b
BDX-DE V0/V1    (06-56-02:10) 0f->14
BDX-DE V2       (06-56-03:10) 700000d->7000011
KBL-U/Y H0      (06-8e-09:c0) 62->80
KBL Y0 / CFL D0 (06-8e-0a:c0) 70->80
KBL-H/S B0      (06-9e-09:2a) 5e->80
CFL U0          (06-9e-0a:22) 70->80
CFL B0          (06-9e-0b:02) 72->80
SKX H0          (06-55-04:b7) 2000035->200003c
GLK B0          (06-7a-01:01) 1e->22

Reviewed by:	A bunch of folks on the review
MFH:		2018Q1
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D13815
This commit is contained in:
Sean Bruno 2018-01-10 17:32:14 +00:00
parent b87e5ceebd
commit 1f03396b1b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=458664
3 changed files with 34 additions and 3 deletions

View file

@ -3,6 +3,7 @@
PORTNAME= data
PORTVERSION= 1.13
PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= https://downloadmirror.intel.com/27431/eng/:intel \
LOCAL/sbruno:amd

View file

@ -42,7 +42,7 @@ microcode_update_prepare()
microcode_update_start()
{
echo "Updating cpucodes..."
echo "Updating CPU Microcode..."
if [ "${microcode_cpus}" = "ALL" ]; then
ncpu=`/sbin/sysctl -n hw.ncpu`
cpus=`jot ${ncpu} 0`;
@ -51,9 +51,19 @@ microcode_update_start()
fi
for i in ${cpus}; do
${CMT} -u ${microcode_update_flags} \
-d "${microcode_update_datadir}" /dev/cpuctl${i} || \
(echo "Failed." && exit 1)
-d "${microcode_update_datadir}" /dev/cpuctl${i} 2>&1 | \
logger -p daemon.notice -t microcode_update || \
(echo "Microcode Update Failed." && exit 1)
done
if [ "${microcode_cpus}" = "ALL" ]; then
for i in ${cpus}; do
${CMT} -e /dev/cpuctl${i} >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Re-evalutation of CPU flags Failed."
exit 1
fi
done
fi
echo "Done."
}

View file

@ -0,0 +1,20 @@
Installing this port will allow host startup to update the CPU microcode on
a FreeBSD system automatically. In order to enable this feature, add the
following to the system's /etc/rc.conf:
microcode_update_enable="YES"
To ensure the update is applied, reboot the system or start the microcode update
service via:
# service microcode_update start
If the CPU requires a microcode update, a console message such as the following
will appear:
Updating CPU Microcode...
/usr/local/share/cpucontrol/m32306c3_00000022.fw: updating cpu /dev/cpuctl0 from rev 0x17 to rev 0x22... done.
/usr/local/share/cpucontrol/m32306c3_00000022.fw: updating cpu /dev/cpuctl2 from rev 0x17 to rev 0x22... done.
/usr/local/share/cpucontrol/m32306c3_00000022.fw: updating cpu /dev/cpuctl4 from rev 0x17 to rev 0x22... done.
/usr/local/share/cpucontrol/m32306c3_00000022.fw: updating cpu /dev/cpuctl6 from rev 0x17 to rev 0x22... done.
Done.