Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/mpc6xx for MP builds, save and restore sprg...
details: https://anonhg.NetBSD.org/src/rev/edf897ecc09b
branches: trunk
changeset: 534394:edf897ecc09b
user: chs <chs%NetBSD.org@localhost>
date: Wed Jul 24 06:04:43 2002 +0000
description:
for MP builds, save and restore sprg0 (which contains the curcpu pointer)
around restoring OFW's sprg registers while calling into OFW.
diffstat:
sys/arch/powerpc/mpc6xx/ofw_subr.S | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diffs (49 lines):
diff -r ebcfb030ace9 -r edf897ecc09b sys/arch/powerpc/mpc6xx/ofw_subr.S
--- a/sys/arch/powerpc/mpc6xx/ofw_subr.S Wed Jul 24 05:44:37 2002 +0000
+++ b/sys/arch/powerpc/mpc6xx/ofw_subr.S Wed Jul 24 06:04:43 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_subr.S,v 1.1 2002/07/06 18:01:23 matt Exp $ */
+/* $NetBSD: ofw_subr.S,v 1.2 2002/07/24 06:04:43 chs Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -40,6 +40,11 @@
GLOBAL(ofmsr)
.long 0,0,0,0,0 /* msr & sprg[0-3] used in OF */
+#ifdef MULTIPROCESSOR
+GLOBAL(ofwsprg0save)
+ .long 0
+#endif
+
.comm firmstk,NBPG,8
.comm openfirmware_entry,4,4 /* openfirmware entry point */
.comm ofwsrsave,64,4 /* openfirmware SR savearea */
@@ -107,6 +112,13 @@
cmpwi 5,0
bne 1b
+#ifdef MULTIPROCESSOR
+ mfsprg 5,0 /* save current sprg0 (curcpu) */
+ lis 4,ofwsprg0save@ha
+ addi 4,4,ofwsprg0save@l
+ stw 5,0(4)
+#endif
+
lis 4,_C_LABEL(ofw_pmap)@ha /* load OFW SR */
addi 4,4,_C_LABEL(ofw_pmap)@l
lwz 0,PM_KERNELSR(4)
@@ -135,6 +147,13 @@
blrl /* call Open Firmware */
+#ifdef MULTIPROCESSOR
+ lis 4,ofwsprg0save@ha /* return saved sprg0 (curcpu) */
+ addi 4,4,ofwsprg0save@l
+ lwz 5,0(4)
+ mtsprg 0,5
+#endif
+
lis 4,ofwsrsave@ha /* restore saved SRs */
addi 4,4,ofwsrsave@l
li 5,0
Home |
Main Index |
Thread Index |
Old Index