Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2216958/?format=api
{ "id": 2216958, "url": "http://patchwork.ozlabs.org/api/patches/2216958/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260327125318.1037146-2-padmarao.begari@amd.com/", "project": { "id": 18, "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api", "name": "U-Boot", "link_name": "uboot", "list_id": "u-boot.lists.denx.de", "list_email": "u-boot@lists.denx.de", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260327125318.1037146-2-padmarao.begari@amd.com>", "list_archive_url": null, "date": "2026-03-27T12:52:55", "name": "[1/4] firmware: zynqmp: Add HW PCR API for Versal Gen 2", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "6d2079b0be49178771de8020378052b4d8e5adce", "submitter": { "id": 89329, "url": "http://patchwork.ozlabs.org/api/people/89329/?format=api", "name": "Begari, Padmarao", "email": "padmarao.begari@amd.com" }, "delegate": { "id": 96103, "url": "http://patchwork.ozlabs.org/api/users/96103/?format=api", "username": "apalos", "first_name": "Ilias", "last_name": "Apalodimas", "email": "apalos@gmail.com" }, "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260327125318.1037146-2-padmarao.begari@amd.com/mbox/", "series": [ { "id": 497763, "url": "http://patchwork.ozlabs.org/api/series/497763/?format=api", "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=497763", "date": "2026-03-27T12:52:54", "name": "Add TPM2 support for AMD Versal Gen 2", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497763/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2216958/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2216958/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<u-boot-bounces@lists.denx.de>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256\n header.s=selector1 header.b=eTLbMbk2;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)", "phobos.denx.de;\n dmarc=pass (p=quarantine dis=none) header.from=amd.com", "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de", "phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=amd.com header.i=@amd.com header.b=\"eTLbMbk2\";\n\tdkim-atps=neutral", "phobos.denx.de;\n dmarc=pass (p=quarantine dis=none) header.from=amd.com", "phobos.denx.de;\n spf=fail smtp.mailfrom=Padmarao.Begari@amd.com" ], "Received": [ "from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fj0vM74g1z1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 23:53:51 +1100 (AEDT)", "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id BE7D483F14;\n\tFri, 27 Mar 2026 13:53:47 +0100 (CET)", "by phobos.denx.de (Postfix, from userid 109)\n id 33F5B83FA7; Fri, 27 Mar 2026 13:53:47 +0100 (CET)", "from DM5PR21CU001.outbound.protection.outlook.com\n (mail-centralusazlp170110009.outbound.protection.outlook.com\n [IPv6:2a01:111:f403:c111::9])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id DCB0581E18\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 13:53:44 +0100 (CET)", "from LV3P220CA0011.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:234::12)\n by PH7PR12MB9256.namprd12.prod.outlook.com (2603:10b6:510:2fe::21)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.8; Fri, 27 Mar\n 2026 12:53:39 +0000", "from BN3PEPF0000B076.namprd04.prod.outlook.com\n (2603:10b6:408:234:cafe::8b) by LV3P220CA0011.outlook.office365.com\n (2603:10b6:408:234::12) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.24 via Frontend Transport; Fri,\n 27 Mar 2026 12:53:38 +0000", "from satlexmb07.amd.com (165.204.84.17) by\n BN3PEPF0000B076.mail.protection.outlook.com (10.167.243.121) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9745.21 via Frontend Transport; Fri, 27 Mar 2026 12:53:38 +0000", "from Satlexmb09.amd.com (10.181.42.218) by satlexmb07.amd.com\n (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Fri, 27 Mar\n 2026 07:53:38 -0500", "from satlexmb08.amd.com (10.181.42.217) by satlexmb09.amd.com\n (10.181.42.218) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Fri, 27 Mar\n 2026 05:53:37 -0700", "from xhdkummari40.xilinx.com (10.180.168.240) by satlexmb08.amd.com\n (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17 via Frontend\n Transport; Fri, 27 Mar 2026 07:53:35 -0500" ], "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de", "X-Spam-Level": "", "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=DSmf6mNa8sKi5v/oTFILi2Qae6BEgp4eo1yJUEvK5D4ke9w6UusD1HvID8vTT8OyAUnTcontmj/9IrC38CCP3ARVVuXlSpWX6B+Ox8g7F4qF6jLdsIFU52VnmGqErGWktLiPh3ITbOJb8Xag1vQw9GdSERtNv0pp+dkBrKPzAdOhPXZ3dP9zaNBguz5AgpmGLN1xwP6FrZh15GBfkN0LhevZHIreDrV2zf95teN4arJmj3y9ExKwop0IaZAKoCXpqOy7C/Qa6UAWF89Fte658HK/hWFk+dfUoAnJgy2ZpeotuPx5QXKUkNbm1giXKFaht76wrB94tUl6KryWVqmGsg==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=/B8i4BtZq80FOLKFu+gsg6MsXWsvZQtIqGtwThA1Rq0=;\n b=sjWueuSLGMrqYzb1MYIoWVTOuE4BaZphlrQlpVu6834nJT2F7q2mDVf7fhQlgC1aDUX6i2NWR+xfAZJ8uz+ddRHr8qr8GFjQyRAhoR1pgOJp7NcnEUUUK0WULFxg+PV4O+tkYWVEZaWF3lHx3IyE9JUYrMPo860BdTt7LCpnQiZI4zi6PPGrtvk6HmqTqAfHK9DxNPPGw4uwsrnXSMd02UpHBkmq5bnqROnMeNk8E1jMpX7efvT87JAWRO7ya27CP0UQcMTIxmCpEog2m2M4UoJB5ovd1F4KPfrq+VdR7RNIIfOOstvthCtNoFiwkjksInPo8H/Ky74i6NNagNeb1w==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 165.204.84.17) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=amd.com;\n dmarc=pass (p=quarantine sp=quarantine pct=100) action=none\n header.from=amd.com; dkim=none (message not signed); arc=none (0)", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=/B8i4BtZq80FOLKFu+gsg6MsXWsvZQtIqGtwThA1Rq0=;\n b=eTLbMbk21aU0AIr2+8LZ/4DogoUcC/4c6mshnba/C/1eeXftU/1rDRcbUSuhLfVXwdSdRGIMqu9ypyFtNzPngzT46jMvf72dj4qXGYfaWbUuEjSi5HJbPSOisg8YsTMkDxn9EfDxWGhL51onwQT+1THQxBWD6Y+uh373alVn7X0=", "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 165.204.84.17)\n smtp.mailfrom=amd.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=amd.com;", "Received-SPF": "Pass (protection.outlook.com: domain of amd.com designates\n 165.204.84.17 as permitted sender) receiver=protection.outlook.com;\n client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C", "From": "Padmarao Begari <padmarao.begari@amd.com>", "To": "<u-boot@lists.denx.de>, <michal.simek@amd.com>", "CC": "<git@amd.com>, <padmarao.begari@amd.com>, Tom Rini <trini@konsulko.com>,\n Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>, Prasad Kummari\n <prasad.kummari@amd.com>, Senthil Nathan Thangaraj\n <senthilnathan.thangaraj@amd.com>, Naman Trivedi\n <naman.trivedimanojbhai@amd.com>", "Subject": "[PATCH 1/4] firmware: zynqmp: Add HW PCR API for Versal Gen 2", "Date": "Fri, 27 Mar 2026 18:22:55 +0530", "Message-ID": "<20260327125318.1037146-2-padmarao.begari@amd.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260327125318.1037146-1-padmarao.begari@amd.com>", "References": "<20260327125318.1037146-1-padmarao.begari@amd.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-EOPAttributedMessage": "0", "X-MS-PublicTrafficType": "Email", "X-MS-TrafficTypeDiagnostic": "BN3PEPF0000B076:EE_|PH7PR12MB9256:EE_", "X-MS-Office365-Filtering-Correlation-Id": "77092c4a-e41c-42d9-504f-08de8bffddf8", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "BCL:0;\n ARA:13230040|82310400026|1800799024|36860700016|376014|18002099003|22082099003|56012099003;", "X-Microsoft-Antispam-Message-Info": "\n Ae4qOAw6EmhDzGKZtHtehYkeokWublZfwBlZlJLzvD3FXbjxIVWorhL1Od1BQ0SnhiOGQ7ft3cmD6HF+7AD+AlSidc9RU+SZEqgUzbqCHmdy26hoiySLRV8LnDguCyBgD343cMmJiokMHEm66kyQGFohHoVYHQ061ogUe1jpf48IcWsuikEeF8WLevYy3DePLL0NDJ/uBPPMSr4UejYPyz/CXwmIy49VhFlNzlOml0BF3Ze70OxqeIcFkPCU2tA0W2lDNXloloZuBgWsxsEqpOwu14VN3G0l3+xo2Q2QgsFkFyZ/d9XywKJ0ggMbKT5o3/eYYQ4iuEyiptCfIkJdBt+OHW2MdidTF1kgtnzxvGilZxQTZyiWXBo1xZ8hIQfbgodt16QGLygz50ctTIjt1glB+fVIajejQJTMQiLZgbQVrYLzXRGTIdBysiSEJtfCJ8+a4iKR8pWQJv6+vIv2yB0Y5oZL1zK4Xj9hXBcbBYvkSmImQoks1gmgz4gOWAN4z9Yytlj5fOMKQUmpoD/MffgJ4YyxrNuM5hSYc8GTh5T62PuKV1YkcFauDYb8NcUbx3yWgxYwqOcINKJUYQOjgooAr9UWyAbkxqc40nnmh/HBINbAB8RpSlag/pq002RRptoE/1AGZmeJxoVsag30f08IjNUdD3zN9FWPCg3AApIF1M35st4Cxwxm6fzRR3is0WY/Mgb8Nf8UrbadiB/nP+YiqN5LJJbudMKf7AkQE+sZSCv4pVOlG2dfri0N9bdE/1uzNdZkWfgKqB0Hd/besg==", "X-Forefront-Antispam-Report": "CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:satlexmb07.amd.com; PTR:InfoDomainNonexistent; CAT:NONE;\n SFS:(13230040)(82310400026)(1800799024)(36860700016)(376014)(18002099003)(22082099003)(56012099003);\n DIR:OUT; SFP:1101;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n hv9nL1LUnkrzxH4zoi5oab7899yXi48ULVDJmmvzWpB+Kcg23BIrbBvHo5hvdAWU3T+/0B2uIDROJzvOncH0fwbH6yJDmH8OYR1XLyFk2xL+0OC8WMdNZg7GvbjyR/YSM+fDNT2AvCI6JPzBwOkCfnY73zncMZQihrGTHJqYfoNuDtFCSmCpJ8oE4e+p4TAZgt5FfQzzxSX5zmp29xD8P1QR/8Hq+kIBuwztxaWQkCAy72hmu91EZzarRHZ7KylVTKoyRxL+ER+G7s3TW6Vnoqj+sLHh45Nexx7mk1w6fQXScpibM3JpaxC8nrvL5FfPg/GCX+qUDN3HgwBnlKnF0JUrF/0g/7kuSP7wT8i+PBrInJJtaRyI/4cqvkjzRHy3dmGVvq5xTQ1hlSHTo4EBjYbMy2RYz7KOVE2o1L8aH8omr7gAHmdjc/i+5xCyUnng", "X-OriginatorOrg": "amd.com", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "27 Mar 2026 12:53:38.9720 (UTC)", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 77092c4a-e41c-42d9-504f-08de8bffddf8", "X-MS-Exchange-CrossTenant-Id": "3dd8961f-e488-4e60-8e11-a82d994e183d", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17];\n Helo=[satlexmb07.amd.com]", "X-MS-Exchange-CrossTenant-AuthSource": "\n BN3PEPF0000B076.namprd04.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PH7PR12MB9256", "X-BeenThere": "u-boot@lists.denx.de", "X-Mailman-Version": "2.1.39", "Precedence": "list", "List-Id": "U-Boot discussion <u-boot.lists.denx.de>", "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>", "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>", "List-Post": "<mailto:u-boot@lists.denx.de>", "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>", "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>", "Errors-To": "u-boot-bounces@lists.denx.de", "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>", "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de", "X-Virus-Status": "Clean" }, "content": "Add three helper functions for PLM XilOCP PCR operations on AMD\nVersal Gen 2, all routed via the existing xilinx_pm_request()\nSMC PASS_THROUGH path:\n\n - zynqmp_pm_xilocp_is_feature_supported(): queries PLM for API\n availability using XOCP_API_FEATURES (fn 0)\n - zynqmp_pm_xilocp_extend_hwpcr(): extends a HW PCR with a 48-byte\n digest using XOCP_API_EXTEND_HWPCR (fn 1)\n - zynqmp_pm_xilocp_get_hwpcr(): reads HW PCR value(s) into a\n caller-supplied buffer using XOCP_API_GET_HWPCR (fn 2)\n\nAlso define the PLM_IPI_HDR() macro and XilOCP API ID constants in\nzynqmp_firmware.h. PLM_IPI_HDR() takes an explicit module_id\nparameter to encode the PLM module ID and function ID into the IPI\npayload header word passed to xilinx_pm_request(), making it reusable\nfor other PLM modules.\n\nThe new functions are added into the existing CONFIG_ARCH_VERSAL2\nguard block.\n\nSigned-off-by: Padmarao Begari <padmarao.begari@amd.com>\n---\n drivers/firmware/firmware-zynqmp.c | 72 +++++++++++++++++++++++++++++-\n include/zynqmp_firmware.h | 24 ++++++++++\n 2 files changed, 95 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/firmware/firmware-zynqmp.c b/drivers/firmware/firmware-zynqmp.c\nindex f8a9945c1da..2315d5932d1 100644\n--- a/drivers/firmware/firmware-zynqmp.c\n+++ b/drivers/firmware/firmware-zynqmp.c\n@@ -3,7 +3,7 @@\n * Xilinx Zynq MPSoC Firmware driver\n *\n * Copyright (C) 2018-2019 Xilinx, Inc.\n- * Copyright (C) 2022 - 2025, Advanced Micro Devices, Inc.\n+ * Copyright (C) 2022 - 2026, Advanced Micro Devices, Inc.\n */\n \n #include <asm/arch/hardware.h>\n@@ -197,6 +197,76 @@ int zynqmp_pm_ufs_cal_reg(u32 *value)\n \t*value = readl(PMXC_EFUSE_CACHE_BASE_ADDRESS + PMXC_UFS_CAL_1_OFFSET);\n \treturn 0;\n }\n+\n+/**\n+ * zynqmp_pm_xilocp_is_feature_supported() - Query PLM XilOCP for API support.\n+ * @api_id: XilOCP API function ID to check (e.g. XOCP_API_EXTEND_HWPCR)\n+ *\n+ * Sends XOCP_API_FEATURES (0) to PLM XilOCP with @api_id as the query\n+ * argument. PLM returns success if that API is compiled-in and available.\n+ *\n+ * Return: 0 if supported, PLM error code if not supported or call failed.\n+ */\n+int zynqmp_pm_xilocp_is_feature_supported(u32 api_id)\n+{\n+\treturn xilinx_pm_request(PLM_IPI_HDR(1, XILOCP_MODULE_ID, XOCP_API_FEATURES),\n+\t\t\t\t api_id, 0, 0, 0, 0, 0, NULL);\n+}\n+\n+/**\n+ * zynqmp_pm_xilocp_extend_hwpcr() - Extend a Hardware PCR via PLM XilOCP.\n+ * @pcr_num: HW PCR index (0..7)\n+ * @hash_addr: Physical address of the 48-byte hash buffer\n+ * (cache-flushed by caller)\n+ * @size: Buffer size in bytes (must be 48)\n+ *\n+ * Calls PLM XilOCP XOCP_API_EXTEND_HWPCR over the TF-A SMC PASS_THROUGH path.\n+ *\n+ * Return: 0 on success, PLM error code on failure.\n+ */\n+int zynqmp_pm_xilocp_extend_hwpcr(u32 pcr_num, u64 hash_addr, u32 size)\n+{\n+\tint ret;\n+\n+\tret = xilinx_pm_request(PLM_IPI_HDR(4, XILOCP_MODULE_ID, XOCP_API_EXTEND_HWPCR),\n+\t\t\t\tpcr_num,\n+\t\t\t\tlower_32_bits(hash_addr),\n+\t\t\t\tupper_32_bits(hash_addr),\n+\t\t\t\tsize, 0, 0, NULL);\n+\tif (ret)\n+\t\tprintf(\"%s: HW PCR %u extend failed: %d\\n\",\n+\t\t __func__, pcr_num, ret);\n+\n+\treturn ret;\n+}\n+\n+/**\n+ * zynqmp_pm_xilocp_get_hwpcr() - Read Hardware PCR value(s) via PLM XilOCP.\n+ * @pcr_mask: Bitmask of PCRs to read; bit N selects HW PCR N.\n+ * @buf_addr: Physical address of the output buffer (invalidated by caller)\n+ * @buf_size: Buffer size in bytes (48 * number of PCRs selected)\n+ *\n+ * Calls PLM XilOCP XOCP_API_GET_HWPCR over the TF-A SMC PASS_THROUGH path.\n+ * PLM DMA-writes the PCR value(s) to buf_addr; caller must invalidate cache\n+ * after this call before reading the buffer.\n+ *\n+ * Return: 0 on success, PLM error code on failure.\n+ */\n+int zynqmp_pm_xilocp_get_hwpcr(u32 pcr_mask, u64 buf_addr, u32 buf_size)\n+{\n+\tint ret;\n+\n+\tret = xilinx_pm_request(PLM_IPI_HDR(4, XILOCP_MODULE_ID, XOCP_API_GET_HWPCR),\n+\t\t\t\tpcr_mask,\n+\t\t\t\tlower_32_bits(buf_addr),\n+\t\t\t\tupper_32_bits(buf_addr),\n+\t\t\t\tbuf_size, 0, 0, NULL);\n+\tif (ret)\n+\t\tprintf(\"%s: HW PCR mask 0x%x read failed: %d\\n\",\n+\t\t __func__, pcr_mask, ret);\n+\n+\treturn ret;\n+}\n #endif\n \n int zynqmp_pm_set_gem_config(u32 node, enum pm_gem_config_type config, u32 value)\ndiff --git a/include/zynqmp_firmware.h b/include/zynqmp_firmware.h\nindex 05df49f292a..4482517a970 100644\n--- a/include/zynqmp_firmware.h\n+++ b/include/zynqmp_firmware.h\n@@ -529,4 +529,28 @@ extern smc_call_handler_t __data smc_call_handler;\n \n #define PM_DEV_OSPI\t\t(0x1822402aU)\n \n+/* XilOCP HW PCR API - Versal Gen 2 only */\n+#define XILOCP_MODULE_ID\t\t13U\n+\n+/*\n+ * IPI payload header word passed as api_id to xilinx_pm_request().\n+ * bits [31:16] = payload length (number of arguments after the header)\n+ * bits [15:8] = PLM module ID\n+ * bits [7:0] = API function ID\n+ *\n+ * smc_call_enhanced() extracts module_id from bits[15:8] and fn_id from\n+ * bits[7:0]; the len field is not encoded in the SMC call itself.\n+ */\n+#define PLM_IPI_HDR(len, module_id, api_id) \\\n+\t(((u32)(len) << 16U) | ((u32)(module_id) << 8U) | (u32)(api_id))\n+\n+/* XilOCP API function IDs */\n+#define XOCP_API_FEATURES\t\t0U\n+#define XOCP_API_EXTEND_HWPCR\t\t1U\n+#define XOCP_API_GET_HWPCR\t\t2U\n+\n+int zynqmp_pm_xilocp_is_feature_supported(u32 api_id);\n+int zynqmp_pm_xilocp_extend_hwpcr(u32 pcr_num, u64 hash_addr, u32 size);\n+int zynqmp_pm_xilocp_get_hwpcr(u32 pcr_mask, u64 buf_addr, u32 buf_size);\n+\n #endif /* _ZYNQMP_FIRMWARE_H_ */\n", "prefixes": [ "1/4" ] }