106e46062Sjbeloro /*
206e46062Sjbeloro  * CDDL HEADER START
306e46062Sjbeloro  *
406e46062Sjbeloro  * The contents of this file are subject to the terms of the
506e46062Sjbeloro  * Common Development and Distribution License (the "License").
606e46062Sjbeloro  * You may not use this file except in compliance with the License.
706e46062Sjbeloro  *
806e46062Sjbeloro  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
906e46062Sjbeloro  * or http://www.opensolaris.org/os/licensing.
1006e46062Sjbeloro  * See the License for the specific language governing permissions
1106e46062Sjbeloro  * and limitations under the License.
1206e46062Sjbeloro  *
1306e46062Sjbeloro  * When distributing Covered Code, include this CDDL HEADER in each
1406e46062Sjbeloro  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1506e46062Sjbeloro  * If applicable, add the following below this CDDL HEADER, with the
1606e46062Sjbeloro  * fields enclosed by brackets "[]" replaced with your own identifying
1706e46062Sjbeloro  * information: Portions Copyright [yyyy] [name of copyright owner]
1806e46062Sjbeloro  *
1906e46062Sjbeloro  * CDDL HEADER END
2006e46062Sjbeloro  */
2106e46062Sjbeloro 
227c478bd9Sstevel@tonic-gate /*
23e3f8e17dSsc  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate #ifndef	_SYS_RMC_COMM_HPROTO_H
287c478bd9Sstevel@tonic-gate #define	_SYS_RMC_COMM_HPROTO_H
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
317c478bd9Sstevel@tonic-gate 
327c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
337c478bd9Sstevel@tonic-gate extern "C" {
347c478bd9Sstevel@tonic-gate #endif
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate /*
377c478bd9Sstevel@tonic-gate  * data types used in the data protocol fields
387c478bd9Sstevel@tonic-gate  */
397c478bd9Sstevel@tonic-gate 
407c478bd9Sstevel@tonic-gate typedef unsigned char rsci8;
417c478bd9Sstevel@tonic-gate typedef unsigned short rsci16;
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate typedef short rscis16;
447c478bd9Sstevel@tonic-gate 
457c478bd9Sstevel@tonic-gate #ifdef _LP64
467c478bd9Sstevel@tonic-gate typedef unsigned int rsci32;
477c478bd9Sstevel@tonic-gate typedef unsigned long rsci64;
487c478bd9Sstevel@tonic-gate #else
497c478bd9Sstevel@tonic-gate typedef unsigned long rsci32;
507c478bd9Sstevel@tonic-gate typedef unsigned long long rsci64;
517c478bd9Sstevel@tonic-gate #endif
527c478bd9Sstevel@tonic-gate 
537c478bd9Sstevel@tonic-gate /*
547c478bd9Sstevel@tonic-gate  * handle definition. Handles are used in the high-level data protocol
557c478bd9Sstevel@tonic-gate  * to identify FRU, sensors (temperature, voltage), and so on.
567c478bd9Sstevel@tonic-gate  */
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate typedef rsci16 dp_handle_t;
597c478bd9Sstevel@tonic-gate 
607c478bd9Sstevel@tonic-gate #define	DP_NULL_HANDLE		0xffff
617c478bd9Sstevel@tonic-gate 
627c478bd9Sstevel@tonic-gate #define	DP_MAX_HANDLE_NAME	32
637c478bd9Sstevel@tonic-gate 
647c478bd9Sstevel@tonic-gate #define	DP_NULL_MSG		0x00
657c478bd9Sstevel@tonic-gate 
667c478bd9Sstevel@tonic-gate /*
677c478bd9Sstevel@tonic-gate  * Supported message types and associated data types:
687c478bd9Sstevel@tonic-gate  */
697c478bd9Sstevel@tonic-gate 
707c478bd9Sstevel@tonic-gate #define	DP_RESET_RSC		0x7A
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate #define	DP_RESET_RSC_R		0x5A
737c478bd9Sstevel@tonic-gate 
747c478bd9Sstevel@tonic-gate #define	DP_UPDATE_FLASH		0x66
757c478bd9Sstevel@tonic-gate 
767c478bd9Sstevel@tonic-gate #define	DP_UPDATE_FLASH_R	0x46
777c478bd9Sstevel@tonic-gate typedef struct dp_update_flash_r {
787c478bd9Sstevel@tonic-gate 	rsci32	status;		/* completion code */
797c478bd9Sstevel@tonic-gate } dp_update_flash_r_t;
807c478bd9Sstevel@tonic-gate 
817c478bd9Sstevel@tonic-gate #define	DP_RUN_TEST		0x74
827c478bd9Sstevel@tonic-gate typedef struct dp_run_test {
837c478bd9Sstevel@tonic-gate 	rsci32	testno;		/* test number to run; see below. */
847c478bd9Sstevel@tonic-gate 	rsci32	param_len;	/* # bytes in test parameter data. */
857c478bd9Sstevel@tonic-gate } dp_run_test_t;
867c478bd9Sstevel@tonic-gate /* followed by test parameters; see individual tests below. */
877c478bd9Sstevel@tonic-gate 
887c478bd9Sstevel@tonic-gate #define	DP_RUN_TEST_R		0x54
897c478bd9Sstevel@tonic-gate typedef struct dp_run_test_r {
907c478bd9Sstevel@tonic-gate 	rsci32	status;		/* 0 = test passed, otherwise see failure */
917c478bd9Sstevel@tonic-gate 				/* codes below. */
927c478bd9Sstevel@tonic-gate 	rsci32	idatalen;	/* # items in input data array */
937c478bd9Sstevel@tonic-gate 	rsci32	odatalen;	/* # items in output data array */
947c478bd9Sstevel@tonic-gate #define	DP_MAX_RUN_TEST_DATALEN (DP_MAX_MSGLEN-32)/2
957c478bd9Sstevel@tonic-gate 	rsci8	idata[DP_MAX_RUN_TEST_DATALEN];	/* input data array */
967c478bd9Sstevel@tonic-gate 	rsci8	odata[DP_MAX_RUN_TEST_DATALEN];	/* output data array */
977c478bd9Sstevel@tonic-gate } dp_run_test_r_t;
987c478bd9Sstevel@tonic-gate 
997c478bd9Sstevel@tonic-gate #define	RSC_TEST_PASSED		0
1007c478bd9Sstevel@tonic-gate #define	RSC_TEST_SW_FAILURE	1
1017c478bd9Sstevel@tonic-gate #define	RSC_TEST_BAD_DATA	2
1027c478bd9Sstevel@tonic-gate #define	RSC_TEST_NO_RESPONSE	3
1037c478bd9Sstevel@tonic-gate #define	RSC_TEST_BAD_CRC	4
1047c478bd9Sstevel@tonic-gate #define	RSC_TEST_BAD_PARAMS	5
1057c478bd9Sstevel@tonic-gate #define	RSC_TEST_NO_DEVICE	6
1067c478bd9Sstevel@tonic-gate #define	RSC_TEST_DEV_SETUP_FAIL	7
1077c478bd9Sstevel@tonic-gate #define	RSC_TEST_MEM_ALLOC_FAIL	8
1087c478bd9Sstevel@tonic-gate #define	RSC_TEST_ENET_ADDR_FAIL	9
1097c478bd9Sstevel@tonic-gate #define	RSC_TEST_DEV_INFO_FAIL	10
1107c478bd9Sstevel@tonic-gate #define	RSC_TEST_NYI		255
1117c478bd9Sstevel@tonic-gate 
1127c478bd9Sstevel@tonic-gate #define	DP_RSC_STATUS		0x73
1137c478bd9Sstevel@tonic-gate 
1147c478bd9Sstevel@tonic-gate #define	DP_RSC_STATUS_R		0x53
1157c478bd9Sstevel@tonic-gate typedef struct dp_rsc_status_r {
1167c478bd9Sstevel@tonic-gate /* The first six fields here must not be changed to ensure that they  */
1177c478bd9Sstevel@tonic-gate /* are the same in all versions of RSC, most notably when compared to */
1187c478bd9Sstevel@tonic-gate /* 1.x. New fields must be added to the end of the structure. */
1197c478bd9Sstevel@tonic-gate 	rsci16	main_rev_major;
1207c478bd9Sstevel@tonic-gate 	rsci16	main_rev_minor;
1217c478bd9Sstevel@tonic-gate 	rsci16	bootmon_rev_major;
1227c478bd9Sstevel@tonic-gate 	rsci16	bootmon_rev_minor;
1237c478bd9Sstevel@tonic-gate 	rsci16	post_status;
1247c478bd9Sstevel@tonic-gate 	rsci16	nusers;		/* number of users currently logged in to */
1257c478bd9Sstevel@tonic-gate 				/* CLI.  */
1267c478bd9Sstevel@tonic-gate /* Any new fields in the structure may be added after this point ONLY! */
1277c478bd9Sstevel@tonic-gate 	rsci16	release_rev_major;
1287c478bd9Sstevel@tonic-gate 	rsci16	release_rev_minor;
1297c478bd9Sstevel@tonic-gate 	rsci16	release_rev_micro;
1307c478bd9Sstevel@tonic-gate 	rsci16	main_rev_micro;
1317c478bd9Sstevel@tonic-gate 	rsci16	bootmon_rev_micro;
1327c478bd9Sstevel@tonic-gate 	rsci16	hardware_rev;
1337c478bd9Sstevel@tonic-gate 
1347c478bd9Sstevel@tonic-gate 	rsci32 bm_cksum;
1357c478bd9Sstevel@tonic-gate 	rsci8  rsc_build;
1367c478bd9Sstevel@tonic-gate 	char creationDate[256];
1377c478bd9Sstevel@tonic-gate 	rsci32 fw_cksum;
1387c478bd9Sstevel@tonic-gate 	rsci32 sys_mem;
1397c478bd9Sstevel@tonic-gate 	rsci32 nvram_version;
1407c478bd9Sstevel@tonic-gate 
1417c478bd9Sstevel@tonic-gate } dp_rsc_status_r_t;
1427c478bd9Sstevel@tonic-gate 
1437c478bd9Sstevel@tonic-gate #define	DP_SET_CFGVAR		0x76
1447c478bd9Sstevel@tonic-gate typedef struct dp_set_cfgvar {
1457c478bd9Sstevel@tonic-gate 	rsci32	hidden;		/* boolean */
1467c478bd9Sstevel@tonic-gate } dp_set_cfgvar_t;
1477c478bd9Sstevel@tonic-gate 
1487c478bd9Sstevel@tonic-gate /* Data is variable name & new value as zero-terminated ascii strings. */
1497c478bd9Sstevel@tonic-gate 
1507c478bd9Sstevel@tonic-gate #define	DP_SET_CFGVAR_R		0x56
1517c478bd9Sstevel@tonic-gate typedef struct dp_set_cfgvar_r {
1527c478bd9Sstevel@tonic-gate 	rsci32	status;		/* completion code */
1537c478bd9Sstevel@tonic-gate } dp_set_cfgvar_r_t;
1547c478bd9Sstevel@tonic-gate 
1557c478bd9Sstevel@tonic-gate #define	DP_GET_CFGVAR		0x67
1567c478bd9Sstevel@tonic-gate /* Data is variable name as zero-terminated ascii string. */
1577c478bd9Sstevel@tonic-gate 
1587c478bd9Sstevel@tonic-gate #define	DP_GET_CFGVAR_R		0x47
1597c478bd9Sstevel@tonic-gate typedef struct dp_get_cfgvar_r {
1607c478bd9Sstevel@tonic-gate 	rsci32	status;		/* completion code */
1617c478bd9Sstevel@tonic-gate } dp_get_cfgvar_r_t;
1627c478bd9Sstevel@tonic-gate /* followed by value of variable as a zero-terminated ascii string. */
1637c478bd9Sstevel@tonic-gate 
1647c478bd9Sstevel@tonic-gate #define	DP_GET_CFGVAR_NAME	0x6E
1657c478bd9Sstevel@tonic-gate /*
1667c478bd9Sstevel@tonic-gate  * Data is variable name as zero-terminated ascii string.  A zero-length
1677c478bd9Sstevel@tonic-gate  * string means 'return the name of the "first" variable.'
1687c478bd9Sstevel@tonic-gate  */
1697c478bd9Sstevel@tonic-gate 
1707c478bd9Sstevel@tonic-gate #define	DP_GET_CFGVAR_NAME_R	0x4E
1717c478bd9Sstevel@tonic-gate typedef struct dp_get_cfgvar_name_r {
1727c478bd9Sstevel@tonic-gate 	rsci32	status;		/* completion code */
1737c478bd9Sstevel@tonic-gate } dp_get_cfgvar_name_r_t;
1747c478bd9Sstevel@tonic-gate /* followed by name of "next" variable as a zero-terminated ascii string. */
1757c478bd9Sstevel@tonic-gate 
1767c478bd9Sstevel@tonic-gate #define	DP_SET_DATE_TIME		0x64
1777c478bd9Sstevel@tonic-gate #define	DP_SET_DATE_TIME_IGNORE_FIELD	0xFFFF
1787c478bd9Sstevel@tonic-gate typedef struct dp_set_date_time {
1797c478bd9Sstevel@tonic-gate 	rsci32	year;		/* Full year, IE 1997 */
1807c478bd9Sstevel@tonic-gate 	rsci32	month;		/* 1 = Jan, 2 = Feb, etc. */
1817c478bd9Sstevel@tonic-gate 	rsci32	day;		/* Day of the month, 1 to 31. */
1827c478bd9Sstevel@tonic-gate 	rsci32	hour;		/* 0 to 23 */
1837c478bd9Sstevel@tonic-gate 	rsci32	minute;		/* 0 to 59 */
1847c478bd9Sstevel@tonic-gate 	rsci32	second;		/* 0 to 59 */
1857c478bd9Sstevel@tonic-gate } dp_set_date_time_t;
1867c478bd9Sstevel@tonic-gate 
1877c478bd9Sstevel@tonic-gate #define	DP_SET_DATE_TIME_R	0x44
1887c478bd9Sstevel@tonic-gate typedef struct dp_set_date_time_r {
1897c478bd9Sstevel@tonic-gate 	rsci32	status;		/* 0 - succes, non-zero - fail. */
1907c478bd9Sstevel@tonic-gate } dp_set_date_time_r_t;
1917c478bd9Sstevel@tonic-gate 
1927c478bd9Sstevel@tonic-gate #define	DP_GET_DATE_TIME	0x65
1937c478bd9Sstevel@tonic-gate #define	DP_GET_DATE_TIME_R	0x45
1947c478bd9Sstevel@tonic-gate typedef struct dp_get_date_time_r {
1957c478bd9Sstevel@tonic-gate 	rsci32	status;		/* completion code */
1967c478bd9Sstevel@tonic-gate 	rsci32	current_datetime; /* in Unix format */
1977c478bd9Sstevel@tonic-gate } dp_get_date_time_r_t;
1987c478bd9Sstevel@tonic-gate /* followed by the date represented as a zero-terminated ascii string. */
1997c478bd9Sstevel@tonic-gate 
2007c478bd9Sstevel@tonic-gate 
2017c478bd9Sstevel@tonic-gate #define	DP_SEND_ALERT		0x61
2027c478bd9Sstevel@tonic-gate typedef struct dp_send_alert {
2037c478bd9Sstevel@tonic-gate 	rsci32	critical; /* boolean */
2047c478bd9Sstevel@tonic-gate } dp_send_alert_t;
2057c478bd9Sstevel@tonic-gate 
2067c478bd9Sstevel@tonic-gate #define	DP_SEND_ALERT_R		0x41
2077c478bd9Sstevel@tonic-gate typedef struct dp_send_alert_r {
2087c478bd9Sstevel@tonic-gate 	rsci32	status;		/* completion code */
2097c478bd9Sstevel@tonic-gate } dp_send_alert_r_t;
2107c478bd9Sstevel@tonic-gate 
2117c478bd9Sstevel@tonic-gate #define	DP_GET_TEMP		0x78
2127c478bd9Sstevel@tonic-gate 
2137c478bd9Sstevel@tonic-gate #define	DP_GET_TEMP_R		0x58
2147c478bd9Sstevel@tonic-gate typedef struct dp_get_temp_r {
2157c478bd9Sstevel@tonic-gate 	rsci32	status;
2167c478bd9Sstevel@tonic-gate 	rsci32	current_temp;
2177c478bd9Sstevel@tonic-gate } dp_get_temp_r_t;
2187c478bd9Sstevel@tonic-gate 
219*270993a9Sfw /*
220*270993a9Sfw  * Implementations using this level of protocol or above,
221*270993a9Sfw  * will generate a response to any supplied command code.
222*270993a9Sfw  * This doesn't mean they will support a given command.
223*270993a9Sfw  * It only means that they will generate a response to that
224*270993a9Sfw  * command.
225*270993a9Sfw  */
226*270993a9Sfw #define	SDP_RESPONDS_TO_ALL_CMDS	3
227*270993a9Sfw 
2287c478bd9Sstevel@tonic-gate #define	DP_GET_SDP_VERSION	0x7B
2297c478bd9Sstevel@tonic-gate 
2307c478bd9Sstevel@tonic-gate #define	DP_GET_SDP_VERSION_R	0x5B
2317c478bd9Sstevel@tonic-gate typedef struct dp_get_sdp_version_r {
2327c478bd9Sstevel@tonic-gate 	rsci32	version;
2337c478bd9Sstevel@tonic-gate } dp_get_sdp_version_r_t;
2347c478bd9Sstevel@tonic-gate 
2357c478bd9Sstevel@tonic-gate #define	DP_GET_TOD_CLOCK	0x7C
2367c478bd9Sstevel@tonic-gate 
2377c478bd9Sstevel@tonic-gate #define	DP_GET_TOD_CLOCK_R	0x5C
2387c478bd9Sstevel@tonic-gate typedef struct dp_get_tod_clock_r {
2397c478bd9Sstevel@tonic-gate 	rsci32	current_tod;
2407c478bd9Sstevel@tonic-gate } dp_get_tod_clock_r_t;
2417c478bd9Sstevel@tonic-gate 
2427c478bd9Sstevel@tonic-gate #define	DP_MAX_LOGSIZE		(DP_MAX_MSGLEN-24)
2437c478bd9Sstevel@tonic-gate 
2447c478bd9Sstevel@tonic-gate #define	DP_GET_EVENT_LOG	0x7D
2457c478bd9Sstevel@tonic-gate 
24606e46062Sjbeloro /*
24706e46062Sjbeloro  * NOTE: changing this or the dp_event_log_entry structure will almost
24806e46062Sjbeloro  * certainly require changing the code that parses these structures
24906e46062Sjbeloro  * in scadm.  See src/cmd/scadm/sparcv9/mpxu/common/eventlog.c.
25006e46062Sjbeloro  */
2517c478bd9Sstevel@tonic-gate #define	DP_GET_EVENT_LOG_R	0x5D
2527c478bd9Sstevel@tonic-gate typedef struct dp_get_event_log_r {
2537c478bd9Sstevel@tonic-gate 	rsci32	entry_count;
2547c478bd9Sstevel@tonic-gate 	rsci8	data[DP_MAX_LOGSIZE];
2557c478bd9Sstevel@tonic-gate } dp_get_event_log_r_t;
2567c478bd9Sstevel@tonic-gate 
2577c478bd9Sstevel@tonic-gate typedef struct dp_event_log_entry {
2587c478bd9Sstevel@tonic-gate 	rsci32	eventTime;
2597c478bd9Sstevel@tonic-gate 	rsci32	eventId;
2607c478bd9Sstevel@tonic-gate 	rsci32	paramLen;
2617c478bd9Sstevel@tonic-gate 	char	param[256];
2627c478bd9Sstevel@tonic-gate } dp_event_log_entry_t;
2637c478bd9Sstevel@tonic-gate 
2647c478bd9Sstevel@tonic-gate #define	DP_GET_PCMCIA_INFO	0x7E
2657c478bd9Sstevel@tonic-gate 
2667c478bd9Sstevel@tonic-gate #define	DP_GET_PCMCIA_INFO_R	0x5E
2677c478bd9Sstevel@tonic-gate typedef struct dp_get_pcmcia_info_r {
2687c478bd9Sstevel@tonic-gate 	rsci32	card_present;	/* true=present, false=no card */
2697c478bd9Sstevel@tonic-gate 	rsci32	idInfoLen;
2707c478bd9Sstevel@tonic-gate 	rsci8	idInfo[256];
2717c478bd9Sstevel@tonic-gate } dp_get_pcmcia_info_r_t;
2727c478bd9Sstevel@tonic-gate 
2737c478bd9Sstevel@tonic-gate 
2747c478bd9Sstevel@tonic-gate #define	DP_USER_MAX		16
2757c478bd9Sstevel@tonic-gate #define	DP_USER_NAME_SIZE	16
2767c478bd9Sstevel@tonic-gate 
2777c478bd9Sstevel@tonic-gate /* User sub-commands */
2787c478bd9Sstevel@tonic-gate #define	DP_USER_CMD_ADD		0x1
2797c478bd9Sstevel@tonic-gate #define	DP_USER_CMD_DEL		0x2
2807c478bd9Sstevel@tonic-gate #define	DP_USER_CMD_SHOW	0x3
2817c478bd9Sstevel@tonic-gate #define	DP_USER_CMD_PASSWORD	0x4
2827c478bd9Sstevel@tonic-gate #define	DP_USER_CMD_PERM	0x5
2837c478bd9Sstevel@tonic-gate 
2847c478bd9Sstevel@tonic-gate /*
2857c478bd9Sstevel@tonic-gate  * The following fields are used to set the user permissions.
2867c478bd9Sstevel@tonic-gate  * Each must be represented as a single bit in the parm field.
2877c478bd9Sstevel@tonic-gate  */
2887c478bd9Sstevel@tonic-gate #define	DP_USER_PERM_C		0x1
2897c478bd9Sstevel@tonic-gate #define	DP_USER_PERM_U		0x2
2907c478bd9Sstevel@tonic-gate #define	DP_USER_PERM_A		0x4
2917c478bd9Sstevel@tonic-gate #define	DP_USER_PERM_R		0x8
2927c478bd9Sstevel@tonic-gate 
2937c478bd9Sstevel@tonic-gate /*
2947c478bd9Sstevel@tonic-gate  * values for parm for CMD_SHOW.  Anything other than 0 will show
2957c478bd9Sstevel@tonic-gate  * the user # up to and including DP_USER_MAX
2967c478bd9Sstevel@tonic-gate  */
2977c478bd9Sstevel@tonic-gate #define	DP_USER_SHOW_USERNAME	0x0
2987c478bd9Sstevel@tonic-gate 
2997c478bd9Sstevel@tonic-gate /* Error values for status */
3007c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_FULL	0x1  /* No free user slots */
3017c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_NONE	0x2  /* User does not exist */
3027c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_BAD		0x3  /* Malformed username */
3037c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_NACT	0x4  /* user # not activated */
3047c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_THERE	0x5  /* user already registered */
3057c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_PASSWD	0x6  /* invalid password */
3067c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_WARNING	0x7  /* Malformed username warning */
3077c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_NYI		0xFD /* Not yet implemented */
3087c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_UNDEF	0xFE /* Undefine error */
3097c478bd9Sstevel@tonic-gate #define	DP_ERR_USER_CMD		0xFF /* Invalid Command */
3107c478bd9Sstevel@tonic-gate 
3117c478bd9Sstevel@tonic-gate #define	DP_USER_ADM		0x50
3127c478bd9Sstevel@tonic-gate /*
3137c478bd9Sstevel@tonic-gate  * The parm field is used by the permission command to set specific
3147c478bd9Sstevel@tonic-gate  *  permissions.  The parm field is also used by the show command to
3157c478bd9Sstevel@tonic-gate  * indicate if the user name is specified or not.
3167c478bd9Sstevel@tonic-gate  */
3177c478bd9Sstevel@tonic-gate typedef struct dp_user_adm {
3187c478bd9Sstevel@tonic-gate 	rsci32	command;
3197c478bd9Sstevel@tonic-gate 	rsci32	parm;
3207c478bd9Sstevel@tonic-gate } dp_user_adm_t;
3217c478bd9Sstevel@tonic-gate /*
3227c478bd9Sstevel@tonic-gate  * followed by zero-terminated ascii strings.  All user commands
3237c478bd9Sstevel@tonic-gate  * are followed by the username. The password command is also
3247c478bd9Sstevel@tonic-gate  * followed by the password.
3257c478bd9Sstevel@tonic-gate  */
3267c478bd9Sstevel@tonic-gate 
3277c478bd9Sstevel@tonic-gate #define	DP_USER_ADM_R		0x51
3287c478bd9Sstevel@tonic-gate /*
3297c478bd9Sstevel@tonic-gate  * the response field is used to return the user permissions
3307c478bd9Sstevel@tonic-gate  * for the user permissions command. The response is also used
3317c478bd9Sstevel@tonic-gate  * to echo back the user selection for the show command.
3327c478bd9Sstevel@tonic-gate  */
3337c478bd9Sstevel@tonic-gate typedef struct dp_user_adm_r {
3347c478bd9Sstevel@tonic-gate 	rsci32	status;		/* completion code */
3357c478bd9Sstevel@tonic-gate 	rsci32  command;	/* echo back adm command */
3367c478bd9Sstevel@tonic-gate 	rsci32	response;
3377c478bd9Sstevel@tonic-gate } dp_user_adm_r_t;
3387c478bd9Sstevel@tonic-gate /* followed by a zero-terminated ascii string for the show command.  */
3397c478bd9Sstevel@tonic-gate 
3407c478bd9Sstevel@tonic-gate 
3417c478bd9Sstevel@tonic-gate #define	DP_MODEM_PASS		0
3427c478bd9Sstevel@tonic-gate #define	DP_MODEM_FAIL		-1
3437c478bd9Sstevel@tonic-gate 
3447c478bd9Sstevel@tonic-gate /* Commands used for rscadm modem_setup */
3457c478bd9Sstevel@tonic-gate #define	DP_MODEM_CONNECT	0x30
3467c478bd9Sstevel@tonic-gate #define	DP_MODEM_CONNECT_R	0x31
3477c478bd9Sstevel@tonic-gate typedef struct dp_modem_connect_r {
3487c478bd9Sstevel@tonic-gate 	rsci32	status;
3497c478bd9Sstevel@tonic-gate } dp_modem_connect_r_t;
3507c478bd9Sstevel@tonic-gate 
3517c478bd9Sstevel@tonic-gate /* There is no reponse to a modem_data command */
3527c478bd9Sstevel@tonic-gate /* The modem data command goes in both directions */
3537c478bd9Sstevel@tonic-gate #define	DP_MODEM_DATA		0x32
3547c478bd9Sstevel@tonic-gate /* followed by a zero-terminated ascii string */
3557c478bd9Sstevel@tonic-gate 
3567c478bd9Sstevel@tonic-gate #define	DP_MODEM_DISCONNECT	0x34
3577c478bd9Sstevel@tonic-gate #define	DP_MODEM_DISCONNECT_R	0x35
3587c478bd9Sstevel@tonic-gate typedef struct dp_modem_disconnect_r {
3597c478bd9Sstevel@tonic-gate 	rsci32	status;
3607c478bd9Sstevel@tonic-gate } dp_modem_disconnect_r_t;
3617c478bd9Sstevel@tonic-gate 
3627c478bd9Sstevel@tonic-gate 
3637c478bd9Sstevel@tonic-gate #define	DP_GET_TICKCNT		0x22
3647c478bd9Sstevel@tonic-gate #define	DP_GET_TICKCNT_R	0x23
3657c478bd9Sstevel@tonic-gate typedef struct dp_get_tickcnt_r {
3667c478bd9Sstevel@tonic-gate 	rsci32	upper;		/* MSW of 64 bit tick count */
3677c478bd9Sstevel@tonic-gate 	rsci32	lower;		/* LSW of 64 bit tick count */
3687c478bd9Sstevel@tonic-gate } dp_get_tickcnt_r_t;
3697c478bd9Sstevel@tonic-gate 
3707c478bd9Sstevel@tonic-gate 
3717c478bd9Sstevel@tonic-gate #define	DP_SET_DEFAULT_CFG	0x72
3727c478bd9Sstevel@tonic-gate 
3737c478bd9Sstevel@tonic-gate #define	DP_SET_DEFAULT_CFG_R	0x52
3747c478bd9Sstevel@tonic-gate typedef struct dp_set_default_cfg_r {
3757c478bd9Sstevel@tonic-gate 	rsci32	status;
3767c478bd9Sstevel@tonic-gate } dp_set_default_cfg_r_t;
3777c478bd9Sstevel@tonic-gate 
3787c478bd9Sstevel@tonic-gate 
3797c478bd9Sstevel@tonic-gate #define	DP_GET_NETWORK_CFG	0x59
3807c478bd9Sstevel@tonic-gate 
3817c478bd9Sstevel@tonic-gate #define	DP_GET_NETWORK_CFG_R	0x79
3827c478bd9Sstevel@tonic-gate typedef struct dp_get_network_cfg_r {
3837c478bd9Sstevel@tonic-gate 	rsci32	status;
3847c478bd9Sstevel@tonic-gate 	char	ipMode[7];
3857c478bd9Sstevel@tonic-gate 	char	ipAddr[16];
3867c478bd9Sstevel@tonic-gate 	char	ipMask[16];
3877c478bd9Sstevel@tonic-gate 	char	ipGateway[16];
3887c478bd9Sstevel@tonic-gate 	char	ethAddr[18];
3897c478bd9Sstevel@tonic-gate 	char	ipDHCPServer[16];
3907c478bd9Sstevel@tonic-gate } dp_get_network_cfg_r_t;
3917c478bd9Sstevel@tonic-gate 
3927c478bd9Sstevel@tonic-gate 
3937c478bd9Sstevel@tonic-gate /*
3947c478bd9Sstevel@tonic-gate  * Parameters for DP_RUN_TEST message:
3957c478bd9Sstevel@tonic-gate  */
3967c478bd9Sstevel@tonic-gate 
3977c478bd9Sstevel@tonic-gate /*
3987c478bd9Sstevel@tonic-gate  * Test routines need to know what the low-level protocol sync
3997c478bd9Sstevel@tonic-gate  * character is.
4007c478bd9Sstevel@tonic-gate  */
4017c478bd9Sstevel@tonic-gate 
4027c478bd9Sstevel@tonic-gate #define	RSC_TEST_SERIAL		0
4037c478bd9Sstevel@tonic-gate typedef struct rsc_serial_test {
4047c478bd9Sstevel@tonic-gate 	rsci32	testtype;
4057c478bd9Sstevel@tonic-gate #define	RSC_SERIAL_TTYC_LB	0
4067c478bd9Sstevel@tonic-gate #define	RSC_SERIAL_TTYC_LB_OFF	1
4077c478bd9Sstevel@tonic-gate #define	RSC_SERIAL_TTYD_LB	2
4087c478bd9Sstevel@tonic-gate #define	RSC_SERIAL_TTYD_LB_OFF	3
4097c478bd9Sstevel@tonic-gate #define	RSC_SERIAL_TTYCD_LB	4
4107c478bd9Sstevel@tonic-gate #define	RSC_SERIAL_TTYCD_LB_OFF	5
4117c478bd9Sstevel@tonic-gate #define	RSC_SERIAL_TTYU_INT_LB	6
4127c478bd9Sstevel@tonic-gate #define	RSC_SERIAL_TTYU_EXT_LB	7
4137c478bd9Sstevel@tonic-gate 	rsci32	baud;
4147c478bd9Sstevel@tonic-gate 	rsci32	passes;
4157c478bd9Sstevel@tonic-gate 	rsci32	datalen;
4167c478bd9Sstevel@tonic-gate 	rsci8	data[DP_MAX_MSGLEN-32];
4177c478bd9Sstevel@tonic-gate } rsc_serial_test_t;
4187c478bd9Sstevel@tonic-gate 
4197c478bd9Sstevel@tonic-gate #define	RSC_TEST_ENET		1
4207c478bd9Sstevel@tonic-gate typedef struct rsc_enet_test {
4217c478bd9Sstevel@tonic-gate 	rsci32	testtype;
4227c478bd9Sstevel@tonic-gate #define	RSC_ENET_INT_LB		0
4237c478bd9Sstevel@tonic-gate #define	RSC_ENET_EXT_LB		1
4247c478bd9Sstevel@tonic-gate #define	RSC_ENET_PING		2
4257c478bd9Sstevel@tonic-gate #define	RSC_ENET_INT_PHY_LB	3
4267c478bd9Sstevel@tonic-gate 	rsci8	ip_addr[4];
4277c478bd9Sstevel@tonic-gate 	rsci32	passes;
4287c478bd9Sstevel@tonic-gate 	rsci32	datalen;
4297c478bd9Sstevel@tonic-gate 	rsci8	data[DP_MAX_MSGLEN-32];
4307c478bd9Sstevel@tonic-gate } rsc_enet_test_t;
4317c478bd9Sstevel@tonic-gate 
4327c478bd9Sstevel@tonic-gate #define	RSC_TEST_FLASH_CRC	2
4337c478bd9Sstevel@tonic-gate typedef struct rsc_flash_crcs_r {
4347c478bd9Sstevel@tonic-gate 	rsci32	boot_crc;
4357c478bd9Sstevel@tonic-gate 	rsci32	main_crc;
4367c478bd9Sstevel@tonic-gate } rsc_flash_crcs_r_t;
4377c478bd9Sstevel@tonic-gate 
4387c478bd9Sstevel@tonic-gate #define	RSC_TEST_SEEPROM_CRC	3
4397c478bd9Sstevel@tonic-gate typedef struct rsc_seeprom_crcs_r {
4407c478bd9Sstevel@tonic-gate 	rsci32	hdr_crc;
4417c478bd9Sstevel@tonic-gate 	rsci32	main_crc;
4427c478bd9Sstevel@tonic-gate } rsc_seeprom_crcs_r_t;
4437c478bd9Sstevel@tonic-gate 
4447c478bd9Sstevel@tonic-gate #define	RSC_TEST_FRU_SEEPROM_CRC 4
4457c478bd9Sstevel@tonic-gate typedef struct rsc_fru_crcs_r {
4467c478bd9Sstevel@tonic-gate 	rsci32	ro_hdr_crc;
4477c478bd9Sstevel@tonic-gate 	rsci32	seg_sd_crc;
4487c478bd9Sstevel@tonic-gate } rsc_fru_crcs_r_t;
4497c478bd9Sstevel@tonic-gate 
4507c478bd9Sstevel@tonic-gate 
4517c478bd9Sstevel@tonic-gate /*
4527c478bd9Sstevel@tonic-gate  * new commands definitions
4537c478bd9Sstevel@tonic-gate  */
4547c478bd9Sstevel@tonic-gate 
4557c478bd9Sstevel@tonic-gate #define	DP_GET_SYSINFO		0x20
4567c478bd9Sstevel@tonic-gate 
4577c478bd9Sstevel@tonic-gate #define	DP_GET_SYSINFO_R	0x21
4587c478bd9Sstevel@tonic-gate typedef struct dp_get_sysinfo_r {
4597c478bd9Sstevel@tonic-gate 	rsci8 maxTemp;		/* max number of temperature sensors */
4607c478bd9Sstevel@tonic-gate 	rsci8 maxFan;		/* max number of FANs */
4617c478bd9Sstevel@tonic-gate 	rsci8 maxPSU;		/* max number of PSUs slot */
4627c478bd9Sstevel@tonic-gate 	rsci8 maxLED;		/* max number of LEDs */
4637c478bd9Sstevel@tonic-gate 	rsci8 maxVolt;		/* max number of voltage sensors */
4647c478bd9Sstevel@tonic-gate 	rsci8 maxFRU;		/* max number of FRUs (field replac. unit)  */
4657c478bd9Sstevel@tonic-gate 	rsci8 maxCircuitBrks;	/* max number of circuit breakers */
4667c478bd9Sstevel@tonic-gate 	rsci8 keyswitch;	/* key switch setting value */
4677c478bd9Sstevel@tonic-gate } dp_get_sysinfo_r_t;
4687c478bd9Sstevel@tonic-gate 
4697c478bd9Sstevel@tonic-gate 
4707c478bd9Sstevel@tonic-gate #define	DP_GET_TEMPERATURES	0x24
4717c478bd9Sstevel@tonic-gate typedef struct dp_get_temperatures {
4727c478bd9Sstevel@tonic-gate 	dp_handle_t handle;	/* handle of a temperature sensor */
4737c478bd9Sstevel@tonic-gate 				/* or <null handle> (0xffff) */
4747c478bd9Sstevel@tonic-gate } dp_get_temperatures_t;
4757c478bd9Sstevel@tonic-gate 
4767c478bd9Sstevel@tonic-gate /* Data is variable name & new value as zero-terminated ascii strings. */
4777c478bd9Sstevel@tonic-gate 
4787c478bd9Sstevel@tonic-gate #define	DP_GET_TEMPERATURES_R	0x25
4797c478bd9Sstevel@tonic-gate typedef rscis16		dp_tempr_t;
4807c478bd9Sstevel@tonic-gate 
4817c478bd9Sstevel@tonic-gate enum sensor_status {
4827c478bd9Sstevel@tonic-gate 	DP_SENSOR_DATA_AVAILABLE = 0,
4837c478bd9Sstevel@tonic-gate 	DP_SENSOR_DATA_UNAVAILABLE,
4847c478bd9Sstevel@tonic-gate 	DP_SENSOR_NOT_PRESENT
4857c478bd9Sstevel@tonic-gate };
4867c478bd9Sstevel@tonic-gate 
4877c478bd9Sstevel@tonic-gate typedef struct dp_tempr_status {
4887c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
4897c478bd9Sstevel@tonic-gate 	rsci8		sensor_status; 	/* tells whether the reading is */
4907c478bd9Sstevel@tonic-gate 					/* available or not */
4917c478bd9Sstevel@tonic-gate 	dp_tempr_t	value;	/* temperature value (celsius). */
4927c478bd9Sstevel@tonic-gate 
4937c478bd9Sstevel@tonic-gate 	dp_tempr_t 	low_warning;
4947c478bd9Sstevel@tonic-gate 	dp_tempr_t 	low_soft_shutdown;
4957c478bd9Sstevel@tonic-gate 	dp_tempr_t 	low_hard_shutdown;
4967c478bd9Sstevel@tonic-gate 	dp_tempr_t 	high_warning;
4977c478bd9Sstevel@tonic-gate 	dp_tempr_t 	high_soft_shutdown;
4987c478bd9Sstevel@tonic-gate 	dp_tempr_t 	high_hard_shutdown;
4997c478bd9Sstevel@tonic-gate 
5007c478bd9Sstevel@tonic-gate } dp_tempr_status_t;
5017c478bd9Sstevel@tonic-gate 
5027c478bd9Sstevel@tonic-gate typedef struct dp_get_temperatures_r {
5037c478bd9Sstevel@tonic-gate 	rsci8			num_temps;
5047c478bd9Sstevel@tonic-gate 	dp_tempr_status_t	temp_status[1];
5057c478bd9Sstevel@tonic-gate 
5067c478bd9Sstevel@tonic-gate } dp_get_temperatures_r_t;
5077c478bd9Sstevel@tonic-gate 
5087c478bd9Sstevel@tonic-gate 
5097c478bd9Sstevel@tonic-gate #define	DP_GET_FAN_STATUS	0x26
5107c478bd9Sstevel@tonic-gate typedef struct dp_get_fan_status {
5117c478bd9Sstevel@tonic-gate 	dp_handle_t handle;	/* handle of a temperature sensor */
5127c478bd9Sstevel@tonic-gate 				/* or <null handle> (0xffff) */
5137c478bd9Sstevel@tonic-gate } dp_get_fan_status_t;
5147c478bd9Sstevel@tonic-gate 
5157c478bd9Sstevel@tonic-gate #define	DP_GET_FAN_STATUS_R	0x27
5167c478bd9Sstevel@tonic-gate 
5177c478bd9Sstevel@tonic-gate typedef struct dp_fan_status {
5187c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
5197c478bd9Sstevel@tonic-gate 	rsci8		sensor_status; 	/* tells whether the reading is */
5207c478bd9Sstevel@tonic-gate 					/* available or not */
5217c478bd9Sstevel@tonic-gate 	rsci8 		flag;
5227c478bd9Sstevel@tonic-gate 
5237c478bd9Sstevel@tonic-gate #define	DP_FAN_PRESENCE		0x01	/* FAN presence (bit set=FAN present) */
5247c478bd9Sstevel@tonic-gate #define	DP_FAN_SPEED_VAL_UNIT	0x02	/* speed unit	(bit set=relative, */
5257c478bd9Sstevel@tonic-gate 					/*		bit clear=RPM) */
5267c478bd9Sstevel@tonic-gate #define	DP_FAN_STATUS		0x04	/* FAN status (bit set=error) */
5277c478bd9Sstevel@tonic-gate 
5287c478bd9Sstevel@tonic-gate 	rsci16		speed;	/* FAN speed. */
5297c478bd9Sstevel@tonic-gate 	rsci16		minspeed; /* minimum FAN speed warning threshold */
5307c478bd9Sstevel@tonic-gate 
5317c478bd9Sstevel@tonic-gate } dp_fan_status_t;
5327c478bd9Sstevel@tonic-gate 
5337c478bd9Sstevel@tonic-gate typedef struct dp_get_fan_status_r {
5347c478bd9Sstevel@tonic-gate 	rsci8		num_fans;
5357c478bd9Sstevel@tonic-gate 	dp_fan_status_t	fan_status[1];
5367c478bd9Sstevel@tonic-gate 
5377c478bd9Sstevel@tonic-gate } dp_get_fan_status_r_t;
5387c478bd9Sstevel@tonic-gate 
5397c478bd9Sstevel@tonic-gate 
5407c478bd9Sstevel@tonic-gate #define	DP_GET_PSU_STATUS	0x28
5417c478bd9Sstevel@tonic-gate typedef struct dp_get_psu_status {
5427c478bd9Sstevel@tonic-gate 	dp_handle_t handle;	/* handle of a temperature sensor */
5437c478bd9Sstevel@tonic-gate 				/* or <null handle> (0xffff) */
5447c478bd9Sstevel@tonic-gate } dp_get_psu_status_t;
5457c478bd9Sstevel@tonic-gate 
5467c478bd9Sstevel@tonic-gate #define	DP_GET_PSU_STATUS_R	0x29
5477c478bd9Sstevel@tonic-gate typedef struct dp_psu_status {
5487c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
5497c478bd9Sstevel@tonic-gate 	rsci8		sensor_status; 	/* tells whether the reading is */
5507c478bd9Sstevel@tonic-gate 					/* available or not */
5517c478bd9Sstevel@tonic-gate 	rsci16 		mask;		/* flag bit mask (feature presence) */
5527c478bd9Sstevel@tonic-gate 	rsci16 		flag;		/* status bits */
5537c478bd9Sstevel@tonic-gate 
5547c478bd9Sstevel@tonic-gate #define	DP_PSU_PRESENCE			0x0001	/* PSU presence  */
5557c478bd9Sstevel@tonic-gate #define	DP_PSU_OUTPUT_STATUS		0x0002	/* output status */
5567c478bd9Sstevel@tonic-gate #define	DP_PSU_INPUT_STATUS		0x0004	/* input status */
5577c478bd9Sstevel@tonic-gate #define	DP_PSU_SEC_INPUT_STATUS		0x0008	/* secondary input status */
5587c478bd9Sstevel@tonic-gate #define	DP_PSU_OVERTEMP_FAULT		0x0010	/* over temperature fault */
5597c478bd9Sstevel@tonic-gate #define	DP_PSU_FAN_FAULT    		0x0020	/* FAN fault */
5607c478bd9Sstevel@tonic-gate #define	DP_PSU_FAIL_STATUS		0x0040	/* PSU generic fault */
5617c478bd9Sstevel@tonic-gate #define	DP_PSU_OUTPUT_VLO_STATUS	0x0080	/* output under voltage */
5627c478bd9Sstevel@tonic-gate #define	DP_PSU_OUTPUT_VHI_STATUS	0x0100	/* output over voltage */
5637c478bd9Sstevel@tonic-gate #define	DP_PSU_OUTPUT_AHI_STATUS	0x0200	/* output over current */
5647c478bd9Sstevel@tonic-gate #define	DP_PSU_ALERT_STATUS		0x0400	/* PSU alert indication */
5657c478bd9Sstevel@tonic-gate #define	DP_PSU_PDCT_FAN			0x0800	/* predicted fan fail */
5667c478bd9Sstevel@tonic-gate #define	DP_PSU_NR_WARNING		0x1000	/* non-redundancy condition */
5677c478bd9Sstevel@tonic-gate 
5687c478bd9Sstevel@tonic-gate 			/* presence: 	bit clear=not present */
5697c478bd9Sstevel@tonic-gate 			/*		bit set=present */
5707c478bd9Sstevel@tonic-gate 			/* status:	bit clear=ok */
5717c478bd9Sstevel@tonic-gate 			/*		bit set=generic fault */
5727c478bd9Sstevel@tonic-gate } dp_psu_status_t;
5737c478bd9Sstevel@tonic-gate 
5747c478bd9Sstevel@tonic-gate typedef struct dp_get_psu_status_r {
5757c478bd9Sstevel@tonic-gate 
5767c478bd9Sstevel@tonic-gate 	rsci8		num_psus;
5777c478bd9Sstevel@tonic-gate 	dp_psu_status_t	psu_status[1];
5787c478bd9Sstevel@tonic-gate 
5797c478bd9Sstevel@tonic-gate } dp_get_psu_status_r_t;
5807c478bd9Sstevel@tonic-gate 
5817c478bd9Sstevel@tonic-gate #define	DP_GET_FRU_STATUS	0x2A
5827c478bd9Sstevel@tonic-gate typedef struct dp_get_fru_status {
5837c478bd9Sstevel@tonic-gate 	dp_handle_t handle;	/* handle of a hot pluggable unit */
5847c478bd9Sstevel@tonic-gate 				/* or <null handle> (0xffff)	  */
5857c478bd9Sstevel@tonic-gate } dp_get_fru_status_t;
5867c478bd9Sstevel@tonic-gate 
5877c478bd9Sstevel@tonic-gate 
5887c478bd9Sstevel@tonic-gate #define	DP_GET_FRU_STATUS_R	0x2B
5897c478bd9Sstevel@tonic-gate typedef struct dp_fru_status {
5907c478bd9Sstevel@tonic-gate 
5917c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
5927c478bd9Sstevel@tonic-gate 	rsci8		sensor_status; 	/* tells whether the reading is */
5937c478bd9Sstevel@tonic-gate 					/* available or not */
5947c478bd9Sstevel@tonic-gate 	rsci8		presence;	/* 1=FRU present */
5957c478bd9Sstevel@tonic-gate 	rsci8		status;
5967c478bd9Sstevel@tonic-gate 
5977c478bd9Sstevel@tonic-gate } dp_fru_status_t;
5987c478bd9Sstevel@tonic-gate 
5997c478bd9Sstevel@tonic-gate enum dp_fru_status_type {
6007c478bd9Sstevel@tonic-gate 	DP_FRU_STATUS_OK = 1,
6017c478bd9Sstevel@tonic-gate 	DP_FRU_STATUS_FAILED,
6027c478bd9Sstevel@tonic-gate 	DP_FRU_STATUS_BLACKLISTED,
6037c478bd9Sstevel@tonic-gate 	DP_FRU_STATUS_UNKNOWN
6047c478bd9Sstevel@tonic-gate };
6057c478bd9Sstevel@tonic-gate 
6067c478bd9Sstevel@tonic-gate typedef struct dp_get_fru_status_r {
6077c478bd9Sstevel@tonic-gate 	rsci8		num_frus;
6087c478bd9Sstevel@tonic-gate 	dp_fru_status_t	fru_status[1];
6097c478bd9Sstevel@tonic-gate 
6107c478bd9Sstevel@tonic-gate } dp_get_fru_status_r_t;
6117c478bd9Sstevel@tonic-gate 
6127c478bd9Sstevel@tonic-gate /*
6137c478bd9Sstevel@tonic-gate  * DP_GET_DEVICE(_R) command is used to discover I2C devices dynamically
6147c478bd9Sstevel@tonic-gate  * (used by SunVTS)
6157c478bd9Sstevel@tonic-gate  */
6167c478bd9Sstevel@tonic-gate #define	DP_GET_DEVICE		0x2C
6177c478bd9Sstevel@tonic-gate 
6187c478bd9Sstevel@tonic-gate typedef struct dp_get_device {
6197c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;	/* handle of a device or */
6207c478bd9Sstevel@tonic-gate 				/* <null handle>(0xffff) */
6217c478bd9Sstevel@tonic-gate } dp_get_device_t;
6227c478bd9Sstevel@tonic-gate 
6237c478bd9Sstevel@tonic-gate #define	DP_GET_DEVICE_R		0x2D
6247c478bd9Sstevel@tonic-gate 
6257c478bd9Sstevel@tonic-gate #define	DP_MAX_DEVICE_TYPE_NAME	32
6267c478bd9Sstevel@tonic-gate 
6277c478bd9Sstevel@tonic-gate typedef struct dp_device {
6287c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
6297c478bd9Sstevel@tonic-gate 	rsci8		presence;	/* 0 is not present, 1 is present */
6307c478bd9Sstevel@tonic-gate 	char		device_type[DP_MAX_DEVICE_TYPE_NAME];
6317c478bd9Sstevel@tonic-gate } dp_device_t;
6327c478bd9Sstevel@tonic-gate 
6337c478bd9Sstevel@tonic-gate typedef struct dp_get_device_r {
6347c478bd9Sstevel@tonic-gate 	rsci8		num_devices;
6357c478bd9Sstevel@tonic-gate 	dp_device_t	device[1];
6367c478bd9Sstevel@tonic-gate } dp_get_device_r_t;
6377c478bd9Sstevel@tonic-gate 
6387c478bd9Sstevel@tonic-gate 
6397c478bd9Sstevel@tonic-gate #define	DP_SET_CPU_SIGNATURE	0x33
6407c478bd9Sstevel@tonic-gate 
6417c478bd9Sstevel@tonic-gate typedef struct dp_set_cpu_signature {
6427c478bd9Sstevel@tonic-gate 	int		cpu_id;		/* see PSARC 2000/205 for more */
6437c478bd9Sstevel@tonic-gate 	ushort_t	sig; 		/* information on the value/meaning */
6447c478bd9Sstevel@tonic-gate 	uchar_t		states;		/* of these fields */
6457c478bd9Sstevel@tonic-gate 	uchar_t		sub_state;
6467c478bd9Sstevel@tonic-gate 
6477c478bd9Sstevel@tonic-gate } dp_cpu_signature_t;
6487c478bd9Sstevel@tonic-gate 
6497c478bd9Sstevel@tonic-gate 
6507c478bd9Sstevel@tonic-gate #define	DP_SET_CPU_NODENAME	0x38
6517c478bd9Sstevel@tonic-gate 
6527c478bd9Sstevel@tonic-gate #define	DP_MAX_NODENAME		256
6537c478bd9Sstevel@tonic-gate 
6547c478bd9Sstevel@tonic-gate typedef struct dp_set_nodename {
6557c478bd9Sstevel@tonic-gate 	char		nodename[DP_MAX_NODENAME];
6567c478bd9Sstevel@tonic-gate } dp_set_nodename_t;
6577c478bd9Sstevel@tonic-gate 
6587c478bd9Sstevel@tonic-gate 
6597c478bd9Sstevel@tonic-gate #define	DP_GET_LED_STATE	0x3C
6607c478bd9Sstevel@tonic-gate 
6617c478bd9Sstevel@tonic-gate typedef struct dp_get_led_state {
6627c478bd9Sstevel@tonic-gate 	dp_handle_t handle;	/* handle of a hot pluggable unit */
6637c478bd9Sstevel@tonic-gate 				/* or <null handle> (0xffff) */
6647c478bd9Sstevel@tonic-gate } dp_get_led_state_t;
6657c478bd9Sstevel@tonic-gate 
6667c478bd9Sstevel@tonic-gate #define	DP_GET_LED_STATE_R	0x3D
6677c478bd9Sstevel@tonic-gate 
6687c478bd9Sstevel@tonic-gate typedef struct dp_led_state {
6697c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
6707c478bd9Sstevel@tonic-gate 	rsci8		sensor_status; 	/* tells whether the reading is */
6717c478bd9Sstevel@tonic-gate 					/* available or not */
6727c478bd9Sstevel@tonic-gate 	rsci8		state;
6737c478bd9Sstevel@tonic-gate 	rsci8		colour;
6747c478bd9Sstevel@tonic-gate } dp_led_state_t;
6757c478bd9Sstevel@tonic-gate 
6767c478bd9Sstevel@tonic-gate typedef struct dp_get_led_state_r {
6777c478bd9Sstevel@tonic-gate 	rsci8		num_leds;
6787c478bd9Sstevel@tonic-gate 	dp_led_state_t	led_state[1];
6797c478bd9Sstevel@tonic-gate } dp_get_led_state_r_t;
6807c478bd9Sstevel@tonic-gate 
6817c478bd9Sstevel@tonic-gate /* LED states */
6827c478bd9Sstevel@tonic-gate 
6837c478bd9Sstevel@tonic-gate enum dp_led_states {
6847c478bd9Sstevel@tonic-gate 	DP_LED_OFF = 0,
6857c478bd9Sstevel@tonic-gate 	DP_LED_ON,
6867c478bd9Sstevel@tonic-gate 	DP_LED_FLASHING,
6877c478bd9Sstevel@tonic-gate 	DP_LED_BLINKING
6887c478bd9Sstevel@tonic-gate };
6897c478bd9Sstevel@tonic-gate 
6907c478bd9Sstevel@tonic-gate enum dp_led_colours {
6917c478bd9Sstevel@tonic-gate 	DP_LED_COLOUR_NONE = -1,
6927c478bd9Sstevel@tonic-gate 	DP_LED_COLOUR_ANY,
6937c478bd9Sstevel@tonic-gate 	DP_LED_COLOUR_WHITE,
6947c478bd9Sstevel@tonic-gate 	DP_LED_COLOUR_BLUE,
6957c478bd9Sstevel@tonic-gate 	DP_LED_COLOUR_GREEN,
6967c478bd9Sstevel@tonic-gate 	DP_LED_COLOUR_AMBER
6977c478bd9Sstevel@tonic-gate };
6987c478bd9Sstevel@tonic-gate 
6997c478bd9Sstevel@tonic-gate 
7007c478bd9Sstevel@tonic-gate #define	DP_SET_LED_STATE	0x3E
7017c478bd9Sstevel@tonic-gate 
7027c478bd9Sstevel@tonic-gate typedef struct dp_set_led_state {
7037c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;		/* handle of a LED */
7047c478bd9Sstevel@tonic-gate 	rsci8		state;
7057c478bd9Sstevel@tonic-gate } dp_set_led_state_t;
7067c478bd9Sstevel@tonic-gate 
7077c478bd9Sstevel@tonic-gate #define	DP_SET_LED_STATE_R	0x3F
7087c478bd9Sstevel@tonic-gate typedef struct dp_set_led_state_r {
7097c478bd9Sstevel@tonic-gate 	rsci8		status;
7107c478bd9Sstevel@tonic-gate } dp_set_led_state_r_t;
7117c478bd9Sstevel@tonic-gate 
7127c478bd9Sstevel@tonic-gate enum dp_set_led_status {
7137c478bd9Sstevel@tonic-gate 	DP_SET_LED_OK = 0,
7147c478bd9Sstevel@tonic-gate 	DP_SET_LED_INVALID_HANDLE,
7157c478bd9Sstevel@tonic-gate 	DP_SET_LED_ERROR
7167c478bd9Sstevel@tonic-gate };
7177c478bd9Sstevel@tonic-gate 
7187c478bd9Sstevel@tonic-gate 
7197c478bd9Sstevel@tonic-gate #define	DP_GET_ALARM_STATE	0x68
7207c478bd9Sstevel@tonic-gate 
7217c478bd9Sstevel@tonic-gate typedef struct dp_get_alarm_state {
7227c478bd9Sstevel@tonic-gate 	dp_handle_t handle;	/* handle of an alarm relay */
7237c478bd9Sstevel@tonic-gate 				/* or <null handle> (0xffff) */
7247c478bd9Sstevel@tonic-gate } dp_get_alarm_state_t;
7257c478bd9Sstevel@tonic-gate 
7267c478bd9Sstevel@tonic-gate #define	DP_GET_ALARM_STATE_R	0x69
7277c478bd9Sstevel@tonic-gate 
7287c478bd9Sstevel@tonic-gate typedef struct dp_alarm_state {
7297c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
7307c478bd9Sstevel@tonic-gate 	rsci8		sensor_status; 	/* tells whether the reading is */
7317c478bd9Sstevel@tonic-gate 					/* available or not */
7327c478bd9Sstevel@tonic-gate 	rsci8		state;
7337c478bd9Sstevel@tonic-gate } dp_alarm_state_t;
7347c478bd9Sstevel@tonic-gate 
7357c478bd9Sstevel@tonic-gate typedef struct dp_get_alarm_state_r {
7367c478bd9Sstevel@tonic-gate 	rsci8		num_alarms;
7377c478bd9Sstevel@tonic-gate 	dp_alarm_state_t	alarm_state[1];
7387c478bd9Sstevel@tonic-gate } dp_get_alarm_state_r_t;
7397c478bd9Sstevel@tonic-gate 
7407c478bd9Sstevel@tonic-gate /* ALARM states */
7417c478bd9Sstevel@tonic-gate 
7427c478bd9Sstevel@tonic-gate enum dp_alarm_states {
7437c478bd9Sstevel@tonic-gate 	DP_ALARM_OFF = 0,
7447c478bd9Sstevel@tonic-gate 	DP_ALARM_ON
7457c478bd9Sstevel@tonic-gate };
7467c478bd9Sstevel@tonic-gate 
7477c478bd9Sstevel@tonic-gate #define	DP_SET_ALARM_STATE	0x6A
7487c478bd9Sstevel@tonic-gate 
7497c478bd9Sstevel@tonic-gate typedef struct dp_set_alarm_state {
7507c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;		/* handle of a ALARM */
7517c478bd9Sstevel@tonic-gate 	rsci8		state;
7527c478bd9Sstevel@tonic-gate } dp_set_alarm_state_t;
7537c478bd9Sstevel@tonic-gate 
7547c478bd9Sstevel@tonic-gate #define	DP_SET_ALARM_STATE_R	0x6B
7557c478bd9Sstevel@tonic-gate typedef struct dp_set_alarm_state_r {
7567c478bd9Sstevel@tonic-gate 	rsci8		status;
7577c478bd9Sstevel@tonic-gate } dp_set_alarm_state_r_t;
7587c478bd9Sstevel@tonic-gate 
7597c478bd9Sstevel@tonic-gate enum dp_set_alarm_status {
7607c478bd9Sstevel@tonic-gate 	DP_SET_ALARM_OK = 0,
7617c478bd9Sstevel@tonic-gate 	DP_SET_ALARM_INVALID_HANDLE,
7627c478bd9Sstevel@tonic-gate 	DP_SET_ALARM_ERROR
7637c478bd9Sstevel@tonic-gate };
7647c478bd9Sstevel@tonic-gate 
7657c478bd9Sstevel@tonic-gate 
766e3f8e17dSsc #define	DP_SET_USER_WATCHDOG	0x60
767e3f8e17dSsc #define	DP_SET_USER_WATCHDOG_R	0x6F
768e3f8e17dSsc #define	DP_GET_USER_WATCHDOG	0x70
769e3f8e17dSsc #define	DP_GET_USER_WATCHDOG_R	0x71
770e3f8e17dSsc 
771e3f8e17dSsc #define	DP_USER_WATCHDOG_ENABLE		0x01
772e3f8e17dSsc #define	DP_USER_WATCHDOG_DISABLE	0x00
773e3f8e17dSsc 
774e3f8e17dSsc enum dp_user_watchdog_status {
775e3f8e17dSsc 	DP_USER_WDT_OK = 0,
776e3f8e17dSsc 	DP_USER_WDT_ERROR
777e3f8e17dSsc };
778e3f8e17dSsc 
779e3f8e17dSsc typedef struct dp_set_user_watchdog {
780e3f8e17dSsc 	rsci8 enable;	/* enable = 1 */
781e3f8e17dSsc } dp_set_user_watchdog_t;
782e3f8e17dSsc 
783e3f8e17dSsc typedef struct dp_set_user_watchdog_r {
784e3f8e17dSsc 	rsci8 status;
785e3f8e17dSsc } dp_set_user_watchdog_r_t;
786e3f8e17dSsc 
787e3f8e17dSsc typedef struct dp_get_user_watchdog_r {
788e3f8e17dSsc 	rsci8 enable;
789e3f8e17dSsc } dp_get_user_watchdog_r_t;
790e3f8e17dSsc 
7917c478bd9Sstevel@tonic-gate #define	DP_GET_VOLTS		0x42
7927c478bd9Sstevel@tonic-gate 
7937c478bd9Sstevel@tonic-gate typedef struct dp_get_volts {
7947c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;		/* handle of a voltage sensor */
7957c478bd9Sstevel@tonic-gate } dp_get_volts_t;
7967c478bd9Sstevel@tonic-gate 
7977c478bd9Sstevel@tonic-gate #define	DP_GET_VOLTS_R		0x43
7987c478bd9Sstevel@tonic-gate 
7997c478bd9Sstevel@tonic-gate typedef rscis16		dp_volt_reading_t;	/* unit in mV */
8007c478bd9Sstevel@tonic-gate 
8017c478bd9Sstevel@tonic-gate typedef struct dp_volt_status {
8027c478bd9Sstevel@tonic-gate 	dp_handle_t		handle;
8037c478bd9Sstevel@tonic-gate 	rsci8			sensor_status; 	/* tells whether the reading */
8047c478bd9Sstevel@tonic-gate 						/* is available or not */
8057c478bd9Sstevel@tonic-gate 	rsci8			status;		/* 0=ok, 1=error */
8067c478bd9Sstevel@tonic-gate 	dp_volt_reading_t	reading;	/* value in mV. */
8077c478bd9Sstevel@tonic-gate 	dp_volt_reading_t	low_warning;
8087c478bd9Sstevel@tonic-gate 	dp_volt_reading_t	low_soft_shutdown;
8097c478bd9Sstevel@tonic-gate 	dp_volt_reading_t	low_hard_shutdown;
8107c478bd9Sstevel@tonic-gate 	dp_volt_reading_t	high_warning;
8117c478bd9Sstevel@tonic-gate 	dp_volt_reading_t	high_soft_shutdown;
8127c478bd9Sstevel@tonic-gate 	dp_volt_reading_t	high_hard_shutdown;
8137c478bd9Sstevel@tonic-gate 
8147c478bd9Sstevel@tonic-gate } dp_volt_status_t;
8157c478bd9Sstevel@tonic-gate 
8167c478bd9Sstevel@tonic-gate typedef struct dp_get_volts_r {
8177c478bd9Sstevel@tonic-gate 	rsci8			num_volts;
8187c478bd9Sstevel@tonic-gate 	dp_volt_status_t	volt_status[1];
8197c478bd9Sstevel@tonic-gate 
8207c478bd9Sstevel@tonic-gate } dp_get_volts_r_t;
8217c478bd9Sstevel@tonic-gate 
8227c478bd9Sstevel@tonic-gate 
8237c478bd9Sstevel@tonic-gate #define	DP_GET_CIRCUIT_BRKS	0x62
8247c478bd9Sstevel@tonic-gate 
8257c478bd9Sstevel@tonic-gate typedef struct dp_get_circuit_brks {
8267c478bd9Sstevel@tonic-gate 	dp_handle_t handle;	/* handle of a circuit breaker */
8277c478bd9Sstevel@tonic-gate 				/* or <null handle> (0xffff) */
8287c478bd9Sstevel@tonic-gate } dp_get_circuit_brks_t;
8297c478bd9Sstevel@tonic-gate 
8307c478bd9Sstevel@tonic-gate #define	DP_GET_CIRCUIT_BRKS_R	0x63
8317c478bd9Sstevel@tonic-gate 
8327c478bd9Sstevel@tonic-gate typedef struct dp_circuit_brk_status {
8337c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
8347c478bd9Sstevel@tonic-gate 	rsci8		sensor_status; 	/* tells whether the reading is */
8357c478bd9Sstevel@tonic-gate 					/* available or not */
8367c478bd9Sstevel@tonic-gate 	rsci8		status;		/* 0=ok, 1=error */
8377c478bd9Sstevel@tonic-gate 
8387c478bd9Sstevel@tonic-gate } dp_circuit_brk_status_t;
8397c478bd9Sstevel@tonic-gate 
8407c478bd9Sstevel@tonic-gate typedef struct dp_get_circuit_brks_r {
8417c478bd9Sstevel@tonic-gate 	rsci8			num_circuit_brks;
8427c478bd9Sstevel@tonic-gate 	dp_circuit_brk_status_t	circuit_brk_status[1];
8437c478bd9Sstevel@tonic-gate 
8447c478bd9Sstevel@tonic-gate } dp_get_circuit_brks_r_t;
8457c478bd9Sstevel@tonic-gate 
8467c478bd9Sstevel@tonic-gate 
8477c478bd9Sstevel@tonic-gate #define	DP_SET_HOST_WATCHDOG	0x48
8487c478bd9Sstevel@tonic-gate 
8497c478bd9Sstevel@tonic-gate typedef struct dp_set_host_watchdog {
8507c478bd9Sstevel@tonic-gate 	rsci8	enable;		/* 0=enable watchdog, 1=disable watchdog */
8517c478bd9Sstevel@tonic-gate } dp_set_host_watchdog_t;
8527c478bd9Sstevel@tonic-gate 
8537c478bd9Sstevel@tonic-gate 
8547c478bd9Sstevel@tonic-gate #define	DP_GET_HANDLE_NAME	0x4A
8557c478bd9Sstevel@tonic-gate 
8567c478bd9Sstevel@tonic-gate typedef struct dp_get_handle_name {
8577c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
8587c478bd9Sstevel@tonic-gate } dp_get_handle_name_t;
8597c478bd9Sstevel@tonic-gate 
8607c478bd9Sstevel@tonic-gate #define	DP_GET_HANDLE_NAME_R	0x4B
8617c478bd9Sstevel@tonic-gate 
8627c478bd9Sstevel@tonic-gate typedef struct dp_get_handle_name_r {
8637c478bd9Sstevel@tonic-gate 	dp_handle_t	handle;
8647c478bd9Sstevel@tonic-gate 	char 		name[DP_MAX_HANDLE_NAME];
8657c478bd9Sstevel@tonic-gate } dp_get_handle_name_r_t;
8667c478bd9Sstevel@tonic-gate 
8677c478bd9Sstevel@tonic-gate 
8687c478bd9Sstevel@tonic-gate #define	DP_GET_HANDLE		0x4C
8697c478bd9Sstevel@tonic-gate 
8707c478bd9Sstevel@tonic-gate typedef struct dp_get_handle {
8717c478bd9Sstevel@tonic-gate 	char 		name[DP_MAX_HANDLE_NAME];
8727c478bd9Sstevel@tonic-gate } dp_get_handle_t;
8737c478bd9Sstevel@tonic-gate 
8747c478bd9Sstevel@tonic-gate #define	DP_GET_HANDLE_R		0x4D
8757c478bd9Sstevel@tonic-gate 
8767c478bd9Sstevel@tonic-gate typedef struct dp_get_handle_r {
8777c478bd9Sstevel@tonic-gate 	dp_handle_t 	handle;
8787c478bd9Sstevel@tonic-gate } dp_get_handle_r_t;
8797c478bd9Sstevel@tonic-gate 
8807c478bd9Sstevel@tonic-gate 
8817c478bd9Sstevel@tonic-gate #define	DP_RMC_EVENTS		0x57
8827c478bd9Sstevel@tonic-gate 
8837c478bd9Sstevel@tonic-gate typedef rsci16	dp_event_t;
8847c478bd9Sstevel@tonic-gate 
8857c478bd9Sstevel@tonic-gate /*
8867c478bd9Sstevel@tonic-gate  * list of events
8877c478bd9Sstevel@tonic-gate  */
8887c478bd9Sstevel@tonic-gate 
8897c478bd9Sstevel@tonic-gate enum rmc_events {
8907c478bd9Sstevel@tonic-gate 	RMC_INIT_EVENT	= 0x01,
8917c478bd9Sstevel@tonic-gate 	RMC_HPU_EVENT,
8927c478bd9Sstevel@tonic-gate 	RMC_ENV_EVENT,
8937c478bd9Sstevel@tonic-gate 	RMC_KEYSWITCH_EVENT,
8947c478bd9Sstevel@tonic-gate 	RMC_LOG_EVENT
8957c478bd9Sstevel@tonic-gate };
8967c478bd9Sstevel@tonic-gate 
8977c478bd9Sstevel@tonic-gate /*
8987c478bd9Sstevel@tonic-gate  * event data structures
8997c478bd9Sstevel@tonic-gate  */
9007c478bd9Sstevel@tonic-gate enum rmc_hpu_events {
9017c478bd9Sstevel@tonic-gate 	RMC_HPU_INSERT_EVENT	= 0x20,
9027c478bd9Sstevel@tonic-gate 	RMC_HPU_REMOVE_EVENT,
9037c478bd9Sstevel@tonic-gate 	RMC_HPU_HWERROR_EVENT
9047c478bd9Sstevel@tonic-gate };
9057c478bd9Sstevel@tonic-gate 
9067c478bd9Sstevel@tonic-gate typedef struct dp_hpu_event {
9077c478bd9Sstevel@tonic-gate 	dp_handle_t	hpu_hdl;
9087c478bd9Sstevel@tonic-gate 	dp_event_t	sub_event;
9097c478bd9Sstevel@tonic-gate 
9107c478bd9Sstevel@tonic-gate } dp_hpu_event_t;
9117c478bd9Sstevel@tonic-gate 
9127c478bd9Sstevel@tonic-gate 
9137c478bd9Sstevel@tonic-gate enum rmc_env_events {
9147c478bd9Sstevel@tonic-gate 	RMC_ENV_WARNING_THRESHOLD_EVENT = 0x31,
9157c478bd9Sstevel@tonic-gate 	RMC_ENV_SHUTDOWN_THRESHOLD_EVENT,
9167c478bd9Sstevel@tonic-gate 	RMC_ENV_FAULT_EVENT,
9177c478bd9Sstevel@tonic-gate 	RMC_ENV_OK_EVENT
9187c478bd9Sstevel@tonic-gate };
9197c478bd9Sstevel@tonic-gate 
9207c478bd9Sstevel@tonic-gate typedef struct dp_env_event {
9217c478bd9Sstevel@tonic-gate 	dp_handle_t	env_hdl;
9227c478bd9Sstevel@tonic-gate 	dp_event_t	sub_event;
9237c478bd9Sstevel@tonic-gate 
9247c478bd9Sstevel@tonic-gate } dp_env_event_t;
9257c478bd9Sstevel@tonic-gate 
9267c478bd9Sstevel@tonic-gate 
9277c478bd9Sstevel@tonic-gate enum rmc_keyswitch_pos {
9287c478bd9Sstevel@tonic-gate 	RMC_KEYSWITCH_POS_UNKNOWN	= 0x00,
9297c478bd9Sstevel@tonic-gate 	RMC_KEYSWITCH_POS_NORMAL,
9307c478bd9Sstevel@tonic-gate 	RMC_KEYSWITCH_POS_DIAG,
9317c478bd9Sstevel@tonic-gate 	RMC_KEYSWITCH_POS_LOCKED,
9327c478bd9Sstevel@tonic-gate 	RMC_KEYSWITCH_POS_OFF
9337c478bd9Sstevel@tonic-gate };
9347c478bd9Sstevel@tonic-gate 
9357c478bd9Sstevel@tonic-gate typedef struct dp_keyswitch_event {
9367c478bd9Sstevel@tonic-gate 	rsci8	key_position;
9377c478bd9Sstevel@tonic-gate } dp_keyswitch_event_t;
9387c478bd9Sstevel@tonic-gate 
9397c478bd9Sstevel@tonic-gate 
9407c478bd9Sstevel@tonic-gate typedef struct dp_rmclog_event {
9417c478bd9Sstevel@tonic-gate 	int	log_record_size;
9427c478bd9Sstevel@tonic-gate 	rsci8	log_record[DP_MAX_LOGSIZE];
9437c478bd9Sstevel@tonic-gate } dp_rmclog_event_t;
9447c478bd9Sstevel@tonic-gate 
9457c478bd9Sstevel@tonic-gate typedef union dp_event_info {
9467c478bd9Sstevel@tonic-gate 	dp_hpu_event_t		ev_hpunot;
9477c478bd9Sstevel@tonic-gate 	dp_env_event_t		ev_envnot;
9487c478bd9Sstevel@tonic-gate 	dp_keyswitch_event_t	ev_keysw;
9497c478bd9Sstevel@tonic-gate 	dp_rmclog_event_t	ev_rmclog;
9507c478bd9Sstevel@tonic-gate } dp_event_info_t;
9517c478bd9Sstevel@tonic-gate 
9527c478bd9Sstevel@tonic-gate typedef struct dp_event_notification {
9537c478bd9Sstevel@tonic-gate 	dp_event_t	event;
9547c478bd9Sstevel@tonic-gate 	rsci32		event_seqno; 	/* event sequence number */
9557c478bd9Sstevel@tonic-gate 	rsci32		timestamp;	/* timestamp of the event */
9567c478bd9Sstevel@tonic-gate 	dp_event_info_t	event_info;	/* event information */
9577c478bd9Sstevel@tonic-gate } dp_event_notification_t;
9587c478bd9Sstevel@tonic-gate 
9597c478bd9Sstevel@tonic-gate #define	DP_RMC_EVENTS_R		0x5F
9607c478bd9Sstevel@tonic-gate 
9617c478bd9Sstevel@tonic-gate typedef struct dp_event_notification_r {
9627c478bd9Sstevel@tonic-gate 	rsci32		event_seqno; 	/* event sequence number */
9637c478bd9Sstevel@tonic-gate } dp_event_notification_r_t;
9647c478bd9Sstevel@tonic-gate 
96506e46062Sjbeloro #define	DP_GET_CHASSIS_SERIALNUM	0x2E
96606e46062Sjbeloro #define	DP_GET_CHASSIS_SERIALNUM_R	0x2F
96706e46062Sjbeloro typedef struct dp_get_serialnum_r {
96806e46062Sjbeloro 	rsci8		chassis_serial_number[32];
96906e46062Sjbeloro } dp_get_serialnum_r_t;
97006e46062Sjbeloro 
97106e46062Sjbeloro #define	DP_GET_CONSOLE_LOG	0x1A
97206e46062Sjbeloro typedef struct dp_get_console_log {
97306e46062Sjbeloro 	rsci64		start_seq; 	/* sequence number of first log byte */
97406e46062Sjbeloro 	rsci16		length;		/* expected size of retrieved data */
97506e46062Sjbeloro } dp_get_console_log_t;
97606e46062Sjbeloro 
97706e46062Sjbeloro #define	DP_GET_CONSOLE_LOG_R	0x1B
97806e46062Sjbeloro typedef struct dp_get_console_log_r {
97906e46062Sjbeloro 	rsci64		next_seq;	/* sequence number of next log byte */
98006e46062Sjbeloro 	rsci64		remaining_log_bytes;	/* bytes left to retrieve */
98106e46062Sjbeloro 	rsci16		length;		/* size of retrieved data */
98206e46062Sjbeloro 	char		buffer[DP_MAX_MSGLEN - (sizeof (rsci64) * 2 +
98306e46062Sjbeloro 			    sizeof (rsci16))];
98406e46062Sjbeloro } dp_get_console_log_r_t;
98506e46062Sjbeloro 
98606e46062Sjbeloro #define	DP_GET_CONFIG_LOG	0x1C
98706e46062Sjbeloro typedef struct dp_get_config_log {
98806e46062Sjbeloro 	rsci64		start_seq;	/* sequence number of first log byte */
98906e46062Sjbeloro 	rsci16		length;		/* size of retrieved data */
99006e46062Sjbeloro } dp_get_config_log_t;
99106e46062Sjbeloro 
99206e46062Sjbeloro #define	DP_GET_CONFIG_LOG_R	0x1D
99306e46062Sjbeloro typedef struct dp_get_config_log_r {
99406e46062Sjbeloro 	rsci64		next_seq;	/* sequence number of next log byte */
99506e46062Sjbeloro 	rsci64		remaining_log_bytes;	/* bytes left to retrieve */
99606e46062Sjbeloro 	rsci16		length;		/* size of retrieved data */
99706e46062Sjbeloro 	char		buffer[DP_MAX_MSGLEN - (sizeof (rsci64) * 2 +
99806e46062Sjbeloro 			    sizeof (rsci16))];
99906e46062Sjbeloro } dp_get_config_log_r_t;
100006e46062Sjbeloro 
100106e46062Sjbeloro #define	DP_GET_EVENT_LOG2	0x1E
100206e46062Sjbeloro typedef struct dp_get_event_log2 {
100306e46062Sjbeloro 	rsci64		start_seq;	/* sequence number of first log event */
100406e46062Sjbeloro 	rsci16		length;		/* size of retrieved data */
100506e46062Sjbeloro } dp_get_event_log2_t;
100606e46062Sjbeloro 
100706e46062Sjbeloro #define	DP_GET_EVENT_LOG2_R	0x1F
100806e46062Sjbeloro typedef struct dp_get_event_log2_r {
100906e46062Sjbeloro 	rsci64		next_seq;	/* sequence number of next log event */
101006e46062Sjbeloro 	rsci64		remaining_log_events;	/* events left to retrieve */
101106e46062Sjbeloro 	rsci16		num_events;		/* size of retrieved data */
101206e46062Sjbeloro 	char		buffer[DP_MAX_MSGLEN - (sizeof (rsci64) * 2 +
101306e46062Sjbeloro 			    sizeof (rsci16))];
101406e46062Sjbeloro } dp_get_event_log2_r_t;
101506e46062Sjbeloro 
1016*270993a9Sfw /*
1017*270993a9Sfw  * This is ALOM's response to command codes it does not know.  It will
1018*270993a9Sfw  * return the unknown command code in inv_type.  Note that this is
1019*270993a9Sfw  * available starting with protocol version 3.  ALOM will not respond
1020*270993a9Sfw  * to unknown commands in older versions of the protocol.
1021*270993a9Sfw  */
1022*270993a9Sfw #define	DP_INVCMD	0x7F
1023*270993a9Sfw typedef struct dp_invcmd {
1024*270993a9Sfw 	uint8_t inv_type;
1025*270993a9Sfw } dp_invcmd_t;
1026*270993a9Sfw 
10277c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
10287c478bd9Sstevel@tonic-gate }
10297c478bd9Sstevel@tonic-gate #endif
10307c478bd9Sstevel@tonic-gate 
10317c478bd9Sstevel@tonic-gate #endif	/* _SYS_RMC_COMM_HPROTO_H */
1032