From 4924c0ae307a2b88f77ebd44f929659a0d89e77b Mon Sep 17 00:00:00 2001 From: uwe Date: Tue, 11 Dec 2001 03:35:02 +0000 Subject: [PATCH] On ms-IIep kernel runs with PCI endian swapping turned on but we need to turn it off before we pass control to PROM's repl as it expects PCIC to be in little endian mode and would hang otherwise. --- sys/arch/sparc/sparc/openfirm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/arch/sparc/sparc/openfirm.c b/sys/arch/sparc/sparc/openfirm.c index de85d61f2f61..6173450a9c24 100644 --- a/sys/arch/sparc/sparc/openfirm.c +++ b/sys/arch/sparc/sparc/openfirm.c @@ -1,4 +1,4 @@ -/* $NetBSD: openfirm.c,v 1.5 2001/09/24 13:22:33 wiz Exp $ */ +/* $NetBSD: openfirm.c,v 1.6 2001/12/11 03:35:02 uwe Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -639,7 +639,13 @@ OF_enter() args.name = ADR2CELL("enter"); args.nargs = 0; args.nreturns = 0; +#if defined(MSIIEP) + msiiep_swap_endian(0); +#endif openfirmware(&args); +#if defined(MSIIEP) + msiiep_swap_endian(1); +#endif } void @@ -654,7 +660,13 @@ OF_exit() args.name = ADR2CELL("exit"); args.nargs = 0; args.nreturns = 0; +#if defined(MSIIEP) + msiiep_swap_endian(0); +#endif openfirmware(&args); +#if defined(MSIIEP) + msiiep_swap_endian(1); +#endif panic("OF_exit failed"); }