From patchwork Mon Jul 19 13:19:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 1507031 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=JlQ4YwrT; 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 4GT2Z91SpGz9sXG for ; Mon, 19 Jul 2021 23:22:09 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GT2Z90lTrz3bb4 for ; Mon, 19 Jul 2021 23:22:09 +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=JlQ4YwrT; 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=JlQ4YwrT; 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 4GT2Y40l1Yz3bSn for ; Mon, 19 Jul 2021 23:21:11 +1000 (AEST) Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16JDE28Q086149 for ; Mon, 19 Jul 2021 09:21:10 -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=A8Oo7gN41ZYofsO5oyhJBPgHywPhpCimY98Stzk1dMc=; b=JlQ4YwrTqySALSciJVP/WGnX5UdLSc6/sCX1EjJ5vChIlRL0zAjss2YYgZnAijwgzj/p A8Qjs3gA6unr11mhnYciOiYPHvxyVsC0sxESsVHj8Pg8wUbyv7ngW95O7o30CfnTZhxP 8L3m7YcJXPzmkYnrw8LNYR/I8lopYAW8j4EvFsC29XvhS7CNbX2tnD7+FBUHI4B6bXQ5 tuw8VNQImoPGCXOpAUKJGpFy51Y1ItMu4O28qt7oAValJ+upkGB6xquCAsVcjphPRNlQ BeaagfKmmVx7dkUdJ5T97LKn5kHb9b2+SPemvowsoZRZVKRFNZhGyBn8lIErXuXWSwtv dQ== Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 39wa3h07bf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 19 Jul 2021 09:21:09 -0400 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 16JDCwYo028809 for ; Mon, 19 Jul 2021 13:21:07 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma03fra.de.ibm.com with ESMTP id 39upu88cr8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 19 Jul 2021 13:21:07 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 16JDL4kK26804610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 Jul 2021 13:21:04 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A562A4059; Mon, 19 Jul 2021 13:21:04 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2CEEFA404D; Mon, 19 Jul 2021 13:21:03 +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:02 +0000 (GMT) From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Mon, 19 Jul 2021 18:49:27 +0530 Message-Id: <20210719132012.150948-17-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: HJC-9R93KbQnH6KYuC2LXH0H8DwwJFqd X-Proofpoint-ORIG-GUID: HJC-9R93KbQnH6KYuC2LXH0H8DwwJFqd 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 adultscore=0 spamscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2107190076 Subject: [Skiboot] [PATCH 16/61] hdat/spira: Add ibm, power10-vas-x string to VAS compatible property 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: , Cc: Haren Myneni Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" From: Haren Myneni VAS SCOM base address and paste address format are changed on P10. This patch adds ibm,power10-vas-x string to compatible property per each VAS node. This compatible string is used to define the paste base address later during VAS initialization. Also enables NX on P10 without adding any compatible string since the NX SCOM base address is not changed. Signed-off-by: Haren Myneni Signed-off-by: Vasant Hegde --- hdata/spira.c | 25 ++++++++++++++++--------- include/vas.h | 5 +++-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/hdata/spira.c b/hdata/spira.c index 2fd3da108..b7101d72e 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "hdata.h" #include "hostservices.h" @@ -475,17 +476,23 @@ static void add_xive_node(struct dt_node *np) dt_add_property(xive, "force-assign-bars", NULL, 0); } -/* - * SCOM Base Address from P9 SCOM Assignment spreadsheet - */ -#define VAS_SCOM_BASE_ADDR 0x03011800 - static void add_vas_node(struct dt_node *np, int idx) { - struct dt_node *vas = dt_new_addr(np, "vas", VAS_SCOM_BASE_ADDR); + struct dt_node *vas; + const char *comp; + uint64_t base_addr; - dt_add_property_cells(vas, "reg", VAS_SCOM_BASE_ADDR, 0x300); - dt_add_property_string(vas, "compatible", "ibm,power9-vas-x"); + if (proc_gen == proc_gen_p9) { + base_addr = P9_VAS_SCOM_BASE_ADDR; + comp = "ibm,power9-vas-x"; + } else { + base_addr = VAS_SCOM_BASE_ADDR; + comp = "ibm,power10-vas-x"; + } + + vas = dt_new_addr(np, "vas", base_addr); + dt_add_property_cells(vas, "reg", base_addr, 0x300); + dt_add_property_string(vas, "compatible", comp); dt_add_property_cells(vas, "ibm,vas-id", idx); } @@ -906,10 +913,10 @@ static void add_nx_node(u32 gcid) "ibm,power8-nx"); break; case proc_gen_p9: + case proc_gen_p10: /* POWER9 NX is not software compatible with P8 NX */ dt_add_property_strings(nx, "compatible", "ibm,power9-nx"); break; - case proc_gen_p10: /* XXX P10 */ default: return; } diff --git a/include/vas.h b/include/vas.h index 1c06e5606..369c3807a 100644 --- a/include/vas.h +++ b/include/vas.h @@ -67,9 +67,10 @@ extern __attrconst uint64_t vas_get_wcbs_bar(int chipid); #define VAS_WINDOWS_PER_CHIP 65536 /* 64K */ /* - * SCOM Base Address from P9 SCOM Assignment spreadsheet + * SCOM Base Address from P9/P10 SCOM Assignment spreadsheet */ -#define VAS_SCOM_BASE_ADDR 0x03011800 +#define P9_VAS_SCOM_BASE_ADDR 0x03011800 +#define VAS_SCOM_BASE_ADDR 0x02011400 /* * NOTE: VAS_SCOM_BASE_ADDR (0x3011800) includes the SCOM ring of 6. So,