I couldn't let the MemSemaphoreResxxx thing go... I twiddled with my
simple tool and wound up tracing into the calls while the system was up
and running. Along the way, I came across what seems like a bug in the
3.3 Roms, but I might be missing something...
The first few lines of the trap appear to be:
move.l d0,-(a7) ; save it
move.w #0x2c, d0 ; the exception vector address that got us here
bra <common> ; jump to a common exception handler
.
. [Other handler entry points]
.
<common>:
or.w 0x700, sr ; we're the man...
tst.b 0x101 ; test some variable
bne <good> ; go on with the exception if good
tst.l 0x14a ; test yet another variable
beq <reset>
pea <err string>
trap #F: SysFatalAlert ; ???? Won't this recurse until the stack
explodes if
; trap #F got us here in the first place?
<reset>:
trap #F: SysReset ; ???? And this as well?
<err string>:
dc.b 'something about an illegal exception...'
<good>:
Figure out what kind of exception and process it...
On a brighter note, I was absolutely wrong (as usual) - the initial
MemSemaphorexxx traps *are* replaced, and they do a lot. Actually, they
don't seem to do *that* much, but they run through a lot of code doing
it <grin>... The most important thing they do seems to be clearing and
setting the READ-ONLY bit in a Dragonball chip select register. There
is also some pretty interesting usage count type logic that seems to get
bypassed most the time. There also appear to be Trap #F codes which do
not start with 0xA0xx. I had no idea these existed!
Oh well, more exploring some other day <bigger grin than usual>.
One other dumb question - I understand why the MW debugger can't set
breakpoints in ROM when debugging on a real device, but why doesn't it
let you set breakpoints at arbitrary addresses when you are running with
the POSE? I basically stuck 'illegal's in 'Rom' code on the POSE to get
into my ultra simple monitor, it seems that the MW-D should be able to
do something similar.
Best Regards,
-jjf
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html