aboutsummaryrefslogtreecommitdiff
path: root/include/opal.h
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2014-07-25 00:11:50 +0530
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-25 14:10:52 +1000
commit91f1712faaa1b8774bb2198e580d1d210ae473cb (patch)
tree9e3f70291f12828d16d76e6de2451f8885c8e438 /include/opal.h
parente02dd7f7d86f54273a512a4546c716ce659a38c8 (diff)
downloadskiboot-91f1712faaa1b8774bb2198e580d1d210ae473cb.zip
skiboot-91f1712faaa1b8774bb2198e580d1d210ae473cb.tar.gz
skiboot-91f1712faaa1b8774bb2198e580d1d210ae473cb.tar.bz2
opal: Add opal call to handle HMI.
With new proposed change, Linux will get the HMI interrupt directly. Linux will then invoke opal_handle_hmi to handle HMI recovery in opal. After handling HMI errors, opal will generate an OPAL HMI event and queue it up in opal message infrastructure so that Linux host can pull the event and act upon it accordingly. This patch also adds new message type for HMI event. Changes in v2: - Removed the token argument from opal_handle_hmi() Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/opal.h')
-rw-r--r--include/opal.h50
1 files changed, 48 insertions, 2 deletions
diff --git a/include/opal.h b/include/opal.h
index 22f6a9f..4833726 100644
--- a/include/opal.h
+++ b/include/opal.h
@@ -133,7 +133,8 @@
#define OPAL_WRITE_OPPANEL_ASYNC 95
#define OPAL_PCI_ERR_INJCT 96
#define OPAL_PCI_EEH_FREEZE_SET 97
-#define OPAL_LAST 97
+#define OPAL_HANDLE_HMI 98
+#define OPAL_LAST 98
#ifndef __ASSEMBLY__
@@ -429,6 +430,7 @@ enum OpalMessageType {
OPAL_MSG_MEM_ERR,
OPAL_MSG_EPOW,
OPAL_MSG_SHUTDOWN,
+ OPAL_MSG_HMI_EVT,
OPAL_MSG_TYPE_MAX,
};
@@ -544,6 +546,50 @@ struct OpalMemoryErrorData {
} u;
};
+/* HMI interrupt event */
+enum OpalHMI_Version {
+ OpalHMIEvt_V1 = 1,
+};
+
+enum OpalHMI_Severity {
+ OpalHMI_SEV_NO_ERROR = 0,
+ OpalHMI_SEV_WARNING = 1,
+ OpalHMI_SEV_ERROR_SYNC = 2,
+ OpalHMI_SEV_FATAL = 3,
+};
+
+enum OpalHMI_Disposition {
+ OpalHMI_DISPOSITION_RECOVERED = 0,
+ OpalHMI_DISPOSITION_NOT_RECOVERED = 1,
+};
+
+enum OpalHMI_ErrType {
+ OpalHMI_ERROR_MALFUNC_ALERT = 0,
+ OpalHMI_ERROR_PROC_RECOV_DONE,
+ OpalHMI_ERROR_PROC_RECOV_DONE_AGAIN,
+ OpalHMI_ERROR_PROC_RECOV_MASKED,
+ OpalHMI_ERROR_TFAC,
+ OpalHMI_ERROR_TFMR_PARITY,
+ OpalHMI_ERROR_HA_OVERFLOW_WARN,
+ OpalHMI_ERROR_XSCOM_FAIL,
+ OpalHMI_ERROR_XSCOM_DONE,
+ OpalHMI_ERROR_SCOM_FIR,
+ OpalHMI_ERROR_DEBUG_TRIG_FIR,
+ OpalHMI_ERROR_HYP_RESOURCE,
+};
+
+struct OpalHMIEvent {
+ uint8_t version; /* 0x00 */
+ uint8_t severity; /* 0x01 */
+ uint8_t type; /* 0x02 */
+ uint8_t disposition; /* 0x03 */
+ uint8_t reserved_1[4]; /* 0x04 */
+
+ uint64_t hmer;
+ /* TFMR register. Valid only for TFAC and TFMR_PARITY error type. */
+ uint64_t tfmr;
+};
+
enum {
OPAL_P7IOC_DIAG_TYPE_NONE = 0,
OPAL_P7IOC_DIAG_TYPE_RGC = 1,
@@ -831,7 +877,7 @@ extern void opal_del_host_sync_notifier(bool (*notify)(void *data));
/*
* Opal internal function prototype
*/
-extern int handle_hmi_exception(uint64_t hmer);
+extern int handle_hmi_exception(uint64_t hmer, struct OpalHMIEvent *hmi_evt);
#endif /* __ASSEMBLY__ */
#endif /* __OPAL_H */