It's been a long time since I wrote this code, but I believe what's
supposed to happen is that the function that generates the microop is
supposed to take the current macroop (the JMP that caused this to be
executed in the first place), take its emulation environment object
which defines operand sizes, and use that to construct the microop. If
no macroop is passed in, then the environment defaults to one with
dummy values. That's necessary if you're entering the microcode ROM
because of something other than an instruction, like because you got
an interrupt. Some of the relevant code is here:
http://repo.gem5.org/gem5/file/f348cf78072c/src/arch/x86/isa/microops/base.isa
If this is giving you problems, the macroop is probably getting lost
somehow. Is this related to what you were asking about the other day?
Gabe
Quoting Nilay Vaish <[email protected]>:
The microcode defined for jmp instructions may have a problem. On
reading the trace, I found that the microop 'wrip' in the code below
is assuming data size to be 1. Looking at the values of t0 and t1
registers, it seems that the data size should be at least 2. Can any
one (most likely Gabe) comment on this?
def rom
{
extern jmpFarWork:
# t1 has the offset and t2 has the new selector.
# This is intended to run in protected mode.
andi t0, t2, 0xFC, flags=(EZF,), dataSize=2
fault "new GeneralProtection(0)", flags=(CEZF,)
andi t3, t2, 0xF8, dataSize=8
andi t0, t2, 0x4, flags=(EZF,), dataSize=2
br rom_local_label("farJmpGlobalDescriptor"), flags=(CEZF,)
ld t4, tsl, [1, t0, t3], dataSize=8, addressSize=8, atCPL0=True
br rom_local_label("farJmpProcessDescriptor")
farJmpGlobalDescriptor:
ld t4, tsg, [1, t0, t3], dataSize=8, addressSize=8, atCPL0=True
farJmpProcessDescriptor:
rcri t0, t4, 13, flags=(ECF,), dataSize=2
br rom_local_label("farJmpSystemDescriptor"), flags=(nCECF,)
chks t2, t4, CSCheck, dataSize=8
wrdl cs, t4, t2
wrsel cs, t2
wrip t0, t1
eret
farJmpSystemDescriptor:
panic "Far jumps to system descriptors aren't implemented"
eret
};
--
Nilay
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev