OpenBIC
OpenSource Bridge-IC
plat_isr.c File Reference
#include <stdlib.h>
#include "plat_isr.h"
#include "plat_gpio.h"
#include "plat_sensor_table.h"
#include "plat_mctp.h"
#include "plat_class.h"
#include "plat_power_status.h"
#include "plat_i2c.h"
#include "plat_fru.h"
#include "power_status.h"
#include "ipmi.h"
#include "pldm.h"
#include "ssif.h"
#include "sbmr.h"
#include "pmbus.h"
#include "util_worker.h"
#include "libutil.h"
#include "libipmi.h"
#include "logging/log.h"
Include dependency graph for plat_isr.c:

Macros

#define IPMI_SYS_EVENT_OFFSET_RETIMER_FAULT   0x17
 
#define SATMC_POLL_INTERVAL   4000
 
#define SATMC_POLL_THREAD_STACK_SIZE   1024
 
#define POST_DOWN_2_SECOND   2
 
#define CPLD_CPU_POWER_SEQ_STATE   0x11
 
#define CPU_SHDN_STATE   0x07
 
#define IPMI_SYS_EVENT_OFFSET_CPU_THERM_TRIP_OR_VR_HOT   0x16
 
#define DC_ON_5_SECOND   5
 
#define PROC_FAIL_START_DELAY_SECOND   10
 

Functions

 LOG_MODULE_REGISTER (plat_isr)
 
void send_gpio_interrupt (uint8_t gpio_num)
 
void ISR_E1S_ALERT ()
 
void ISR_RTC_ALERT ()
 
 K_KERNEL_STACK_MEMBER (satmc_poll_thread_stack, SATMC_POLL_THREAD_STACK_SIZE)
 
void start_satmc_access_poll ()
 
void check_host_reboot_status ()
 
 K_WORK_DELAYABLE_DEFINE (check_host_reboot_work, check_host_reboot_status)
 
void ISR_POST_COMPLETE ()
 
void ISR_GPIOA5 ()
 
void ISR_GPIOA6 ()
 
void ISR_GPIOB0 ()
 
void ISR_RTC_CLR ()
 
void ISR_HSC_OC ()
 
void ISR_GPIOC1 ()
 
void ISR_GPIOC3 ()
 
void ISR_GPIOC4 ()
 
void ISR_GPIOD0 ()
 
 K_WORK_DELAYABLE_DEFINE (read_cpu_power_seq_status_work, read_cpu_power_seq_status)
 
 K_WORK_DELAYABLE_DEFINE (set_DC_on_5s_work, set_DC_on_delayed_status)
 
 K_WORK_DELAYABLE_DEFINE (PROC_FAIL_work, PROC_FAIL_handler)
 
 K_WORK_DELAYABLE_DEFINE (check_retimer_status_work, check_retimer_status)
 
void ISR_PWRGD_CPU ()
 
void ISR_GPIOE2 ()
 
void ISR_HSC_THROTTLE ()
 
void ISR_GPIOE4 ()
 
void ISR_GPIOE5 ()
 
void ISR_GPIOE6 ()
 
void ISR_GPIOE7 ()
 
void ISR_CPU_HIGHTEMP ()
 
void ISR_CPU_OVERTEMP ()
 
void ISR_CPU_FAULT_ALERT ()
 
void ISR_GPIOF3 ()
 
void ISR_GPIOF4 ()
 
void ISR_GPIOF6 ()
 
void ISR_GPIOF7 ()
 
void ISR_MB_THROTTLE ()
 
void ISR_GPIOH0 ()
 
void ISR_GPIOH1 ()
 
void ISR_SYS_THROTTLE ()
 
 K_WORK_DELAYABLE_DEFINE (check_cpu_status_work, check_cpu_status)
 
void ISR_RETIMER_FAULT ()
 

Variables

struct k_thread satmc_poll_thread
 

Macro Definition Documentation

◆ CPLD_CPU_POWER_SEQ_STATE

#define CPLD_CPU_POWER_SEQ_STATE   0x11

◆ CPU_SHDN_STATE

#define CPU_SHDN_STATE   0x07

◆ DC_ON_5_SECOND

#define DC_ON_5_SECOND   5

◆ IPMI_SYS_EVENT_OFFSET_CPU_THERM_TRIP_OR_VR_HOT

#define IPMI_SYS_EVENT_OFFSET_CPU_THERM_TRIP_OR_VR_HOT   0x16

◆ IPMI_SYS_EVENT_OFFSET_RETIMER_FAULT

#define IPMI_SYS_EVENT_OFFSET_RETIMER_FAULT   0x17

◆ POST_DOWN_2_SECOND

#define POST_DOWN_2_SECOND   2

