blob: 8407a064bb50ce7ca1708726b41927d21554b390 [file] [log] [blame]
Patrick Venture4d49ae62018-09-17 11:35:32 -07001#pragma once
2
Patrick Ventureaa374122019-03-15 15:09:10 -07003#include "handler.hpp"
4
William A. Kennington III2c9e1622019-02-07 15:45:19 -08005#include <ipmid/api.h>
Patrick Venture4d49ae62018-09-17 11:35:32 -07006
7namespace google
8{
9namespace ipmi
10{
11
Patrick Ventureaa374122019-03-15 15:09:10 -070012struct PsuResetRequest
13{
14 uint8_t subcommand;
15 // Delay in seconds.
16 uint32_t delay;
17} __attribute__((packed));
18
Shounak Mitraac4a16f2021-02-02 11:11:44 -080019struct PsuResetOnShutdownRequest
20{
21 uint8_t subcommand;
22} __attribute__((packed));
23
Patrick Venture4d49ae62018-09-17 11:35:32 -070024// Set a time-delayed PSU hard reset.
Patrick Venture45fad1b2019-03-18 16:52:14 -070025ipmi_ret_t psuHardReset(const uint8_t* reqBuf, uint8_t* replyBuf,
Patrick Venturec87de552020-05-20 20:25:39 -070026 size_t* dataLen, const HandlerInterface* handler);
Patrick Venture4d49ae62018-09-17 11:35:32 -070027
Shounak Mitraac4a16f2021-02-02 11:11:44 -080028// Arm for PSU hard reset on host shutdown.
29ipmi_ret_t psuHardResetOnShutdown(const uint8_t* reqBuf, uint8_t* replyBuf,
30 size_t* dataLen,
31 const HandlerInterface* handler);
32
Patrick Venture4d49ae62018-09-17 11:35:32 -070033} // namespace ipmi
34} // namespace google