From patchwork Thu Mar 5 06:52:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 1249440 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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48Y1lR62bDz9sRR for ; Thu, 5 Mar 2020 17:57:23 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=A0s/L4Lo; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 48Y1lQ4rnvzDqhk for ; Thu, 5 Mar 2020 17:57:22 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::642; helo=mail-pl1-x642.google.com; envelope-from=oohall@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=A0s/L4Lo; dkim-atps=neutral Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 48Y1fL1KjjzDqkb for ; Thu, 5 Mar 2020 17:52:57 +1100 (AEDT) Received: by mail-pl1-x642.google.com with SMTP id t14so2205784plr.8 for ; Wed, 04 Mar 2020 22:52:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=n2MJP6zYki7q/pWh59pL7IYijRSiZH+UfO1iMKt/Kfo=; b=A0s/L4Lo648HuIzU+Bo0qwBcN9eUdhz2ODv//6fiAcZl0++EiVbG9+yRE7ozOQNv4i XmMa7sFhmDNji+rsH6JoKhFQLMyGxTQUMSs1phW8wmTeDfpfnowvz7B0gmpouw4VUlKY uQ3+egY/uDM04bV8sg5VXpxE6GHQIUFv8wxgE4S8/wwJc3XzWQduPUMLlGORgwFO1MqD MKTpGY+AoO8x36Ax7kcwfSMIVkvhdT/8Shv9OJmWL60Ap7CDh6UWX32K/HA4cW148SeM zJ/IqPj874IOokPGPLKdoSk4rcARHCvZ2N88tPKFTba0jVww3IEPdluJN5DU3C6T1MiD ZiwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=n2MJP6zYki7q/pWh59pL7IYijRSiZH+UfO1iMKt/Kfo=; b=V9FgZuiAY2UzLVkh4rGTSWmkDX6ci0oRwcsklaT3rjdzt4I6VADHRe+yR3qUVoGZEn wmi6XXEzodW2kdlFWmzA+G3pKr5zL98TlX8wOffZXZSGjgnG1wdPmBMf4OCWOWQRs30d DO3HhyzFDU2KJuahKbmDoCey5bX2fx/xxHoiu0XOmEapbzf8oI9+9ZBe63zd+2fvGB8j 9iPbZ/cwwTAgf0KEIgxAOfbXZd5V+vl3Q4zyQdFWqJ34qoqB89NJzMro8vmThnrxnEBj XqpbZ4oS259XeGMRlSjdb2vb1Cu18S+1i7sdu31NoxS0lvMSpdPi7G65kwQAHONkcSis 4Bvg== X-Gm-Message-State: ANhLgQ2A/hGbuVNjzfyF4+ML+xYxIp84lUiKkXuwWUrPC+Cht85UD7qh HsxtA84yiIGUlqScVQqoMziANoo2v5M= X-Google-Smtp-Source: ADFU+vsFwnela6ZK7FYjPCA6dTDspiJ6d+33IvE6m5Nl69UH9ku4Hj7LUSGbu5wbiyh3pyHDuciGww== X-Received: by 2002:a17:902:6809:: with SMTP id h9mr6635244plk.32.1583391173511; Wed, 04 Mar 2020 22:52:53 -0800 (PST) Received: from wafer.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id x66sm19130336pgb.9.2020.03.04.22.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2020 22:52:53 -0800 (PST) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Thu, 5 Mar 2020 17:52:00 +1100 Message-Id: <20200305065200.12009-1-oohall@gmail.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Subject: [Skiboot] [PATCH] hw/fsp: Fix GENERIC_FAILURE mailbox status code 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: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" The 0xEF return code is used to tell the hypervisor that the FSP was not able to replicate an NVRAM write to the secondary FSP. The GENERIC_FAILURE is using this code instead of the correct 0xFE code which indicates a generic error condition. We already have a FSP_STATUS_GENERIC_ERROR for 0xFE so convert the existing users of FSP_STATUS_GENERIC_FAILURE to use GENERIC_ERROR and remove the duplicate. Cc: Vasant Hegde Signed-off-by: Oliver O'Halloran Reviewed-by: Vasant Hegde --- hw/prd.c | 4 ++-- include/fsp.h | 3 +-- platforms/ibm-fsp/hostservices.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/prd.c b/hw/prd.c index 2301dafd0c9f..a119b92cc716 100644 --- a/hw/prd.c +++ b/hw/prd.c @@ -119,7 +119,7 @@ static void prd_msg_consumed(void *data, int status) if (status != 0) { prlog(PR_DEBUG, "PRD: Failed to send FSP -> HBRT message\n"); - notify_status = FSP_STATUS_GENERIC_FAILURE; + notify_status = FSP_STATUS_GENERIC_ERROR; } assert(platform.prd); assert(platform.prd->msg_response); @@ -372,7 +372,7 @@ int prd_hbrt_fsp_msg_notify(void *data, u32 dsize) { struct prd_fw_msg *fw_notify; int size, fw_notify_size; - int rc = FSP_STATUS_GENERIC_FAILURE; + int rc = FSP_STATUS_GENERIC_ERROR; if (!prd_enabled || !prd_active) { prlog(PR_NOTICE, "PRD: %s: PRD daemon is not ready\n", diff --git a/include/fsp.h b/include/fsp.h index 92f5459a5cd6..ec079a27461f 100644 --- a/include/fsp.h +++ b/include/fsp.h @@ -46,7 +46,6 @@ #define FSP_STATUS_FLASH_INPROGRESS 0x61 #define FSP_STATUS_FLASH_NOPROGRESS 0x62 #define FSP_STATUS_FLASH_INVALID_SIDE 0x63 -#define FSP_STATUS_GENERIC_ERROR 0xfe #define FSP_STATUS_EOF_ERROR 0x02 #define FSP_STATUS_DMA_ERROR 0x24 #define FSP_STATUS_BUSY 0x3e @@ -61,7 +60,7 @@ #define FSP_STATUS_TOD_PERMANENT_ERROR 0xAF /* Permanent error in TOD */ #define FSP_STATUS_I2C_TRANS_ERROR 0xE4 /* I2C device / transmission error */ #define FSP_STATUS_IND_PARTIAL_SUCCESS 0xE5 /* Indicator partial success */ -#define FSP_STATUS_GENERIC_FAILURE 0xEF /* Generic Failure in execution */ +#define FSP_STATUS_GENERIC_ERROR 0xFE /* Generic Failure in execution */ /* * FSP registers diff --git a/platforms/ibm-fsp/hostservices.c b/platforms/ibm-fsp/hostservices.c index d93c4f6e6b5c..d61d58378268 100644 --- a/platforms/ibm-fsp/hostservices.c +++ b/platforms/ibm-fsp/hostservices.c @@ -883,7 +883,7 @@ static bool hservice_hbrt_msg_notify(uint32_t cmd_sub_mod, struct fsp_msg *msg) } if (prd_hbrt_fsp_msg_notify(buf, len)) { - hservice_hbrt_msg_response(FSP_STATUS_GENERIC_FAILURE); + hservice_hbrt_msg_response(FSP_STATUS_GENERIC_ERROR); prlog(PR_NOTICE, "Unable to send FSP - HBRT message\n"); }