From patchwork Thu Oct 14 15:56:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lombard X-Patchwork-Id: 1540987 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=JgpAsoH7; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HVYvX0pyKz9sNH for ; Fri, 15 Oct 2021 02:57:44 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HVYvW734wz30Pj for ; Fri, 15 Oct 2021 02:57:43 +1100 (AEDT) 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=JgpAsoH7; 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=clombard@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=JgpAsoH7; 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 4HVYtx3pJHz2yNC for ; Fri, 15 Oct 2021 02:57:12 +1100 (AEDT) Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19EFUb4m002323 for ; Thu, 14 Oct 2021 11:57:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=pp1; bh=ZJqAVZE3ruW2B0iG8RczsPqRP4Y+fDqljCxKeaypyt4=; b=JgpAsoH7n30sqlo/fFOPs+dc46H4LX+bvBF5bboFoa9wp2fiqBNnopIqClRhoFZcesYI Cxif1UcnXnF6V0vrqM77u3VHrTpAnd0M79Hf+RKYQX22SNpqpArkY8AWaTAci33+VzyZ U5kBUhVJ6q4KGCv7btnxiR29IoYHFINsDl5cXS/FPLI/X1dNALs1gp1i2dN+bnrQ3l3I laX9Q2vZhghA6zj9l8QiECuYAy9PXjsKK9KqD4u+Il1+FZmlIFFb7vfZk/X14J2onpcn jRYeLda/EXRyxslvPWer8f63qU30PawNq1shXYZ1/9t0rG3t6u8DW80Mb+B9eZKPirbD bw== 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 3bpq8kgjsr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Oct 2021 11:57:10 -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 19EFXd6Z014143 for ; Thu, 14 Oct 2021 15:57:08 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma05fra.de.ibm.com with ESMTP id 3bk2qabwry-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 14 Oct 2021 15:57:07 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19EFpOSE60424560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 14 Oct 2021 15:51:24 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0589611C05B for ; Thu, 14 Oct 2021 15:57:05 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DA21711C054 for ; Thu, 14 Oct 2021 15:57:04 +0000 (GMT) Received: from li-ed209401-43e8-11cb-8043-c0c0b85d70f7.biot.fr.ibm.com (unknown [9.144.57.15]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Thu, 14 Oct 2021 15:57:04 +0000 (GMT) From: Christophe Lombard To: skiboot@lists.ozlabs.org Date: Thu, 14 Oct 2021 17:56:49 +0200 Message-Id: <20211014155704.46441-1-clombard@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: _R4dlZG87gqB2rSHiXeTTyIqs7LuSMb7 X-Proofpoint-ORIG-GUID: _R4dlZG87gqB2rSHiXeTTyIqs7LuSMb7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-14_09,2021-10-14_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 phishscore=0 clxscore=1015 adultscore=0 spamscore=0 lowpriorityscore=1 mlxlogscore=291 suspectscore=0 mlxscore=0 bulkscore=1 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110140093 Subject: [Skiboot] [PATCH V3 00/15] OpenCAPI support for P10 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 Open Coherently Attached Processor Interface (OCAPI) is used to allow an Attached Functional Unit (AFU) to connect to the Processor Chip's system bus in a high speed and cache coherent manner. This series implements OpenCAPI support for P10. The series is divided as follows: - Patches 1-2: general refactoring Add various structs and fields we'll need later. - Patch 3: Detect devices on Rainier platform - Patches 4-8: setting up the PAU - Patch 9: create OpenCAPI PHBs - Patch 10: dumping hmi scoms - Patch 11-12: Link training and Phy configuration - Patch 13: OPAL API calls We define three new API calls for handling the Shared Process Area and setting OpenCAPI TL template capabilities. - Patch 14: mmio invalidates. Use MMIO registers to perform TLB operations. - Patch 15: lpc memory support. This series has been tested on a Rainier system with a HMS/Bono and TresHombres cards Changelog[v3] - Rebase to latest upstream. - patch2: - hdata_to_dt-check-dt Error. - Change the header files in pau.c - patch4: - Phys map direct test FAILED: Entry overlaps and Hole in map. Changelog[v2] - Rebase to latest upstream. - patch1: - Rework opal call functions. - Remove patch2 due to the series to remove npu3 support. - patch3: - HDAT part for PAU have been removed. Keep only pau_dt_create() for the definitions. - Update "ibm,phb-index" definition. - patch4: - rainier_i2c_dev_detect() has been a little bit reworked. - patch11: - Avoid going back to the device tree to read the scom base. - patch14: - Rework opal call functions. - patch16: - Change mapping of OCAPI_MEM Christophe Lombard (15): npu2: move opal api pau: introduce support rainier: detect pau devices pau: assign bars pau: create phb pau: enabling opencapi pau: translation layer configuration pau: enable interrupt on error pau: complete phb ops pau: hmi scom dump pau: phy init pau: link training pau: update current opal call functions pau: mmio invalidates pau: Add support for OpenCAPI Persistent Memory devices. core/hmi.c | 276 +++-- core/init.c | 3 + core/pci-opal.c | 9 +- core/pci.c | 4 +- hdata/spira.c | 31 +- hdata/spira.h | 2 +- hw/Makefile.inc | 2 +- hw/npu-opal.c | 113 ++ hw/npu2-common.c | 27 +- hw/npu2-opencapi.c | 58 +- hw/pau-hw-procedures.c | 310 ++++++ hw/pau.c | 2095 ++++++++++++++++++++++++++++++++++++ hw/phys-map.c | 66 +- include/npu2-regs.h | 5 + include/npu2.h | 12 +- include/pau-regs.h | 223 ++++ include/pau.h | 220 ++++ include/pci.h | 1 + include/phys-map.h | 4 + include/platform.h | 9 + include/skiboot.h | 1 + include/xscom-p10-regs.h | 51 + platforms/astbmc/rainier.c | 239 ++++ 23 files changed, 3520 insertions(+), 241 deletions(-) create mode 100644 hw/pau-hw-procedures.c create mode 100644 hw/pau.c create mode 100644 include/pau-regs.h create mode 100644 include/pau.h