[Top] [All Lists]


Subject: Bugs...
From: Andreas Busse <>
Date: Tue, 5 Sep 1995 19:01:39 +0200
Hi all,

I'm fighting with the GDB stub and (who wonders) think
mysterious things happening... The problem I have that
the gdb stub works, but not for a BREAK instruction.
In exactly this case, the CP0_EPC and CP0_CAUSE are
exchanged, and the CP0_STATUS register on the stackframe
contains nonsense. Before you say: check your handler
I say: It's the same for all exceptions, *including* BREAK.

So I took a look into the R4000 V2.2 and 3.0 errata.
Not that I found something regarding this problem, but
something else instead:

The following conditions cause the R4000 to operate
 1) An exception is taken from user code
 2) On the ERET instruction of the exception handler, 
    a CacheErr is taken

The R4000 takes the CacheErr exception correctly but
returns to user code instead of the ERET of the exception
handler. This will then cause an Address Error exception.

WORKAROUND: Use the following code sequence as the last
three instructions of the exception handler:

The CacheErr handler must add 4 to the ErrorEPC to return
to the nop.
[end of quoted material]

I guess we should take this into account. Any comments?


Andreas Busse                      |
Waldorf Electronics GmbH, R&D Dep. | Phone: +49 2636-970105
Neustrasse 9-12, D-53498 Waldorf   | Fax:   +49 2636-970106

<Prev in Thread] Current Thread [Next in Thread>
  • Bugs..., Andreas Busse <=