Subject: port-powerpc/33107: probable typo in reset code
To: None <port-powerpc-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: seebs <seebs@vash.cel.plethora.net>
List: netbsd-bugs
Date: 03/20/2006 15:40:01
>Number: 33107
>Category: port-powerpc
>Synopsis: probable typo in reset code
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: port-powerpc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 20 15:40:00 +0000 2006
>Originator: seebs
>Release: NetBSD 3.99.15
>Organization:
>Environment:
Architecture: powerpc
Machine: powerpc
>Description:
The reset code in /sys/arch/powerpc/ibm4xx/4xx_locore.S has a typo.
>How-To-Repeat:
Read code, compare with other systems
>Fix:
It seems most likely that the intent of this code is to set the reset
bits without touching the rest of the register, but in fact, it adds
them to whatever random noise is in r13. This shouldn't matter,
because the reset bits dominate everything else, but cleanliness is
next to having some clue why my 4xx box won't reset.
Index: 4xx_locore.S
===================================================================
RCS file: /cvsroot/src/sys/arch/powerpc/ibm4xx/4xx_locore.S,v
retrieving revision 1.5
diff -r1.5 4xx_locore.S
92,94c92,94
< mfspr %r3,SPR_DBCR0
< oris %r3,%r13,DBCR0_RST_SYSTEM@h
< mtspr SPR_DBCR0,%r3
---
> mfspr %r3,SPR_DBCR0
> oris %r3,%r3,DBCR0_RST_SYSTEM@h
> mtspr SPR_DBCR0,%r3