Solaris ATCA IPMI Driver - Functional Specification =================================================== 1. Introduction --------------- The IPMI (Intelligent Platform Management Interface) architecture provides a platform management subsystem for monitoring system hardware and sensors, controlling system components and logging critical system events. The IPMI v1.5 specification defines a standardized, abstracted interface to this platform management subsystem. ATCA systems have an embedded microcontroller, called the Intelligent Platform Management Controller (IPMC) as its baseboard management controller (BMC). It implements the IPMI specification and provides ATCA supports. System software accesses the IPMI facilities through the IPMC. The motivation for this project is to provide a Solaris interface to communicate with IPMC using OpenIPMI nterface. This facilities all OpenIPMI based applications: - User access to IPMC: For example, inquire FRUid, inquire sensors, control LED. - ATCA Graceful Shutdown and Graceful reboot; - Support ipmitool open interface; - Firmware update; 2. Solaris ATCA IPMI Driver Project Description ----------------------------------------------- 2.1 Overview User IPMI Applications | _____|_____ | | | ipmi | |___________| | ___________|____________ | | | ipmi svc | |________________________| | _________|________ | | | ipmi interface | |__________________| . . ============================================================================= . . **************** * * * IPMC * **************** Solaris ATCA IPMI driver has three layers: ipmi IPMI device interface driver, pseudo; arch generic. It interfaces to user land IPMI applications. ipmi svc IPMI service module or message handler; arch generic. This is the IPMI message handler - processing IPMI message; - providing the ATCA services; - providing the framework of the interface driver registration to support different interface drivers on different platforms. ipmi interface IPMI system management interface controller (SMIC) driver; See more in 2.2 below. 2.2 Interfaces to IPMC The interface to IPMC is platform or design specific. The interfaces could be serial, KCS, etc. ipmi svc provides the framework of supporting different interface driver. On Netra ATCA platforms, the interface is serial. IPMI interface is serial interface basic mode, with a platform specific method. On different blades, this ipmi serial driver could be different. IPMI serial driver will attach to a device if its device property "compatible" has value "ipmc-su16550". This will be the design for x86, x64 and RF based Netra ATCA blades. For Netra ATCA sun4v N1 or N2 blade, it needs a pseudo serial driver based on Solaris ldc support. A Solaris service will plumb the pseudo serial driver to load it. - On UltraSPARC-T1 ATCA blade, ldc IPMI channel (/devices/virtual-devices@100/ipmi@f:glvc) provides the serial link between host and service processor. A physical serial line links between SP and IPMC. - On UltraSPARC-T2 ATCA blade, ldc IPMI channel (/devices/virtual-devices@100/channel-devices@200/virtual-channel@3:ipmi) provides the serial link between host and service processor. A physical serial line links between SP and IPMC. ______________________ | | | LDC ipmi_serial | |______________________| | | __________|___________ | | | vldc or glvc | |______________________| | =============================================================================== | ********************* * * * Service Processor * ********************* | | ********************* * * * IPMC * ********************* For sun4v RF blades, the serial driver is based on tty support. Ttyb is added in FPGA (ttya is console) and will show up in OBP as a device. ______________________ | | | ipmi_serial | |______________________| | | =============================================================================== | ********************* * * * ttyb@FPGA * ********************* | | ********************* * * * IPMC * ********************* On Sun Netra ATCA x64 and x86 blades, a serial port (ttyb usually) is for IPMC access. ______________________ | | | ipmi_serial | |______________________| | | =============================================================================== | | ********************* * Serial * * port * ********************* | | ********************* * * * IPMC * ********************* 3. User Interfaces ------------------ 3.1 Driver Configuration User may specify following parameters in file ipmi_serial.conf for ipmi serial pseudo driver ____________________________________________________________________________ |service_channel | Evolving |Property in ipmi_serial.conf| | | |specify service channel | |_______________________|_______________________|____________________________| Driver will take default values if no service_channel in .conf. Example: service_channel="/devices/virtual-devices@100/channel-devices@200/virtual-channel@3:ipmi" 3.2 System Calls For user applications, IPMI driver supports - open(2) - close(2) - ioctl(2) - poll(2) Reminder, the IPMI messaging is done by ioctl(2) not read(2)/write(2). See OpenIPMI for the user programming guide. 3.2.1 Ioctl Requests The following ioctl requests are compatible to OpenIPMI's. #define IPMICTL_RECEIVE_MSG_TRUNC _IOWR(IPMI_IOC_MAGIC,\ RECEIVE_MSG_TRUNC,\ ipmi_recv_t) #define IPMICTL_RECEIVE_MSG _IOWR(IPMI_IOC_MAGIC,\ RECEIVE_MSG, \ ipmi_recv_t) #define IPMICTL_SEND_COMMAND _IOR(IPMI_IOC_MAGIC,\ SEND_CMD, \ ipmi_req_t) #define IPMICTL_REGISTER_FOR_CMD _IOR(IPMI_IOC_MAGIC,\ REGISTER_FOR_CMD, \ ipmi_command_t) #define IPMICTL_UNREGISTER_FOR_CMD _IOR(IPMI_IOC_MAGIC,\ UNREGISTER_FOR_CMD, \ ipmi_command_t) #define IPMICTL_SET_GETS_EVENTS_CMD _IOR(IPMI_IOC_MAGIC,\ SET_GETS_EVENTS_CMD, int) #define IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD \ _IOR(IPMI_IOC_MAGIC, 24, struct ipmi_channel_lun_address_set) #define IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD \ _IOR(IPMI_IOC_MAGIC, 25, struct ipmi_channel_lun_address_set) #define IPMICTL_SET_MY_CHANNEL_LUN_CMD \ _IOR(IPMI_IOC_MAGIC, 26, struct ipmi_channel_lun_address_set) #define IPMICTL_GET_MY_CHANNEL_LUN_CMD \ _IOR(IPMI_IOC_MAGIC, 27, struct ipmi_channel_lun_address_set) #define IPMICTL_SET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC,\ SET_MY_ADDRESS_CMD, uint_t) OR(IPMI_IOC_MAGIC, 25, struct ipmi_channel_lun_address_set) #define IPMICTL_GET_MY_ADDRESS_CMD _IOR(IPMI_IOC_MAGIC,\ GET_MY_ADDRESS_CMD, uint_t) #define IPMICTL_SET_MY_LUN_CMD _IOR(IPMI_IOC_MAGIC,\ SET_MY_LUN_CMD, uint_t) #define IPMICTL_GET_MY_LUN_CMD _IOR(IPMI_IOC_MAGIC,\ GET_MY_LUN_CMD, uint_t) #define IPMICTL_SEND_COMMAND_SETTIME _IOR(IPMI_IOC_MAGIC,\ SEND_COMMAND_SETTIM, \ ipmi_req_settime_t) #define IPMICTL_SET_TIMING_PARMS_CMD _IOR(IPMI_IOC_MAGIC,\ SET_TIMING_PARMS_CMD, \ ipmi_retry_parameter_t) #define IPMICTL_GET_TIMING_PARMS_CMD _IOR(IPMI_IOC_MAGIC,\ GET_TIMING_PARMS_CMD, \ ipmi_retry_parameter_t) while enum { RECEIVE_MSG_TRUNC = 11, RECEIVE_MSG, SEND_CMD, REGISTER_FOR_CMD, UNREGISTER_FOR_CMD, SET_GETS_EVENTS_CMD, SET_MY_ADDRESS_CMD, GET_MY_ADDRESS_CMD, SET_MY_LUN_CMD, GET_MY_LUN_CMD, /* 20 */ SEND_COMMAND_SETTIM, SET_TIMING_PARMS_CMD, /* 22 */ GET_TIMING_PARMS_CMD }; 3.2.2 Ioctl Args The following data structures used in ioctl args are compatible to OpenIPMI's typedef struct ipmi_msg { uchar_t netfn; uchar_t cmd; unsigned short data_len; uchar_t *data; } ipmi_msg_t; typedef struct ipmi_recv { int recv_type; unsigned char *addr; unsigned int addr_len; long msgid; ipmi_msg_t msg; } ipmi_recv_t; typedef struct ipmi_req { uchar_t *addr; uint_t addr_len; long msgid; ipmi_msg_t msg; } ipmi_req_t; typedef struct ipmi_cmdspec { unsigned char netfn; unsigned char cmd; } ipmi_command_t; typedef struct ipmi_timing_parms { int retries; unsigned int retry_time_ms; } ipmi_retry_parameter_t; typedef struct ipmi_req_settime { struct ipmi_req req; int retries; unsigned int retry_time_ms; } ipmi_req_settime_t; struct ipmi_channel_lun_address_set { unsigned short channel; unsigned char value; };