Silly question about "updateMicrocode" option

Hi!

This is not really nixos specific question, but easily framed as such.

There’s this hardware.cpu.[intel|amd].updateMicrocode option.

When it’s set where does the new microcode get loaded?
I’ve read that the onchip microcode is immutable. So where does OS store the new microcode and where does the mutation happen?
How persistent is it? For example does it affect other operating systems running on the same hardware? What is the protocol/mechanism/abstraction layer that makes this microcode update possible?

Thanks for any light you guys can shed on this!

It’s stored in the initrd, and the kernel updates it as one of the first things it does during boot. It’s not persistent on the system; it’s just something the kernel does every time it boots.

3 Likes

Thanks!
How does cpu access this microcode?

The kernel docs cover this in all the gory detail: https://www.kernel.org/doc/html/next/x86/microcode.html

This isn’t NixOS specific, mind you, most distros do this. NixOS is a bit unique because the initramfs is built with a custom script instead of dracut, but then that isn’t universally the same across distros either (arch uses a bespoke script as well, for example).

1 Like