From nobody@FreeBSD.org  Tue Jul  3 08:51:35 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8DA5D106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  3 Jul 2012 08:51:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 79CA98FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  3 Jul 2012 08:51:35 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q638pZrh058361
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 3 Jul 2012 08:51:35 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q638pZbw058360;
	Tue, 3 Jul 2012 08:51:35 GMT
	(envelope-from nobody)
Message-Id: <201207030851.q638pZbw058360@red.freebsd.org>
Date: Tue, 3 Jul 2012 08:51:35 GMT
From: Volodymyr Kostyrko <c.kworr@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: sysutils/devcpu-data
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         169628
>Category:       ports
>Synopsis:       sysutils/devcpu-data
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 03 09:00:26 UTC 2012
>Closed-Date:    Tue Nov 26 14:20:23 UTC 2013
>Last-Modified:  Tue Nov 26 14:20:23 UTC 2013
>Originator:     Volodymyr Kostyrko
>Release:        RELENG_9
>Organization:
None
>Environment:
FreeBSD green.tandem.local 9.0-STABLE FreeBSD 9.0-STABLE #0 r237957M: Mon Jul  2 11:49:40 EEST 2012     arcade@green.tandem.local:/usr/obj/usr/src/sys/MINIMAL  amd64
>Description:
1. When updating my chip firmware changes are not saved:

/usr/local/share/cpucontrol/m011067660F.fw: updating cpu /dev/cpuctl0 from rev 0x60b to rev 0x60f... done.
/usr/local/share/cpucontrol/m011067660F.fw: updating cpu /dev/cpuctl1 from rev 0x60b to rev 0x60f... done.

However I get this each reboot. It seems that update doesn't go right. My chip is:

Jul  3 09:01:14 green kernel: CPU: Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz (3000.01-MHz K8-class CPU)
Jul  3 09:01:14 green kernel: Origin = "GenuineIntel"  Id = 0x10676  Family = 6  Model = 17  Stepping = 6
Jul  3 09:01:14 green kernel: Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Jul  3 09:01:14 green kernel: Features2=0x8e3fd<SSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1>
Jul  3 09:01:14 green kernel: AMD Features=0x20100800<SYSCALL,NX,LM>
Jul  3 09:01:14 green kernel: AMD Features2=0x1<LAHF>

2. Isn't it right to change rc script to patch microcode on powering system down instead of patching it when system starts?

 - we can have more stable behavior in case some patch requires a reboot;
 - we don't need to do anything on port update except rebooting.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Alex Kozlov <spam@rm-rf.kiev.ua>
To: Volodymyr Kostyrko <c.kworr@gmail.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/169628: sysutils/devcpu-data
Date: Mon, 14 Oct 2013 15:40:14 +0300

 Hi, Volodymyr
 
 The CPU microcode needs to be loaded at every bootup:
 https://wiki.archlinux.org/index.php/microcode
 
 
 -- 
 Alex

From: Volodymyr Kostyrko <c.kworr@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/169628: sysutils/devcpu-data
Date: Mon, 14 Oct 2013 16:38:21 +0300

 Hi all.
 
 Sorry, missed that at first glance. It actually looks like CPU should be 
 patched only once because if you reboot it without turning system off 
 next run shows that nothing should be done.
 
 There's also no sentence or link directly mentioning or referring to 
 microcode update process. Maybe we should include at least one (in 
 files/pkg-message.in I suppose)?
 
 Probably like this:
 
 ===> IMPORTANT NOTE:
 
 To set up microcode updates you need to alter one of the following:
    /etc/rc.conf
    /etc/rc.conf.local
 
 Add the following line to enable:
    microcode_update_enable="YES"
 
 You can see this file for a full option list:
    %%LOCALBASE%%/etc/rc.d/microcode_update
 
 Note that any changes to CPU microcodes are temporary and would wear off 
 on cold reboot. You can consult 
 https://wiki.archlinux.org/index.php/microcode for a complete description.
 
 -- 
 Sphinx of black quartz, judge my vow.
State-Changed-From-To: open->feedback 
State-Changed-By: jadawin 
State-Changed-When: Wed Nov 20 15:00:20 UTC 2013 
State-Changed-Why:  
Can we close this PR? Is issue solved? Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169628 
State-Changed-From-To: feedback->closed 
State-Changed-By: jadawin 
State-Changed-When: Tue Nov 26 14:20:22 UTC 2013 
State-Changed-Why:  
No feedback. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=169628 
>Unformatted:
