From owner-svn-ports-head@freebsd.org Wed Jan 10 17:32:16 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A362E69DCF; Wed, 10 Jan 2018 17:32:16 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E91E7805A4; Wed, 10 Jan 2018 17:32:15 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 36110B0F; Wed, 10 Jan 2018 17:32:15 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0AHWFpW023966; Wed, 10 Jan 2018 17:32:15 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0AHWEIX023963; Wed, 10 Jan 2018 17:32:14 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201801101732.w0AHWEIX023963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 10 Jan 2018 17:32:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458664 - in head/sysutils/devcpu-data: . files X-SVN-Group: ports-head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: in head/sysutils/devcpu-data: . files X-SVN-Commit-Revision: 458664 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jan 2018 17:32:16 -0000 Author: sbruno Date: Wed Jan 10 17:32:14 2018 New Revision: 458664 URL: https://svnweb.freebsd.org/changeset/ports/458664 Log: 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 Added: head/sysutils/devcpu-data/pkg-message (contents, props changed) Modified: head/sysutils/devcpu-data/Makefile head/sysutils/devcpu-data/files/microcode_update.in Modified: head/sysutils/devcpu-data/Makefile ============================================================================== --- head/sysutils/devcpu-data/Makefile Wed Jan 10 17:29:23 2018 (r458663) +++ head/sysutils/devcpu-data/Makefile Wed Jan 10 17:32:14 2018 (r458664) @@ -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 Modified: head/sysutils/devcpu-data/files/microcode_update.in ============================================================================== --- head/sysutils/devcpu-data/files/microcode_update.in Wed Jan 10 17:29:23 2018 (r458663) +++ head/sysutils/devcpu-data/files/microcode_update.in Wed Jan 10 17:32:14 2018 (r458664) @@ -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." } Added: head/sysutils/devcpu-data/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/devcpu-data/pkg-message Wed Jan 10 17:32:14 2018 (r458664) @@ -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.