OpenBIC
OpenSource Bridge-IC
plat_pldm_monitor.c File Reference
#include <logging/log.h>
#include "sensor.h"
#include "hal_gpio.h"
#include "pldm.h"
#include "pmbus.h"
#include "plat_fru.h"
#include "plat_gpio.h"
#include "plat_pldm_monitor.h"
#include "plat_class.h"
#include "plat_led.h"
#include "plat_mctp.h"
Include dependency graph for plat_pldm_monitor.c:

Classes

struct  ssd_event_check
 

Macros

#define PLDM_OEM_ENTITY_LED   8192
 
#define PLDM_OEM_ENTITY_SSD_LED   8193
 
#define PLDM_OEM_ENTITY_NIC_TYPE   8194
 

Functions

 LOG_MODULE_REGISTER (plat_pldm_monitor)
 
void ssd_alert_check_ina230 (uint8_t idx, uint8_t *flag)
 
void ssd_alert_check_isl28022 (uint8_t idx, uint8_t *flag)
 
void ssd_alert_check_handler (struct k_work *work)
 
void ssd_alert_check (uint8_t group)
 
void ssd_present_check ()
 
void nic_present_check ()
 
void vr_status_mfr_specific_check_handler (struct k_work *work)
 
void vr_alert_check ()
 
uint8_t plat_pldm_set_state_effecter_state_handler (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len, struct pldm_state_effecter_info *info_p)
 
uint8_t plat_pldm_get_state_effecter_state_handler (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len, struct pldm_state_effecter_info *info_p)
 
void plat_pldm_load_state_effecter_table (void)
 

Variables

struct pldm_state_effecter_info plat_state_effecter_table []
 
uint8_t e1s_prsnt_pin [4][4]
 
uint8_t nic_prsnt_pin []
 
uint8_t pex_sensor_num_table []
 
uint8_t nic_power_ic_sensor_table []
 
uint8_t pex_1v25_power_ic_sensor_table []
 
uint8_t ssd_power_ic_sensor_table []
 
uint8_t e1s_sensor_table [SSD_MAX_NUMBER]
 
uint8_t nic_temp_sensor_table [NIC_MAX_NUMBER]
 
uint8_t nic_optics_sensor_table [NIC_MAX_NUMBER]
 

Macro Definition Documentation

◆ PLDM_OEM_ENTITY_LED

#define PLDM_OEM_ENTITY_LED   8192

◆ PLDM_OEM_ENTITY_NIC_TYPE

#define PLDM_OEM_ENTITY_NIC_TYPE   8194

◆ PLDM_OEM_ENTITY_SSD_LED

#define PLDM_OEM_ENTITY_SSD_LED   8193

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_pldm_monitor  )

◆ nic_present_check()

void nic_present_check ( )
Here is the call graph for this function:

◆ plat_pldm_get_state_effecter_state_handler()

uint8_t plat_pldm_get_state_effecter_state_handler ( const uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len,
struct pldm_state_effecter_info info_p 
)
Here is the call graph for this function:

◆ plat_pldm_load_state_effecter_table()

void plat_pldm_load_state_effecter_table ( void  )

◆ plat_pldm_set_state_effecter_state_handler()

uint8_t plat_pldm_set_state_effecter_state_handler ( const uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len,
struct pldm_state_effecter_info info_p 
)
Here is the call graph for this function:

◆ ssd_alert_check()

void ssd_alert_check ( uint8_t  group)

◆ ssd_alert_check_handler()

void ssd_alert_check_handler ( struct k_work *  work)

◆ ssd_alert_check_ina230()

void ssd_alert_check_ina230 ( uint8_t  idx,
uint8_t *  flag 
)
Here is the call graph for this function:

◆ ssd_alert_check_isl28022()

void ssd_alert_check_isl28022 ( uint8_t  idx,
uint8_t *  flag 
)
Here is the call graph for this function:

◆ ssd_present_check()

void ssd_present_check ( )
Here is the call graph for this function:

◆ vr_alert_check()

void vr_alert_check ( )
Here is the call graph for this function:

◆ vr_status_mfr_specific_check_handler()

void vr_status_mfr_specific_check_handler ( struct k_work *  work)

Get PMBUS_STATUS_MFR_SPECIFIC

Clear faults when bit ADCUNLOCK or BBEVENT is high

Here is the call graph for this function:

Variable Documentation

◆ e1s_prsnt_pin

