summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/dbus/phosphor-dbus-interfaces/0009-Add-host-restart-cause-property.patch
blob: 1221a0ab4241c9cedb00a73175d98b6439f8dc4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
From 72b7b30a5dda56c170ee2ce82c1082c26f4663e3 Mon Sep 17 00:00:00 2001
From: Kuiying Wang <kuiying.wang@intel.com>
Date: Tue, 31 Jul 2018 16:55:21 +0800
Subject: [PATCH] Add host restart cause property.

Add host restart cause property to track the information about what
action last caused the system to restart.
According to IPMI Spec, it includes 12 types as following:
1. Unknown                  0x0
2. IpmiCommand              0x1
3. ResetButton              0x2
4. PowerButton              0x3
5. WatchdogTimer            0x4
6. OEM                      0x5
7. PowerPolicyAlwaysOn      0x6
8. PowerPolicyPreviousState 0x7
9. PEF-Reset                0x8
10. PEF-PowerCycle          0x9
11. SoftReset               0xA
12. RTC-Wakeup              0xB

Change-Id: Id2cc6a18b98e485a978940e5ffc085bf5c4fbed8
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
---
 xyz/openbmc_project/State/Host.interface.yaml | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/xyz/openbmc_project/State/Host.interface.yaml b/xyz/openbmc_project/State/Host.interface.yaml
index 8f481b8..a4d88d0 100644
--- a/xyz/openbmc_project/State/Host.interface.yaml
+++ b/xyz/openbmc_project/State/Host.interface.yaml
@@ -17,6 +17,12 @@ properties:
           comparing the CurrentHostState and the RequestedHostTransition
           properties.
 
+    - name: HostRestartCause
+      type: enum[self.RestartCause]
+      default: Unknown
+      description: >
+         The information about what action last caused the system to restart.
+
 enumerations:
     - name: Transition
       description: >
@@ -45,3 +51,49 @@ enumerations:
         - name: 'Quiesced'
           description: >
             Host firmware is quiesced
+
+    - name: RestartCause
+      description: >
+        The information about what action last caused the system to restart.
+      values:
+        - name: Unknown
+          description: >
+            System start/restart detected but the reason is unknown.
+        - name: IpmiCommand
+          description: >
+            System start/restart detected and caused by ipmi command.
+        - name: ResetButton
+          description: >
+            System start/restart detected and caused by reset button.
+        - name: PowerButton
+          description: >
+            System start/restart detected and caused by power button.
+        - name: WatchdogTimer
+          description: >
+            System start/restart detected and casued by watchdog expiration.
+        - name: OEM
+          description: >
+            System start/restart detected and caused by OEM command.
+        - name: PowerPolicyAlwaysOn
+          description: >
+            System start/restart detected and caused by power restore policy
+            "chassis always powers up after AC/mains is applied or returns".
+        - name: PowerPolicyPreviousState
+          description: >
+            System start/restart detected and caused by power restore policy
+            "after AC/mains is applied or returns, power is restored to the
+            state was in effect when AC/mains removed or lost".
+        - name: PEFReset
+          description: >
+            System start/restart detected and caused by PEF(reset).
+        - name: PEFPowerCycle
+          description: >
+            System start/restart detected and caused by PEF(power-cycle).
+        - name: SoftReset
+          description: >
+            System start/restart detected and caused by soft reset like
+            "CTRL-ALT-DEL".
+        - name: RTCWakeup
+          description: >
+            System start/restart detected and caused by system real time
+            clock(RTC) wakeup.
\ No newline at end of file
-- 
2.17.0