OpenBIC
OpenSource Bridge-IC
chassis_handler.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#ifndef CHASSIS_HANDLER_H
18#define CHASSIS_HANDLER_H
19
20#include "ipmi.h"
21
22typedef struct CHASSIS_STATUS_STRUCT {
24 uint8_t pwOn : 1;
25 uint8_t pwOverload : 1;
26 uint8_t interlock : 1;
27 uint8_t pwFault : 1;
28 uint8_t pwControlFault : 1;
29 uint8_t pwRestorePolicy : 2;
30 uint8_t reserve : 1;
32
34 uint8_t acFail : 1;
35 uint8_t pwDownOverload : 1;
36 uint8_t pwDownInterlock : 1;
37 uint8_t pwDownFault : 1;
38 uint8_t pwOnIpmi : 1;
39 uint8_t reserve : 3;
41
42 struct MISC {
43 uint8_t intru : 1;
44 uint8_t fpcLockout : 1;
45 uint8_t driveFault : 1;
46 uint8_t fanFault : 1;
47 uint8_t idLedState : 2;
48 uint8_t idLedSupport : 1;
49 uint8_t reserve : 1;
51
54 uint8_t resetButtonDisable : 1;
55 uint8_t diagnosticDisable : 1;
56 uint8_t standbyDisable : 1;
63
64#ifdef CONFIG_ESPI
65void CHASSIS_GET_CHASSIS_STATUS(ipmi_msg *msg);
66#endif
67
69
70#endif
struct CHASSIS_STATUS_STRUCT CHASSIS_STATUS
void IPMI_CHASSIS_handler(ipmi_msg *msg)
Definition: chassis_handler.c:48
Definition: chassis_handler.h:52
uint8_t diagnosticDisableAllowed
Definition: chassis_handler.h:59
uint8_t resetButtonDisableAllowed
Definition: chassis_handler.h:58
uint8_t powerOffButtonDisableAllowed
Definition: chassis_handler.h:57
uint8_t resetButtonDisable
Definition: chassis_handler.h:54
uint8_t diagnosticDisable
Definition: chassis_handler.h:55
uint8_t standbyDisableAllowed
Definition: chassis_handler.h:60
uint8_t standbyDisable
Definition: chassis_handler.h:56
uint8_t powerOffButtonDisable
Definition: chassis_handler.h:53
Definition: chassis_handler.h:23
uint8_t pwFault
Definition: chassis_handler.h:27
uint8_t pwOverload
Definition: chassis_handler.h:25
uint8_t pwOn
Definition: chassis_handler.h:24
uint8_t reserve
Definition: chassis_handler.h:30
uint8_t pwControlFault
Definition: chassis_handler.h:28
uint8_t pwRestorePolicy
Definition: chassis_handler.h:29
uint8_t interlock
Definition: chassis_handler.h:26
Definition: chassis_handler.h:33
uint8_t pwDownFault
Definition: chassis_handler.h:37
uint8_t reserve
Definition: chassis_handler.h:39
uint8_t pwDownInterlock
Definition: chassis_handler.h:36
uint8_t acFail
Definition: chassis_handler.h:34
uint8_t pwDownOverload
Definition: chassis_handler.h:35
uint8_t pwOnIpmi
Definition: chassis_handler.h:38
Definition: chassis_handler.h:42
uint8_t fanFault
Definition: chassis_handler.h:46
uint8_t intru
Definition: chassis_handler.h:43
uint8_t fpcLockout
Definition: chassis_handler.h:44
uint8_t reserve
Definition: chassis_handler.h:49
uint8_t driveFault
Definition: chassis_handler.h:45
uint8_t idLedState
Definition: chassis_handler.h:47
uint8_t idLedSupport
Definition: chassis_handler.h:48
Definition: chassis_handler.h:22
struct CHASSIS_STATUS_STRUCT::LAST_POWER_EVENT lastPwEvt
struct CHASSIS_STATUS_STRUCT::CHASSIS_BUTTON_ENABLES chassisButtonEnables
struct CHASSIS_STATUS_STRUCT::CURRENT_POWER_STATE currPwState
struct CHASSIS_STATUS_STRUCT::MISC misc
Definition: ipmb.h:165