uint8_t e1s_prsnt_pin[4][4]
Initial value:
= {
{ PRSNT_SSD0_R_N, PRSNT_SSD1_R_N, PRSNT_SSD2_R_N, PRSNT_SSD3_R_N },
{ PRSNT_SSD4_R_N, PRSNT_SSD5_R_N, PRSNT_SSD6_R_N, PRSNT_SSD7_R_N },
{ PRSNT_SSD8_R_N, PRSNT_SSD9_R_N, PRSNT_SSD10_R_N, PRSNT_SSD11_R_N },
{ PRSNT_SSD12_R_N, PRSNT_SSD13_R_N, PRSNT_SSD14_R_N, PRSNT_SSD15_R_N },
}

◆ e1s_sensor_table

uint8_t e1s_sensor_table[SSD_MAX_NUMBER]
Initial value:
= {
}
#define SENSOR_NUM_TEMP_E1S_1
Definition: plat_sensor_table.h:43
#define SENSOR_NUM_TEMP_E1S_4
Definition: plat_sensor_table.h:46
#define SENSOR_NUM_TEMP_E1S_3
Definition: plat_sensor_table.h:45
#define SENSOR_NUM_TEMP_E1S_2
Definition: plat_sensor_table.h:44
#define SENSOR_NUM_TEMP_E1S_7
Definition: plat_sensor_table.h:230
#define SENSOR_NUM_TEMP_E1S_12
Definition: plat_sensor_table.h:255
#define SENSOR_NUM_TEMP_E1S_11
Definition: plat_sensor_table.h:250
#define SENSOR_NUM_TEMP_E1S_10
Definition: plat_sensor_table.h:245
#define SENSOR_NUM_TEMP_E1S_14
Definition: plat_sensor_table.h:265
#define SENSOR_NUM_TEMP_E1S_5
Definition: plat_sensor_table.h:220
#define SENSOR_NUM_TEMP_E1S_8
Definition: plat_sensor_table.h:235
#define SENSOR_NUM_TEMP_E1S_13
Definition: plat_sensor_table.h:260
#define SENSOR_NUM_TEMP_E1S_9
Definition: plat_sensor_table.h:240
#define SENSOR_NUM_TEMP_E1S_15
Definition: plat_sensor_table.h:270
#define SENSOR_NUM_TEMP_E1S_0
Definition: plat_sensor_table.h:195
#define SENSOR_NUM_TEMP_E1S_6
Definition: plat_sensor_table.h:225

◆ nic_optics_sensor_table

uint8_t nic_optics_sensor_table[NIC_MAX_NUMBER]
Initial value:
= {
}
#define SENSOR_NUM_TEMP_NIC_OPTICS_3
Definition: plat_sensor_table.h:278
#define SENSOR_NUM_TEMP_NIC_OPTICS_2
Definition: plat_sensor_table.h:277
#define SENSOR_NUM_TEMP_NIC_OPTICS_5
Definition: plat_sensor_table.h:280
#define SENSOR_NUM_TEMP_NIC_OPTICS_6
Definition: plat_sensor_table.h:281
#define SENSOR_NUM_TEMP_NIC_OPTICS_0
Definition: plat_sensor_table.h:275
#define SENSOR_NUM_TEMP_NIC_OPTICS_4
Definition: plat_sensor_table.h:279
#define SENSOR_NUM_TEMP_NIC_OPTICS_1
Definition: plat_sensor_table.h:276
#define SENSOR_NUM_TEMP_NIC_OPTICS_7
Definition: plat_sensor_table.h:282

◆ nic_power_ic_sensor_table

uint8_t nic_power_ic_sensor_table[]
Initial value:
= {
}
#define SENSOR_NUM_VOLT_NIC_4
Definition: plat_sensor_table.h:114
#define SENSOR_NUM_VOLT_NIC_2
Definition: plat_sensor_table.h:104
#define SENSOR_NUM_VOLT_NIC_3
Definition: plat_sensor_table.h:109
#define SENSOR_NUM_VOLT_NIC_6
Definition: plat_sensor_table.h:124
#define SENSOR_NUM_VOLT_NIC_0
Definition: plat_sensor_table.h:94
#define SENSOR_NUM_VOLT_NIC_5
Definition: plat_sensor_table.h:119
#define SENSOR_NUM_VOLT_NIC_1
Definition: plat_sensor_table.h:99
#define SENSOR_NUM_VOLT_NIC_7
Definition: plat_sensor_table.h:129

