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 fix the FIRMWORKSBUGS case: ofwr_ini...
details: https://anonhg.NetBSD.org/src/rev/7e3aac91a293
branches: trunk
changeset: 536441:7e3aac91a293
user: chs <chs%NetBSD.org@localhost>
date: Mon Sep 16 02:07:24 2002 +0000
description:
fix the FIRMWORKSBUGS case: ofwr_init() substitutes a wrapper OFW entry point
for the real one, so we must call it before we save off the entry point
that the higher level code will use.
diffstat:
sys/arch/powerpc/mpc6xx/ofw_subr.S | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
diffs (52 lines):
diff -r ef3200c0208e -r 7e3aac91a293 sys/arch/powerpc/mpc6xx/ofw_subr.S
--- a/sys/arch/powerpc/mpc6xx/ofw_subr.S Mon Sep 16 01:49:06 2002 +0000
+++ b/sys/arch/powerpc/mpc6xx/ofw_subr.S Mon Sep 16 02:07:24 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_subr.S,v 1.2 2002/07/24 06:04:43 chs Exp $ */
+/* $NetBSD: ofw_subr.S,v 1.3 2002/09/16 02:07:24 chs Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -53,7 +53,17 @@
* Called by start to save the initial OFW state so we can restore it
* when call back to OFW.
*/
-ENTRY(ofwinit)
+ENTRY_NOPROFILE(ofwinit)
+#ifdef FIRMWORKSBUGS
+ mfmsr 0
+ andi. 0,0,PSL_IR|PSL_DR
+ beq 1f
+
+ mflr 30
+ bl _C_LABEL(ofwr_init)
+ mtlr 30
+1:
+#endif
lis 8,openfirmware_entry@ha
stw 5,openfirmware_entry@l(8) /* save client interface handler*/
@@ -70,14 +80,6 @@
mfsprg 0,3
stw 0,4(9)
-#ifdef FIRMWORKSBUGS
- mfmsr 0
- andi. 0,0,PSL_IR|PSL_DR
- beq 1f
-
- b _C_LABEL(ofwr_init) /* do a tail call */
-1:
-#endif
blr
/*
@@ -148,7 +150,7 @@
blrl /* call Open Firmware */
#ifdef MULTIPROCESSOR
- lis 4,ofwsprg0save@ha /* return saved sprg0 (curcpu) */
+ lis 4,ofwsprg0save@ha /* restore saved sprg0 (curcpu) */
addi 4,4,ofwsprg0save@l
lwz 5,0(4)
mtsprg 0,5
Home |
Main Index |
Thread Index |
Old Index