OpenBIC
OpenSource Bridge-IC
apml.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _mailbox_WrData_
 
struct  _mailbox_RdData_
 
struct  _cpuid_WrData_
 
struct  _cpuid_WrData_TwoPOne_
 
struct  _cpuid_RdData_
 
struct  _mca_WrData_
 
struct  _mca_WrData_TwoPOne
 
struct  _mca_RdData_
 
struct  _apml_buffer_
 

Macros

#define APML_SUCCESS   0
 
#define APML_ERROR   1
 
#define RMI_SOFT_RESET_BIT   BIT(0)
 
#define SB_TSI_ADDR   0x4C
 
#define SB_RMI_ADDR   0x3C
 
#define SBRMI_CMD_CODE_LEN_DEFAULT   1
 
#define SBRMI_CMD_CODE_LEN_TWO_BYTE   2
 
#define SBRMI_REV_BRTH   0x21
 
#define APML_BUS_UNKNOWN   0xFF
 

Typedefs

typedef struct _mailbox_WrData_ mailbox_WrData
 
typedef struct _mailbox_RdData_ mailbox_RdData
 
typedef struct _cpuid_WrData_ cpuid_WrData
 
typedef struct _cpuid_WrData_TwoPOne_ cpuid_WrData_TwoPOne
 
typedef struct _cpuid_RdData_ cpuid_RdData
 
typedef struct _mca_WrData_ mca_WrData
 
typedef struct _mca_WrData_TwoPOne mca_WrData_TwoPOne
 
typedef struct _mca_RdData_ mca_RdData
 
typedef struct _apml_buffer_ apml_buffer
 

Enumerations

enum  APML_MSG_TYPE { APML_MSG_TYPE_MAILBOX , APML_MSG_TYPE_CPUID , APML_MSG_TYPE_MCA }
 
enum  SBRMI_MAILBOX_CMD {
  SBRMI_MAILBOX_PKGPWR = 0x01 , SBRMI_MAILBOX_WRITE_DRAM_THROTTLE = 0x0D , SBRMI_MAILBOX_REPORT_DIMM_POWER = 0x40 , SBRMI_MAILBOX_REPORT_DIMM_TEMP = 0x41 ,
  SBRMI_MAILBOX_GET_DIMM_PWR = 0x47 , SBRMI_MAILBOX_GET_DIMM_TEMP = 0x48
}
 
enum  SBTSI_REGISTER {
  SBTSI_CPU_TEMP_INT = 0x01 , SBTSI_STATUS = 0x02 , SBTSI_CONFIG = 0x03 , SBTSI_UPDATE_RATE = 0x04 ,
  SBTSI_HIGH_TEMP_INTEGER_THRESHOLD = 0x07 , SBTSI_CONFIG_WRITE = 0x09 , SBTSI_CPU_TEMP_DEC = 0x10
}
 
enum  SBRMI_MAILBOX_ERR_CODE { SBRMI_MAILBOX_NO_ERR = 0x00 , SBRMI_MAILBOX_CMD_ABORT = 0x01 , SBRMI_MAILBOX_UNKNOWN_CMD = 0x02 , SBRMI_MAILBOX_INVALID_CORE = 0x03 }
 
enum  SBRMI_REGISTER {
  SBRMI_REVISION = 0x00 , SBRMI_CONTROL = 0x01 , SBRMI_STATUS = 0x02 , SBRMI_OUTBANDMSG_INST0 = 0x30 ,
  SBRMI_OUTBANDMSG_INST1 = 0x31 , SBRMI_OUTBANDMSG_INST2 = 0x32 , SBRMI_OUTBANDMSG_INST3 = 0x33 , SBRMI_OUTBANDMSG_INST4 = 0x34 ,
  SBRMI_OUTBANDMSG_INST5 = 0x35 , SBRMI_OUTBANDMSG_INST6 = 0x36 , SBRMI_OUTBANDMSG_INST7 = 0x37 , SBRMI_INBANDMSG_INST0 = 0x38 ,
  SBRMI_INBANDMSG_INST1 = 0x39 , SBRMI_INBANDMSG_INST2 = 0x3A , SBRMI_INBANDMSG_INST3 = 0x3B , SBRMI_INBANDMSG_INST4 = 0x3C ,
  SBRMI_INBANDMSG_INST5 = 0x3D , SBRMI_INBANDMSG_INST6 = 0x3E , SBRMI_INBANDMSG_INST7 = 0x3F , SBRMI_SOFTWARE_INTERRUPT = 0x40 ,
  SBRMI_RAS_STATUS = 0x4C
}
 

Functions

typedef __aligned (4) struct _apml_msg_
 
uint8_t apml_read_byte (uint8_t bus, uint8_t addr, uint8_t offset, uint8_t *read_data)
 
uint8_t apml_write_byte (uint8_t bus, uint8_t addr, uint8_t offset, uint8_t write_data)
 
void apml_request_callback (apml_msg *msg)
 
uint8_t get_apml_response_by_index (apml_msg *msg, uint8_t index)
 
uint8_t apml_read (apml_msg *msg)
 
void apml_init ()
 
void fatal_error_happened ()
 
void apml_recovery ()
 
int pal_check_sbrmi_command_code_length ()
 
uint8_t pal_get_apml_bus ()
 
uint8_t apml_get_bus ()
 
int set_sbrmi_command_code_len (uint8_t value)
 
int get_sbrmi_command_code_len ()
 
void disable_mailbox_completion_alert ()
 
void enable_alert_signal ()
 

Variables

__packed apml_msg
 

