OpenBIC
OpenSource Bridge-IC
ncsi.h File Reference
#include "mctp.h"
Include dependency graph for ncsi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _ncsi_msg
 
struct  _ncsi
 
struct  clear_initial_state_req
 
struct  clear_initial_state_resp
 
struct  get_infiniband_link_status_req
 
struct  get_infiniband_link_status_resp
 

Macros

#define MONITOR_THREAD_STACK_SIZE   1024
 
#define NCSI_PAYLOAD_LENGTH_MAX   0xFFF
 
#define NCSI_PAYLOAD_LENGTH_LOW_MASK   0xFF
 
#define NCSI_PAYLOAD_LENGTH_HIGH_MASK   0xF00
 
#define NCSI_CHECHSUM_LENGTH   4
 

Typedefs

typedef struct _ncsi_msg ncsi_msg
 
typedef struct _ncsi ncsi_t
 

Enumerations

enum  NCSI_CMD { NCSI_OEM = 0x50 }
 
enum  ncsi_response_codes {
  NCSI_COMMAND_COMPLETED = 0x0000 , NCSI_COMMAND_FAILED = 0x0001 , NCSI_COMMAND_UNAVAILABLE = 0x0002 , NCSI_COMMAND_UNSUPPORTED = 0x0003 ,
  NCSI_DELAYED_RESPONSE = 0x0004
}
 
enum  ncsi_reason_codes {
  NCSI_NO_ERROR = 0x0000 , NCSI_INTERFACE_INITIALIZAION_REQUIRED = 0x0001 , NCSI_PARAMETER_IS_INVALID = 0x0002 , NCSI_CHANNEL_NOT_READY = 0x0003 ,
  NCSI_PACKAGE_NOT_READY = 0x0004 , NCSI_INVALID_PAYLOAD_LENGTH = 0x0005 , NCSI_INFORMATION_NOT_AVAILABLE = 0x0006 , NCSI_INTERVENTION_REQUIRED = 0x0007 ,
  NCSI_LINK_COMMANDS_FAILED_HARDWARE_ACCESS_ERROR = 0x0008 , NCSI_COMMAND_TIMEOUT = 0x0009 , NCSI_SECONDARY_DEVICE_NOT_POWERED = 0x000A , NCSI_UNSUPPORTED_COMMAND_TYPE = 0x7FFF
}
 
enum  ncsi_command_codes { NCSI_COMMAND_CLEAR_INITIAL_STATE = 0x00 , NCSI_COMMAND_GET_INFINIBAND_LINK_STATUS = 0x38 , NCSI_COMMAND_OEM = 0x50 }
 
enum  ncsi_command_rq { NCSI_COMMAND_REQUEST = 0x00 , NCSI_COMMAND_RESPONSE = 0x01 }
 
enum  infiniband_link_status_link_type { NCSI_IB_LINK_TYPE_ETHERNET = 0x00 , NCSI_IB_LINK_TYPE_INFINIBAND = 0x01 , NCSI_IB_LINK_TYPE_UNKNOWN = 0xFF }
 

Functions

struct __attribute__ ((packed))
 
uint8_t mctp_ncsi_send_msg (void *mctp_p, ncsi_msg *msg)
 
uint8_t mctp_ncsi_cmd_handler (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params ext_params)
 
uint16_t mctp_ncsi_read (void *mctp_p, ncsi_msg *msg, uint8_t *rbuf, uint16_t rbuf_len)
 

Variables

 ncsi_hdr
 
uint32_t checksum
 
uint16_t response_code
 
uint16_t reason_code
 
uint8_t ib_link_active_width
 
uint8_t ib_link_supported_width
 
uint8_t link_type
 
uint8_t log_state
 
uint8_t phys_state
 
uint8_t reserved1
 
uint8_t ib_link_active_speed
 
uint8_t reserved2
 
uint8_t ib_link_supported_speed
 

Macro Definition Documentation

◆ MONITOR_THREAD_STACK_SIZE

