Index: head/sysutils/cpupdate/Makefile =================================================================== --- head/sysutils/cpupdate/Makefile (revision 468691) +++ head/sysutils/cpupdate/Makefile (revision 468692) @@ -1,80 +1,79 @@ # Created by: Eugene Grosbein # $FreeBSD$ PORTNAME= cpupdate -DISTVERSION= g20180323 -PORTREVISION= 1 +DISTVERSION= g20180324 CATEGORIES= sysutils MAINTAINER= eugen@FreeBSD.org COMMENT= CPU microcode update utility for x86 LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE USE_RC_SUBR= ${PORTNAME} ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= specific to x86 processors SUB_FILES= pkg-message SUB_LIST= CPM_DIR=${CPM_DIR} INTEL_DIR=${INTEL_DIR} USE_GITHUB= yes GH_ACCOUNT= kernschmelze GH_PROJECT= ${PORTNAME} -GH_TAGNAME= 7633a43 +GH_TAGNAME= 82ec0b6 PLIST_FILES= sbin/${PORTNAME} man/man8/${PORTNAME}.8.gz CPM_ACCOUNT= platomav CPM_PROJECT= CPUMicrocodes -CPM_TAGNAME= 079248c +CPM_TAGNAME= 869ad44 OPTIONS_DEFINE= CPM INTEL CPM_DESC= Download platomav/CPUMicrocodes collection CPM_GH_ACCOUNT= ${CPM_ACCOUNT}:cpm CPM_GH_PROJECT= ${CPM_PROJECT}:cpm CPM_GH_TAGNAME= ${CPM_TAGNAME}:cpm CPM_DIR= ${WRKDIR}/${CPM_PROJECT}-${CPM_TAGNAME} CPM_DATADIR= ${DATADIR}/CPUMicrocodes/secondary/Intel INTEL_PACK= microcode-20180312.tgz INTEL_DESC= Download Intel microcode pack ${INTEL_PACK} INTEL_MASTER_SITES= https://downloadmirror.intel.com/27591/eng/:intel INTEL_DISTFILES= ${INTEL_PACK}:intel INTEL_DIR= ${WRKDIR}/intel-ucode INTEL_DATADIR= ${DATADIR}/CPUMicrocodes/primary/Intel post-patch: ${REINPLACE_CMD} -e "s,/usr/local/share/cpupdate,${DATADIR},g" ${WRKSRC}/cpupdate.h do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${STAGEDIR}${MANPREFIX}/man/man8 .include install-microcodes: .if ${PORT_OPTIONS:MINTEL} ${RM} -rf ${INTEL_DATADIR} ${MKDIR} ${INTEL_DATADIR} (cd ${INTEL_DIR} && ${COPYTREE_SHARE} . ${INTEL_DATADIR}) .endif .if ${PORT_OPTIONS:MCPM} ${RM} -rf ${CPM_DATADIR} ${MKDIR} ${CPM_DATADIR} cpupdate -IC -S ${CPM_DIR}/Intel -T ${CPM_DATADIR} .endif .for _o in INTEL CPM .if ${PORT_OPTIONS:M${_o}} @${ECHO} '' @${ECHO} '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' @${ECHO} NOTE: you have to manually remove the directory @${ECHO} ${${_o}_DATADIR} @${ECHO} after deinstallation of ${PORTNAME}. @${ECHO} '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' .endif .endfor .include Index: head/sysutils/cpupdate/distinfo =================================================================== --- head/sysutils/cpupdate/distinfo (revision 468691) +++ head/sysutils/cpupdate/distinfo (revision 468692) @@ -1,7 +1,7 @@ -TIMESTAMP = 1523034276 +TIMESTAMP = 1525090663 SHA256 (microcode-20180312.tgz) = 0b381face2df1b0a829dc4fa8fa93f47f39e11b1c9c22ebd44f8614657c1e779 SIZE (microcode-20180312.tgz) = 3789662 -SHA256 (kernschmelze-cpupdate-g20180323-7633a43_GH0.tar.gz) = b6a595223b7e70fbdf170b51d6aee4d907b36e080c18d076b6a17ae16bd63d28 -SIZE (kernschmelze-cpupdate-g20180323-7633a43_GH0.tar.gz) = 4566592 -SHA256 (platomav-CPUMicrocodes-079248c_GH0.tar.gz) = 89c875f5467409af543b83abe069a00bc29a7933a64a30450a5b06ab0cfa0c7c -SIZE (platomav-CPUMicrocodes-079248c_GH0.tar.gz) = 4602296 +SHA256 (kernschmelze-cpupdate-g20180324-82ec0b6_GH0.tar.gz) = 653a64962077550eeb75c683e2ff23e1901846b89d64d34630c1b0693128e0fe +SIZE (kernschmelze-cpupdate-g20180324-82ec0b6_GH0.tar.gz) = 4566676 +SHA256 (platomav-CPUMicrocodes-869ad44_GH0.tar.gz) = d3f3446e5a82fc874faf72e68a5c617cb61e772c0c00b61983408d343859d245 +SIZE (platomav-CPUMicrocodes-869ad44_GH0.tar.gz) = 4602485 Index: head/sysutils/cpupdate/files/cpupdate.in =================================================================== --- head/sysutils/cpupdate/files/cpupdate.in (revision 468691) +++ head/sysutils/cpupdate/files/cpupdate.in (revision 468692) @@ -1,39 +1,39 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: cpupdate # REQUIRE: FILESYSTEMS kldxref # BEFORE: netif -# KEYWORD: nojail +# KEYWORD: nojail resume # Add these lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # cpupdate_enable (bool): Set to NO by default. # Set it to YES to enable cpupdate. -# cpupdate_irbs_enable (bool): Enable Indirect Branch Restricted +# cpupdate_ibrs_enable (bool): Enable Indirect Branch Restricted # Speculation after start of cpupdate. # Default is YES. # cpupdate_flags (string): Command line flags for cpupdate. # Default is "-w -u". . /etc/rc.subr name=cpupdate rcvar=cpupdate_enable start_postcmd="cpupdate_poststart" load_rc_config $name : ${cpupdate_enable:="NO"} : ${cpupdate_flags="-w -u"} -: ${cpupdate_irbs_enable="YES"} +: ${cpupdate_ibrs_enable="YES"} command=%%PREFIX%%/sbin/${name} cpupdate_poststart() { - checkyesno cpupdate_irbs_enable && sysctl -i hw.ibrs_disable=0 + checkyesno cpupdate_ibrs_enable && sysctl -i hw.ibrs_disable=0 return 0 } run_rc_command "$1" Index: head/sysutils/cpupdate/files/pkg-message.in =================================================================== --- head/sysutils/cpupdate/files/pkg-message.in (revision 468691) +++ head/sysutils/cpupdate/files/pkg-message.in (revision 468692) @@ -1,12 +1,15 @@ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! NOTE: The following directories %%CPM_DIR%% %%INTEL_DIR%% contain Intel and/or platomav/CPUMicrocodes collections respectively if you have just built the port with corresponding CPM/INTEL option(s) enabled. In this case you can run "make install-microcodes" to install them to %%DATADIR%% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +Suspend/resume sequence clears microcode update, so make sure your system runs +"service cpupdate start" again on resume. +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Index: head/sysutils/cpupdate/pkg-descr =================================================================== --- head/sysutils/cpupdate/pkg-descr (revision 468691) +++ head/sysutils/cpupdate/pkg-descr (revision 468692) @@ -1,9 +1,9 @@ x86 CPU microcode utility for BSD. -It is still work in progress but should do its job for Intel chips already. +At the moment, it is for Intel processors only. Note: update FreeBSD to OSVERSION level 1101507 for 11.x or 1200055 for 12.0+ before building/using this utility if your microcode update brings new CPU features like Indirect Branch Restricted Speculation (IBRS). WWW: https://github.com/kernschmelze/cpupdate