Index: branches/2018Q1/sysutils/devcpu-data/Makefile =================================================================== --- branches/2018Q1/sysutils/devcpu-data/Makefile (revision 459101) +++ branches/2018Q1/sysutils/devcpu-data/Makefile (revision 459102) @@ -1,35 +1,36 @@ # Created by: stas # $FreeBSD$ PORTNAME= data -PORTVERSION= 1.13 +PORTVERSION= 1.14 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= https://downloadmirror.intel.com/27431/eng/:intel \ LOCAL/sbruno:amd PKGNAMEPREFIX= devcpu- -DISTFILES= microcode-20180108.tgz:intel amd-ucode-2014-12-01.tar.bz2:amd +DISTFILES= microcode-20171117.tgz:intel amd64-microcode_3.20171205.1.tar.xz:amd MAINTAINER= clarkjc@runbox.com COMMENT= Intel and AMD CPUs microcode updates LICENSE= EULA LICENSE_NAME= Intel Software License Agreement LICENSE_FILE= ${FILESDIR}/LICENSE LICENSE_PERMS= dist-mirror no-dist-sell pkg-mirror no-pkg-sell auto-accept ONLY_FOR_ARCHS= amd64 i386 NO_ARCH= yes NO_WRKSUBDIR= yes DATADIR= ${PREFIX}/share/cpucontrol USE_RC_SUBR= microcode_update post-extract: ${CP} -p ${FILESDIR}/Makefile ${FILESDIR}/ucode-tool.c ${WRKSRC} do-install: ${MKDIR} ${STAGEDIR}${DATADIR}/ ${INSTALL_DATA} ${WRKSRC}/mcodes/* ${STAGEDIR}${DATADIR}/ .include Index: branches/2018Q1/sysutils/devcpu-data/distinfo =================================================================== --- branches/2018Q1/sysutils/devcpu-data/distinfo (revision 459101) +++ branches/2018Q1/sysutils/devcpu-data/distinfo (revision 459102) @@ -1,5 +1,5 @@ -TIMESTAMP = 1515578462 -SHA256 (microcode-20180108.tgz) = 063f1aa3a546cb49323a5e0b516894e4b040007107b8c8ff017aca8a86204130 -SIZE (microcode-20180108.tgz) = 3676678 -SHA256 (amd-ucode-2014-12-01.tar.bz2) = e8f37ed12955585a625ee7cd48d89f9a04ceb2afa36081b52cc59d08a3bb8293 -SIZE (amd-ucode-2014-12-01.tar.bz2) = 20585 +TIMESTAMP = 1515706070 +SHA256 (microcode-20171117.tgz) = 93bd1da9fa58ece0016702e657f708b7e496e56da637a3fe9a6d21f1d6f524dc +SIZE (microcode-20171117.tgz) = 3594762 +SHA256 (amd64-microcode_3.20171205.1.tar.xz) = a38bc072f535a3d3c1bf4e9e545197aa5114e979e94ef7e4a67e615df2f853a7 +SIZE (amd64-microcode_3.20171205.1.tar.xz) = 32584 Index: branches/2018Q1/sysutils/devcpu-data/files/Makefile =================================================================== --- branches/2018Q1/sysutils/devcpu-data/files/Makefile (revision 459101) +++ branches/2018Q1/sysutils/devcpu-data/files/Makefile (revision 459102) @@ -1,18 +1,19 @@ -AMD_UCODE_DIR= amd-ucode +AMD_UCODE_DIR= amd64-microcode-3.20171205.1 AMD_UCODE= $(AMD_UCODE_DIR)/microcode_amd.bin \ $(AMD_UCODE_DIR)/microcode_amd_fam15h.bin \ - $(AMD_UCODE_DIR)/microcode_amd_fam16h.bin + $(AMD_UCODE_DIR)/microcode_amd_fam16h.bin \ + $(AMD_UCODE_DIR)/microcode_amd_fam17h.bin INTEL_UCODE= microcode.dat OUTPUT_DIR= mcodes all: ucode ucode: ucode-tool mkdir -p $(OUTPUT_DIR) ./ucode-tool -o $(OUTPUT_DIR) -i $(INTEL_UCODE) - ./ucode-tool -o $(OUTPUT_DIR) -a $(AMD_UCODE) + mv ${AMD_UCODE} $(OUTPUT_DIR) # Use the host cc to compile ucode-tool in case of cross-compile ucode-tool: ucode-tool.c cc ucode-tool.c -o $@ clean: rm -rf $(OUTPUT_DIR) ucode-tool Index: branches/2018Q1/sysutils/devcpu-data/files/microcode_update.in =================================================================== --- branches/2018Q1/sysutils/devcpu-data/files/microcode_update.in (revision 459101) +++ branches/2018Q1/sysutils/devcpu-data/files/microcode_update.in (revision 459102) @@ -1,68 +1,81 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: microcode_update # REQUIRE: root mountcritlocal # KEYWORD: nojail # BEFORE: SERVERS # # Add the following line to /etc/rc.conf to enable flow-capture: # microcode_update_enable (bool): Set it to "YES" to update microcode on startup # Set to "NO" by default. # microcode_update_datadir (str): Directory, microcode updates stored in. # Default is "%%DATADIR%%" # microcode_update_cpus (str): A list of cpus to update on startup, or "ALL" for all. # Example: microcode_update_cpus_cpus="0 CPU0" # Set to "ALL" by default. # microcode_update_flags (str): Flags for cpucontrol(8). . /etc/rc.subr name="microcode_update" rcvar=microcode_update_enable stop_cmd=":" start_precmd="microcode_update_prepare" start_cmd="microcode_update_start" requires_modules="cpuctl" CMT="/usr/sbin/cpucontrol" microcode_update_prepare() { if ! kldstat -q -m cpuctl; then if ! kldload cpuctl > /dev/null 2>&1; then warn "Can't load cpuctl module." return 1 fi fi } 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`; else cpus=${microcode_cpus} 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 + CPUCONTROL_UPDATED=$(cpucontrol -h 2>&1 | grep -q -- -e; echo $?) + if [ ${CPUCONTROL_UPDATED} -ne 0 ]; then + echo "Please update your system in order to update CPU microcode." + else + ${CMT} -e /dev/cpuctl0 >/dev/null 2>&1 + if [ $? -ne 0 ]; then + echo "Re-evalulation of CPU flags Failed." + exit 1 + fi + fi + fi echo "Done." } load_rc_config $name # Set default values : ${microcode_update_enable="NO"} : ${microcode_update_datadir="%%DATADIR%%"} : ${microcode_cpus="ALL"} : ${microcode_update_flags=""} run_rc_command "$1" Index: branches/2018Q1/sysutils/devcpu-data/pkg-message =================================================================== --- branches/2018Q1/sysutils/devcpu-data/pkg-message (nonexistent) +++ branches/2018Q1/sysutils/devcpu-data/pkg-message (revision 459102) @@ -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. Property changes on: branches/2018Q1/sysutils/devcpu-data/pkg-message ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1,2 ## +yes +\ No newline at end of property \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2018Q1/sysutils/devcpu-data/pkg-plist =================================================================== --- branches/2018Q1/sysutils/devcpu-data/pkg-plist (revision 459101) +++ branches/2018Q1/sysutils/devcpu-data/pkg-plist (revision 459102) @@ -1,180 +1,168 @@ %%DATADIR%%/2f0708.fw -%%DATADIR%%/AMD-00001020-01000084.fw -%%DATADIR%%/AMD-00001022-01000083.fw -%%DATADIR%%/AMD-00001041-010000db.fw -%%DATADIR%%/AMD-00001043-010000c8.fw -%%DATADIR%%/AMD-00001062-010000c7.fw -%%DATADIR%%/AMD-00001080-010000da.fw -%%DATADIR%%/AMD-00001081-010000d9.fw -%%DATADIR%%/AMD-000010a0-010000dc.fw -%%DATADIR%%/AMD-00002031-02000032.fw -%%DATADIR%%/AMD-00003010-03000027.fw -%%DATADIR%%/AMD-00005010-05000029.fw -%%DATADIR%%/AMD-00005020-05000119.fw -%%DATADIR%%/AMD-00006012-0600063d.fw -%%DATADIR%%/AMD-00006020-06000832.fw -%%DATADIR%%/AMD-00006101-06001119.fw -%%DATADIR%%/AMD-00007001-0700010f.fw %%DATADIR%%/M01106C2217.fw %%DATADIR%%/M01106CA107.fw %%DATADIR%%/M0120661104.fw %%DATADIR%%/M0220661105_CV.fw %%DATADIR%%/M04106C2218.fw %%DATADIR%%/M04106CA107.fw %%DATADIR%%/M08106C2219.fw %%DATADIR%%/M08106CA107.fw %%DATADIR%%/M10106CA107.fw %%DATADIR%%/MU163202.fw %%DATADIR%%/MU165040.fw %%DATADIR%%/MU165041.fw %%DATADIR%%/MU165045.fw %%DATADIR%%/MU165140.fw %%DATADIR%%/MU16522a.fw %%DATADIR%%/MU16522c.fw %%DATADIR%%/MU16530c.fw %%DATADIR%%/MU16530d.fw %%DATADIR%%/MU165310.fw %%DATADIR%%/MU16600a.fw %%DATADIR%%/MU166503.fw %%DATADIR%%/MU166a0b.fw %%DATADIR%%/MU166a0c.fw %%DATADIR%%/MU166a0d.fw %%DATADIR%%/MU166d05.fw %%DATADIR%%/MU166d06.fw %%DATADIR%%/MU166d07.fw %%DATADIR%%/MU16810d.fw %%DATADIR%%/MU16810e.fw %%DATADIR%%/MU16810f.fw %%DATADIR%%/MU168111.fw %%DATADIR%%/MU168307.fw %%DATADIR%%/MU168308.fw %%DATADIR%%/MU168607.fw %%DATADIR%%/MU168608.fw %%DATADIR%%/MU16860a.fw %%DATADIR%%/MU16860c.fw %%DATADIR%%/MU168a01.fw %%DATADIR%%/MU168a04.fw %%DATADIR%%/MU168a05.fw %%DATADIR%%/MU16b11c.fw %%DATADIR%%/MU16b11d.fw %%DATADIR%%/MU16b401.fw %%DATADIR%%/MU16b402.fw %%DATADIR%%/MU26522b.fw %%DATADIR%%/MU26530b.fw %%DATADIR%%/MU268110.fw %%DATADIR%%/MU268602.fw %%DATADIR%%/m011066143.fw %%DATADIR%%/m011067660F.fw %%DATADIR%%/m016fbBA.fw %%DATADIR%%/m01f0712.fw %%DATADIR%%/m01f0a13.fw %%DATADIR%%/m01f2529.fw %%DATADIR%%/m01f480c.fw %%DATADIR%%/m01f6402.fw %%DATADIR%%/m01f6508.fw %%DATADIR%%/m021066142.fw -%%DATADIR%%/m02906eb_0000007f_00000080.fw +%%DATADIR%%/m02906eb_00000071_00000072.fw %%DATADIR%%/m02f0a15.fw %%DATADIR%%/m02f241f.fw %%DATADIR%%/m02f252a.fw %%DATADIR%%/m02f2610.fw %%DATADIR%%/m02f2738.fw %%DATADIR%%/m02f292d.fw %%DATADIR%%/m02f4116.fw %%DATADIR%%/m02f480e.fw %%DATADIR%%/m03106a4_00000012.fw %%DATADIR%%/m03106a5_00000019.fw %%DATADIR%%/m041067660F.fw %%DATADIR%%/m046fbBC.fw %%DATADIR%%/m04f0a14.fw %%DATADIR%%/m04f122e.fw %%DATADIR%%/m04f241e.fw %%DATADIR%%/m04f252b.fw %%DATADIR%%/m04f2737.fw %%DATADIR%%/m04f292e.fw %%DATADIR%%/m04f620f.fw %%DATADIR%%/m05206f2_00000037.fw %%DATADIR%%/m08106d129.fw %%DATADIR%%/m086fbBB.fw %%DATADIR%%/m08f2739.fw %%DATADIR%%/m08f292f.fw %%DATADIR%%/m0df320a.fw %%DATADIR%%/m0df330c.fw %%DATADIR%%/m101067660F.fw %%DATADIR%%/m101067770A.fw -%%DATADIR%%/m1050662_00000014.fw -%%DATADIR%%/m1050663_07000011.fw +%%DATADIR%%/m1050662_0000000f.fw +%%DATADIR%%/m1050663_0700000d.fw %%DATADIR%%/m1050664_0f00000a.fw %%DATADIR%%/m1069507.fw %%DATADIR%%/m106f76a.fw %%DATADIR%%/m106fbBA.fw %%DATADIR%%/m10f2421.fw %%DATADIR%%/m10f252c.fw %%DATADIR%%/m111067AA0B.fw %%DATADIR%%/m1220652_0000000e.fw %%DATADIR%%/m12206a7_00000029.fw %%DATADIR%%/m12306a9_0000001c.fw %%DATADIR%%/m13106e5_00000007.fw %%DATADIR%%/m16f25d.fw %%DATADIR%%/m16f6d0.fw %%DATADIR%%/m16fda4.fw %%DATADIR%%/m1df3417.fw %%DATADIR%%/m2069507.fw %%DATADIR%%/m206d618.fw %%DATADIR%%/m206e839.fw %%DATADIR%%/m206ec54.fw %%DATADIR%%/m206f25c.fw %%DATADIR%%/m206f6d1.fw %%DATADIR%%/m206fbBA.fw %%DATADIR%%/m206fda4.fw -%%DATADIR%%/m2240671_0000001b.fw -%%DATADIR%%/m22906ea_00000080.fw +%%DATADIR%%/m2240671_00000017.fw +%%DATADIR%%/m22906ea_0000006f_00000070.fw %%DATADIR%%/m22f6809.fw -%%DATADIR%%/m2a906e9_0000007f_00000080.fw -%%DATADIR%%/m32306c3_00000023.fw -%%DATADIR%%/m3240661_00000018.fw +%%DATADIR%%/m2a906e9_0000005d_0000005e.fw +%%DATADIR%%/m32306c3_00000022.fw +%%DATADIR%%/m3240661_00000017.fw %%DATADIR%%/m34f6404.fw -%%DATADIR%%/m36506e3_000000c1_000000c2.fw +%%DATADIR%%/m36506e3_000000b9_000000ba.fw %%DATADIR%%/m401067660F.fw %%DATADIR%%/m406f76b.fw %%DATADIR%%/m406fbBC.fw %%DATADIR%%/m441067AA0B.fw %%DATADIR%%/m46f6d2.fw %%DATADIR%%/m5cf4a04.fw %%DATADIR%%/m5df4a02.fw %%DATADIR%%/m5ff4807.fw %%DATADIR%%/m6d206d6_00000619.fw %%DATADIR%%/m6d206d7_00000710.fw -%%DATADIR%%/m6f306f2_0000003b.fw -%%DATADIR%%/m7240651_00000021.fw +%%DATADIR%%/m6f306f2_0000003a.fw +%%DATADIR%%/m7240651_00000020.fw %%DATADIR%%/m801066144.fw %%DATADIR%%/m801067660F.fw -%%DATADIR%%/m80306f4_00000010.fw +%%DATADIR%%/m80306f4_0000000f.fw %%DATADIR%%/m8069547.fw %%DATADIR%%/m806ec59.fw %%DATADIR%%/m806fa95.fw %%DATADIR%%/m806fbBA.fw %%DATADIR%%/m806fda4.fw %%DATADIR%%/m9220655_00000004.fw %%DATADIR%%/m9df4305.fw %%DATADIR%%/m9df4406.fw %%DATADIR%%/m9df4703.fw %%DATADIR%%/mA01067AA0B.fw -%%DATADIR%%/m_01_706a1_00000022.fw +%%DATADIR%%/m_01_706a1_0000001e.fw %%DATADIR%%/m_03_506c9_0000002c.fw -%%DATADIR%%/mb750654_0200003c.fw +%%DATADIR%%/mb750654_02000035.fw %%DATADIR%%/mbdf4117.fw %%DATADIR%%/mbdf4903.fw -%%DATADIR%%/mc0306d4_00000028.fw -%%DATADIR%%/mc0406e3_000000c1_000000c2.fw -%%DATADIR%%/mc0806e9_0000007f_00000080.fw -%%DATADIR%%/mc0806ea_0000007f_00000080.fw -%%DATADIR%%/med306e4_0000042a.fw +%%DATADIR%%/mc0306d4_00000025.fw +%%DATADIR%%/mc0406e3_000000b9_000000ba.fw +%%DATADIR%%/mc0806e9_00000061_00000062.fw +%%DATADIR%%/mc0806ea_0000006f_00000070.fw +%%DATADIR%%/med306e4_00000428.fw %%DATADIR%%/med306e6_00000600.fw %%DATADIR%%/med306e7_0000070d.fw %%DATADIR%%/mef406f1_0b000021.fw +%%DATADIR%%/microcode_amd.bin +%%DATADIR%%/microcode_amd_fam15h.bin +%%DATADIR%%/microcode_amd_fam16h.bin +%%DATADIR%%/microcode_amd_fam17h.bin %%DATADIR%%/mu267114.fw %%DATADIR%%/mu267238.fw %%DATADIR%%/mu26732e.fw %%DATADIR%%/mu26a003.fw %%DATADIR%%/mu26a101.fw Index: branches/2018Q1 =================================================================== --- branches/2018Q1 (revision 459101) +++ branches/2018Q1 (revision 459102) Property changes on: branches/2018Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r458664,458792,458943,458987,459084