#define MONITOR_THREAD_STACK_SIZE   1024

◆ NCSI_CHECHSUM_LENGTH

#define NCSI_CHECHSUM_LENGTH   4

◆ NCSI_PAYLOAD_LENGTH_HIGH_MASK

#define NCSI_PAYLOAD_LENGTH_HIGH_MASK   0xF00

◆ NCSI_PAYLOAD_LENGTH_LOW_MASK

#define NCSI_PAYLOAD_LENGTH_LOW_MASK   0xFF

◆ NCSI_PAYLOAD_LENGTH_MAX

#define NCSI_PAYLOAD_LENGTH_MAX   0xFFF

Typedef Documentation

◆ ncsi_msg

typedef struct _ncsi_msg ncsi_msg

◆ ncsi_t

typedef struct _ncsi ncsi_t

Enumeration Type Documentation

◆ infiniband_link_status_link_type

Enumerator
NCSI_IB_LINK_TYPE_ETHERNET 
NCSI_IB_LINK_TYPE_INFINIBAND 
NCSI_IB_LINK_TYPE_UNKNOWN 

◆ NCSI_CMD

enum NCSI_CMD
Enumerator
NCSI_OEM 

◆ ncsi_command_codes

Enumerator
NCSI_COMMAND_CLEAR_INITIAL_STATE 
NCSI_COMMAND_GET_INFINIBAND_LINK_STATUS 
NCSI_COMMAND_OEM 

◆ ncsi_command_rq

Enumerator
NCSI_COMMAND_REQUEST 
NCSI_COMMAND_RESPONSE 

◆ ncsi_reason_codes

Enumerator
NCSI_NO_ERROR 
NCSI_INTERFACE_INITIALIZAION_REQUIRED 
NCSI_PARAMETER_IS_INVALID 
NCSI_CHANNEL_NOT_READY 
NCSI_PACKAGE_NOT_READY 
NCSI_INVALID_PAYLOAD_LENGTH 
NCSI_INFORMATION_NOT_AVAILABLE 
NCSI_INTERVENTION_REQUIRED 
NCSI_LINK_COMMANDS_FAILED_HARDWARE_ACCESS_ERROR 
NCSI_COMMAND_TIMEOUT 
NCSI_SECONDARY_DEVICE_NOT_POWERED 
NCSI_UNSUPPORTED_COMMAND_TYPE 

◆ ncsi_response_codes

Enumerator
NCSI_COMMAND_COMPLETED 
NCSI_COMMAND_FAILED 
NCSI_COMMAND_UNAVAILABLE 
NCSI_COMMAND_UNSUPPORTED 
NCSI_DELAYED_RESPONSE 

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed)  )

◆ mctp_ncsi_cmd_handler()

uint8_t mctp_ncsi_cmd_handler ( void *  mctp_p,
uint8_t *  buf,
uint32_t  len,
mctp_ext_params  ext_params 
)

◆ mctp_ncsi_read()

uint16_t mctp_ncsi_read ( void *  mctp_p,
ncsi_msg msg,
uint8_t *  rbuf,
uint16_t  rbuf_len 
)

◆ mctp_ncsi_send_msg()

uint8_t mctp_ncsi_send_msg ( void *  mctp_p,
ncsi_msg msg 
)

Variable Documentation

◆ checksum

uint32_t checksum

◆ ib_link_active_speed

uint8_t ib_link_active_speed

◆ ib_link_active_width

uint8_t ib_link_active_width

◆ ib_link_supported_speed

uint8_t ib_link_supported_speed

◆ ib_link_supported_width

uint8_t ib_link_supported_width

◆ link_type

uint8_t link_type

◆ log_state

uint8_t log_state

◆ ncsi_hdr

ncsi_hdr

◆ phys_state

uint8_t phys_state

◆ reason_code

uint16_t reason_code

◆ reserved1

uint8_t reserved1

◆ reserved2

uint8_t reserved2

◆ response_code

uint16_t response_code