OpenBIC
OpenSource Bridge-IC
plat_pldm_monitor.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "pldm_monitor.h"
18
19#ifndef PLAT_PLDM_MONITOR_H
20#define PLAT_PLDM_MONITOR_H
21
22#define MAX_STATE_EFFECTER_IDX 168
23
26};
27
29
31 // ACCL1 - ACCL12
81};
82
104};
105
143};
144
150};
151
156};
157
161void plat_accl_power_good_fail_event(uint8_t card_id, uint8_t current_state);
162void plat_accl_cable_power_good_fail_event(uint8_t card_id, uint8_t status);
163void plat_asic_nvme_status_event(uint8_t card_id, uint8_t device_id, uint8_t status);
164uint8_t plat_set_effecter_states_req(uint8_t device_type, uint8_t board_info, uint8_t event_type);
165void plat_send_accl_present_event(uint8_t card_id, uint8_t option);
166
167#endif
PLDM_ADDSEL_EVENT_TYPE
Definition: plat_pldm_monitor.h:106
@ PLDM_ADDSEL_WATCHDOG_0_TIMEOUT_SYSTEM_RESET
Definition: plat_pldm_monitor.h:118
@ PLDM_ADDSEL_EVENT_TYPE_DEFAULT
Definition: plat_pldm_monitor.h:107
@ PLDM_ADDSEL_PSB_STATION_FATAL_ERROR
Definition: plat_pldm_monitor.h:133
@ PLDM_ADDSEL_STATION_7_FATAL_ERROR
Definition: plat_pldm_monitor.h:131
@ PLDM_ADDSEL_STATION_4_FATAL_ERROR
Definition: plat_pldm_monitor.h:128
@ PLDM_ADDSEL_STATION_5_FATAL_ERROR
Definition: plat_pldm_monitor.h:129
@ PLDM_ADDSEL_OUTPUT_CURRENT_WARNING_FAULT
Definition: plat_pldm_monitor.h:135
@ PLDM_ADDSEL_MFR_SPECIFIC_FAULT
Definition: plat_pldm_monitor.h:141
@ PLDM_ADDSEL_STATION_2_FATAL_ERROR
Definition: plat_pldm_monitor.h:126
@ PLDM_ADDSEL_OUTPUT_VOLTAGE_WARNING_FAULT
Definition: plat_pldm_monitor.h:134
@ PLDM_ADDSEL_INPUT_VOLTAGE_FAULT
Definition: plat_pldm_monitor.h:136
@ PLDM_ADDSEL_SECURE_BOOT_FAIL
Definition: plat_pldm_monitor.h:122
@ PLDM_ADDSEL_POR_BISR_TIMEOUT
Definition: plat_pldm_monitor.h:115
@ PLDM_ADDSEL_TEMPERATURE_WARNING_FAULT
Definition: plat_pldm_monitor.h:139
@ PLDM_ADDSEL_STATION_3_FATAL_ERROR
Definition: plat_pldm_monitor.h:127
@ PLDM_ADDSEL_CML_FAULT
Definition: plat_pldm_monitor.h:140
@ PLDM_ADDSEL_STATION_1_FATAL_ERROR
Definition: plat_pldm_monitor.h:125
@ PLDM_ADDSEL_POWER_OFF_FAULT
Definition: plat_pldm_monitor.h:138
@ PLDM_ADDSEL_OVER_VOLTAGE_EVENT
Definition: plat_pldm_monitor.h:109
@ PLDM_ADDSEL_WATCHDOG_0_TIMEOUT_CPU_CORE_RESET
Definition: plat_pldm_monitor.h:117
@ PLDM_ADDSEL_UNDER_VOLTAGE_EVENT
Definition: plat_pldm_monitor.h:111
@ PLDM_ADDSEL_PEX_FATAL_ERROR
Definition: plat_pldm_monitor.h:114
@ PLDM_ADDSEL_FLASH_SIGNATURE_FAIL
Definition: plat_pldm_monitor.h:116
@ PLDM_ADDSEL_POWER_GOOD_FAULT
Definition: plat_pldm_monitor.h:137
@ PLDM_ADDSEL_LOCAL_CPU_PARITY_ERROR
Definition: plat_pldm_monitor.h:121
@ PLDM_ADDSEL_STATION_6_FATAL_ERROR
Definition: plat_pldm_monitor.h:130
@ PLDM_ADDSEL_WATCHDOG_1_TIMEOUT_CPU_CORE_RESET
Definition: plat_pldm_monitor.h:119
@ PLDM_ADDSEL_WATCHDOG_1_TIMEOUT_SYSTEM_RESET
Definition: plat_pldm_monitor.h:120
@ PLDM_ADDSEL_STATION_8_FATAL_ERROR
Definition: plat_pldm_monitor.h:132
@ PLDM_ADDSEL_SBR_LOAD_FAIL
Definition: plat_pldm_monitor.h:123
@ PLDM_ADDSEL_OVER_CURRENT_EVENT
Definition: plat_pldm_monitor.h:110
@ PLDM_ADDSEL_OVER_POWER_EVENT
Definition: plat_pldm_monitor.h:108
@ PLDM_ADDSEL_NO_LISTED_FAULT
Definition: plat_pldm_monitor.h:142
@ PLDM_ADDSEL_OVER_TEMPERATURE_EVENT
Definition: plat_pldm_monitor.h:112
@ PLDM_ADDSEL_STATION_0_FATAL_ERROR
Definition: plat_pldm_monitor.h:124
@ PLDM_ADDSEL_SYSTEM_ERROR
Definition: plat_pldm_monitor.h:113
struct pldm_state_effecter_info plat_state_effecter_table[]
Definition: plat_pldm_monitor.c:35
void plat_accl_cable_power_good_fail_event(uint8_t card_id, uint8_t status)
Definition: plat_pldm_monitor.c:180
void plat_accl_present_check()
Definition: plat_pldm_monitor.c:129
pldm_state_set_oem_device_nvme_status
Definition: plat_pldm_monitor.h:152
@ PLDM_STATE_SET_OEM_DEVICE_NVME_UNKNOWN_STATUS
Definition: plat_pldm_monitor.h:153
@ PLDM_STATE_SET_OEM_DEVICE_NVME_READY
Definition: plat_pldm_monitor.h:155
@ PLDM_STATE_SET_OEM_DEVICE_NVME_NOT_READY
Definition: plat_pldm_monitor.h:154
pldm_plat_effecter_id_high_byte
Definition: plat_pldm_monitor.h:24
@ PLAT_EFFECTER_ID_GPIO_HIGH_BYTE
Definition: plat_pldm_monitor.h:25
void plat_send_accl_present_event(uint8_t card_id, uint8_t option)
Definition: plat_pldm_monitor.c:101
void plat_asic_nvme_status_event(uint8_t card_id, uint8_t device_id, uint8_t status)
Definition: plat_pldm_monitor.c:194
void plat_accl_power_good_fail_event(uint8_t card_id, uint8_t current_state)
Definition: plat_pldm_monitor.c:166
plat_pldm_event_sensor_num
Definition: plat_pldm_monitor.h:30
@ PLDM_EVENT_ACCL_PWR_CBL_9
Definition: plat_pldm_monitor.h:52
@ PLDM_EVENT_ACCL_PWR_CBL_6
Definition: plat_pldm_monitor.h:49
@ PLDM_EVENT_ACCL_5
Definition: plat_pldm_monitor.h:36
@ PLDM_EVENT_ACCL_11
Definition: plat_pldm_monitor.h:42
@ PLDM_EVENT_ACCL_10
Definition: plat_pldm_monitor.h:41
@ PLDM_EVENT_ACCL_4_DEV_1
Definition: plat_pldm_monitor.h:63
@ PLDM_EVENT_ACCL_PWR_CBL_4
Definition: plat_pldm_monitor.h:47
@ PLDM_EVENT_ACCL_3
Definition: plat_pldm_monitor.h:34
@ PLDM_EVENT_ACCL_5_DEV_2
Definition: plat_pldm_monitor.h:66
@ PLDM_EVENT_ACCL_11_DEV_2
Definition: plat_pldm_monitor.h:78
@ PLDM_EVENT_ACCL_PWR_CBL_5
Definition: plat_pldm_monitor.h:48
@ PLDM_EVENT_ACCL_9
Definition: plat_pldm_monitor.h:40
@ PLDM_EVENT_ACCL_10_DEV_1
Definition: plat_pldm_monitor.h:75
@ PLDM_EVENT_ACCL_9_DEV_1
Definition: plat_pldm_monitor.h:73
@ PLDM_EVENT_ACCL_2
Definition: plat_pldm_monitor.h:33
@ PLDM_EVENT_ACCL_6_DEV_2
Definition: plat_pldm_monitor.h:68
@ PLDM_EVENT_ACCL_9_DEV_2
Definition: plat_pldm_monitor.h:74
@ PLDM_EVENT_ACCL_12_DEV_2
Definition: plat_pldm_monitor.h:80
@ PLDM_EVENT_ACCL_6
Definition: plat_pldm_monitor.h:37
@ PLDM_EVENT_ACCL_4
Definition: plat_pldm_monitor.h:35
@ PLDM_EVENT_ACCL_3_DEV_1
Definition: plat_pldm_monitor.h:61
@ PLDM_EVENT_ACCL_11_DEV_1
Definition: plat_pldm_monitor.h:77
@ PLDM_EVENT_ACCL_PWR_CBL_3
Definition: plat_pldm_monitor.h:46
@ PLDM_EVENT_ACCL_2_DEV_1
Definition: plat_pldm_monitor.h:59
@ PLDM_EVENT_ACCL_3_DEV_2
Definition: plat_pldm_monitor.h:62
@ PLDM_EVENT_ACCL_12_DEV_1
Definition: plat_pldm_monitor.h:79
@ PLDM_EVENT_ACCL_12
Definition: plat_pldm_monitor.h:43
@ PLDM_EVENT_ACCL_1_DEV_2
Definition: plat_pldm_monitor.h:58
@ PLDM_EVENT_ACCL_PWR_CBL_8
Definition: plat_pldm_monitor.h:51
@ PLDM_EVENT_ACCL_PWR_CBL_1
Definition: plat_pldm_monitor.h:44
@ PLDM_EVENT_FIO
Definition: plat_pldm_monitor.h:56
@ PLDM_EVENT_ACCL_PWR_CBL_2
Definition: plat_pldm_monitor.h:45
@ PLDM_EVENT_ACCL_8
Definition: plat_pldm_monitor.h:39
@ PLDM_EVENT_ACCL_PWR_CBL_7
Definition: plat_pldm_monitor.h:50
@ PLDM_EVENT_ACCL_8_DEV_1
Definition: plat_pldm_monitor.h:71
@ PLDM_EVENT_ACCL_PWR_CBL_10
Definition: plat_pldm_monitor.h:53
@ PLDM_EVENT_ACCL_8_DEV_2
Definition: plat_pldm_monitor.h:72
@ PLDM_EVENT_ACCL_1_DEV_1
Definition: plat_pldm_monitor.h:57
@ PLDM_EVENT_ACCL_5_DEV_1
Definition: plat_pldm_monitor.h:65
@ PLDM_EVENT_ACCL_4_DEV_2
Definition: plat_pldm_monitor.h:64
@ PLDM_EVENT_ACCL_7
Definition: plat_pldm_monitor.h:38
@ PLDM_EVENT_ACCL_PWR_CBL_12
Definition: plat_pldm_monitor.h:55
@ PLDM_EVENT_ACCL_7_DEV_1
Definition: plat_pldm_monitor.h:69
@ PLDM_EVENT_ACCL_10_DEV_2
Definition: plat_pldm_monitor.h:76
@ PLDM_EVENT_ACCL_7_DEV_2
Definition: plat_pldm_monitor.h:70
@ PLDM_EVENT_ACCL_2_DEV_2
Definition: plat_pldm_monitor.h:60
@ PLDM_EVENT_ACCL_6_DEV_1
Definition: plat_pldm_monitor.h:67
@ PLDM_EVENT_ACCL_1
Definition: plat_pldm_monitor.h:32
@ PLDM_EVENT_ACCL_PWR_CBL_11
Definition: plat_pldm_monitor.h:54
plat_pldm_device_state_set_offset
Definition: plat_pldm_monitor.h:145
@ PLDM_STATE_SET_OFFSET_DEVICE_NVME_STATUS
Definition: plat_pldm_monitor.h:149
@ PLDM_STATE_SET_OFFSET_DEVICE_POWER_STATUS
Definition: plat_pldm_monitor.h:148
@ PLDM_STATE_SET_OFFSET_DEVICE_STATUS
Definition: plat_pldm_monitor.h:147
@ PLDM_STATE_SET_OFFSET_DEVICE_PRESENCE
Definition: plat_pldm_monitor.h:146
void plat_fio_present_check()
Definition: plat_pldm_monitor.c:151
PLDM_ADDSEL_DEVICE_TYPE
Definition: plat_pldm_monitor.h:83
@ PLDM_ADDSEL_DEVICE_TYPE_DEFAULT
Definition: plat_pldm_monitor.h:84
@ PLDM_ADDSEL_DEVICE_TYPE_P0V8_VDD1_ALERT
Definition: plat_pldm_monitor.h:85
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL10_MONITOR_ALERT
Definition: plat_pldm_monitor.h:98
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL11_MONITOR_ALERT
Definition: plat_pldm_monitor.h:99
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL6_MONITOR_ALERT
Definition: plat_pldm_monitor.h:94
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL5_MONITOR_ALERT
Definition: plat_pldm_monitor.h:93
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL8_MONITOR_ALERT
Definition: plat_pldm_monitor.h:96
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL7_MONITOR_ALERT
Definition: plat_pldm_monitor.h:95
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL3_MONITOR_ALERT
Definition: plat_pldm_monitor.h:91
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL9_MONITOR_ALERT
Definition: plat_pldm_monitor.h:97
@ PLDM_ADDSEL_DEVICE_TYPE_PEX_SWITCH_0
Definition: plat_pldm_monitor.h:101
@ PLDM_ADDSEL_DEVICE_TYPE_POWER_BRICK_0_ALERT
Definition: plat_pldm_monitor.h:87
@ PLDM_ADDSEL_DEVICE_TYPE_P0V8_VDD2_ALERT
Definition: plat_pldm_monitor.h:86
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL12_MONITOR_ALERT
Definition: plat_pldm_monitor.h:100
@ PLDM_ADDSEL_DEVICE_TYPE_PEX_SWITCH_1
Definition: plat_pldm_monitor.h:102
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL2_MONITOR_ALERT
Definition: plat_pldm_monitor.h:90
@ PLDM_ADDSEL_DEVICE_TYPE_POWER_BRICK_1_ALERT
Definition: plat_pldm_monitor.h:103
@ PLDM_ADDSEL_DEVICE_TYPE_P1V25_MONITOR_ALERT
Definition: plat_pldm_monitor.h:88
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL4_MONITOR_ALERT
Definition: plat_pldm_monitor.h:92
@ PLDM_ADDSEL_DEVICE_TYPE_P12V_ACCL1_MONITOR_ALERT
Definition: plat_pldm_monitor.h:89
void plat_accl_power_cable_present_check()
Definition: plat_pldm_monitor.c:140
uint8_t plat_set_effecter_states_req(uint8_t device_type, uint8_t board_info, uint8_t event_type)
Definition: plat_pldm_monitor.c:239
uint8_t status
Definition: mctp_ctrl.h:1
device_id
Definition: power_shell.h:28
uint8_t event_type
Definition: storage_handler.h:10
Definition: pldm_monitor.h:425