5.2 MIPS32® Architecture Release 2 - enhanced interrupt system(s)
Programming the MIPS32® 74K™ Core Family, Revision 02.14
68
ducer affects even the instruction fetch of the consumer - that’s an “instruction hazard” - or only affecting the opera-
tion of the consuming instruction (an “execution hazard”). Hazard barriers come in two strengths:
ehb
deals only
with execution hazards, while
eret
,
jr.hb
and
jalr.hb
are barriers to both kinds of hazard.
In most implementations the strong hazard barrier instructions are quite costly, often discarding most or all of the
pipeline contents: they should not be used indiscriminately. For efficiency you should use the weaker
ehb
where it is
enough. Since some implementations work by holding up execution of all instructions after the barrier, it’s preferable
to place the barrier just before the consumer, not just after the producer.
For example you might be updating a TLB entry:
mtc0 Index, t0
# other stuff, if there’s stuff to do
ehb
tlbwi
jr.hb ra
The
ehb
makes sure that the change to
Index
has been made before you attempt to write the TLB entry, which is fine.
But updating the TLB might affect how instructions are fetched in mapped space, so you should not return to code
which might be running in mapped space until you’ve cleared the “instruction hazard”. That’s dealt with by the
jr.hb
.
The unconditional hardware interlock between an
mtco
and an
mfco
instruction has been removed. An
ehb
instruc-
tion is now required between an MTC0 and a MFC0 instruction type only when there is a CP0 register dependency.
This optimization reduces the stall cycles incurred by software TLB refill exception handlers when accessing excep-
tion and TLB-related state, The reduction in overhead of handling TLB refill exceptions has a significant impact on
system performance. For more information, refer to the description of the
sync
instruction in the 74K™ Software
User’s Manual .
Porting software to use the new instructions
If you know your software will only ever run on a MIPS32 Release 2 or higher CPU, then that’s great. But to maintain
software which has to continue running on older CPUs:
•
ehb is a no-op: on all previous CPUs. So you can substitute an
ehb
for the last no-op in your sequence of
“enough no-ops”, and your software is now safe on all future CPUs which are compliant with Release 2.
•
jr.hb and jalr.hb: are decoded as plain jump-register and call-by-register instructions on earlier CPUs. Again, pro-
vided you already had enough no-ops for your worst-case older CPU, your system should now be safe on Release
2 and higher CPUs.
5.2 MIPS32® Architecture Release 2 - enhanced interrupt system(s)
The features for handling interrupts include:
•
offers multiple entry points (one for each of the interrupt sources), instead of the
single general exception entry point.
External Interrupt Controller (EIC) mode
goes further, and reinterprets the six core interrupt input signals as a
64-value field - potentially 63 distinguished interrupts each with their own entry point (the zero code, of course,
is reserved to mean “no interrupt active”).
Содержание MIPS32 74K Series
Страница 1: ...Document Number MD00541 Revision 02 14 March 30 2011 Programming the MIPS32 74K Core Family...
Страница 10: ...Programming the MIPS32 74K Core Family Revision 02 14 10...
Страница 20: ...1 4 A brief guide to the 74K core implementation Programming the MIPS32 74K Core Family Revision 02 14 20...
Страница 28: ...2 2 PRId register identifying your CPU type Programming the MIPS32 74K Core Family Revision 02 14 28...
Страница 54: ...3 8 The TLB and translation Programming the MIPS32 74K Core Family Revision 02 14 54...
Страница 83: ......
Страница 86: ...6 5 FPU pipeline and instruction timing Programming the MIPS32 74K Core Family Revision 02 14 86...
Страница 101: ...The MIPS32 DSP ASE 101 Programming the MIPS32 74K Core Family Revision 02 14...
Страница 134: ...8 4 Performance counters Programming the MIPS32 74K Core Family Revision 02 14 134...
Страница 154: ...C 3 FPU changes in Release 2 of the MIPS32 Architecture Programming the MIPS32 74K Core Family Revision 02 14 154...