CPU Firmware

So, I've never really been one to understand things at the hardware level and generally don't understand how assembly works behind the scenes (which is probably a bad thing given some of my projects but I digress). I get by by just understanding that a certain op code does a specific action, it has X side effects I need to be careful about, and I need to remember any state it changes before calling the next op-code.

But CPU firmware has me confused. Opcodes, to my knowledge, are driven by hardware (AFAIK the CPU). Firmware can change support for certain opcodes and I don't understand how that works. Can anyone explain to me the place where firmware sits for the CPU relative to the opcodes I call from something like x86 or AMD64 assembly?
Maybe this is something your interested in learning about.

Microcode typically resides in special high-speed memory and translates machine instructions, state machine data or other input into sequences of detailed circuit-level operations. It separates the machine instructions from the underlying electronics so that instructions can be designed and altered more freely. It also facilitates the building of complex multi-step instructions, while reducing the complexity of computer circuits...

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


My old instructor claimed that CPU vendors are highly secretive about their microcode, so you can't really know much at all about it for a specific CPU. Basically, you can say that machine instructions aren't really machine instructions, they're actually a high level language interpreted by Microcode, which translates it into actual processor specific instructions. This makes it easier to use the same standard machine code for a whole family of processors, yet still integrate new high performance features and tricks in newer devices, etc.
Last edited on
Topic archived. No new replies allowed.