From patchwork Mon Jul 19 13:19:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 1507043 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=bYYLB4o0; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 4GT2bG06g4z9sX5 for ; Mon, 19 Jul 2021 23:23:06 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GT2bF6Vg7z3bkk for ; Mon, 19 Jul 2021 23:23:05 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=bYYLB4o0; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=hegdevasant@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=bYYLB4o0; dkim-atps=neutral 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 4GT2YX0G7fz3bbf for ; Mon, 19 Jul 2021 23:21:35 +1000 (AEST) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16JD4X5s027867 for ; Mon, 19 Jul 2021 09:21:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=oxfJj/Jif53INxlI2iWUMsVmUKy2EyQiTAwTTOWH13M=; b=bYYLB4o0uWvaokQa49LjRM5tm5Vw6gTihT5BjqKlO/CDyzVnurJ4IIFVCPRPRa5yZl1A Iiy78PAHkHwQQ8Wc0gEkr1V6dQYuJ2HzxYJHpM71y7y3IosIAbSaDMPucmcS/2A5isgB Vpw//FBlTwEM1Fu3QfWbVSpeDjm19e5KHhvy+ojiwROsXpkVKgvcSOrQ0RYBsUbRE4bU 9O7u/qVjOklEzRvxlQ9/dypUkEJ3kE/S5z0sKHgPUoaRp8pWZsGj9Nf7dVl3AQOPh1zy yOxGiceQ1WC9W3iefTuNFulPacQBYBpqGWrm6rlrwPaeEe46twRWu85ItAzELZmS1FlO Yw== Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 39w97va4dg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 19 Jul 2021 09:21:34 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16JDEHqK029420 for ; Mon, 19 Jul 2021 13:21:31 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma05fra.de.ibm.com with ESMTP id 39upu88crj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 19 Jul 2021 13:21:31 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16JDLSKc24445332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Jul 2021 13:21:28 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B9D42A4053; Mon, 19 Jul 2021 13:21:28 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B55A3A4055; Mon, 19 Jul 2021 13:21:27 +0000 (GMT) Received: from hegdevasant.in.ibm.com (unknown [9.85.86.230]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 19 Jul 2021 13:21:27 +0000 (GMT) From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Mon, 19 Jul 2021 18:49:40 +0530 Message-Id: <20210719132012.150948-30-hegdevasant@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210719132012.150948-1-hegdevasant@linux.vnet.ibm.com> References: <20210719132012.150948-1-hegdevasant@linux.vnet.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KFL3N1J9xAJAormMRAmLxtPJbhcZAiqz X-Proofpoint-ORIG-GUID: KFL3N1J9xAJAormMRAmLxtPJbhcZAiqz X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-19_05:2021-07-19, 2021-07-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 phishscore=0 impostorscore=0 clxscore=1015 mlxscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 bulkscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107190076 Subject: [Skiboot] [PATCH 29/61] platform: Add Denali platform support 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" Denali is P10 system. But FSP interaction (MBOX protocol) is same as ZZ. Hence add denali platform detection code inside zz.c for now. We can think of adding separate platform later. Also enable : - P10 TCE mapping support - Detect PHBs Signed-off-by: Vasant Hegde --- hdata/iohub.c | 4 ++++ hdata/spira.h | 1 + hw/fsp/fsp-psi.c | 1 + platforms/ibm-fsp/hostservices.c | 4 ++++ platforms/ibm-fsp/zz.c | 6 ++++++ 5 files changed, 16 insertions(+) diff --git a/hdata/iohub.c b/hdata/iohub.c index 92df48b8f..92655407e 100644 --- a/hdata/iohub.c +++ b/hdata/iohub.c @@ -843,6 +843,10 @@ static void io_parse_fru(const void *sp_iohubs) prlog(PR_INFO, "CEC: Rainier !\n"); io_add_p9(hub, sp_iohubs); break; + case CECHUB_HUB_DENALI: + prlog(PR_INFO, "CEC: Denali !\n"); + io_add_p9(hub, sp_iohubs); + break; default: prlog(PR_ERR, "CEC: Hub ID 0x%04x unsupported !\n", hub_id); diff --git a/hdata/spira.h b/hdata/spira.h index 7fcf5c302..afdc9228a 100644 --- a/hdata/spira.h +++ b/hdata/spira.h @@ -667,6 +667,7 @@ struct cechub_io_hub { #define CECHUB_HUB_CUMULUS_DUOMO 0x0030 /* cumulus+duomo from spec */ #define CECHUB_HUB_AXONE_HOPPER 0x0040 /* axone+hopper */ #define CECHUB_HUB_RAINIER 0x0050 +#define CECHUB_HUB_DENALI 0x0051 __be32 ec_level; __be32 aff_dom2; /* HDAT < v9.x only */ __be32 aff_dom3; /* HDAT < v9.x only */ diff --git a/hw/fsp/fsp-psi.c b/hw/fsp/fsp-psi.c index aeaf47e89..38f130dd7 100644 --- a/hw/fsp/fsp-psi.c +++ b/hw/fsp/fsp-psi.c @@ -37,6 +37,7 @@ void psi_init_for_fsp(struct psi *psi) switch (proc_gen) { case proc_gen_p8: case proc_gen_p9: + case proc_gen_p10: out_be64(psi->regs + PSIHB_TAR, PSI_TCE_TABLE_BASE | PSIHB_TAR_256K_ENTRIES); break; diff --git a/platforms/ibm-fsp/hostservices.c b/platforms/ibm-fsp/hostservices.c index 81fd6bdd3..accc0989a 100644 --- a/platforms/ibm-fsp/hostservices.c +++ b/platforms/ibm-fsp/hostservices.c @@ -551,6 +551,10 @@ int hservice_wakeup(uint32_t i_core, uint32_t i_mode) i_core &= SPR_PIR_P9_MASK; i_core <<= 2; break; + case proc_gen_p10: + i_core &= SPR_PIR_P10_MASK; + i_core <<= 2; + break; default: return OPAL_UNSUPPORTED; } diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c index 7c6050ab7..493d6030a 100644 --- a/platforms/ibm-fsp/zz.c +++ b/platforms/ibm-fsp/zz.c @@ -160,6 +160,12 @@ static bool zz_probe(void) if (dt_node_is_compatible(dt_root, "ibm,fleetwood-m9s")) { return true; } + + /* Add Denali FSP platform and map it to ZZ */ + if (dt_node_is_compatible(dt_root, "ibm,denali")) { + return true; + } + return false; }