From owner-svn-ports-head@freebsd.org Tue Aug 28 21:52:00 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2E391099014; Tue, 28 Aug 2018 21:52:00 +0000 (UTC) (envelope-from markj@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 5606197DC8; Tue, 28 Aug 2018 21:52:00 +0000 (UTC) (envelope-from markj@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 375AB142A0; Tue, 28 Aug 2018 21:52:00 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7SLq0YT011174; Tue, 28 Aug 2018 21:52:00 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7SLpxvW011168; Tue, 28 Aug 2018 21:51:59 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201808282151.w7SLpxvW011168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 28 Aug 2018 21:51:59 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r478330 - head/sysutils/devcpu-data X-SVN-Group: ports-head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sysutils/devcpu-data X-SVN-Commit-Revision: 478330 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.27 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: Tue, 28 Aug 2018 21:52:00 -0000 Author: markj (src committer) Date: Tue Aug 28 21:51:59 2018 New Revision: 478330 URL: https://svnweb.freebsd.org/changeset/ports/478330 Log: sysutils/devcpu-data: Provide a file for loading Intel updates at boot Extend the port so that users may easily apply microcode updates using the method implemented in src r337715. For now, this just consists of providing all Intel microcode update files concatenated together as a single blob in /boot/firmware. Approved by: sbruno Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16924 Modified: head/sysutils/devcpu-data/Makefile head/sysutils/devcpu-data/pkg-message head/sysutils/devcpu-data/pkg-plist Modified: head/sysutils/devcpu-data/Makefile ============================================================================== --- head/sysutils/devcpu-data/Makefile Tue Aug 28 21:01:27 2018 (r478329) +++ head/sysutils/devcpu-data/Makefile Tue Aug 28 21:51:59 2018 (r478330) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= data -PORTVERSION= 1.19 +PORTVERSION= 1.20 CATEGORIES= sysutils MASTER_SITES= https://downloadmirror.intel.com/28039/eng/:intel \ LOCAL/sbruno:amd @@ -23,11 +23,13 @@ NO_ARCH= yes NO_WRKSUBDIR= yes DATADIR= ${PREFIX}/share/cpucontrol +FWDIR= /boot/firmware USE_RC_SUBR= microcode_update post-extract: ${CP} -p ${FILESDIR}/Makefile ${FILESDIR}/ucode-split.c ${WRKSRC} + ${CAT} ${WRKSRC}/intel-ucode/* ${WRKSRC}/intel-ucode-with-caveats/* > ${WRKSRC}/intel-ucode.bin do-install: ${MKDIR} ${STAGEDIR}${DATADIR}/ @@ -36,5 +38,7 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam16h.bin ${STAGEDIR}${DATADIR}/ ${INSTALL_DATA} ${WRKSRC}/microcode_amd_fam17h.bin ${STAGEDIR}${DATADIR}/ ${INSTALL_DATA} ${WRKSRC}/mcodes/* ${STAGEDIR}${DATADIR}/ + ${MKDIR} ${STAGEDIR}${FWDIR} + ${INSTALL_DATA} ${WRKSRC}/intel-ucode.bin ${STAGEDIR}${FWDIR}/ .include Modified: head/sysutils/devcpu-data/pkg-message ============================================================================== --- head/sysutils/devcpu-data/pkg-message Tue Aug 28 21:01:27 2018 (r478329) +++ head/sysutils/devcpu-data/pkg-message Tue Aug 28 21:51:59 2018 (r478330) @@ -1,11 +1,31 @@ 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: +a FreeBSD system automatically. There are two methods for updating CPU +microcode: the first methods loads and applies the update before the kernel +begins booting, and the second method loads and applies updates using an +rc script. The first method is preferred, but is currently only supported +on Intel i386 and amd64 processors running FreeBSD 12.0. It is safe to +enable both methods. +The first method ensures that any CPU features introduced by a microcode +update are visible to the kernel. In other words, the update is loaded +before the kernel performs CPU feature detection. + +To enable updates using the first method, add the following lines to +the system's /boot/loader.conf: + +cpu_microcode_load="YES" +cpu_microcode_name="/boot/firmware/intel-ucode.bin" + +This method will not load the microcode update until the system is +rebooted. + +To enable updates using the second method, add the following line 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: +Then, to ensure the update is applied, reboot the system or start the +microcode update service via: # service microcode_update start Modified: head/sysutils/devcpu-data/pkg-plist ============================================================================== --- head/sysutils/devcpu-data/pkg-plist Tue Aug 28 21:01:27 2018 (r478329) +++ head/sysutils/devcpu-data/pkg-plist Tue Aug 28 21:51:59 2018 (r478330) @@ -172,3 +172,4 @@ %%DATADIR%%/microcode_amd_fam15h.bin %%DATADIR%%/microcode_amd_fam16h.bin %%DATADIR%%/microcode_amd_fam17h.bin +/boot/firmware/intel-ucode.bin