From owner-freebsd-current@freebsd.org Mon Sep 10 19:55:39 2018 Return-Path: Delivered-To: freebsd-current@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 70A5E109A5C8 for ; Mon, 10 Sep 2018 19:55:39 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from mail.nomadlogic.org (mail.nomadlogic.org [140.82.23.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.nomadlogic.org", Issuer "mail.nomadlogic.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DDB3B725E6; Mon, 10 Sep 2018 19:55:38 +0000 (UTC) (envelope-from pete@nomadlogic.org) Received: from [192.168.1.203] (cpe-76-175-75-27.socal.res.rr.com [76.175.75.27]) by mail.nomadlogic.org (OpenSMTPD) with ESMTPSA id 1bdbca27 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Mon, 10 Sep 2018 12:48:57 -0700 (PDT) Subject: Re: testing early microcode loading To: Mark Johnston , freebsd-current@freebsd.org References: <20180910182655.GA2849@raichu> From: Pete Wright Message-ID: <812c75e6-e77b-7559-3d0e-06085df10d0f@nomadlogic.org> Date: Mon, 10 Sep 2018 12:48:56 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180910182655.GA2849@raichu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2018 19:55:39 -0000 On 9/10/18 11:26 AM, Mark Johnston wrote: > Hi, > > Support for boot-time loading of Intel microcode updates has landed in > the kernel in r337715, and in the sysutils/devcpu-data port as of 1.20. > I'd like to solicit some testing of the feature ahead of 12.0. > > The port has been modified to install /boot/firmware/intel-ucode.bin. > This file contains a copy of every Intel microcode update supplied by > the port. Per the pkg-message, one can enable early loading of this > file by specifying: > > cpu_microcode_load="YES" > cpu_microcode_name="/boot/firmware/intel-ucode.bin" > > in loader.conf. The update will be applied upon a subsequent reboot. > > Testing consists of enabling early loading and verifying that the CPUs > report an updated microcode version. If early loading fails, a message > is printed to the dmesg. If your system is capable of successful ACPI > suspend/resume, it is useful to also verify that the microcode remains > updated following a resume. > > To fetch the current microcode version, use sysutils/x86info: > > # kldload -n cpuctl && x86info -a | grep Micro > Microcode version: 0x0000000000000020 > > Compare with the version installed by the microcode_update rc script at > run-time: > > # service microcode_update onestart > Updating CPU Microcode... > Done. > # kldload -n cpuctl && x86info -a | grep Micro > Microcode version: 0x0000000000000020 > > If your testing indicates that the boot-time loading method doesn't > work, please include the dmesg in your reply. Thanks in advance. Hey there Mark, So I've just tested this on a kabylake system running a kernel/world from Sept 7th which I believe is recent enough. After updating /boot/loader.conf as per your email I am not sure if any microcode updates are being applied.  I'm not seeing any messages regarding firmware updates being applied in the dmesg buffer.  running x86info results in the following: $ sudo kldload -n cpuctl && sudo x86info -a | grep Micro Microcode version: 0x000000000000008e this is after rebooting with the updated loader.conf as well as running the rc script by hand.  i didn't think to compare the output of x86info before running the rc script, i can do that later today. for reference here is my dmesg: https://gist.github.com/nomadlogic/bfc54315b97d374a7818d29bfc93223e Cheers, -pete -- Pete Wright pete@nomadlogic.org @nomadlogicLA