openMMC
Open Source Modular MMC for AMCs
|
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
#include "sdr.h"
#include "sensors.h"
#include "ipmi.h"
#include "fpga_spi.h"
Macros | |
#define | vTaskHotSwap_Handle NULL |
Functions | |
uint8_t | compare_val (uint8_t val1, uint8_t val2, uint8_t comp, uint8_t sign) |
size_t | sdr_get_size_by_type (SDR_TYPE type) |
size_t | sdr_get_size_by_entry (sensor_t *entry) |
void | sensor_init (void) |
void | sdr_init (void) |
sensor_t * | sdr_insert_entry (SDR_TYPE type, void *sdr, TaskHandle_t *monitor_task, uint8_t diag_id, uint8_t chipid) |
sensor_t * | sdr_add_settings (uint8_t chipid, void *settings) |
sensor_t * | find_sensor_by_sdr (void *sdr) |
sensor_t * | find_sensor_by_id (uint8_t id) |
void | sdr_remove_entry (sensor_t *entry) |
void | sdr_pop (void) |
void | sensor_enable (sensor_t *sensor) |
void | sensor_disable (sensor_t *sensor) |
IPMI_HANDLER (ipmi_se_get_sdr_info, NETFN_SE, IPMI_GET_DEVICE_SDR_INFO_CMD, ipmi_msg *req, ipmi_msg *rsp) | |
IPMI_HANDLER (ipmi_se_set_event_receiver, NETFN_SE, IPMI_SET_EVENT_RECEIVER_CMD, ipmi_msg *req, ipmi_msg *rsp) | |
IPMI_HANDLER (ipmi_se_get_event_receiver, NETFN_SE, IPMI_GET_EVENT_RECEIVER_CMD, ipmi_msg *req, ipmi_msg *rsp) | |
Handler for "Get Event Receiver" command, as on IPMIv2 1.1 section 29.1. | |
IPMI_HANDLER (ipmi_se_get_sdr, NETFN_SE, IPMI_GET_DEVICE_SDR_CMD, ipmi_msg *req, ipmi_msg *rsp) | |
IPMI_HANDLER (ipmi_se_reserve_device_sdr, NETFN_SE, IPMI_RESERVE_DEVICE_SDR_REPOSITORY_CMD, ipmi_msg *req, ipmi_msg *rsp) | |
IPMI_HANDLER (ipmi_se_get_sensor_reading, NETFN_SE, IPMI_GET_SENSOR_READING_CMD, ipmi_msg *req, ipmi_msg *rsp) | |
IPMI_HANDLER (ipmi_se_get_sensor_threshold, NETFN_SE, IPMI_GET_SENSOR_THRESHOLD_CMD, ipmi_msg *req, ipmi_msg *rsp) | |
void | sensor_state_check (sensor_t *sensor) |
void | check_sensor_event (sensor_t *sensor) |
Variables | |
volatile uint8_t | sdr_count = 0 |
sensor_t * | sdr_head = NULL |
sensor_t * | sdr_tail = NULL |
uint8_t | event_receiver_addr = 0x20 |
Handler for "Set Event Receiver" command, as on IPMIv2 1.1 section 29.1. | |
uint8_t | event_receiver_lun = 0x00 |
const SDR_type_12h_t | SDR0 |
const SDR_type_12h_t | SDR_RTM_DEV_LOCATOR |
#define vTaskHotSwap_Handle NULL |
void check_sensor_event | ( | sensor_t * | sensor | ) |
Should be rewritten to be compliant with RTM management !!
Compare threshold with the upper thresholds
Upper non-critical threshold going-high
Upper critical threshold going-high
Upper non-recoverable threshold going-high
Lower non-critical threshold going-high
Lower critical threshold going-high
Lower non-recoverable threshold going-high
uint8_t compare_val | ( | uint8_t | val1, |
uint8_t | val2, | ||
uint8_t | comp, | ||
uint8_t | sign ) |
sensor_t * find_sensor_by_id | ( | uint8_t | id | ) |
sensor_t * find_sensor_by_sdr | ( | void * | sdr | ) |
IPMI_HANDLER | ( | ipmi_se_get_event_receiver | , |
NETFN_SE | , | ||
IPMI_GET_EVENT_RECEIVER_CMD | , | ||
ipmi_msg * | req, | ||
ipmi_msg * | rsp ) |
Handler for "Get Event Receiver" command, as on IPMIv2 1.1 section 29.1.
Returns the previously set event receiver address and LUN
[in] | req | Incoming request to be handled and answered. |
[out] | rsp | Message with data, data length and completion code. |
IPMI_HANDLER | ( | ipmi_se_get_sdr | , |
NETFN_SE | , | ||
IPMI_GET_DEVICE_SDR_CMD | , | ||
ipmi_msg * | req, | ||
ipmi_msg * | rsp ) |
IPMI_HANDLER | ( | ipmi_se_get_sdr_info | , |
NETFN_SE | , | ||
IPMI_GET_DEVICE_SDR_INFO_CMD | , | ||
ipmi_msg * | req, | ||
ipmi_msg * | rsp ) |
IPMI_HANDLER | ( | ipmi_se_get_sensor_reading | , |
NETFN_SE | , | ||
IPMI_GET_SENSOR_READING_CMD | , | ||
ipmi_msg * | req, | ||
ipmi_msg * | rsp ) |
IPMI_HANDLER | ( | ipmi_se_get_sensor_threshold | , |
NETFN_SE | , | ||
IPMI_GET_SENSOR_THRESHOLD_CMD | , | ||
ipmi_msg * | req, | ||
ipmi_msg * | rsp ) |
IPMI_HANDLER | ( | ipmi_se_reserve_device_sdr | , |
NETFN_SE | , | ||
IPMI_RESERVE_DEVICE_SDR_REPOSITORY_CMD | , | ||
ipmi_msg * | req, | ||
ipmi_msg * | rsp ) |
IPMI_HANDLER | ( | ipmi_se_set_event_receiver | , |
NETFN_SE | , | ||
IPMI_SET_EVENT_RECEIVER_CMD | , | ||
ipmi_msg * | req, | ||
ipmi_msg * | rsp ) |
sensor_t * sdr_add_settings | ( | uint8_t | chipid, |
void * | settings ) |
size_t sdr_get_size_by_entry | ( | sensor_t * | entry | ) |
size_t sdr_get_size_by_type | ( | SDR_TYPE | type | ) |
void sdr_init | ( | void | ) |
sensor_t * sdr_insert_entry | ( | SDR_TYPE | type, |
void * | sdr, | ||
TaskHandle_t * | monitor_task, | ||
uint8_t | diag_id, | ||
uint8_t | chipid ) |
void sdr_pop | ( | void | ) |
void sdr_remove_entry | ( | sensor_t * | entry | ) |
void sensor_disable | ( | sensor_t * | sensor | ) |
void sensor_enable | ( | sensor_t * | sensor | ) |
void sensor_init | ( | void | ) |
void sensor_state_check | ( | sensor_t * | sensor | ) |
uint8_t event_receiver_addr = 0x20 |
Handler for "Set Event Receiver" command, as on IPMIv2 1.1 section 29.1.
Set (or reset) the address to which IPMI events will be sent. Also, disable sending events if command 0xFF is received.
[in] | req | Incoming request to be handled and answered. |
[out] | rsp | Message with data, data length and completion code. |
uint8_t event_receiver_lun = 0x00 |
const SDR_type_12h_t SDR0 |
volatile uint8_t sdr_count = 0 |
sensor_t* sdr_head = NULL |
const SDR_type_12h_t SDR_RTM_DEV_LOCATOR |
sensor_t* sdr_tail = NULL |