[Skiboot] [PATCH v2 1/2] include: Add PRD message definition

Neelesh Gupta neelegup at linux.vnet.ibm.com
Thu Feb 12 03:39:46 AEDT 2015


From: Jeremy Kerr <jk at ozlabs.org>

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
Signed-off-by: Neelesh Gupta <neelegup at linux.vnet.ibm.com>
---
 include/opal.h  |   41 ++++++++++++++++++++++++++++++++++++++++-
 include/xscom.h |    8 ++++++++
 2 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/include/opal.h b/include/opal.h
index 6c9b13a..f9f502f 100644
--- a/include/opal.h
+++ b/include/opal.h
@@ -154,7 +154,8 @@
 #define OPAL_IPMI_SEND				107
 #define OPAL_IPMI_RECV				108
 #define OPAL_I2C_REQUEST			109
-#define OPAL_LAST				109
+#define OPAL_PRD_MSG				110
+#define OPAL_LAST				110
 
 #ifndef __ASSEMBLY__
 
@@ -398,6 +399,7 @@ enum OpalMessageType {
 	OPAL_MSG_SHUTDOWN,
 	OPAL_MSG_HMI_EVT,
 	OPAL_MSG_DPO,
+	OPAL_MSG_PRD,
 	OPAL_MSG_TYPE_MAX,
 };
 
@@ -754,6 +756,43 @@ typedef struct oppanel_line {
 	uint64_t 	line_len;
 } oppanel_line_t;
 
+enum opal_prd_msg_type {
+	OPAL_PRD_MSG_TYPE_INIT = 0,	/* RT --> FW */
+	OPAL_PRD_MSG_TYPE_FINI,		/* RT --> FW */
+	OPAL_PRD_MSG_TYPE_ATTN,		/* RT <-- FW */
+	OPAL_PRD_MSG_TYPE_ATTN_ACK,	/* RT --> FW */
+	OPAL_PRD_MSG_TYPE_OCC_ERROR,	/* RT <-- FW */
+	OPAL_PRD_MSG_TYPE_OCC_RESET,	/* RT <-- FW */
+	OPAL_PRD_MSG_TYPE_MAX,
+};
+
+struct opal_prd_msg {
+	uint8_t		type;
+	uint8_t		pad[3];
+	uint32_t	token;
+	union {
+		struct {
+			uint32_t	version;
+			uint64_t	ipoll;
+		} init;
+		struct {
+			uint64_t	proc;
+			uint64_t	ipoll_status;
+			uint64_t	ipoll_mask;
+		} attn;
+		struct {
+			uint64_t	proc;
+			uint64_t	ipoll_ack;
+		} attn_ack;
+		struct {
+			uint64_t	chip;
+		} occ_error;
+		struct {
+			uint64_t	chip;
+		} occ_reset;
+	};
+};
+
 /*
  * SG entries used for code update
  *
diff --git a/include/xscom.h b/include/xscom.h
index 5eed85f..970840b 100644
--- a/include/xscom.h
+++ b/include/xscom.h
@@ -154,6 +154,14 @@
 #define EX_PM_IDLE_ST_HIST_PM_STATE_MASK	PPC_BITMASK(0, 2)
 #define EX_PM_IDLE_ST_HIST_PM_STATE_LSH		PPC_BITLSHIFT(2)
 
+/* PRD registers */
+#define PRD_IPOLL_MASK_REG	0x01020013
+#define PRD_ERROR_STATUS	0x01020014
+#define PRD_IPOLL_XSTOP		PPC_BIT(0) /* Xstop for host/core/millicode */
+#define PRD_IPOLL_RECOV		PPC_BIT(1) /* Recoverable */
+#define PRD_IPOLL_SPEC_ATTN	PPC_BIT(2) /* Special attention */
+#define PRD_IPOLL_HOST_ATTN	PPC_BIT(3) /* Host attention */
+#define PRD_IPOLL_MASK		PPC_BITMASK(0, 3)
 
 /*
  * Error handling:



More information about the Skiboot mailing list