summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorsc121708 <none@none>2005-08-31 13:33:50 -0700
committersc121708 <none@none>2005-08-31 13:33:50 -0700
commite3f8e17d584e2168f25f0b4e6c36e2926d10ad89 (patch)
treef4ec21d15f3865c7b81ae6bc372fa807edb7d4b1 /usr/src
parentae0b9099826d798f6c35401e2c0061f655420cb4 (diff)
downloadillumos-joyent-e3f8e17d584e2168f25f0b4e6c36e2926d10ad89.tar.gz
6302553 Need watchdog supports on Netra systems: N440, N240, N210
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/devfsadm/misc_link.c14
-rw-r--r--usr/src/pkgdefs/SUNWcakr.u/prototype_com4
-rw-r--r--usr/src/uts/sun4u/mpxu/Makefile.files1
-rw-r--r--usr/src/uts/sun4u/mpxu/Makefile.mpxu2
-rw-r--r--usr/src/uts/sun4u/mpxu/sys/lom_io.h41
-rw-r--r--usr/src/uts/sun4u/sys/rmc_comm_hproto.h27
6 files changed, 86 insertions, 3 deletions
diff --git a/usr/src/cmd/devfsadm/misc_link.c b/usr/src/cmd/devfsadm/misc_link.c
index 8e12f2085b..f5389ba064 100644
--- a/usr/src/cmd/devfsadm/misc_link.c
+++ b/usr/src/cmd/devfsadm/misc_link.c
@@ -52,6 +52,7 @@ static int ppm(di_minor_t minor, di_node_t node);
static int gpio(di_minor_t minor, di_node_t node);
static int av_create(di_minor_t minor, di_node_t node);
static int tsalarm_create(di_minor_t minor, di_node_t node);
+static int ntwdt_create(di_minor_t minor, di_node_t node);
static int zcons_create(di_minor_t minor, di_node_t node);
static int cpuid(di_minor_t minor, di_node_t node);
static int glvc(di_minor_t minor, di_node_t node);
@@ -149,6 +150,9 @@ static devfsadm_create_t misc_cbt[] = {
{ "pseudo", "ddi_pseudo", "tsalarm",
TYPE_EXACT | DRV_RE, ILEVEL_0, tsalarm_create,
},
+ { "pseudo", "ddi_pseudo", "ntwdt",
+ TYPE_EXACT | DRV_RE, ILEVEL_0, ntwdt_create,
+ },
{ "pseudo", "ddi_pseudo", "daplt",
TYPE_EXACT | DRV_EXACT, ILEVEL_0, minor_name
},
@@ -578,6 +582,16 @@ tsalarm_create(di_minor_t minor, di_node_t node)
return (DEVFSADM_CONTINUE);
}
+/*
+ * Creates /dev/ntwdt for ntwdt node
+ */
+static int
+ntwdt_create(di_minor_t minor, di_node_t node)
+{
+ (void) devfsadm_mklink("ntwdt", node, minor, 0);
+ return (DEVFSADM_CONTINUE);
+}
+
static int
zcons_create(di_minor_t minor, di_node_t node)
{
diff --git a/usr/src/pkgdefs/SUNWcakr.u/prototype_com b/usr/src/pkgdefs/SUNWcakr.u/prototype_com
index 11f26de838..60f2982087 100644
--- a/usr/src/pkgdefs/SUNWcakr.u/prototype_com
+++ b/usr/src/pkgdefs/SUNWcakr.u/prototype_com
@@ -222,7 +222,9 @@ s none platform/SUNW,Sun-Fire-V240/kernel/crypto/sparcv9/aes=../../../../sun4u-u
d none platform/SUNW,Sun-Fire-V240/kernel/drv 755 root sys
d none platform/SUNW,Sun-Fire-V240/kernel/drv/sparcv9 755 root sys
f none platform/SUNW,Sun-Fire-V240/kernel/drv/sparcv9/tsalarm 755 root sys
+f none platform/SUNW,Sun-Fire-V240/kernel/drv/sparcv9/ntwdt 755 root sys
f none platform/SUNW,Sun-Fire-V240/kernel/drv/tsalarm.conf 644 root sys
+f none platform/SUNW,Sun-Fire-V240/kernel/drv/ntwdt.conf 644 root sys
d none platform/SUNW,Sun-Fire-V240/kernel/misc 755 root sys
d none platform/SUNW,Sun-Fire-V240/kernel/misc/sparcv9 755 root sys
f none platform/SUNW,Sun-Fire-V240/kernel/misc/sparcv9/platmod 755 root sys
@@ -242,7 +244,9 @@ s none platform/SUNW,Sun-Fire-V440/kernel/crypto/sparcv9/aes=../../../../sun4u-u
d none platform/SUNW,Sun-Fire-V440/kernel/drv 755 root sys
d none platform/SUNW,Sun-Fire-V440/kernel/drv/sparcv9 755 root sys
s none platform/SUNW,Sun-Fire-V440/kernel/drv/sparcv9/tsalarm=../../../../SUNW,Sun-Fire-V240/kernel/drv/sparcv9/tsalarm
+s none platform/SUNW,Sun-Fire-V440/kernel/drv/sparcv9/ntwdt=../../../../SUNW,Sun-Fire-V240/kernel/drv/sparcv9/ntwdt
s none platform/SUNW,Sun-Fire-V440/kernel/drv/tsalarm.conf=../../../SUNW,Sun-Fire-V240/kernel/drv/tsalarm.conf
+s none platform/SUNW,Sun-Fire-V440/kernel/drv/ntwdt.conf=../../../SUNW,Sun-Fire-V240/kernel/drv/ntwdt.conf
d none platform/SUNW,Sun-Fire-V440/kernel/misc 755 root sys
d none platform/SUNW,Sun-Fire-V440/kernel/misc/sparcv9 755 root sys
f none platform/SUNW,Sun-Fire-V440/kernel/misc/sparcv9/platmod 755 root sys
diff --git a/usr/src/uts/sun4u/mpxu/Makefile.files b/usr/src/uts/sun4u/mpxu/Makefile.files
index 41b0ebfb82..06b42042b1 100644
--- a/usr/src/uts/sun4u/mpxu/Makefile.files
+++ b/usr/src/uts/sun4u/mpxu/Makefile.files
@@ -36,6 +36,7 @@
#
MPXU_PLATMOD_OBJS = mpxu.o
MPXU_TSALARM_OBJS = tsalarm.o
+NTWDT_OBJS = ntwdt.o
#
# include mpxu header files
diff --git a/usr/src/uts/sun4u/mpxu/Makefile.mpxu b/usr/src/uts/sun4u/mpxu/Makefile.mpxu
index 83211a1eaf..612f4a7085 100644
--- a/usr/src/uts/sun4u/mpxu/Makefile.mpxu
+++ b/usr/src/uts/sun4u/mpxu/Makefile.mpxu
@@ -68,7 +68,7 @@ MPXU_LINT_LIB_DIR = $(UTSBASE)/$(PLATFORM)/mpxu/lint-libs/$(OBJS_DIR)
#
# Define modules.
#
-MPXU_KMODS = platmod tsalarm
+MPXU_KMODS = platmod tsalarm ntwdt
#
# Links to UltraSparc III crypto modules
diff --git a/usr/src/uts/sun4u/mpxu/sys/lom_io.h b/usr/src/uts/sun4u/mpxu/sys/lom_io.h
index f438ae9b64..6d0c905ccb 100644
--- a/usr/src/uts/sun4u/mpxu/sys/lom_io.h
+++ b/usr/src/uts/sun4u/mpxu/sys/lom_io.h
@@ -20,7 +20,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -44,6 +44,14 @@ extern "C" {
#define TSIOCALSTATE _IOWR('a', 1, ts_aldata_t)
#define TSIOCALCTL _IOW('a', 2, ts_aldata_t)
+/* ioctls for watchdog */
+
+#define TSIOCDOGSTATE _IOR('a', 6, ts_dogstate_t)
+#define TSIOCDOGCTL _IOW('a', 7, ts_dogctl_t)
+#define TSIOCDOGTIME _IOW('a', 8, uint_t)
+#define TSIOCDOGPAT _IO('a', 9)
+
+
/*
* Defines for identifying the four alarms
*/
@@ -67,6 +75,19 @@ struct {
int alarm_state;
} ts_aldata_t;
+typedef
+struct {
+ int reset_enable;
+ int dog_enable;
+} ts_dogctl_t;
+
+typedef
+struct {
+ int reset_enable;
+ int dog_enable;
+ uint_t dog_timeout;
+} ts_dogstate_t;
+
/*
* Values for alarm_state
*/
@@ -90,6 +111,24 @@ struct {
int state;
} lom_aldata_t;
+#define LOMIOCDOGSTATE TSIOCDOGSTATE
+#define LOMIOCDOGCTL TSIOCDOGCTL
+#define LOMIOCDOGTIME TSIOCDOGTIME
+#define LOMIOCDOGPAT TSIOCDOGPAT
+
+typedef
+struct {
+ int reset_enable;
+ int dog_enable;
+} lom_dogctl_t;
+
+typedef
+struct {
+ int reset_enable;
+ int dog_enable;
+ uint_t dog_timeout;
+} lom_dogstate_t;
+
#ifdef __cplusplus
}
#endif
diff --git a/usr/src/uts/sun4u/sys/rmc_comm_hproto.h b/usr/src/uts/sun4u/sys/rmc_comm_hproto.h
index 218fc1154b..a886562e62 100644
--- a/usr/src/uts/sun4u/sys/rmc_comm_hproto.h
+++ b/usr/src/uts/sun4u/sys/rmc_comm_hproto.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2001-2003 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -728,6 +728,31 @@ enum dp_set_alarm_status {
};
+#define DP_SET_USER_WATCHDOG 0x60
+#define DP_SET_USER_WATCHDOG_R 0x6F
+#define DP_GET_USER_WATCHDOG 0x70
+#define DP_GET_USER_WATCHDOG_R 0x71
+
+#define DP_USER_WATCHDOG_ENABLE 0x01
+#define DP_USER_WATCHDOG_DISABLE 0x00
+
+enum dp_user_watchdog_status {
+ DP_USER_WDT_OK = 0,
+ DP_USER_WDT_ERROR
+};
+
+typedef struct dp_set_user_watchdog {
+ rsci8 enable; /* enable = 1 */
+} dp_set_user_watchdog_t;
+
+typedef struct dp_set_user_watchdog_r {
+ rsci8 status;
+} dp_set_user_watchdog_r_t;
+
+typedef struct dp_get_user_watchdog_r {
+ rsci8 enable;
+} dp_get_user_watchdog_r_t;
+
#define DP_GET_VOLTS 0x42
typedef struct dp_get_volts {