Intel Microcode

The Intel CPU instruction set is actually a microcode architecture. Calling MOV, IMUL, etc. means that a series of microcode instructions get executed to perform the desired opcode. This lets Intel treat the x86/x64 instruction set as an API, so they can change the microcode underneath with each new CPU or CPU stepping.

Intel can ship new versions of the microcode to fix problems identified after a CPU is released and is in the field. These updates are digitally signed, traceable back to Intel’s root key, so that not just anyone can ship an update. These get distributed through trusted partners, like Dell and Microsoft.

But … there are rumors that the NSA has a copy of Intel’s private key. And this means they can overwrite the microcode in your CPU with their own instructions.

It affects AMD processors as well.

root@ws:~# apt-cache search -- -microcode
iucode-tool - Intel processor microcode tool
microcode.ctl - Intel IA32/IA64 CPU Microcode Utility (transitional package)
amd64-microcode - Processor microcode firmware for AMD CPUs
intel-microcode - Processor microcode firmware for Intel CPUs

There is no source code. The whole thing is a closely guarded secret by Intel. The microcode is not only signed, it’s even encrypted so that us plebs don’t get any chance to even go near Intel’s prized crown jewels (because we’d probably be able to find all the bugs in there…)

Here‘s some nice writeup about what little things are known, if you’re interested. This site has some info on AMD microcode updates.

If learning microcode is actually something you want to do, then you don’t need Intel at all for it. Get an FPGA and start hacking away on many of the open-source CPUs. The FPGA toolchains are closed-source. But there are FOSS soft-cores that can be run on an FPGA.


One thought on “Intel Microcode

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s