<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Enodev.fr / Christophe's log (Posts about CPU)</title><link>https://www.enodev.fr/</link><description></description><atom:link href="https://www.enodev.fr/categories/cpu.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><lastBuildDate>Sun, 10 Mar 2024 11:03:11 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Upgrade the CPU microcode on Debian</title><link>https://www.enodev.fr/posts/upgrade-the-cpu-microcode-on-debian.html</link><dc:creator>Christophe Vu-Brugier</dc:creator><description>&lt;p&gt;When looking at your system's logs, you may notice the following
advice in the Linux kernel logs:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="go"&gt;perf_event_intel: PEBS disabled due to CPU errata, please upgrade microcode&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you are running Debian, you just have to install two packages to
fix the problem: &lt;em&gt;intel-microcode&lt;/em&gt; and &lt;em&gt;iucode-tool&lt;/em&gt;. With these
packages installed, the Linux kernel automagically upgrades the
microcode during the boot sequence.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="go"&gt;microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x23&lt;/span&gt;
&lt;span class="go"&gt;platform microcode: firmware: agent loaded intel-ucode/06-2a-07 into memory&lt;/span&gt;
&lt;span class="go"&gt;microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x23&lt;/span&gt;
&lt;span class="go"&gt;microcode: CPU0 updated to revision 0x28, date = 2012-04-24&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now that the CPU microcode is up-to-date on your computer, let's see
what microcode is and why it matters.&lt;/p&gt;
&lt;h2&gt;What is microcode?&lt;/h2&gt;
&lt;p&gt;Software has bugs. Hardware has bugs too. However, it is easier to fix
a software bug than a hardware design defect in a CPU because software
can be updated whereas a CPU must be replaced.&lt;/p&gt;
&lt;p&gt;Intel documents its design defects and errors as errata. Upgrading the
CPU's microcode can fix some of these problems.&lt;/p&gt;
&lt;p&gt;Microcode is a very low-level construct: it is a program that defines
the control logic of the CPU. As such, microprogramming is lower-level
than assembly programming. You can consider the assembly language
instruction set as the CPU's API which is publicly documented whereas
the microcode defines the implementation of an instruction for a
specific CPU. Moreover, Intel's microcode is mostly a black box and
only Intel's engineers have enough knowledge to write it.&lt;/p&gt;
&lt;p&gt;The BIOS or EFI firmware often update the CPU microcode. But for many
computers, vendors do not supply new firmware. Fortunately, the
operating system can update the microcode itself. It has to apply the
update at every boot because the new microcode is lost after a CPU
hard reset.&lt;/p&gt;
&lt;p&gt;For more information about Intel's microcode, you can read:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gitlab.com/iucode-tool/iucode-tool/-/wikis/home"&gt;iucode's Wiki&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Section 9.11 "microcode update facilities" of the &lt;a href="https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.pdf"&gt;Intel® 64 and IA-32 Architectures Software Developer’s Manual&lt;/a&gt; [PDF].&lt;/li&gt;
&lt;/ul&gt;</description><category>CPU</category><category>Debian</category><category>Intel</category><category>Linux</category><category>microcode</category><guid>https://www.enodev.fr/posts/upgrade-the-cpu-microcode-on-debian.html</guid><pubDate>Sun, 16 Jun 2013 18:00:00 GMT</pubDate></item></channel></rss>