Page MenuHomeFreeBSD

D13815.id.diff
No OneTemporary

D13815.id.diff

Index: head/sysutils/devcpu-data/Makefile
===================================================================
--- head/sysutils/devcpu-data/Makefile
+++ head/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
Index: head/sysutils/devcpu-data/files/microcode_update.in
===================================================================
--- head/sysutils/devcpu-data/files/microcode_update.in
+++ head/sysutils/devcpu-data/files/microcode_update.in
@@ -42,7 +42,7 @@
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 @@
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."
}
Index: head/sysutils/devcpu-data/pkg-message
===================================================================
--- head/sysutils/devcpu-data/pkg-message
+++ head/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.

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 28, 8:19 AM (20 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29060269
Default Alt Text
D13815.id.diff (2 KB)

Event Timeline