OpenBIC
OpenSource Bridge-IC
plat_pldm_monitor.c File Reference
#include <logging/log.h>
#include <stdlib.h>
#include "sensor.h"
#include "hal_gpio.h"
#include "pldm.h"
#include "plat_gpio.h"
#include "plat_i2c.h"
#include "plat_sensor_table.h"
#include "plat_pldm_monitor.h"
#include "plat_isr.h"
#include "power_status.h"
Include dependency graph for plat_pldm_monitor.c:

Macros

#define SET_POWER_STACK   1024
 
#define PLAT_PLDM_POWER_ON_BUTTON_MSEC   1000
 
#define PLAT_PLDM_RESET_BUTTON_MSEC   1000
 
#define PLAT_PLDM_GRACEFUL_SHUTDOWN_BUTTON_MSEC   1000
 
#define PLAT_PLDM_POWER_OFF_BUTTON_MSEC   6000
 
#define PLAT_PLDM_POWER_CYCLE_INTERVAL_MSEC   5000
 
#define PLAT_PLDM_SEQUENCE_CNT   3
 

Functions

 LOG_MODULE_REGISTER (plat_pldm_monitor)
 
 K_KERNEL_STACK_MEMBER (set_power_sequence_stack, SET_POWER_STACK)
 
void plat_pldm_load_state_effecter_table (void)
 
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_do_host_button_sequence (void *power_sequence, void *pressing_interval, void *arvg1)
 
void plat_pldm_power_cycle (void *arg1, void *arg2, void *arg3)
 
uint8_t plat_pldm_host_button_sequence (const uint8_t *power_sequence, uint16_t pressing_interval)
 
void host_power_on ()
 
void host_power_off ()
 
void plat_pldm_set_effecter_state_host_power_control (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len)
 
void plat_pldm_set_effecter_state_reinit_i3c_hub (const uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len)
 

Variables

k_tid_t set_power_sequence_tid
 
struct pldm_state_effecter_info plat_state_effecter_table []
 

Macro Definition Documentation

◆ PLAT_PLDM_GRACEFUL_SHUTDOWN_BUTTON_MSEC

#define PLAT_PLDM_GRACEFUL_SHUTDOWN_BUTTON_MSEC   1000

◆ PLAT_PLDM_POWER_CYCLE_INTERVAL_MSEC

#define PLAT_PLDM_POWER_CYCLE_INTERVAL_MSEC   5000

◆ PLAT_PLDM_POWER_OFF_BUTTON_MSEC

#define PLAT_PLDM_POWER_OFF_BUTTON_MSEC   6000

◆ PLAT_PLDM_POWER_ON_BUTTON_MSEC

#define PLAT_PLDM_POWER_ON_BUTTON_MSEC   1000

◆ PLAT_PLDM_RESET_BUTTON_MSEC

#define PLAT_PLDM_RESET_BUTTON_MSEC   1000

◆ PLAT_PLDM_SEQUENCE_CNT

#define PLAT_PLDM_SEQUENCE_CNT   3

◆ SET_POWER_STACK

#define SET_POWER_STACK   1024

Function Documentation

◆ host_power_off()

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

◆ host_power_on()

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

◆ K_KERNEL_STACK_MEMBER()

K_KERNEL_STACK_MEMBER ( set_power_sequence_stack  ,
SET_POWER_STACK   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_pldm_monitor  )

◆ plat_pldm_do_host_button_sequence()

void plat_pldm_do_host_button_sequence ( void *  power_sequence,
void *  pressing_interval,
void *  arvg1 
)

◆ 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_host_button_sequence()

uint8_t plat_pldm_host_button_sequence ( const uint8_t *  power_sequence,
uint16_t  pressing_interval 
)

◆ plat_pldm_load_state_effecter_table()

void plat_pldm_load_state_effecter_table ( void  )

◆ plat_pldm_power_cycle()

void plat_pldm_power_cycle ( void *  arg1,
void *  arg2,
void *  arg3 
)
Here is the call graph for this function:

◆ plat_pldm_set_effecter_state_host_power_control()

void plat_pldm_set_effecter_state_host_power_control ( const uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len 
)
Here is the call graph for this function:

◆ plat_pldm_set_effecter_state_reinit_i3c_hub()

void plat_pldm_set_effecter_state_reinit_i3c_hub ( const uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len 
)
Here is the call graph for this function:

◆ 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:

Variable Documentation

◆ plat_state_effecter_table

struct pldm_state_effecter_info plat_state_effecter_table[]
Initial value:
= {
.entity_type = PLDM_ENTITY_IO_CONTROLLER,
},
.entity_type = PLDM_ENTITY_SUB_CHASSIS,
.effecter_id = 0x0000,
},
.entity_type = PLDM_ENTITY_DEVICE_DRIVER,
},
}
#define PLDM_PLATFORM_OEM_AST1030_GPIO_PIN_NUM_MAX
Definition: pldm_monitor.h:66
@ PLDM_ENTITY_IO_CONTROLLER
Definition: pldm_monitor.h:197
@ PLDM_ENTITY_DEVICE_DRIVER
Definition: pldm_monitor.h:195
@ PLDM_ENTITY_SUB_CHASSIS
Definition: pldm_monitor.h:196
@ PLAT_PLDM_EFFECTER_ID_REINIT_I3C_HUB
Definition: plat_pldm_monitor.h:31

◆ set_power_sequence_tid

k_tid_t set_power_sequence_tid