Subject: port-powerpc/33107: probable typo in reset code
To: None <,,>
From: seebs <>
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
Architecture: powerpc
Machine: powerpc
	The reset code in /sys/arch/powerpc/ibm4xx/4xx_locore.S has a typo.
	Read code, compare with other systems
	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
	<       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