Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbppc/mpc85xx Cleanup register use so that r5-r8 a...
details: https://anonhg.NetBSD.org/src/rev/3e3314c675a5
branches: trunk
changeset: 765855:3e3314c675a5
user: matt <matt%NetBSD.org@localhost>
date: Wed Jun 08 05:09:21 2011 +0000
description:
Cleanup register use so that r5-r8 are preserved. Take advantage of
changes to INIT_CPUINFO (it now saves curcpu to L_CPU(%r13)).
diffstat:
sys/arch/evbppc/mpc85xx/mpc85xx_start.S | 36 +++++++++++++++-----------------
1 files changed, 17 insertions(+), 19 deletions(-)
diffs (71 lines):
diff -r c5e33d607fec -r 3e3314c675a5 sys/arch/evbppc/mpc85xx/mpc85xx_start.S
--- a/sys/arch/evbppc/mpc85xx/mpc85xx_start.S Wed Jun 08 05:03:43 2011 +0000
+++ b/sys/arch/evbppc/mpc85xx/mpc85xx_start.S Wed Jun 08 05:09:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mpc85xx_start.S,v 1.3 2011/06/05 16:52:23 matt Exp $ */
+/* $NetBSD: mpc85xx_start.S,v 1.4 2011/06/08 05:09:21 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#include <powerpc/asm.h>
-RCSID("$NetBSD: mpc85xx_start.S,v 1.3 2011/06/05 16:52:23 matt Exp $")
+RCSID("$NetBSD: mpc85xx_start.S,v 1.4 2011/06/08 05:09:21 matt Exp $")
#include "opt_altivec.h"
#include "opt_ddb.h"
@@ -125,7 +125,7 @@
/* zero bss */
sub %r17,%r16,%r15
addi %r17,%r17,3+USPACE
- rlwinm %r3,%r17,32-2,2,31 /* srwl %r0,%r0,2 */
+ rlwinm %r3,%r17,32-2,2,31 /* srwl %r3,%r17,2 */
mtctr %r3
li %r0,0
2: stwu %r0,4(%r15)
@@ -133,12 +133,10 @@
#if NKSYMS || defined(DDB) || defined(MODULAR)
/* If we had symbol table location we'd store it here and would've adjusted r8 here */
- lis %r7,_C_LABEL(startsym)@ha
- addi %r7,%r7,_C_LABEL(startsym)@l
- stw %r8,0(%r7)
- lis %r7,_C_LABEL(endsym)@ha
- addi %r7,%r7,_C_LABEL(endsym)@l
- stw %r8,0(%r7)
+ lis %r17,_C_LABEL(startsym)@ha
+ stw %r18,_C_LABEL(startsym)@l(%r17)
+ lis %r17,_C_LABEL(endsym)@ha
+ stw %r18,_C_LABEL(endsym)@l(%r17)
#endif
/* Set kernel MMU context. */
@@ -146,16 +144,16 @@
mtpid %r0
isync
- INIT_CPUINFO(16,1,9,20)
- mr %r4,%r16
- mfsprg0 %r21
- lwz %r20,CI_CURLWP(%r21)
- mtsprg2 %r20
- stw %r21,L_CPU(%r20)
- addi %r21,%r21,CI_SAVELIFO
- mtsprg3 %r21
- mr %r20,%r31 /* make deadbeef again */
- mr %r21,%r31 /* make deadbeef again */
+ INIT_CPUINFO(16,1,18,17) /* r16 has &_end */
+ mr %r4,%r16 /* remember kernelend */
+ mtsprg2 %r13 /* r13 has &lwp0, put into sprg2 */
+ GET_CPUINFO(%r17)
+ addi %r17,%r17,CI_SAVELIFO
+ mtsprg3 %r17
+ mr %r18,%r31 /* make deadbeef again */
+ mr %r17,%r31 /* make deadbeef again */
+ mr %r16,%r31 /* make deadbeef again */
+ mr %r15,%r31 /* make deadbeef again */
#if defined(GXEMUL)
/*
Home |
Main Index |
Thread Index |
Old Index