Macro Definition Documentation

◆ APML_BUS_UNKNOWN

#define APML_BUS_UNKNOWN   0xFF

◆ APML_ERROR

#define APML_ERROR   1

◆ APML_SUCCESS

#define APML_SUCCESS   0

◆ RMI_SOFT_RESET_BIT

#define RMI_SOFT_RESET_BIT   BIT(0)

◆ SB_RMI_ADDR

#define SB_RMI_ADDR   0x3C

◆ SB_TSI_ADDR

#define SB_TSI_ADDR   0x4C

◆ SBRMI_CMD_CODE_LEN_DEFAULT

#define SBRMI_CMD_CODE_LEN_DEFAULT   1

◆ SBRMI_CMD_CODE_LEN_TWO_BYTE

#define SBRMI_CMD_CODE_LEN_TWO_BYTE   2

◆ SBRMI_REV_BRTH

#define SBRMI_REV_BRTH   0x21

Typedef Documentation

◆ apml_buffer

typedef struct _apml_buffer_ apml_buffer

◆ cpuid_RdData

typedef struct _cpuid_RdData_ cpuid_RdData

◆ cpuid_WrData

typedef struct _cpuid_WrData_ cpuid_WrData

◆ cpuid_WrData_TwoPOne

◆ mailbox_RdData

◆ mailbox_WrData

◆ mca_RdData

typedef struct _mca_RdData_ mca_RdData

◆ mca_WrData

typedef struct _mca_WrData_ mca_WrData

◆ mca_WrData_TwoPOne

Enumeration Type Documentation

◆ APML_MSG_TYPE

Enumerator
APML_MSG_TYPE_MAILBOX 
APML_MSG_TYPE_CPUID 
APML_MSG_TYPE_MCA 

◆ SBRMI_MAILBOX_CMD

Enumerator
SBRMI_MAILBOX_PKGPWR 
SBRMI_MAILBOX_WRITE_DRAM_THROTTLE 
SBRMI_MAILBOX_REPORT_DIMM_POWER 
SBRMI_MAILBOX_REPORT_DIMM_TEMP 
SBRMI_MAILBOX_GET_DIMM_PWR 
SBRMI_MAILBOX_GET_DIMM_TEMP 

◆ SBRMI_MAILBOX_ERR_CODE

Enumerator
SBRMI_MAILBOX_NO_ERR 
SBRMI_MAILBOX_CMD_ABORT 
SBRMI_MAILBOX_UNKNOWN_CMD 
SBRMI_MAILBOX_INVALID_CORE 

◆ SBRMI_REGISTER

Enumerator
SBRMI_REVISION 
SBRMI_CONTROL 
SBRMI_STATUS 
SBRMI_OUTBANDMSG_INST0 
SBRMI_OUTBANDMSG_INST1 
SBRMI_OUTBANDMSG_INST2 
SBRMI_OUTBANDMSG_INST3 
SBRMI_OUTBANDMSG_INST4 
SBRMI_OUTBANDMSG_INST5 
SBRMI_OUTBANDMSG_INST6 
SBRMI_OUTBANDMSG_INST7 
SBRMI_INBANDMSG_INST0 
SBRMI_INBANDMSG_INST1 
SBRMI_INBANDMSG_INST2 
SBRMI_INBANDMSG_INST3 
SBRMI_INBANDMSG_INST4 
SBRMI_INBANDMSG_INST5 
SBRMI_INBANDMSG_INST6 
SBRMI_INBANDMSG_INST7 
SBRMI_SOFTWARE_INTERRUPT 
SBRMI_RAS_STATUS 

◆ SBTSI_REGISTER

Enumerator
SBTSI_CPU_TEMP_INT 
SBTSI_STATUS 
SBTSI_CONFIG 
SBTSI_UPDATE_RATE 
SBTSI_HIGH_TEMP_INTEGER_THRESHOLD 
SBTSI_CONFIG_WRITE 
SBTSI_CPU_TEMP_DEC 

Function Documentation

◆ __aligned()

typedef __aligned ( )

◆ apml_get_bus()

uint8_t apml_get_bus ( )

◆ apml_init()

void apml_init ( )

◆ apml_read()

uint8_t apml_read ( apml_msg msg)

◆ apml_read_byte()

uint8_t apml_read_byte ( uint8_t  bus,
uint8_t  addr,
uint8_t  offset,
uint8_t *  read_data 
)

◆ apml_recovery()

void apml_recovery ( )

◆ apml_request_callback()

void apml_request_callback ( apml_msg msg)

◆ apml_write_byte()

uint8_t apml_write_byte ( uint8_t  bus,
uint8_t  addr,
uint8_t  offset,
uint8_t  write_data 
)

◆ disable_mailbox_completion_alert()

void disable_mailbox_completion_alert ( )

◆ enable_alert_signal()

void enable_alert_signal ( )

◆ fatal_error_happened()

void fatal_error_happened ( )

◆ get_apml_response_by_index()

uint8_t get_apml_response_by_index ( apml_msg msg,
uint8_t  index 
)

◆ get_sbrmi_command_code_len()

int get_sbrmi_command_code_len ( )

◆ pal_check_sbrmi_command_code_length()

int pal_check_sbrmi_command_code_length ( )
Here is the call graph for this function:

◆ pal_get_apml_bus()

uint8_t pal_get_apml_bus ( )
Here is the call graph for this function:

◆ set_sbrmi_command_code_len()

int set_sbrmi_command_code_len ( uint8_t  value)

Variable Documentation

◆ apml_msg

__packed apml_msg