◆ PROC_FAIL_START_DELAY_SECOND

#define PROC_FAIL_START_DELAY_SECOND   10

◆ SATMC_POLL_INTERVAL

#define SATMC_POLL_INTERVAL   4000

◆ SATMC_POLL_THREAD_STACK_SIZE

#define SATMC_POLL_THREAD_STACK_SIZE   1024

Function Documentation

◆ check_host_reboot_status()

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

◆ ISR_CPU_FAULT_ALERT()

void ISR_CPU_FAULT_ALERT ( )

◆ ISR_CPU_HIGHTEMP()

void ISR_CPU_HIGHTEMP ( )

◆ ISR_CPU_OVERTEMP()

void ISR_CPU_OVERTEMP ( )

◆ ISR_E1S_ALERT()

void ISR_E1S_ALERT ( )

◆ ISR_GPIOA5()

void ISR_GPIOA5 ( )

◆ ISR_GPIOA6()

void ISR_GPIOA6 ( )

◆ ISR_GPIOB0()

void ISR_GPIOB0 ( )

◆ ISR_GPIOC1()

void ISR_GPIOC1 ( )

◆ ISR_GPIOC3()

void ISR_GPIOC3 ( )

◆ ISR_GPIOC4()

void ISR_GPIOC4 ( )

◆ ISR_GPIOD0()

void ISR_GPIOD0 ( )

◆ ISR_GPIOE2()

void ISR_GPIOE2 ( )

◆ ISR_GPIOE4()

void ISR_GPIOE4 ( )

◆ ISR_GPIOE5()

void ISR_GPIOE5 ( )

◆ ISR_GPIOE6()

void ISR_GPIOE6 ( )

◆ ISR_GPIOE7()

void ISR_GPIOE7 ( )

◆ ISR_GPIOF3()

void ISR_GPIOF3 ( )

◆ ISR_GPIOF4()

void ISR_GPIOF4 ( )

◆ ISR_GPIOF6()

void ISR_GPIOF6 ( )

◆ ISR_GPIOF7()

void ISR_GPIOF7 ( )

◆ ISR_GPIOH0()

void ISR_GPIOH0 ( )

◆ ISR_GPIOH1()

void ISR_GPIOH1 ( )

◆ ISR_HSC_OC()

void ISR_HSC_OC ( )

◆ ISR_HSC_THROTTLE()

void ISR_HSC_THROTTLE ( )

◆ ISR_MB_THROTTLE()

void ISR_MB_THROTTLE ( )

◆ ISR_POST_COMPLETE()

void ISR_POST_COMPLETE ( )

◆ ISR_PWRGD_CPU()

void ISR_PWRGD_CPU ( )

◆ ISR_RETIMER_FAULT()

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

◆ ISR_RTC_ALERT()

void ISR_RTC_ALERT ( )

◆ ISR_RTC_CLR()

void ISR_RTC_CLR ( )

◆ ISR_SYS_THROTTLE()

void ISR_SYS_THROTTLE ( )

◆ K_KERNEL_STACK_MEMBER()

K_KERNEL_STACK_MEMBER ( satmc_poll_thread_stack  ,
SATMC_POLL_THREAD_STACK_SIZE   
)

◆ K_WORK_DELAYABLE_DEFINE() [1/6]

K_WORK_DELAYABLE_DEFINE ( check_cpu_status_work  ,
check_cpu_status   
)

◆ K_WORK_DELAYABLE_DEFINE() [2/6]

K_WORK_DELAYABLE_DEFINE ( check_host_reboot_work  ,
check_host_reboot_status   
)

◆ K_WORK_DELAYABLE_DEFINE() [3/6]

K_WORK_DELAYABLE_DEFINE ( check_retimer_status_work  ,
check_retimer_status   
)

◆ K_WORK_DELAYABLE_DEFINE() [4/6]

K_WORK_DELAYABLE_DEFINE ( PROC_FAIL_work  ,
PROC_FAIL_handler   
)

◆ K_WORK_DELAYABLE_DEFINE() [5/6]

K_WORK_DELAYABLE_DEFINE ( read_cpu_power_seq_status_work  ,
read_cpu_power_seq_status   
)

◆ K_WORK_DELAYABLE_DEFINE() [6/6]

K_WORK_DELAYABLE_DEFINE ( set_DC_on_5s_work  ,
set_DC_on_delayed_status   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_isr  )

◆ send_gpio_interrupt()

void send_gpio_interrupt ( uint8_t  gpio_num)
Here is the call graph for this function:

◆ start_satmc_access_poll()

void start_satmc_access_poll ( )

Variable Documentation

◆ satmc_poll_thread

struct k_thread satmc_poll_thread