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#include "pldm_monitor.h"
17#include "plat_sensor_table.h"
18
19#ifndef PLAT_PLDM_MONITOR_H
20#define PLAT_PLDM_MONITOR_H
21
22extern uint8_t e1s_prsnt_pin[4][4];
23extern uint8_t nic_prsnt_pin[];
24extern uint8_t pex_sensor_num_table[];
25extern uint8_t e1s_sensor_table[SSD_MAX_NUMBER];
26
27#define MAX_STATE_EFFECTER_IDX 187
28
33};
34
36
38 // BIC
40 // NIC_0 - NIC_7, NIC_0_7
50 /* E1S_0 - E1S_15 */
67 /* PEX0 - PEX1, PEX */
73 /* VR0 - VR1, VR */
77 /* CPLD */
79 /* HSC */
81};
82
85};
86
90};
91
92#define PLDM_PLATFORM_OEM_LED_EFFECTER_STATE_FIELD_COUNT 1
93#define PLDM_PLATFORM_OEM_NIC_TYPE_EFFECTER_STATE_FIELD_COUNT 1
94
100};
101
108};
109
130};
131
132void ssd_alert_check(uint8_t group);
133void ssd_present_check();
134void nic_present_check();
136void vr_alert_check();
138
139#endif
struct pldm_state_effecter_info plat_state_effecter_table[]
Definition: plat_pldm_monitor.c:35
pldm_plat_effecter_id_high_byte
Definition: plat_pldm_monitor.h:24
@ PLAT_EFFECTER_ID_GPIO_HIGH_BYTE
Definition: plat_pldm_monitor.h:25
plat_pldm_event_sensor_num
Definition: plat_pldm_monitor.h:30
plat_pldm_device_state_set_offset
Definition: plat_pldm_monitor.h:145
@ 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 nic_present_check()
Definition: plat_pldm_monitor.c:435
uint8_t e1s_sensor_table[SSD_MAX_NUMBER]
Definition: plat_pldm_monitor.c:159
plat_pldm_bic_state_set_offset
Definition: plat_pldm_monitor.h:83
@ PLDM_STATE_SET_OFFSET_BIC_BOOT_RESTART_CAUSE
Definition: plat_pldm_monitor.h:84
uint8_t e1s_prsnt_pin[4][4]
Definition: plat_pldm_monitor.c:119
@ PLAT_EFFECTER_ID_NIC_TYPE_HIGH_BYTE
Definition: plat_pldm_monitor.h:32
@ PLAT_EFFECTER_ID_LED_HIGH_BYTE
Definition: plat_pldm_monitor.h:31
void vr_status_mfr_specific_check_handler()
uint8_t nic_prsnt_pin[]
Definition: plat_pldm_monitor.c:126
void ssd_alert_check(uint8_t group)
Definition: plat_pldm_monitor.c:388
plat_pldm_effecter_id
Definition: plat_pldm_monitor.h:110
@ PLAT_EFFECTER_ID_LED_E1S_8
Definition: plat_pldm_monitor.h:121
@ PLAT_EFFECTER_ID_LED_E1S_14
Definition: plat_pldm_monitor.h:127
@ PLAT_EFFECTER_ID_LED_E1S_10
Definition: plat_pldm_monitor.h:123
@ PLAT_EFFECTER_ID_LED_E1S_2
Definition: plat_pldm_monitor.h:115
@ PLAT_EFFECTER_ID_LED_E1S_0
Definition: plat_pldm_monitor.h:113
@ PLAT_EFFECTER_ID_LED_E1S_6
Definition: plat_pldm_monitor.h:119
@ PLAT_EFFECTER_ID_LED_E1S_5
Definition: plat_pldm_monitor.h:118
@ PLAT_EFFECTER_ID_LED_E1S_13
Definition: plat_pldm_monitor.h:126
@ PLAT_EFFECTER_ID_POWER_LED
Definition: plat_pldm_monitor.h:111
@ PLAT_EFFECTER_ID_LED_E1S_15
Definition: plat_pldm_monitor.h:128
@ PLAT_EFFECTER_ID_FAULT_LED
Definition: plat_pldm_monitor.h:112
@ PLAT_EFFECTER_ID_LED_E1S_11
Definition: plat_pldm_monitor.h:124
@ PLAT_EFFECTER_ID_LED_E1S_4
Definition: plat_pldm_monitor.h:117
@ PLAT_EFFECTER_ID_NIC_TYPE
Definition: plat_pldm_monitor.h:129
@ PLAT_EFFECTER_ID_LED_E1S_1
Definition: plat_pldm_monitor.h:114
@ PLAT_EFFECTER_ID_LED_E1S_7
Definition: plat_pldm_monitor.h:120
@ PLAT_EFFECTER_ID_LED_E1S_3
Definition: plat_pldm_monitor.h:116
@ PLAT_EFFECTER_ID_LED_E1S_9
Definition: plat_pldm_monitor.h:122
@ PLAT_EFFECTER_ID_LED_E1S_12
Definition: plat_pldm_monitor.h:125
uint8_t pex_sensor_num_table[]
Definition: plat_pldm_monitor.c:131
void vr_alert_check()
Definition: plat_pldm_monitor.c:549
plat_effecter_states_set_led_value
Definition: plat_pldm_monitor.h:95
@ EFFECTER_STATE_LED_VALUE_OFF
Definition: plat_pldm_monitor.h:98
@ EFFECTER_STATE_LED_VALUE_UNKNOWN
Definition: plat_pldm_monitor.h:96
@ EFFECTER_STATE_LED_VALUE_ON
Definition: plat_pldm_monitor.h:97
@ EFFECTER_STATE_LED_VALUE_MAX
Definition: plat_pldm_monitor.h:99
@ PLDM_EVENT_SENSOR_E1S_10
Definition: plat_pldm_monitor.h:61
@ PLDM_EVENT_SENSOR_E1S_1
Definition: plat_pldm_monitor.h:52
@ PLDM_EVENT_SENSOR_NIC_4
Definition: plat_pldm_monitor.h:45
@ PLDM_EVENT_SENSOR_E1S_13
Definition: plat_pldm_monitor.h:64
@ PLDM_EVENT_SENSOR_PEX
Definition: plat_pldm_monitor.h:72
@ PLDM_EVENT_SENSOR_E1S_5
Definition: plat_pldm_monitor.h:56
@ PLDM_EVENT_SENSOR_E1S_14
Definition: plat_pldm_monitor.h:65
@ PLDM_EVENT_SENSOR_PEX_2
Definition: plat_pldm_monitor.h:70
@ PLDM_EVENT_SENSOR_NIC_1
Definition: plat_pldm_monitor.h:42
@ PLDM_EVENT_SENSOR_E1S_6
Definition: plat_pldm_monitor.h:57
@ PLDM_EVENT_SENSOR_E1S_3
Definition: plat_pldm_monitor.h:54
@ PLDM_EVENT_SENSOR_BIC
Definition: plat_pldm_monitor.h:39
@ PLDM_EVENT_SENSOR_E1S_7
Definition: plat_pldm_monitor.h:58
@ PLDM_EVENT_SENSOR_E1S_15
Definition: plat_pldm_monitor.h:66
@ PLDM_EVENT_SENSOR_E1S_2
Definition: plat_pldm_monitor.h:53
@ PLDM_EVENT_SENSOR_E1S_12
Definition: plat_pldm_monitor.h:63
@ PLDM_EVENT_SENSOR_VR
Definition: plat_pldm_monitor.h:76
@ PLDM_EVENT_SENSOR_E1S_4
Definition: plat_pldm_monitor.h:55
@ PLDM_EVENT_SENSOR_NIC_2
Definition: plat_pldm_monitor.h:43
@ PLDM_EVENT_SENSOR_VR_1
Definition: plat_pldm_monitor.h:75
@ PLDM_EVENT_SENSOR_NIC_3
Definition: plat_pldm_monitor.h:44
@ PLDM_EVENT_SENSOR_NIC_6
Definition: plat_pldm_monitor.h:47
@ PLDM_EVENT_SENSOR_E1S_11
Definition: plat_pldm_monitor.h:62
@ PLDM_EVENT_SENSOR_PEX_1
Definition: plat_pldm_monitor.h:69
@ PLDM_EVENT_SENSOR_VR_0
Definition: plat_pldm_monitor.h:74
@ PLDM_EVENT_SENSOR_PEX_0
Definition: plat_pldm_monitor.h:68
@ PLDM_EVENT_SENSOR_NIC_0
Definition: plat_pldm_monitor.h:41
@ PLDM_EVENT_SENSOR_NIC_7
Definition: plat_pldm_monitor.h:48
@ PLDM_EVENT_SENSOR_E1S_9
Definition: plat_pldm_monitor.h:60
@ PLDM_EVENT_SENSOR_HSC
Definition: plat_pldm_monitor.h:80
@ PLDM_EVENT_SENSOR_NIC_5
Definition: plat_pldm_monitor.h:46
@ PLDM_EVENT_SENSOR_E1S_8
Definition: plat_pldm_monitor.h:59
@ PLDM_EVENT_SENSOR_PEX_3
Definition: plat_pldm_monitor.h:71
@ PLDM_EVENT_SENSOR_CPLD
Definition: plat_pldm_monitor.h:78
@ PLDM_EVENT_SENSOR_NIC_0_7
Definition: plat_pldm_monitor.h:49
@ PLDM_EVENT_SENSOR_E1S_0
Definition: plat_pldm_monitor.h:51
void ssd_present_check()
Definition: plat_pldm_monitor.c:416
void pal_load_pldm_effcter_table()
plat_effecter_states_nic_type_value
Definition: plat_pldm_monitor.h:102
@ EFFECTER_STATE_NIC_TYPE_UNKNOWN
Definition: plat_pldm_monitor.h:103
@ EFFECTER_STATE_NIC_TYPE_THOR2
Definition: plat_pldm_monitor.h:106
@ EFFECTER_STATE_NIC_TYPE_CX7
Definition: plat_pldm_monitor.h:104
@ EFFECTER_STATE_NIC_TYPE_CX7_IB
Definition: plat_pldm_monitor.h:105
@ EFFECTER_STATE_NIC_TYPE_MAX
Definition: plat_pldm_monitor.h:107
#define SSD_MAX_NUMBER
Definition: plat_sensor_table.h:87
Definition: pldm_monitor.h:425