summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2007-05-21 23:00:20 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2007-05-21 23:00:20 +0000
commitffe98576b4ce416902b439d5fea6723363e29f8d (patch)
tree68e756bfac7d075841cb22ad9926a4cebf3ecdaa /sys/arch
parent695065fcd15476f7e6cac507bed4514d39ba7785 (diff)
Ask firmware for reset before trying ourselves; needed for four-digit b/c/j
workstations. tested by otto@, krw@; ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/hppa/machdep.c7
-rw-r--r--sys/arch/hppa/include/pdc.h7
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 1a531b330f7..422997dd69f 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.153 2007/05/17 14:24:59 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.154 2007/05/21 23:00:19 kettenis Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -1013,6 +1013,11 @@ boot(howto)
} else {
printf("rebooting...");
DELAY(2000000);
+
+ /* ask firmware to reset */
+ pdc_call((iodcio_t)pdc, 0, PDC_BROADCAST_RESET, PDC_DO_RESET);
+
+ /* forcably reset module if that fails */
__asm __volatile(".export hppa_reset, entry\n\t"
".label hppa_reset");
__asm __volatile("stwas %0, 0(%1)"
diff --git a/sys/arch/hppa/include/pdc.h b/sys/arch/hppa/include/pdc.h
index 632b032ad68..e6443ec66dd 100644
--- a/sys/arch/hppa/include/pdc.h
+++ b/sys/arch/hppa/include/pdc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pdc.h,v 1.32 2005/05/24 22:26:16 mickey Exp $ */
+/* $OpenBSD: pdc.h,v 1.33 2007/05/21 23:00:19 kettenis Exp $ */
/*
* Copyright (c) 1990 mt Xinu, Inc. All rights reserved.
@@ -274,6 +274,11 @@
#define PDC_EEPROM_READ_BYTE 2
#define PDC_EEPROM_WRITE_BYTE 3
+#define PDC_BROADCAST_RESET 136
+#define PDC_DO_RESET 0
+#define PDC_DO_FIRM_TEST_RESET 1
+#define PDC_BR_RECONFIGURATION 2
+
#define PDC_LAN_STATION_ID 138 /* Hversion dependent mechanism for */
#define PDC_LAN_STATION_ID_READ 0 /* getting the lan station address */