◆ nic_prsnt_pin

uint8_t nic_prsnt_pin[]
Initial value:
= {
PRSNT_NIC0_R_N, PRSNT_NIC1_R_N, PRSNT_NIC2_R_N, PRSNT_NIC3_R_N,
PRSNT_NIC4_R_N, PRSNT_NIC5_R_N, PRSNT_NIC6_R_N, PRSNT_NIC7_R_N,
}

◆ nic_temp_sensor_table

uint8_t nic_temp_sensor_table[NIC_MAX_NUMBER]
Initial value:
= {
}
#define SENSOR_NUM_TEMP_NIC_1
Definition: plat_sensor_table.h:98
#define SENSOR_NUM_TEMP_NIC_3
Definition: plat_sensor_table.h:108
#define SENSOR_NUM_TEMP_NIC_6
Definition: plat_sensor_table.h:123
#define SENSOR_NUM_TEMP_NIC_0
Definition: plat_sensor_table.h:93
#define SENSOR_NUM_TEMP_NIC_4
Definition: plat_sensor_table.h:113
#define SENSOR_NUM_TEMP_NIC_7
Definition: plat_sensor_table.h:128
#define SENSOR_NUM_TEMP_NIC_5
Definition: plat_sensor_table.h:118
#define SENSOR_NUM_TEMP_NIC_2
Definition: plat_sensor_table.h:103

◆ pex_1v25_power_ic_sensor_table

uint8_t pex_1v25_power_ic_sensor_table[]
Initial value:
= {
}
#define SENSOR_NUM_P1V25_VOLT_PEX_0
Definition: plat_sensor_table.h:152
#define SENSOR_NUM_P1V25_VOLT_PEX_1
Definition: plat_sensor_table.h:160
#define SENSOR_NUM_P1V25_VOLT_PEX_2
Definition: plat_sensor_table.h:168
#define SENSOR_NUM_P1V25_VOLT_PEX_3
Definition: plat_sensor_table.h:176

◆ pex_sensor_num_table

uint8_t pex_sensor_num_table[]
Initial value:
= {
}
#define SENSOR_NUM_TEMP_PEX_0
Definition: plat_sensor_table.h:60
#define SENSOR_NUM_TEMP_PEX_1
Definition: plat_sensor_table.h:61
#define SENSOR_NUM_TEMP_PEX_2
Definition: plat_sensor_table.h:186
#define SENSOR_NUM_TEMP_PEX_3
Definition: plat_sensor_table.h:187

◆ plat_state_effecter_table

struct pldm_state_effecter_info plat_state_effecter_table[]

◆ ssd_power_ic_sensor_table

uint8_t ssd_power_ic_sensor_table[]
Initial value:
= {
}
#define SENSOR_NUM_VOLT_E1S_9
Definition: plat_sensor_table.h:241
#define SENSOR_NUM_VOLT_E1S_4
Definition: plat_sensor_table.h:216
#define SENSOR_NUM_VOLT_E1S_0
Definition: plat_sensor_table.h:196
#define SENSOR_NUM_VOLT_E1S_15
Definition: plat_sensor_table.h:271
#define SENSOR_NUM_VOLT_E1S_1
Definition: plat_sensor_table.h:201
#define SENSOR_NUM_VOLT_E1S_13
Definition: plat_sensor_table.h:261
#define SENSOR_NUM_VOLT_E1S_11
Definition: plat_sensor_table.h:251
#define SENSOR_NUM_VOLT_E1S_8
Definition: plat_sensor_table.h:236
#define SENSOR_NUM_VOLT_E1S_3
Definition: plat_sensor_table.h:211
#define SENSOR_NUM_VOLT_E1S_14
Definition: plat_sensor_table.h:266
#define SENSOR_NUM_VOLT_E1S_12
Definition: plat_sensor_table.h:256
#define SENSOR_NUM_VOLT_E1S_10
Definition: plat_sensor_table.h:246
#define SENSOR_NUM_VOLT_E1S_5
Definition: plat_sensor_table.h:221
#define SENSOR_NUM_VOLT_E1S_6
Definition: plat_sensor_table.h:226
#define SENSOR_NUM_VOLT_E1S_7
Definition: plat_sensor_table.h:231
#define SENSOR_NUM_VOLT_E1S_2
Definition: plat_sensor_table.h:206