OpenBIC
OpenSource Bridge-IC
plat_isr.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <logging/log.h>
#include "libipmi.h"
#include "kcs.h"
#include "power_status.h"
#include "sensor.h"
#include "snoop.h"
#include "plat_gpio.h"
#include "plat_ipmi.h"
#include "plat_sensor_table.h"
#include "oem_1s_handler.h"
#include "hal_gpio.h"
#include "util_sys.h"
#include "pex89000.h"
#include "pldm.h"
#include "plat_mctp.h"
#include "plat_hook.h"
#include "plat_pldm_monitor.h"
#include "plat_led.h"
#include "plat_pldm_fw_update.h"
#include "plat_class.h"
Include dependency graph for plat_isr.c:

Macros

#define DC_ON_5_SECOND   5
 
#define DC_ON_PEX_INIT_RETRY   5
 
#define ISR_SSD_PRESENT_HANDLER(idx)
 

Functions

 LOG_MODULE_REGISTER (plat_isr)
 
void dc_on_init_pex ()
 
void dc_on_send_cmd_to_dev ()
 
 K_WORK_DELAYABLE_DEFINE (dc_on_init_pex_work, dc_on_init_pex)
 
 K_WORK_DELAYABLE_DEFINE (dc_on_send_cmd_to_dev_work, dc_on_send_cmd_to_dev)
 
 K_WORK_DEFINE (vr_status_mfr_specific_check_work, vr_status_mfr_specific_check_handler)
 
void ISR_DC_ON ()
 
void ISR_NIC_ADC_ALERT ()
 
void ISR_SSD_0_7_ADC_ALERT ()
 
void ISR_SSD_8_15_ADC_ALERT ()
 
void ISR_PEX_ADC_ALERT ()
 
void ISR_SMB_FPGA_ALERT ()
 
void ISR_VR_PMBUS_ALERT ()
 
void ISR_HSC_SMB_ALERT ()
 
 ISR_SSD_PRESENT_HANDLER (0)
 
 ISR_SSD_PRESENT_HANDLER (1)
 
 ISR_SSD_PRESENT_HANDLER (2)
 
 ISR_SSD_PRESENT_HANDLER (3)
 
 ISR_SSD_PRESENT_HANDLER (4)
 
 ISR_SSD_PRESENT_HANDLER (5)
 
 ISR_SSD_PRESENT_HANDLER (6)
 
 ISR_SSD_PRESENT_HANDLER (7)
 
 ISR_SSD_PRESENT_HANDLER (8)
 
 ISR_SSD_PRESENT_HANDLER (9)
 
 ISR_SSD_PRESENT_HANDLER (10)
 
 ISR_SSD_PRESENT_HANDLER (11)
 
 ISR_SSD_PRESENT_HANDLER (12)
 
 ISR_SSD_PRESENT_HANDLER (13)
 
 ISR_SSD_PRESENT_HANDLER (14)
 
 ISR_SSD_PRESENT_HANDLER (15)
 

Macro Definition Documentation

◆ DC_ON_5_SECOND

#define DC_ON_5_SECOND   5

◆ DC_ON_PEX_INIT_RETRY

#define DC_ON_PEX_INIT_RETRY   5

◆ ISR_SSD_PRESENT_HANDLER

#define ISR_SSD_PRESENT_HANDLER (   idx)
Value:
void ISR_SSD##idx##_PRESENT() \
{ \
bool is_present = !gpio_get(e1s_prsnt_pin[idx / 4][idx % 4]); \
\
event.sensor_offset = PLDM_STATE_SET_OFFSET_DEVICE_PRESENCE; \
event.event_state = \
event.previous_event_state = \
\
PLDM_SENSOR_EVENT, PLDM_EVENT_SENSOR_E1S_##idx, \
LOG_ERR("Send SSD%d presence event log failed", idx); \
} \
}
uint8_t idx
Definition: plat_util.c:39
@ PLDM_STATE_SET_OFFSET_DEVICE_PRESENCE
Definition: plat_pldm_monitor.h:146
uint8_t e1s_prsnt_pin[4][4]
Definition: plat_pldm_monitor.c:119
int gpio_get(uint8_t gpio_num)
Definition: hal_gpio.c:261
uint8_t pldm_send_platform_event(uint8_t event_class, uint16_t id, uint8_t ext_class, const uint8_t *event_data, uint8_t event_data_length)
Definition: pldm_monitor.c:460
@ PLDM_STATE_SENSOR_STATE
Definition: pldm_monitor.h:236
@ PLDM_SENSOR_EVENT
Definition: pldm_monitor.h:225
@ PLDM_STATE_SET_NOT_PRESENT
Definition: pldm_state_set.h:30
@ PLDM_STATE_SET_PRESENT
Definition: pldm_state_set.h:29
struct sel_event_record event
Definition: storage_handler.h:1
Definition: pldm_monitor.h:294

Function Documentation

◆ dc_on_init_pex()

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

◆ dc_on_send_cmd_to_dev()

void dc_on_send_cmd_to_dev ( )

Call function to set endpoint and get parameters for the device, the function description is as defined by zephyr but argument is not used in this function so put NULL here.

Here is the call graph for this function:

◆ ISR_DC_ON()

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

◆ ISR_HSC_SMB_ALERT()

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

◆ ISR_NIC_ADC_ALERT()

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

◆ ISR_PEX_ADC_ALERT()

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

◆ ISR_SMB_FPGA_ALERT()

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

◆ ISR_SSD_0_7_ADC_ALERT()

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

◆ ISR_SSD_8_15_ADC_ALERT()

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

◆ ISR_SSD_PRESENT_HANDLER() [1/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_SSD_PRESENT_HANDLER() [2/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_SSD_PRESENT_HANDLER() [3/16]

ISR_SSD_PRESENT_HANDLER ( 10  )

◆ ISR_SSD_PRESENT_HANDLER() [4/16]

ISR_SSD_PRESENT_HANDLER ( 11  )

◆ ISR_SSD_PRESENT_HANDLER() [5/16]

ISR_SSD_PRESENT_HANDLER ( 12  )

◆ ISR_SSD_PRESENT_HANDLER() [6/16]

ISR_SSD_PRESENT_HANDLER ( 13  )

◆ ISR_SSD_PRESENT_HANDLER() [7/16]

ISR_SSD_PRESENT_HANDLER ( 14  )

◆ ISR_SSD_PRESENT_HANDLER() [8/16]

ISR_SSD_PRESENT_HANDLER ( 15  )

◆ ISR_SSD_PRESENT_HANDLER() [9/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_SSD_PRESENT_HANDLER() [10/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_SSD_PRESENT_HANDLER() [11/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_SSD_PRESENT_HANDLER() [12/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_SSD_PRESENT_HANDLER() [13/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_SSD_PRESENT_HANDLER() [14/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_SSD_PRESENT_HANDLER() [15/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_SSD_PRESENT_HANDLER() [16/16]

ISR_SSD_PRESENT_HANDLER ( )

◆ ISR_VR_PMBUS_ALERT()

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

◆ K_WORK_DEFINE()

K_WORK_DEFINE ( vr_status_mfr_specific_check_work  ,
vr_status_mfr_specific_check_handler   
)

◆ K_WORK_DELAYABLE_DEFINE() [1/2]

K_WORK_DELAYABLE_DEFINE ( dc_on_init_pex_work  ,
dc_on_init_pex   
)

◆ K_WORK_DELAYABLE_DEFINE() [2/2]

K_WORK_DELAYABLE_DEFINE ( dc_on_send_cmd_to_dev_work  ,
dc_on_send_cmd_to_dev   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_isr  )