From patchwork Wed Feb 11 16:39:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neelesh Gupta X-Patchwork-Id: 438900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C5E51400B7 for ; Thu, 12 Feb 2015 03:52:56 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 3B7C01A09AF for ; Thu, 12 Feb 2015 03:52:56 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e23smtp04.au.ibm.com (e23smtp04.au.ibm.com [202.81.31.146]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id C198E1A094B for ; Thu, 12 Feb 2015 03:52:53 +1100 (AEDT) Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 12 Feb 2015 02:42:49 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp04.au.ibm.com (202.81.31.210) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 12 Feb 2015 02:42:46 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id D5564357804C for ; Thu, 12 Feb 2015 03:42:44 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1BGgati49479918 for ; Thu, 12 Feb 2015 03:42:44 +1100 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1BGgBA7023638 for ; Thu, 12 Feb 2015 03:42:11 +1100 Received: from localhost.localdomain ([9.79.150.237]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t1BGg9cB023388; Thu, 12 Feb 2015 03:42:10 +1100 To: skiboot@lists.ozlabs.org, benh@au1.ibm.com, jk@ozlabs.org From: Neelesh Gupta Date: Wed, 11 Feb 2015 22:09:46 +0530 Message-ID: <20150211163923.1801.73462.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: 15021116-0013-0000-0000-000000CDB9F7 Subject: [Skiboot] [PATCH v2 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 Reviewed-by: Joel Stanley --- 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: