Patrick Venture | 4d49ae6 | 2018-09-17 11:35:32 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Patrick Venture | aa37412 | 2019-03-15 15:09:10 -0700 | [diff] [blame] | 3 | #include "handler.hpp" |
| 4 | |
William A. Kennington III | 2c9e162 | 2019-02-07 15:45:19 -0800 | [diff] [blame] | 5 | #include <ipmid/api.h> |
Patrick Venture | 4d49ae6 | 2018-09-17 11:35:32 -0700 | [diff] [blame] | 6 | |
| 7 | namespace google |
| 8 | { |
| 9 | namespace ipmi |
| 10 | { |
| 11 | |
Patrick Venture | aa37412 | 2019-03-15 15:09:10 -0700 | [diff] [blame] | 12 | struct PsuResetRequest |
| 13 | { |
| 14 | uint8_t subcommand; |
| 15 | // Delay in seconds. |
| 16 | uint32_t delay; |
| 17 | } __attribute__((packed)); |
| 18 | |
Shounak Mitra | ac4a16f | 2021-02-02 11:11:44 -0800 | [diff] [blame] | 19 | struct PsuResetOnShutdownRequest |
| 20 | { |
| 21 | uint8_t subcommand; |
| 22 | } __attribute__((packed)); |
| 23 | |
Patrick Venture | 4d49ae6 | 2018-09-17 11:35:32 -0700 | [diff] [blame] | 24 | // Set a time-delayed PSU hard reset. |
Patrick Venture | 45fad1b | 2019-03-18 16:52:14 -0700 | [diff] [blame] | 25 | ipmi_ret_t psuHardReset(const uint8_t* reqBuf, uint8_t* replyBuf, |
Patrick Venture | c87de55 | 2020-05-20 20:25:39 -0700 | [diff] [blame] | 26 | size_t* dataLen, const HandlerInterface* handler); |
Patrick Venture | 4d49ae6 | 2018-09-17 11:35:32 -0700 | [diff] [blame] | 27 | |
Shounak Mitra | ac4a16f | 2021-02-02 11:11:44 -0800 | [diff] [blame] | 28 | // Arm for PSU hard reset on host shutdown. |
| 29 | ipmi_ret_t psuHardResetOnShutdown(const uint8_t* reqBuf, uint8_t* replyBuf, |
| 30 | size_t* dataLen, |
| 31 | const HandlerInterface* handler); |
| 32 | |
Patrick Venture | 4d49ae6 | 2018-09-17 11:35:32 -0700 | [diff] [blame] | 33 | } // namespace ipmi |
| 34 | } // namespace google |