Module Name: src
Committed By: tsutsui
Date: Mon Jan 10 17:01:17 UTC 2011
Modified Files:
src/sys/arch/pmax/stand/common: common.h if_prom.c start.S
Log Message:
- start.S
add a hazard nop so that prom_restart() works properly on MIPS1
(it seems broken since initial revision and had been restarted by fault?)
- common.h
export prom_restart()
- if_prom.c
use prom_restart() instead of a direct PROM call (that should be equivalent)
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/pmax/stand/common/common.h \
src/sys/arch/pmax/stand/common/if_prom.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/pmax/stand/common/start.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/pmax/stand/common/common.h
diff -u src/sys/arch/pmax/stand/common/common.h:1.9 src/sys/arch/pmax/stand/common/common.h:1.10
--- src/sys/arch/pmax/stand/common/common.h:1.9 Sat Mar 14 14:46:04 2009
+++ src/sys/arch/pmax/stand/common/common.h Mon Jan 10 17:01:17 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.9 2009/03/14 14:46:04 dsl Exp $ */
+/* $NetBSD: common.h,v 1.10 2011/01/10 17:01:17 tsutsui Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -45,6 +45,7 @@
int prom_lseek(int, int, int);
int prom_open(const char *, int);
int prom_read(int, void *, int);
+void __dead prom_restart(void);
int prom_write(int, void *, int);
Index: src/sys/arch/pmax/stand/common/if_prom.c
diff -u src/sys/arch/pmax/stand/common/if_prom.c:1.9 src/sys/arch/pmax/stand/common/if_prom.c:1.10
--- src/sys/arch/pmax/stand/common/if_prom.c:1.9 Sun Jan 9 16:55:13 2011
+++ src/sys/arch/pmax/stand/common/if_prom.c Mon Jan 10 17:01:17 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: if_prom.c,v 1.9 2011/01/09 16:55:13 tsutsui Exp $ */
+/* $NetBSD: if_prom.c,v 1.10 2011/01/10 17:01:17 tsutsui Exp $ */
/* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -141,7 +141,7 @@
if (enet == NULL) {
printf("No `enet' environment variable found.\n"
"Set MAC address to `enet' manually by setenv command.\n");
- (*callv->_halt)((int *)0, 0); /* XXX */
+ prom_restart();
/* NOTREACHED */
}
Index: src/sys/arch/pmax/stand/common/start.S
diff -u src/sys/arch/pmax/stand/common/start.S:1.21 src/sys/arch/pmax/stand/common/start.S:1.22
--- src/sys/arch/pmax/stand/common/start.S:1.21 Mon Jan 10 15:25:44 2011
+++ src/sys/arch/pmax/stand/common/start.S Mon Jan 10 17:01:17 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: start.S,v 1.21 2011/01/10 15:25:44 tsutsui Exp $ */
+/* $NetBSD: start.S,v 1.22 2011/01/10 17:01:17 tsutsui Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -116,6 +116,7 @@
LEAF(prom_restart)
XLEAF(_rtt)
lw v0, _C_LABEL (callv)
+ nop
lw v0, 0x9C(v0) /* halt */
move a0, zero /* Don't print anything. */
j v0