/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_RMC_COMM_HPROTO_H
#define _SYS_RMC_COMM_HPROTO_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* data types used in the data protocol fields
*/
typedef unsigned char rsci8;
typedef unsigned short rsci16;
typedef short rscis16;
#ifdef _LP64
typedef unsigned int rsci32;
typedef unsigned long rsci64;
#else
typedef unsigned long rsci32;
typedef unsigned long long rsci64;
#endif
/*
* handle definition. Handles are used in the high-level data protocol
* to identify FRU, sensors (temperature, voltage), and so on.
*/
/*
* Supported message types and associated data types:
*/
typedef struct dp_update_flash_r {
typedef struct dp_run_test {
/* followed by test parameters; see individual tests below. */
typedef struct dp_run_test_r {
/* codes below. */
#define RSC_TEST_PASSED 0
typedef struct dp_rsc_status_r {
/* The first six fields here must not be changed to ensure that they */
/* are the same in all versions of RSC, most notably when compared to */
/* 1.x. New fields must be added to the end of the structure. */
/* CLI. */
/* Any new fields in the structure may be added after this point ONLY! */
typedef struct dp_set_cfgvar {
/* Data is variable name & new value as zero-terminated ascii strings. */
typedef struct dp_set_cfgvar_r {
/* Data is variable name as zero-terminated ascii string. */
typedef struct dp_get_cfgvar_r {
/* followed by value of variable as a zero-terminated ascii string. */
/*
* Data is variable name as zero-terminated ascii string. A zero-length
* string means 'return the name of the "first" variable.'
*/
typedef struct dp_get_cfgvar_name_r {
/* followed by name of "next" variable as a zero-terminated ascii string. */
typedef struct dp_set_date_time {
typedef struct dp_set_date_time_r {
typedef struct dp_get_date_time_r {
/* followed by the date represented as a zero-terminated ascii string. */
typedef struct dp_send_alert {
typedef struct dp_send_alert_r {
typedef struct dp_get_temp_r {
/*
* Implementations using this level of protocol or above,
* will generate a response to any supplied command code.
* This doesn't mean they will support a given command.
* It only means that they will generate a response to that
* command.
*/
typedef struct dp_get_sdp_version_r {
typedef struct dp_get_tod_clock_r {
/*
* NOTE: changing this or the dp_event_log_entry structure will almost
* certainly require changing the code that parses these structures
*/
typedef struct dp_get_event_log_r {
typedef struct dp_event_log_entry {
typedef struct dp_get_pcmcia_info_r {
/* User sub-commands */
/*
* The following fields are used to set the user permissions.
* Each must be represented as a single bit in the parm field.
*/
/*
* values for parm for CMD_SHOW. Anything other than 0 will show
* the user # up to and including DP_USER_MAX
*/
/* Error values for status */
/*
* The parm field is used by the permission command to set specific
* permissions. The parm field is also used by the show command to
* indicate if the user name is specified or not.
*/
typedef struct dp_user_adm {
/*
* followed by zero-terminated ascii strings. All user commands
* are followed by the username. The password command is also
* followed by the password.
*/
/*
* the response field is used to return the user permissions
* for the user permissions command. The response is also used
* to echo back the user selection for the show command.
*/
typedef struct dp_user_adm_r {
/* followed by a zero-terminated ascii string for the show command. */
#define DP_MODEM_PASS 0
/* Commands used for rscadm modem_setup */
typedef struct dp_modem_connect_r {
/* There is no reponse to a modem_data command */
/* The modem data command goes in both directions */
/* followed by a zero-terminated ascii string */
typedef struct dp_modem_disconnect_r {
typedef struct dp_get_tickcnt_r {
typedef struct dp_set_default_cfg_r {
typedef struct dp_get_network_cfg_r {
/*
* Parameters for DP_RUN_TEST message:
*/
/*
* Test routines need to know what the low-level protocol sync
* character is.
*/
#define RSC_TEST_SERIAL 0
typedef struct rsc_serial_test {
#define RSC_SERIAL_TTYC_LB 0
typedef struct rsc_enet_test {
#define RSC_ENET_INT_LB 0
typedef struct rsc_flash_crcs_r {
typedef struct rsc_seeprom_crcs_r {
typedef struct rsc_fru_crcs_r {
/*
* new commands definitions
*/
typedef struct dp_get_sysinfo_r {
typedef struct dp_get_temperatures {
/* or <null handle> (0xffff) */
/* Data is variable name & new value as zero-terminated ascii strings. */
enum sensor_status {
};
typedef struct dp_tempr_status {
/* available or not */
typedef struct dp_get_temperatures_r {
typedef struct dp_get_fan_status {
/* or <null handle> (0xffff) */
typedef struct dp_fan_status {
/* available or not */
/* bit clear=RPM) */
typedef struct dp_get_fan_status_r {
typedef struct dp_get_psu_status {
/* or <null handle> (0xffff) */
typedef struct dp_psu_status {
/* available or not */
/* presence: bit clear=not present */
/* bit set=present */
/* status: bit clear=ok */
/* bit set=generic fault */
typedef struct dp_get_psu_status_r {
typedef struct dp_get_fru_status {
/* or <null handle> (0xffff) */
typedef struct dp_fru_status {
/* available or not */
enum dp_fru_status_type {
};
typedef struct dp_get_fru_status_r {
/*
* DP_GET_DEVICE(_R) command is used to discover I2C devices dynamically
* (used by SunVTS)
*/
typedef struct dp_get_device {
/* <null handle>(0xffff) */
typedef struct dp_device {
} dp_device_t;
typedef struct dp_get_device_r {
typedef struct dp_set_cpu_signature {
typedef struct dp_set_nodename {
typedef struct dp_get_led_state {
/* or <null handle> (0xffff) */
typedef struct dp_led_state {
/* available or not */
typedef struct dp_get_led_state_r {
/* LED states */
enum dp_led_states {
DP_LED_OFF = 0,
};
enum dp_led_colours {
};
typedef struct dp_set_led_state {
typedef struct dp_set_led_state_r {
enum dp_set_led_status {
DP_SET_LED_OK = 0,
};
typedef struct dp_get_alarm_state {
/* or <null handle> (0xffff) */
typedef struct dp_alarm_state {
/* available or not */
typedef struct dp_get_alarm_state_r {
/* ALARM states */
enum dp_alarm_states {
DP_ALARM_OFF = 0,
};
typedef struct dp_set_alarm_state {
typedef struct dp_set_alarm_state_r {
enum dp_set_alarm_status {
DP_SET_ALARM_OK = 0,
};
enum dp_user_watchdog_status {
DP_USER_WDT_OK = 0,
};
typedef struct dp_set_user_watchdog {
typedef struct dp_set_user_watchdog_r {
typedef struct dp_get_user_watchdog_r {
typedef struct dp_get_volts {
typedef struct dp_volt_status {
/* is available or not */
typedef struct dp_get_volts_r {
typedef struct dp_get_circuit_brks {
/* or <null handle> (0xffff) */
typedef struct dp_circuit_brk_status {
/* available or not */
typedef struct dp_get_circuit_brks_r {
typedef struct dp_set_host_watchdog {
typedef struct dp_get_handle_name {
typedef struct dp_get_handle_name_r {
typedef struct dp_get_handle {
typedef struct dp_get_handle_r {
/*
* list of events
*/
enum rmc_events {
};
/*
* event data structures
*/
enum rmc_hpu_events {
};
typedef struct dp_hpu_event {
enum rmc_env_events {
};
typedef struct dp_env_event {
enum rmc_keyswitch_pos {
};
typedef struct dp_keyswitch_event {
typedef struct dp_rmclog_event {
int log_record_size;
typedef union dp_event_info {
typedef struct dp_event_notification {
typedef struct dp_event_notification_r {
typedef struct dp_get_serialnum_r {
typedef struct dp_get_console_log {
typedef struct dp_get_console_log_r {
sizeof (rsci16))];
typedef struct dp_get_config_log {
typedef struct dp_get_config_log_r {
sizeof (rsci16))];
typedef struct dp_get_event_log2 {
typedef struct dp_get_event_log2_r {
sizeof (rsci16))];
/*
* This is ALOM's response to command codes it does not know. It will
* return the unknown command code in inv_type. Note that this is
* available starting with protocol version 3. ALOM will not respond
* to unknown commands in older versions of the protocol.
*/
typedef struct dp_invcmd {
} dp_invcmd_t;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_RMC_COMM_HPROTO_H */