From patchwork Tue Nov 13 05:28:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shilpasri G Bhat X-Patchwork-Id: 996788 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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42vGVZ1p3Gz9sBZ for ; Tue, 13 Nov 2018 16:32:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42vGVX2c0jzF3F5 for ; Tue, 13 Nov 2018 16:32:52 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=shilpa.bhat@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42vGVP6mmZzF3Dl for ; Tue, 13 Nov 2018 16:32:45 +1100 (AEDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAD5Tatj052936 for ; Tue, 13 Nov 2018 00:32:43 -0500 Received: from e06smtp02.uk.ibm.com (e06smtp02.uk.ibm.com [195.75.94.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 2nqrd38d6s-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Nov 2018 00:32:42 -0500 Received: from localhost by e06smtp02.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Nov 2018 05:32:41 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp02.uk.ibm.com (192.168.101.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 13 Nov 2018 05:32:39 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAD5WcUO55181476 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Nov 2018 05:32:38 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C913B4C044; Tue, 13 Nov 2018 05:32:38 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EABCE4C04E; Tue, 13 Nov 2018 05:32:37 +0000 (GMT) Received: from oc4502181600.ibm.com (unknown [9.85.72.51]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 13 Nov 2018 05:32:37 +0000 (GMT) From: Shilpasri G Bhat To: skiboot@lists.ozlabs.org Date: Tue, 13 Nov 2018 10:58:54 +0530 X-Mailer: git-send-email 1.8.3.1 X-TM-AS-GCONF: 00 x-cbid: 18111305-0008-0000-0000-00000291EBF1 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111305-0009-0000-0000-000021FBFA83 Message-Id: <1542086934-13580-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-13_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=901 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811130052 Subject: [Skiboot] [PATCH v2] opal-prd: hservice: Enable hservice->wakeup() in BMC X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This patch enables HBRT to use HYP special wakeup register in openBMC which until now was only used in FSP based machines. This patch also adds a capability check for opal-prd so that HBRT can decide if the host special wakeup register can be used. Fixes: 49999302251b("opal-prd: Add support for runtime OCC reset in ZZ") Signed-off-by: Shilpasri G Bhat --- external/opal-prd/hostboot-interface.h | 1 + external/opal-prd/opal-prd.c | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/external/opal-prd/hostboot-interface.h b/external/opal-prd/hostboot-interface.h index 41ffcbc..9df6888 100644 --- a/external/opal-prd/hostboot-interface.h +++ b/external/opal-prd/hostboot-interface.h @@ -59,6 +59,7 @@ enum MemoryError_t * Previous implementations may have incorrectly ignored failures. */ #define HBRT_CAPS_OPAL_HAS_XSCOM_RC (1ul << 0) +#define HBRT_CAPS_OPAL_HAS_WAKEUP_SUPPORT (1ul << 1) /** * Load types for the load_pm_complex() interface diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c index e3b4439..1452a17 100644 --- a/external/opal-prd/opal-prd.c +++ b/external/opal-prd/opal-prd.c @@ -747,7 +747,8 @@ int hservice_memory_error(uint64_t i_start_addr, uint64_t i_endAddr, uint64_t hservice_get_interface_capabilities(uint64_t set) { if (set == HBRT_CAPS_SET1_OPAL) - return HBRT_CAPS_OPAL_HAS_XSCOM_RC; + return HBRT_CAPS_OPAL_HAS_XSCOM_RC || + HBRT_CAPS_OPAL_HAS_WAKEUP_SUPPORT; return 0; } @@ -2196,9 +2197,6 @@ static int run_prd_daemon(struct opal_prd_ctx *ctx) hinterface.pnor_write = NULL; } - if (!is_fsp_system()) - hinterface.wakeup = NULL; - ipmi_init(ctx); pr_debug("HBRT: calling hservices_init");