SuperH (SH) 64-bit RISC Series SH-5 System Architecture, Volume ...
SuperH (SH) 64-bit RISC Series SH-5 System Architecture, Volume ...
SuperH (SH) 64-bit RISC Series SH-5 System Architecture, Volume ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
PRELIMINARY DATA<br />
78 Reset, panic and debug events<br />
The debug event sequence is identical for both of these circumstances, but there are<br />
differences in the data available to the exception handler according to the WP<br />
channel type. This state is described in the WP channel type sections of this<br />
document (Section 1.10 through Section 1.18).<br />
In a given processor cycle, multiple debug events can match, each of which can<br />
potentially have its action set to raise a debug exception. In these circumstances, a<br />
single debug event (the highest priority debug exception which matches) will be<br />
raised. These priorities are defined in Section 1.7.3: Event specific information on<br />
page 80. There are two general approaches that can be used to cope with<br />
instructions that hit more than one excepting condition:<br />
1 The debug event handler could work out which other conditions would have hit<br />
and carry out all the actions.<br />
2 The debug handler can temporarily disable the exception action from the<br />
channel(s) which hit and caused the exception. When the excepting instruction is<br />
restarted by the RTE at the end of the handler, lower priority exceptions will get<br />
a chance to launch. The handler should enable single stepping, so that a<br />
DEBUGSS exception will be taken on completion of the instruction. The DEBUGSS<br />
handler can re-instate any channels’ ACTION_EXCEPTION actions that were<br />
temporarily disabled.<br />
MMU disable<br />
Either RESVEC or DBRVEC is used to vector debug events (see Section 1.7.1).<br />
Both RESVEC and DBRVEC provide a MMUOFF field to allow the MMU to be disabled<br />
when launching the event handler due to debug events (when launching for<br />
non-debug events such as reset or panic, the MMU is always disabled).<br />
Disabling the MMU allows the debug event handler to execute without having to<br />
reserve TLB entries in the application being debugged. Thus it is possible to totally<br />
decouple the debug event handler from the debugger. It also allows execution of code<br />
with the caches disabled, thus it is possible to perform debug event handling<br />
without perturbing the caches.<br />
D R A FT<br />
If the MMUOFF <strong>bit</strong> of RESVEC/DBRVEC is set, the MMU will be forced to be disabled<br />
whenever the debug event handler is launched (that is, the MMU <strong>bit</strong> of SR will be<br />
forced to 0).<br />
<strong>SuperH</strong>, Inc.<br />
<strong>SH</strong>-5 <strong>System</strong> <strong>Architecture</strong>, <strong>Volume</strong> 3: Debug 05-SA-10003 v1.0