From patchwork Wed Feb 11 06:09:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neelesh Gupta X-Patchwork-Id: 438694 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 88015140192 for ; Wed, 11 Feb 2015 17:12:10 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 741D81A0429 for ; Wed, 11 Feb 2015 17:12:10 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e28smtp09.in.ibm.com (e28smtp09.in.ibm.com [122.248.162.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 1EEC51A0094 for ; Wed, 11 Feb 2015 17:12:06 +1100 (AEDT) Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 11 Feb 2015 11:42:04 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp09.in.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 11 Feb 2015 11:42:03 +0530 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 1D0B71258056 for ; Wed, 11 Feb 2015 11:43:09 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay02.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1B6C0Zb53018860 for ; Wed, 11 Feb 2015 11:42:00 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1B6C0WX019024 for ; Wed, 11 Feb 2015 11:42:00 +0530 Received: from localhost.localdomain ([9.124.35.217]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t1B6C0Lw019012; Wed, 11 Feb 2015 11:42:00 +0530 To: skiboot@lists.ozlabs.org, benh@au1.ibm.com, jk@ozlabs.org From: Neelesh Gupta Date: Wed, 11 Feb 2015 11:39:52 +0530 Message-ID: <20150211060941.2970.58191.stgit@localhost.localdomain> User-Agent: StGit/0.16 MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15021106-0033-0000-0000-000004498496 Subject: [Skiboot] [PATCH 1/2] include: Add PRD message definition X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" From: Jeremy Kerr Signed-off-by: Jeremy Kerr Signed-off-by: Neelesh Gupta --- 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: