Jump to content

What exactly is the microcode in modern x86 cpus?

I recently found a page on github where one can find the microcode of various Intel, AMD and VIA cpus going back to 1997.

I opened one of those files in a hex editor and dissassembled the contents to find that it contains valid x86/x64 assembler .

 

My experience with microcode is mainly limited to pre-90's CISC machines, but i was always told that microcode is what the operation of the microsequencer/FSM for decoding and control signals , and isn't really "code" in itself, let alone coherent machine instructions of the target ISA.

 

I see people refer to microcode as something that seems more powerful than i originally though it to be , as in something that can fix logic flaws .I am under the impression that updating/patching it can ONLY solve control signal-related problems.

Is my original view of microcode wrong, or simply not applicable to current generations? Am i mistaken?

AMD Ryzen R7 1700 (3.8ghz) w/ NH-D14, EVGA RTX 2080 XC (stock), 4*4GB DDR4 3000MT/s RAM, Gigabyte AB350-Gaming-3 MB, CX750M PSU, 1.5TB SDD + 7TB HDD, Phanteks enthoo pro case

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, Coaxialgamer said:

I recently found a page on github where one can find the microcode of various Intel, AMD and VIA cpus going back to 1997.

I opened one of those files in a hex editor and dissassembled the contents to find that it contains valid x86/x64 assembler .

 

My experience with microcode is mainly limited to pre-90's CISC machines, but i was always told that microcode is what the operation of the microsequencer/FSM for decoding and control signals , and isn't really "code" in itself, let alone coherent machine instructions of the target ISA.

 

I see people refer to microcode as something that seems more powerful than i originally though it to be , as in something that can fix logic flaws .I am under the impression that updating/patching it can ONLY solve control signal-related problems.

Is my original view of microcode wrong, or simply not applicable to current generations? Am i mistaken?

The word "microcode" is overcharged.

 

Your definition of microcode is correct, and referes to a layer of software (hardware level instructions) in direct contact with a the cpu hardware. Of course is not intelligible or at least not designed to be that way, the lowest level you'd expect to go (as it is intelligible) is assembly code, and that is one layer above microcode, that'd be before compiling it. In short when you compile Assembly code it turns into microcode (architectural specific) in a translation process made by the compiler.

 

In the other hand microcode is a sloppy term refered to drivers for CPU (firmware). In this regard, one would expect "microcode updates" to fix or patch logical flaws, as an example, disabling TSX in haswell architecture due to erratic behavior. Dont know how we came to call that specific blob "microcode", my guess is that intel aready gives compiled code, restricting of course access to souce code. This is the "more powerful" impression you got.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×