From ef9f9d240b841e110baecb4cf3b2d1d14df091fc Mon Sep 17 00:00:00 2001 From: scw Date: Mon, 28 Jul 2003 21:45:13 +0000 Subject: [PATCH] Implement mvme160x platform-specific reset using a semi-documented register of the IBC. --- sys/arch/mvmeppc/mvmeppc/machdep.c | 8 ++++---- sys/arch/mvmeppc/mvmeppc/platform_160x.c | 13 +++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/sys/arch/mvmeppc/mvmeppc/machdep.c b/sys/arch/mvmeppc/mvmeppc/machdep.c index 889d1c4d97b9..61ddc098b67f 100644 --- a/sys/arch/mvmeppc/mvmeppc/machdep.c +++ b/sys/arch/mvmeppc/mvmeppc/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.15 2003/07/28 09:25:28 scw Exp $ */ +/* $NetBSD: machdep.c,v 1.16 2003/07/28 21:45:13 scw Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.15 2003/07/28 09:25:28 scw Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.16 2003/07/28 21:45:13 scw Exp $"); #include "opt_compat_netbsd.h" #include "opt_mvmetype.h" @@ -393,9 +393,9 @@ halt_sys: printf("rebooting...\n\n"); -#if 0 (*platform->reset)(); -#endif + + printf("Oops! Board reset failed!\n"); for (;;) continue; diff --git a/sys/arch/mvmeppc/mvmeppc/platform_160x.c b/sys/arch/mvmeppc/mvmeppc/platform_160x.c index 3a389fd6a66f..8f72f81fb57c 100644 --- a/sys/arch/mvmeppc/mvmeppc/platform_160x.c +++ b/sys/arch/mvmeppc/mvmeppc/platform_160x.c @@ -1,4 +1,4 @@ -/* $NetBSD: platform_160x.c,v 1.3 2003/07/28 14:55:46 chs Exp $ */ +/* $NetBSD: platform_160x.c,v 1.4 2003/07/28 21:45:14 scw Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: platform_160x.c,v 1.3 2003/07/28 14:55:46 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: platform_160x.c,v 1.4 2003/07/28 21:45:14 scw Exp $"); #include #include @@ -142,6 +142,15 @@ p160x_cpu_setup(struct device *dev) static void p160x_reset(void) { + /* + * The mvme160x programmer's manual makes reference to an + * "IBC Port 92" register which can be used to reset the board. + * Unfortunately, I can't find any documentation for this + * register. + * Fortunately, it appears that simply setting bit-0 does + * the trick... + */ + outb(0x80000092, inb(0x80000092) | 1); } static void