Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 /*
0003  * ipmi_smi.h
0004  *
0005  * MontaVista IPMI system management interface
0006  *
0007  * Author: MontaVista Software, Inc.
0008  *         Corey Minyard <minyard@mvista.com>
0009  *         source@mvista.com
0010  *
0011  * Copyright 2002 MontaVista Software Inc.
0012  *
0013  */
0014 
0015 #ifndef __LINUX_IPMI_MSGDEFS_H
0016 #define __LINUX_IPMI_MSGDEFS_H
0017 
0018 /* Various definitions for IPMI messages used by almost everything in
0019    the IPMI stack. */
0020 
0021 /* NetFNs and commands used inside the IPMI stack. */
0022 
0023 #define IPMI_NETFN_SENSOR_EVENT_REQUEST     0x04
0024 #define IPMI_NETFN_SENSOR_EVENT_RESPONSE    0x05
0025 #define IPMI_GET_EVENT_RECEIVER_CMD 0x01
0026 
0027 #define IPMI_NETFN_APP_REQUEST          0x06
0028 #define IPMI_NETFN_APP_RESPONSE         0x07
0029 #define IPMI_GET_DEVICE_ID_CMD      0x01
0030 #define IPMI_COLD_RESET_CMD     0x02
0031 #define IPMI_WARM_RESET_CMD     0x03
0032 #define IPMI_CLEAR_MSG_FLAGS_CMD    0x30
0033 #define IPMI_GET_DEVICE_GUID_CMD    0x08
0034 #define IPMI_GET_MSG_FLAGS_CMD      0x31
0035 #define IPMI_SEND_MSG_CMD       0x34
0036 #define IPMI_GET_MSG_CMD        0x33
0037 #define IPMI_SET_BMC_GLOBAL_ENABLES_CMD 0x2e
0038 #define IPMI_GET_BMC_GLOBAL_ENABLES_CMD 0x2f
0039 #define IPMI_READ_EVENT_MSG_BUFFER_CMD  0x35
0040 #define IPMI_GET_CHANNEL_INFO_CMD   0x42
0041 
0042 /* Bit for BMC global enables. */
0043 #define IPMI_BMC_RCV_MSG_INTR     0x01
0044 #define IPMI_BMC_EVT_MSG_INTR     0x02
0045 #define IPMI_BMC_EVT_MSG_BUFF     0x04
0046 #define IPMI_BMC_SYS_LOG          0x08
0047 
0048 #define IPMI_NETFN_STORAGE_REQUEST      0x0a
0049 #define IPMI_NETFN_STORAGE_RESPONSE     0x0b
0050 #define IPMI_ADD_SEL_ENTRY_CMD      0x44
0051 
0052 #define IPMI_NETFN_FIRMWARE_REQUEST     0x08
0053 #define IPMI_NETFN_FIRMWARE_RESPONSE        0x09
0054 
0055 /* The default slave address */
0056 #define IPMI_BMC_SLAVE_ADDR 0x20
0057 
0058 /* The BT interface on high-end HP systems supports up to 255 bytes in
0059  * one transfer.  Its "virtual" BMC supports some commands that are longer
0060  * than 128 bytes.  Use the full 256, plus NetFn/LUN, Cmd, cCode, plus
0061  * some overhead; it's not worth the effort to dynamically size this based
0062  * on the results of the "Get BT Capabilities" command. */
0063 #define IPMI_MAX_MSG_LENGTH 272 /* multiple of 16 */
0064 
0065 #define IPMI_CC_NO_ERROR        0x00
0066 #define IPMI_NODE_BUSY_ERR      0xc0
0067 #define IPMI_INVALID_COMMAND_ERR    0xc1
0068 #define IPMI_TIMEOUT_ERR        0xc3
0069 #define IPMI_ERR_MSG_TRUNCATED      0xc6
0070 #define IPMI_REQ_LEN_INVALID_ERR    0xc7
0071 #define IPMI_REQ_LEN_EXCEEDED_ERR   0xc8
0072 #define IPMI_DEVICE_IN_FW_UPDATE_ERR    0xd1
0073 #define IPMI_DEVICE_IN_INIT_ERR     0xd2
0074 #define IPMI_NOT_IN_MY_STATE_ERR    0xd5    /* IPMI 2.0 */
0075 #define IPMI_LOST_ARBITRATION_ERR   0x81
0076 #define IPMI_BUS_ERR            0x82
0077 #define IPMI_NAK_ON_WRITE_ERR       0x83
0078 #define IPMI_ERR_UNSPECIFIED        0xff
0079 
0080 #define IPMI_CHANNEL_PROTOCOL_IPMB  1
0081 #define IPMI_CHANNEL_PROTOCOL_ICMB  2
0082 #define IPMI_CHANNEL_PROTOCOL_SMBUS 4
0083 #define IPMI_CHANNEL_PROTOCOL_KCS   5
0084 #define IPMI_CHANNEL_PROTOCOL_SMIC  6
0085 #define IPMI_CHANNEL_PROTOCOL_BT10  7
0086 #define IPMI_CHANNEL_PROTOCOL_BT15  8
0087 #define IPMI_CHANNEL_PROTOCOL_TMODE 9
0088 
0089 #define IPMI_CHANNEL_MEDIUM_IPMB    1
0090 #define IPMI_CHANNEL_MEDIUM_ICMB10  2
0091 #define IPMI_CHANNEL_MEDIUM_ICMB09  3
0092 #define IPMI_CHANNEL_MEDIUM_8023LAN 4
0093 #define IPMI_CHANNEL_MEDIUM_ASYNC   5
0094 #define IPMI_CHANNEL_MEDIUM_OTHER_LAN   6
0095 #define IPMI_CHANNEL_MEDIUM_PCI_SMBUS   7
0096 #define IPMI_CHANNEL_MEDIUM_SMBUS1  8
0097 #define IPMI_CHANNEL_MEDIUM_SMBUS2  9
0098 #define IPMI_CHANNEL_MEDIUM_USB1    10
0099 #define IPMI_CHANNEL_MEDIUM_USB2    11
0100 #define IPMI_CHANNEL_MEDIUM_SYSINTF 12
0101 #define IPMI_CHANNEL_MEDIUM_OEM_MIN 0x60
0102 #define IPMI_CHANNEL_MEDIUM_OEM_MAX 0x7f
0103 
0104 #endif /* __LINUX_IPMI_MSGDEFS_H */