Friday, October 21, 2011

Intel Microcode



Just keep learning new shtuff!

Microcode website

When I upgraded the RAM on my netbook, I was instructed to update my BIOS firmware to the latest release. So I bit my lip and prayed that everything went right. This is one procedure that you don't want to miss on. It can leave your system in an unrecoverable state. It's called bricking your computer. After loading the operating system my BIOS did not recognize the increase in memory. Subsequently neither would the operating system software. My skin crawls when I can't get something to work right, so I set about making sure there wasn't a newer release or perhaps there was a fix for this out there in ether land. While searching Intel's download servers I kept running across these microcode downloads. I had my mind set on BIOS and it took me a little while to investigate just what was this microcode stuff I have never heard of.

http://urbanmyth.org/microcode/

Intel Microcode Update Utility for Linux

The microcode_ctl utility is a companion to the IA32 microcode driver written by Tigran Aivazian <tigran@aivazian.fsnet.co.uk>. The utility has two uses:
it decodes and sends new microcode to the kernel driver to be uploaded to Intel IA32 processors. (Pentium Pro, PII, PIII, Pentium 4, Celeron, Xeon etc - all P6 and above, which does NOT include pentium classics). It also supports processors of the x86_64 architecture.


Microcode has been around for a long time. It was written in assembly code into the harder, more permanent areas of memory.

http://en.wikipedia.org/wiki/Microcode

Modern microcode is normally written by an engineer during the processor design phase and stored in a ROM (read-only memory) or PLA (programmable logic array)[1] structure, or a combination of both.[2] However, machines also exists which have some (or all) microcode stored in SRAM or flash memory. This is traditionally denoted a writeable control store in the context of computers. Complex digital processors may also employ more than one (possibly microcode based) control unit in order to delegate sub-tasks which must be performed (more or less) asynchronously in parallel. Microcode is generally not visible or changeable by a normal programmer, not even by an assembly programmer. Unlike machine code which often retains some compatibility among different processors in a family, microcode only runs on the exact electronic circuitry for which it is designed, as it constitutes an inherent part of the particular processor design itself.


**************************************************
Several Intel CPUs in the x86 architecture family have writable microcode.[16] This has allowed bugs in the Intel Core 2 microcode and IntelXeon microcode to be fixed in software, rather than requiring the entire chip to be replaced. Such fixes can be installed by Linux,[17]FreeBSD,[18] Microsoft Windows,[19] or the motherboard BIOS.[20]

Intel has recently released these software updates to by-pass the BIOS updates and write binary code to the processor.

http://dereenigne.org/computers/linux/update-intel-cpu-microcode
You are probably familiar with the terms firmware and drivers in the context of computer hardware, and the endless updating that they require. Most people associate these drivers and firmware updates with peripheral equipment such as graphic cards and DVD drives. You might not however be aware that you can also update the firmware on your CPU (firmware is called microcode in CPU speak).

These microcode updates are normally bundled in with BIOS updates. Given the fact that BIOS updates are inherently risky, motherboard manufacturers are reluctant to issue BIOS updates for anything other than major bugs. This means your microcode can become quite dated. Both Intel and AMD realize this and release standalone microcode updates.

If you are running Debian or Ubuntu and Intel CPU (there is a pretty good chance you are), you can use the intel-microcode and microcode.ctl packages to update your microcode. This will download the latest microcode for your CPU and apply the update automatically on each boot. This process does not apply the update permanently, and is completely reversible.
Periodically run sudo update-intel-microcode
to download the latest microcode version from Intel.

I was already wary of BIOS updates so I didn't just dive in and start downloading files. microcode.ctl is available from the Ubuntu Software Center. I downloaded the program ran the update and voila, even though my BIOS seems unaware of my RAM upgrade it's no longer fooling my operating system.

Now if I could just convince it that it's only a single core.... :)

No comments:

Post a Comment