# Intel microcode updates and what do they entail?



## fufukauliza (Aug 1, 2022)

Hello,

a topic that I have never studied in depth and therefore I ask you for an explanation as simple as possible.
In one of the many FreeBSD installation tutorials I remember seeing it suggested to also set up the microcode update which I think is possible for both Intel and AMD CPUs.
I have an Intel processor and FreeBSD 13.1
What does this type of update entail, can there be risks and what is the best way to do it?
I found this link but I wanted to ask the community first and wait for your advice.





						Update Intel Microcode on FreeBSD - Thomas-Krenn-Wiki
					

FreeBSD provides support for updating the microcode of a processor at startup or at runtime. In this article, we use a server running FreeBSD 12.0 to show how to check the Intel Microcode version and how to install newer microcode versions if necessary.




					www.thomas-krenn.com
				




Thank you all.


----------



## SirDice (Aug 1, 2022)

fufukauliza said:


> What does this type of update entail


A modern x86 based CPU is actually a complete computer inside the chip. This type of update updates the microcode inside the CPU itself. It's like updating the "OS" of the CPU itself.






						Microcode - Wikipedia
					






					en.wikipedia.org


----------



## fufukauliza (Aug 1, 2022)

SirDice said:


> A modern x86 based CPU is actually a complete computer inside the chip. This type of update updates the microcode inside the CPU itself. It's like updating the "OS" of the CPU itself.
> 
> 
> 
> ...


OK thanks.
What is the safest method you recommend for doing this?
Furthermore, if the update is not successful, what are the risks, can there be malfunctions?
Thanks again.


----------



## mer (Aug 1, 2022)

I think it's just pkg install devcpu-data-intel and follow whatever instructions.  It's probably add a variable to /etc/rc.conf and reboot.

```
2. The second method, which uses the RC script included in this port can
   be enabled by adding the following line to /etc/rc.conf:

   microcode_update_enable="YES"

   The microcode update is then applied upon reboot or when the microcode
   update service is run via:

   # service microcode_update start

   If the CPU requires a microcode update, a console message such as the
   following will appear:

   Updating CPU Microcode...
   %%DATADIR%%/m32306c3_00000022.fw: updating cpu /dev/cpuctl0 from rev 0x17 to rev 0x22... done.
   %%DATADIR%%/m32306c3_00000022.fw: updating cpu /dev/cpuctl2 from rev 0x17 to rev 0x22... done.
   %%DATADIR%%/m32306c3_00000022.fw: updating cpu /dev/cpuctl4 from rev 0x17 to rev 0x22... done.
   %%DATADIR%%/m32306c3_00000022.fw: updating cpu /dev/cpuctl6 from rev 0x17 to rev 0x22... done.
   Done.
```


----------



## SirDice (Aug 1, 2022)

Nice explanation of the different methods: https://www.thomas-krenn.com/en/wiki/Update_Intel_Microcode_on_FreeBSD


----------



## fufukauliza (Aug 1, 2022)

mer said:


> I think it's just pkg install devcpu-data-intel and follow whatever instructions.  It's probably add a variable to /etc/rc.conf and reboot.
> 
> ```
> 2. The second method, which uses the RC script included in this port can
> ...



I installed the package for Intel but when I manually ran the service command microcode_update start it told me it couldn't find the service.
I then uninstalled the package for intel and with the generic one which also includes amd it worked and gave me the same message as the page:
  Updating CPU Microcode ...
%% DATADIR %% / m32306c3_00000022.fw: updating cpu / dev / cpuctl0 from rev 0x17 to rev 0x22 ... done.


I checked my microcode both before and after and it stayed the same: 0x00000000000000f0

Am I wrong something sure or there are no updates for my CPU?

I think I got confused.

Thank you.


----------



## mer (Aug 1, 2022)

Sorry, my mistake about the packages.  If you just installed the devcpu-data-intel you could do the lines in the boot loader, but the service comes in with the devcpu-data package.
If the microcode was the same before and after it means "no updates for your CPU in the current package".


----------



## fufukauliza (Aug 1, 2022)

Hello,
I enabled the microcode update via the boot loader.
Where can I find the logs of the process to know that it has done an update check?

Thank you.


----------

