blob: 6cf2a5b5294b7bee9b6fb83e3b94a1aee6de3c13 [file] [log] [blame]
Ben Tyner9ae5ca42020-02-28 13:13:50 -06001#pragma once
2
Ben Tyner792f32f2020-06-02 08:50:47 -05003#include <stdint.h>
4
Ben Tyner9ae5ca42020-02-28 13:13:50 -06005/**
6 * @brief TI special attention handler
7 *
8 * Handle special attention due to a terminate immediately (TI) condition.
9 */
10namespace attn
11{
12
Ben Tyner792f32f2020-06-02 08:50:47 -050013// TI data area definition
14#pragma pack(push)
15#pragma pack(1)
16struct TiDataArea
17{
18 uint8_t tiAreaValid; // 0x00, common (non-zero == valid)
19 uint8_t command; // 0x01, phyp/opal = 0xA1
20 uint16_t numDataBytes; // 0x02, phyp/opal
21 uint8_t reserved1; // 0x04, reserved
22 uint8_t hbTerminateType; // 0x05, hostboot only
23 uint16_t hardwareDumpType; // 0x06, phyp/opal
24 uint8_t srcFormat; // 0x08, phyp/opal = 0x02
25 uint8_t srcFlags; // 0x09, phyp/opal
26 uint8_t numAsciiWords; // 0x0a, phyp/opal
27 uint8_t numHexWords; // 0x0b, phyp/opal
28 uint8_t hbDumpFlag; // 0x0c, hostboot only
29 uint8_t source; // 0x0d, hostboot only
30 uint16_t lenSrc; // 0x0e, phyp/opal
31 uint32_t srcWord12HbWord0; // 0x10, common
32 uint32_t srcWord13HbWord2; // 0x14, common (Word1 intentionally skipped)
33 uint32_t srcWord14HbWord3; // 0x18, common
34 uint32_t srcWord15HbWord4; // 0x1c, common
35 uint32_t srcWord16HbWord5; // 0x20, common
36 uint32_t srcWord17HbWord6; // 0x24, common
37 uint32_t srcWord18HbWord7; // 0x28, common
38 uint32_t srcWord19HbWord8; // 0x2c, common
39 uint32_t asciiData0; // 0x30, phyp/opal, hostboot error_data
40 uint32_t asciiData1; // 0x34, phyp/opal, hostboot EID
41 uint32_t asciiData2; // 0x38, phyp/opal
42 uint32_t asciiData3; // 0x3c, phyp/opal
43 uint32_t asciiData4; // 0x40, phyp/opal
44 uint32_t asciiData5; // 0x44, phyp/opal
45 uint32_t asciiData6; // 0x48, phyp/opal
46 uint32_t asciiData7; // 0x4c, phyp/opal
47 uint8_t location; // 0x50, phyp/opal
48 uint8_t codeSection; // 0x51, phyp/opal
49 uint8_t additionalSize; // 0x52, phyp/opal
50 uint8_t andData; // 0x53, phyp/opal
51};
52#pragma pack(pop)
53
54int tiHandler(TiDataArea* i_tiDataArea);
Ben Tyner9ae5ca42020-02-28 13:13:50 -060055
Ben Tynerff17f962020-09-23 08:21:19 -050056/**
57 * @brief Read autoreboot property
58 *
59 * Read the autoreboot property via dbus. This status will be used to
60 * determine whether to either mpipl or quiesce the host on TI condition.
61 */
62bool autoRebootEnabled();
Ben Tyner9ae5ca42020-02-28 13:13:50 -060063} // namespace attn