<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Arial"> I have been trying to add hardware/software
breakpoints to the elf loader I am using for Linux on the Pico E12/E14
boards.<br>
I have had no trouble setting up an exception handler - I found
several including the one inside the kernel to "borrow" from.<br>
Using the Xilinx/IBM PPC reference I have had no problem setting a
breakpoint - either by replacing an instruction with a trap, or by
setting the IAC registers.<br>
I have no problem catching the exception - exactly as I expected.<br>
But despite the fact that I have cleared the dbsr, dbcr0, esr, and
the appropriate bits in the msr/ appropriate srr for the exception, <br>
I can not exit from the excretion handler (back through restoring
registers (except for the above changes) , without having the exception
re-occur again at exactly the same place.<br>
I have poured over the Xilinx/IBM docs looking for something I am
missing, some bit I need to wiggle, ... but can't find anything.<br>
<br>
Is anyone aware of a clean example dealing with ppc405 software
debugging (or something similar enough to be useful) that I could use
as a reference ?<br>
Anyone have any ideas what I might be missing ? Or a mailing list
that might be a more appropriate target this question ?<br>
<br>
I have pasted a trace of what I am seeing - the trace is my own
code - part of the software debugger I am trying to build into the
bootloader.<br>
The trace at each exception only shows the registers that have
changed since the last display.<br>
<br>
MonitorK.elf is the debugging version of my boot loader.<br>
Anything prefixed with a "!" is a command to MonitorK.<br>
<br>
<br>
File MonitorK.elf updated from C:\Pico\MonitorK.elf.<br>
Loading MonitorK.elf.<br>
!boot -vvTS kernel.elf<br>
Entrypoint: 0x000064e0 Cmdline @ 0x0fff0200: <><br>
lr=0x000064e0 r3=0x0fffb000 r6=0x0fff0200
r9=0x10000000 srr0=0x000064e0 dbcr0=0x08000000 <br>
iac1=0x000064f0 r1=0x0fff0000 <br>
DBCR0: IC <br>
Traps: 0x000064ec <br>
<br>
Program Exception 00000007 @ 000064ec<br>
bch=0x0fff010c blr=0x07000780 pc=0x000064ec
cr=0x40000000 r11=0x0006fa3c srr0=0x000064ec <br>
esr=0x02000000 tsr=0xc4000000 dbsr=0x98100300 dbcr0=0x09000000
<br>
DBSR: IC TDE UDE IDE <br>
DBCR0: IC TDE <br>
ESR: PEU <br>
TSR: ENW WIS <br>
Traps: 0x000064ec <br>
000064ec: 41820008 bc 12,2,0x8<br>
<br>
!step<br>
Program Exception 00000007 @ 000064ec<br>
tsr=0x04000000 dbsr=0x90100000 <br>
DBSR: IC TDE IDE <br>
DBCR0: IC TDE <br>
ESR: PEU <br>
TSR: <br>
Traps: 0x000064f0 <br>
000064ec: 41820008 bc 12,2,0x8<br>
<br>
!step<br>
Program Exception 00000007 @ 000064ec<br>
tsr=0xc4000000 <br>
DBSR: IC TDE IDE <br>
DBCR0: IC TDE <br>
ESR: PEU <br>
TSR: ENW WIS <br>
Traps: 0x000064f0 0x000064f0 <br>
000064ec: 41820008 bc 12,2,0x8<br>
<br>
!step<br>
Program Exception 00000007 @ 000064ec<br>
tsr=0x04000000 <br>
DBSR: IC TDE IDE <br>
DBCR0: IC TDE <br>
ESR: PEU <br>
TSR: <br>
Traps: 0x000064f0 0x000064f0 0x000064f0 <br>
000064ec: 41820008 bc 12,2,0x8<br>
<br>
<br>
I can get this to repeat pretty much infinitely with nothing changing
except TSR_ENW and TSR_WIS<br>
<br>
<br>
<br>
<br>
</font>
<pre class="moz-signature" cols="72">--
Dave Lynch                                                   DLA Systems
Software Development:                                  Embedded Linux
717.627.3770          <a class="moz-txt-link-abbreviated" href="mailto:dhlii@dlasys.net">dhlii@dlasys.net</a>          <a class="moz-txt-link-freetext" href="http://www.dlasys.net">http://www.dlasys.net</a>
fax: 1.253.369.9244                          Cell: 1.717.587.7774
Over 25 years' experience in platforms, languages, and technologies too numerous to list.
"Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction."
Albert Einstein
</pre>
</body>
</html>