From patchwork Tue Jun 18 07:29:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1117656 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45Sfs21DD8z9s3l for ; Tue, 18 Jun 2019 17:31:18 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 45Sfs164SczDqfs for ; Tue, 18 Jun 2019 17:31:17 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 45Sfq55hgYzDqYb for ; Tue, 18 Jun 2019 17:29:37 +1000 (AEST) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5I7SZFt134478 for ; Tue, 18 Jun 2019 03:29:36 -0400 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t6qxjyjp8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 18 Jun 2019 03:29:35 -0400 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 18 Jun 2019 08:29:34 +0100 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 18 Jun 2019 08:29:32 +0100 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5I7TVn838994338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 18 Jun 2019 07:29:31 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5D832B2066 for ; Tue, 18 Jun 2019 07:29:31 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB5DFB205F for ; Tue, 18 Jun 2019 07:29:30 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.124]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP for ; Tue, 18 Jun 2019 07:29:30 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id 2B97A4E6BB3; Tue, 18 Jun 2019 17:29:28 +1000 (AEST) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 18 Jun 2019 17:29:09 +1000 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190618072925.5299-1-stewart@linux.ibm.com> References: <20190618072925.5299-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19061807-0060-0000-0000-00000351B1AC X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011283; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000286; SDB=6.01219633; UDB=6.00641533; IPR=6.01000774; MB=3.00027356; MTD=3.00000008; XFM=3.00000015; UTC=2019-06-18 07:29:32 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061807-0061-0000-0000-000049CFEF2C Message-Id: <20190618072925.5299-2-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-18_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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906180062 Subject: [Skiboot] [PATCH 01/17] op_display: make platform function rather than "FSP" specific 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" We have an implementation for non-FSP systems now, and we shouldn't be calling that from code in an fsp/ directory, so move op_display() to a platform function. Signed-off-by: Stewart Smith --- core/platform.c | 6 ++++++ hw/fsp/fsp-op-panel.c | 6 ++---- include/fsp.h | 2 ++ include/platform.h | 8 ++++++++ platforms/astbmc/barreleye.c | 1 + platforms/astbmc/firestone.c | 1 + platforms/astbmc/garrison.c | 1 + platforms/astbmc/habanero.c | 1 + platforms/astbmc/p8dnu.c | 1 + platforms/astbmc/p8dtu.c | 2 ++ platforms/astbmc/p9dsu.c | 1 + platforms/astbmc/palmetto.c | 1 + platforms/astbmc/romulus.c | 1 + platforms/astbmc/talos.c | 1 + platforms/astbmc/vesnin.c | 1 + platforms/astbmc/witherspoon.c | 1 + platforms/astbmc/zaius.c | 1 + platforms/ibm-fsp/firenze.c | 1 + platforms/ibm-fsp/zz.c | 1 + 19 files changed, 34 insertions(+), 4 deletions(-) diff --git a/core/platform.c b/core/platform.c index afa00adf7157..efcf63d7719e 100644 --- a/core/platform.c +++ b/core/platform.c @@ -295,3 +295,9 @@ int wait_for_resource_loaded(enum resource_id id, uint32_t idx) id, idx, waited); return r; } + +void op_display(enum op_severity sev, enum op_module mod, uint16_t code) +{ + if (platform.op_display) + platform.op_display(sev, mod, code); +} diff --git a/hw/fsp/fsp-op-panel.c b/hw/fsp/fsp-op-panel.c index 6477e73c1c4d..530871f8eb35 100644 --- a/hw/fsp/fsp-op-panel.c +++ b/hw/fsp/fsp-op-panel.c @@ -49,16 +49,14 @@ static void fsp_op_display_fatal(uint32_t w0, uint32_t w1) fsp_fatal_msg(&op_msg); } -void op_display(enum op_severity sev, enum op_module mod, uint16_t code) +void fsp_op_display(enum op_severity sev, enum op_module mod, uint16_t code) { struct fsp_msg *op_msg; uint32_t w0; uint32_t w1; - if (!fsp_present()) { - op_display_lpc(sev, mod, code); + if (!fsp_present()) return; - } w0 = sev << 16 | mod; diff --git a/include/fsp.h b/include/fsp.h index cfa51afbc7c4..0df7f93f9ff5 100644 --- a/include/fsp.h +++ b/include/fsp.h @@ -853,4 +853,6 @@ extern void fsp_chiptod_init(void); /* Terminate immediate */ extern void __attribute__((noreturn)) ibm_fsp_terminate(const char *msg); +void fsp_op_display(enum op_severity sev, enum op_module mod, uint16_t code); + #endif /* __FSP_H */ diff --git a/include/platform.h b/include/platform.h index 4f8627a3a680..9a77586a9cbf 100644 --- a/include/platform.h +++ b/include/platform.h @@ -237,6 +237,14 @@ struct platform { * SEEPROM update routine */ void (*seeprom_update)(void); + + /* + * Operator Panel display + * Physical FSP op panel or LPC port 80h + * or any other "get boot status out to the user" thing. + */ + void (*op_display)(enum op_severity sev, enum op_module mod, + uint16_t code); }; extern struct platform __platforms_start; diff --git a/platforms/astbmc/barreleye.c b/platforms/astbmc/barreleye.c index 554aacf12105..6cc55370acae 100644 --- a/platforms/astbmc/barreleye.c +++ b/platforms/astbmc/barreleye.c @@ -172,4 +172,5 @@ DECLARE_PLATFORM(barreleye) = { .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/firestone.c b/platforms/astbmc/firestone.c index 28719e300fb0..29ee377c2df6 100644 --- a/platforms/astbmc/firestone.c +++ b/platforms/astbmc/firestone.c @@ -159,4 +159,5 @@ DECLARE_PLATFORM(firestone) = { .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/garrison.c b/platforms/astbmc/garrison.c index ddd33721ccfd..b931057dc740 100644 --- a/platforms/astbmc/garrison.c +++ b/platforms/astbmc/garrison.c @@ -306,4 +306,5 @@ DECLARE_PLATFORM(garrison) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/habanero.c b/platforms/astbmc/habanero.c index ab010278a711..068c31545820 100644 --- a/platforms/astbmc/habanero.c +++ b/platforms/astbmc/habanero.c @@ -150,4 +150,5 @@ DECLARE_PLATFORM(habanero) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/p8dnu.c b/platforms/astbmc/p8dnu.c index 391aa7a8b814..8d7d16be341e 100644 --- a/platforms/astbmc/p8dnu.c +++ b/platforms/astbmc/p8dnu.c @@ -362,4 +362,5 @@ DECLARE_PLATFORM(p8dnu) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/p8dtu.c b/platforms/astbmc/p8dtu.c index 6f66dc22e8e7..f4a0c7fb97a5 100644 --- a/platforms/astbmc/p8dtu.c +++ b/platforms/astbmc/p8dtu.c @@ -263,6 +263,7 @@ DECLARE_PLATFORM(p8dtu1u) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; DECLARE_PLATFORM(p8dtu2u) = { @@ -281,5 +282,6 @@ DECLARE_PLATFORM(p8dtu2u) = { .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, .seeprom_update = astbmc_seeprom_update, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/p9dsu.c b/platforms/astbmc/p9dsu.c index eeb8fd76284d..72645ec1c615 100644 --- a/platforms/astbmc/p9dsu.c +++ b/platforms/astbmc/p9dsu.c @@ -732,4 +732,5 @@ DECLARE_PLATFORM(p9dsu1u) = { .elog_commit = ipmi_elog_commit, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/palmetto.c b/platforms/astbmc/palmetto.c index 29739c03b771..9136d15e9908 100644 --- a/platforms/astbmc/palmetto.c +++ b/platforms/astbmc/palmetto.c @@ -133,4 +133,5 @@ DECLARE_PLATFORM(palmetto) = { .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/romulus.c b/platforms/astbmc/romulus.c index 7bb07cce5363..3e4003a772e2 100644 --- a/platforms/astbmc/romulus.c +++ b/platforms/astbmc/romulus.c @@ -82,4 +82,5 @@ DECLARE_PLATFORM(romulus) = { .elog_commit = ipmi_elog_commit, .exit = astbmc_exit, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/talos.c b/platforms/astbmc/talos.c index 0dea87ef23b5..f4cbb769be0f 100644 --- a/platforms/astbmc/talos.c +++ b/platforms/astbmc/talos.c @@ -83,4 +83,5 @@ DECLARE_PLATFORM(talos) = { .elog_commit = ipmi_elog_commit, .exit = astbmc_exit, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/vesnin.c b/platforms/astbmc/vesnin.c index 47e98e7198c4..8ec1ebc62566 100644 --- a/platforms/astbmc/vesnin.c +++ b/platforms/astbmc/vesnin.c @@ -352,4 +352,5 @@ DECLARE_PLATFORM(vesnin) = { .resource_loaded = flash_resource_loaded, .exit = ipmi_wdt_final_reset, .terminate = ipmi_terminate, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c index 52971ecfd6b6..dd53b4f72247 100644 --- a/platforms/astbmc/witherspoon.c +++ b/platforms/astbmc/witherspoon.c @@ -512,4 +512,5 @@ DECLARE_PLATFORM(witherspoon) = { .pci_get_slot_info = dt_slot_get_slot_info, .ocapi = &witherspoon_ocapi, .npu2_device_detect = witherspoon_npu2_device_detect, + .op_display = op_display_lpc, }; diff --git a/platforms/astbmc/zaius.c b/platforms/astbmc/zaius.c index 23a40725ccf8..ae8ca4bb885f 100644 --- a/platforms/astbmc/zaius.c +++ b/platforms/astbmc/zaius.c @@ -269,4 +269,5 @@ DECLARE_PLATFORM(zaius) = { .terminate = ipmi_terminate, .ocapi = &zaius_ocapi, .npu2_device_detect = npu2_i2c_presence_detect, + .op_display = op_display_lpc, }; diff --git a/platforms/ibm-fsp/firenze.c b/platforms/ibm-fsp/firenze.c index dc705466acb5..8f6a3921b2f6 100644 --- a/platforms/ibm-fsp/firenze.c +++ b/platforms/ibm-fsp/firenze.c @@ -226,4 +226,5 @@ DECLARE_PLATFORM(firenze) = { .resource_loaded = fsp_resource_loaded, .sensor_read = ibm_fsp_sensor_read, .terminate = ibm_fsp_terminate, + .op_display = fsp_op_display, }; diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c index 705906a041d5..09599f85e842 100644 --- a/platforms/ibm-fsp/zz.c +++ b/platforms/ibm-fsp/zz.c @@ -90,4 +90,5 @@ DECLARE_PLATFORM(zz) = { .terminate = ibm_fsp_terminate, .ocapi = &zz_ocapi, .npu2_device_detect = npu2_i2c_presence_detect, + .op_display = fsp_op_display, };