From e0912fc6b7c10bbebb477d73330428365f61c81e Mon Sep 17 00:00:00 2001 From: Francois Isabelle Date: Tue, 12 Jul 2005 12:36:47 +0000 Subject: [PATCH] Added initial PICMG command support --- ipmitool/include/ipmitool/Makefile.am | 2 +- ipmitool/include/ipmitool/ipmi_picmg.h | 75 ++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 ipmitool/include/ipmitool/ipmi_picmg.h diff --git a/ipmitool/include/ipmitool/Makefile.am b/ipmitool/include/ipmitool/Makefile.am index 5125b56..151c63d 100644 --- a/ipmitool/include/ipmitool/Makefile.am +++ b/ipmitool/include/ipmitool/Makefile.am @@ -39,5 +39,5 @@ noinst_HEADERS = log.h bswap.h helper.h ipmi.h ipmi_intf.h \ ipmi_sdr.h ipmi_sel.h ipmi_sol.h ipmi_mc.h ipmi_raw.h \ ipmi_channel.h ipmi_sensor.h ipmi_event.h ipmi_session.h \ ipmi_strings.h ipmi_constants.h ipmi_user.h ipmi_pef.h \ - ipmi_oem.h ipmi_isol.h ipmi_sunoem.h ipmi_main.h + ipmi_oem.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h ipmi_main.h diff --git a/ipmitool/include/ipmitool/ipmi_picmg.h b/ipmitool/include/ipmitool/ipmi_picmg.h new file mode 100644 index 0000000..2f7d4cc --- /dev/null +++ b/ipmitool/include/ipmitool/ipmi_picmg.h @@ -0,0 +1,75 @@ + +/* + (C) Kontron +*/ + +#ifndef _IPMI_PICMG_H_ +#define _IPMI_PICMG_H_ + +#include + +/* PICMG commands */ +#define PICMG_GET_PICMG_PROPERTIES_CMD 0x00 +#define PICMG_GET_ADDRESS_INFO_CMD 0x01 +#define PICMG_GET_SHELF_ADDRESS_INFO_CMD 0x02 +#define PICMG_SET_SHELF_ADDRESS_INFO_CMD 0x03 +#define PICMG_FRU_CONTROL_CMD 0x04 +#define PICMG_GET_FRU_LED_PROPERTIES_CMD 0x05 +#define PICMG_GET_LED_COLOR_CAPABILITIES_CMD 0x06 +#define PICMG_SET_FRU_LED_STATE_CMD 0x07 +#define PICMG_GET_FRU_LED_STATE_CMD 0x08 +#define PICMG_SET_IPMB_CMD 0x09 +#define PICMG_SET_FRU_POLICY_CMD 0x0A +#define PICMG_GET_FRU_POLICY_CMD 0x0B +#define PICMG_FRU_ACTIVATION_CMD 0x0C +#define PICMG_GET_DEVICE_LOCATOR_RECORD_CMD 0x0D +#define PICMG_SET_PORT_STATE_CMD 0x0E +#define PICMG_GET_PORT_STATE_CMD 0x0F +#define PICMG_COMPUTE_POWER_PROPERTIES_CMD 0x10 +#define PICMG_SET_POWER_LEVEL_CMD 0x11 +#define PICMG_GET_POWER_LEVEL_CMD 0x12 +#define PICMG_RENEGOTIATE_POWER_CMD 0x13 +#define PICMG_GET_FAN_SPEED_PROPERTIES_CMD 0x14 +#define PICMG_SET_FAN_LEVEL_CMD 0x15 +#define PICMG_GET_FAN_LEVEL_CMD 0x16 +#define PICMG_BUSED_RESOURCE_CMD 0x17 + +/* Site Types */ +#define PICMG_ATCA_BOARD 0x00 +#define PICMG_POWER_ENTRY 0x01 +#define PICMG_SHELF_FRU 0x02 +#define PICMG_DEDICATED_SHMC 0x03 +#define PICMG_FAN_TRAY 0x04 +#define PICMG_FAN_FILTER_TRAY 0x05 +#define PICMG_ALARM 0x06 +#define PICMG_AMC 0x07 +#define PICMG_PMC 0x08 +#define PICMG_RTM 0x09 + + + +struct picmg_set_fru_activation_cmd { + unsigned char picmg_id; /* always 0*/ + unsigned char fru_id; /* threshold setting mask */ + unsigned char fru_state; /* fru activation/deactivation */ +} __attribute__ ((packed)); + + + +/* the LED color capabilities */ +static unsigned char* led_color_str[] = { + "reserved", + "BLUE", + "RED", + "GREEN", + "AMBER", + "ORANGE", + "WHITE", + "reserved" +}; + + + +int ipmi_picmg_main (struct ipmi_intf * intf, int argc, char ** argv); + +#endif