diff options
author | Sean Bruno <sbruno@FreeBSD.org> | 2018-01-10 17:32:14 +0000 |
---|---|---|
committer | Sean Bruno <sbruno@FreeBSD.org> | 2018-01-10 17:32:14 +0000 |
commit | 1f03396b1b71b1a7cfa473750ebfa5f7f0bb3f19 (patch) | |
tree | 46b9cc456c42eb3203d83dc1e589f92cdba46887 /sysutils | |
parent | b87e5ceebdb0d7fdb166b48c168d32d99c0f8a00 (diff) |
Notes
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/devcpu-data/Makefile | 1 | ||||
-rw-r--r-- | sysutils/devcpu-data/files/microcode_update.in | 16 | ||||
-rw-r--r-- | sysutils/devcpu-data/pkg-message | 20 |
3 files changed, 34 insertions, 3 deletions
diff --git a/sysutils/devcpu-data/Makefile b/sysutils/devcpu-data/Makefile index 5dabd43fea35..dca461af265f 100644 --- a/sysutils/devcpu-data/Makefile +++ b/sysutils/devcpu-data/Makefile @@ -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 diff --git a/sysutils/devcpu-data/files/microcode_update.in b/sysutils/devcpu-data/files/microcode_update.in index 6b53a816a021..7939da014a29 100644 --- a/sysutils/devcpu-data/files/microcode_update.in +++ b/sysutils/devcpu-data/files/microcode_update.in @@ -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." } diff --git a/sysutils/devcpu-data/pkg-message b/sysutils/devcpu-data/pkg-message new file mode 100644 index 000000000000..c93460f70949 --- /dev/null +++ b/sysutils/devcpu-data/pkg-message @@ -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. |