Chris Barnes [of Sydney Linux Users Group] wrote:
> Hi people,
> I'm in the midst of compiling the 2.4.19 kernel on my system and i came
> across something I hadn't noticed before (so i don't know if its a new
> feature or not), its microcode support.
>
> I checked the help for this feature but it doesn't explain what
> microcode is. I went to the web site it refered to
> (http://www.urbanmyth.org/microcode/) but that doesn't explain what
> microcode is either, it only explains how it works with the kernel.
>
> anyway, is this something my system could benefit from or is this more
> of a developers tool?
>
> I have a pentium 2 so my system supports microcode, i just dont know if
> i need it, or could benefit from it.
>
> could anyone shed some light?
Ooh this stuff is fun, so i'll give a slightly extended answer to "what is
microcode"! microcode is one level away from the digital logic level of a CPU.
In Assembler, the programmer uses a mnemonic representation for instructions,
such as
move.b bpb(PC),D0
cmpi.b #1,D0 ;1 or lower value
ble.s endbpb ;means no emphasis
addq.b #1,D2
cmp.b D0,D2
beq.s adjustbpb
lea dlyav(PC),A0
move.w #10,(A0)
lea dlybv(PC),A0
move.w #390,(A0)
rts
These instructions actually represent an address in a kind of CPU ROM that
contains (you guessed it), microcode. The value that each mnemonic represents
is used to manipulate a Micro Program Counter [MPC].
For example. The rts (return from subroutine) instruction would need micro-
instructions to enable certain registers to recieve data off an internal CPU bus,
copy the contents of the Stack Pointer [SP] into a Memory Address Register [MAR],
assert a memory read signal, update the SP, copy the contents of the Memory Buffer
Register [MBR] into the Program Counter [PC], then fetch the instruction pointed
to by the PC.
Each of these micro-instructions is loaded into a Micro Instruction Register [MIR],
which is basically a set of control lines for the CPU (for memory r/w signals,
ALU signals) etc.
Now, if you can understand that, the information at
http://www.urbanmyth.org/microcode/ might make a little more sense ;-)
Cheers,
Grant
--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug