From patchwork Tue Sep 13 10:27:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lombard X-Patchwork-Id: 1677232 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: legolas.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=JQcc4NiN; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MRfpg6Mz2z1ynm for ; Tue, 13 Sep 2022 20:29:31 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4MRfpg3kH2z3cBK for ; Tue, 13 Sep 2022 20:29:31 +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=JQcc4NiN; 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=JQcc4NiN; 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 4MRfmM1tnWz3c6H for ; Tue, 13 Sep 2022 20:27:31 +1000 (AEST) Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28D9gE8g010244 for ; Tue, 13 Sep 2022 10:27:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=ZeE3a5755t/4RGOkI+x4Q6AnWXEiqEwsYe3QRmXxPsQ=; b=JQcc4NiNtxW4FDIFKx1xLOGqtcv6x+LV5iRkC/2UYXWL1MkdRUmSt2XoeR73gYgLnNiO psb0aLlh8Ez1uBgIl8vzCLhlvZGdNGKDpP0jbZvtzDq4N7wPTO0qA0kDU+GRnBE4Da8/ 0DREstI3LMfr4mW9JtB1ZH8ToUrl/LZT7iWL4Bx9335w3rJcYkjtQXy5eKR8Rd/wioWm Yq0OizMLTYBM85gzzw9Rr5Zr0QnhovyDrv8UeQZGteEYje8/kzOVoLGoPiQwR7q/Y1C1 PK5bautvzBtOBKeIp/6uGHmnbmHBRINh2ry2DOTY1S4Rs+G6ljF1BKtpY983XLfEEU7N Xw== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jjqf2hj0x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Sep 2022 10:27:29 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 28DAKlef006790 for ; Tue, 13 Sep 2022 10:27:26 GMT Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by ppma03ams.nl.ibm.com with ESMTP id 3jgj79kncy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Sep 2022 10:27:26 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 28DAROdI34799996 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 13 Sep 2022 10:27:24 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7DCD911C050 for ; Tue, 13 Sep 2022 10:27:24 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 53A0911C04A for ; Tue, 13 Sep 2022 10:27:24 +0000 (GMT) Received: from li-ac0ca24c-3330-11b2-a85c-93224c50ad7a.ibm.com.com (unknown [9.171.35.136]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP for ; Tue, 13 Sep 2022 10:27:24 +0000 (GMT) From: Christophe Lombard To: skiboot@lists.ozlabs.org Date: Tue, 13 Sep 2022 12:27:09 +0200 Message-Id: <20220913102724.65563-1-clombard@linux.vnet.ibm.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: -jZaPaethGpyUNO9C_6hqsjpAWLRXx5H X-Proofpoint-GUID: -jZaPaethGpyUNO9C_6hqsjpAWLRXx5H X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-13_03,2022-09-13_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxscore=0 priorityscore=1501 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209130045 Subject: [Skiboot] [PATCH V3 00/15] Complete PLDM responder and enable PLDM 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" This set of patches allows to complete platform responder to handle platform events (set events, event messages, state sensors reading, state effecters) and fru messages from the BMC. Specific astbmc features (watchdog timer, Real Time Clock, Opal IPMI calls) are also supported. To enable the new PLDM features, add CONFIG_PLDM as a parameter: make .... CONFIG_PLDM=1 This patch set should be applied on top of these previous sets: - Implement virtual flash content using PLDM. - Import external libraries for MCTP/PLDM protocols. - Implement MCTP and PLDM features. Changelog[v3] - Rebase to latest upstream. - patch1 : - Use new pldm requests queue handler. - patch13: - Use new pldm requests queue handler. - patch14: - Use new pldm requests queue handler. - Handle GET_DEVICE_ID_CMD and GET_DEVICE_GUID_CMD. - patch15: - Remove Rainier System part. Changelog[v2] - Rebase to latest upstream. - patch1 : - Update some comments. - Decrement sequence_number in case of issue. - patch2 : - Invoke the appropriate callback handler. - patch5 : - occ reset for default chip. - patch7 : - Update some comments. - patch8 : - Rework adding hosted PDRs. - Add boot progress PDR. - patch9 : - Add free buffer. - patch11: - Add free buffer. - patch12: - Add sensor state changed event. - patch15: - Add boot progress change. Christophe Lombard (15): core/pldm: Handle Watchdog timer. core/pldm: Decode the SetEventReceiver request core/pldm: Decode the PlatformEventMessage request core/pldm: Decode the GetStateSensorReadings request core/pldm: Decode the SetStateEffecterStates request core/pldm: Find PDR record by record handle core/pldm: Encode PLDM PDR Repository Change eventData core/pldm: Update or create terminus locator in the given repo core/pldm: Decode the GetPDR request core/pldm: Decode the GetFRURecordTableMetadata request core/pldm: Decode the GetFruRecordTable request core/pldm: Update boot progress state core/pldm: Register OPAL_RTC_READ/WRITE calls back core/pldm: Register OPAL_IPMI_SEND/RECV calls back platforms/astbmc: Enable PLDM support core/init.c | 29 +- core/pldm/Makefile.inc | 3 + core/pldm/pldm-fru-requests.c | 65 +++ core/pldm/pldm-mctp.c | 11 + core/pldm/pldm-opal.c | 291 ++++++++++++ core/pldm/pldm-platform-requests.c | 499 ++++++++++++++++++++ core/pldm/pldm-responder.c | 710 ++++++++++++++++++++++++++++- core/pldm/pldm-rtc.c | 244 ++++++++++ core/pldm/pldm-watchdog.c | 134 ++++++ core/pldm/pldm.h | 28 ++ include/pldm.h | 24 + platforms/astbmc/astbmc.h | 4 + platforms/astbmc/common.c | 35 ++ platforms/astbmc/pnor.c | 25 + platforms/qemu/qemu.c | 6 + 15 files changed, 2104 insertions(+), 4 deletions(-) create mode 100644 core/pldm/pldm-opal.c create mode 100644 core/pldm/pldm-rtc.c create mode 100644 core/pldm/pldm-watchdog.c