get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2235248/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2235248,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2235248/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/44fb6aa80d06ea63fe1fd7db92e07a363d2a4509.1778277334.git.aidan@wolfssl.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<44fb6aa80d06ea63fe1fd7db92e07a363d2a4509.1778277334.git.aidan@wolfssl.com>",
    "list_archive_url": null,
    "date": "2026-05-09T00:04:14",
    "name": "[v3,07/12] tpm: add wolfTPM driver helpers and Kconfig options",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "1af1bff6c4edc915f22191a9be810939b1aa521f",
    "submitter": {
        "id": 92785,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/92785/?format=api",
        "name": "Aidan Garske",
        "email": "aidan@wolfssl.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/44fb6aa80d06ea63fe1fd7db92e07a363d2a4509.1778277334.git.aidan@wolfssl.com/mbox/",
    "series": [
        {
            "id": 503464,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/503464/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=503464",
            "date": "2026-05-09T00:04:07",
            "name": "tpm: Add wolfTPM library support for TPM 2.0",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/503464/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2235248/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2235248/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 (2048-bit key;\n unprotected) header.d=wolfssl-com.20251104.gappssmtp.com\n header.i=@wolfssl-com.20251104.gappssmtp.com header.a=rsa-sha256\n header.s=20251104 header.b=kSz2UADp;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=fail (p=none dis=none) header.from=wolfssl.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=wolfssl-com.20251104.gappssmtp.com\n header.i=@wolfssl-com.20251104.gappssmtp.com header.b=\"kSz2UADp\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=fail (p=none dis=none) header.from=wolfssl.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=aidan@wolfssl.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4gC6cN6dBcz1yCg\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 09 May 2026 10:41:24 +1000 (AEST)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id E071284E2E;\n\tSat,  9 May 2026 02:40:15 +0200 (CEST)",
            "by phobos.denx.de (Postfix, from userid 109)\n id A55D684E10; Sat,  9 May 2026 02:04:50 +0200 (CEST)",
            "from mail-dl1-x1235.google.com (mail-dl1-x1235.google.com\n [IPv6:2607:f8b0:4864:20::1235])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 28C9E84E0F\n for <u-boot@lists.denx.de>; Sat,  9 May 2026 02:04:48 +0200 (CEST)",
            "by mail-dl1-x1235.google.com with SMTP id\n a92af1059eb24-130c9dcbd25so3054193c88.1\n for <u-boot@lists.denx.de>; Fri, 08 May 2026 17:04:48 -0700 (PDT)",
            "from localhost.localdomain ([207.231.76.218])\n by smtp.gmail.com with ESMTPSA id\n a92af1059eb24-132787673ffsm5505030c88.15.2026.05.08.17.04.45\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 08 May 2026 17:04:45 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "*",
        "X-Spam-Status": "No, score=1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_SBL_CSS,SPF_HELO_NONE,\n SPF_PASS autolearn=no autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=wolfssl-com.20251104.gappssmtp.com; s=20251104; t=1778285086; x=1778889886;\n darn=lists.denx.de;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=lWgXEyOxcvsKo7k9PShIaHo5DHtnMfjPJMe4Spd6224=;\n b=kSz2UADp2bwpDQ/JaBB5XwhFh+1EHQQNnyMyHq/mIim3Sgb+qfM5NISQeSgLSr7FwQ\n EVTphOSxZ1zPiiKc2KHETDQ4RicVnrAkofUbJUaQwpd0661bAgiN58GBNJS6SvenI7OD\n Gfv7X0I1UhlPnRb0EKa7v/h3VLBQ7UDzWi93oF9qmoxX9/z6WYjRm7w7DiMtYXzz8oAL\n 9kUEHUffkCIdY54oY7FgFV0pEBQJZ9dRbTkixMw/kMr/n7zJu8h3EpRTSmep2FKiccwE\n SygJQ0krfOrsy+0KA+SOcEoqk+R9W1kbKudXkL2ki0tHLBgs0zT7N7ikvaADT+SG555J\n PsPQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778285086; x=1778889886;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=lWgXEyOxcvsKo7k9PShIaHo5DHtnMfjPJMe4Spd6224=;\n b=s7/G+gcjyDUu4e9m8xjJ9IQSU+PWa01/Veg/uCGeAXkBjFLwSqlA0ZvJwLxt5it4Yf\n wU3FbbQgMTcx+zO4KD6KMFoe+Qi5ag8OoEyjGn0FGGqacie08Qj+xC3/TfjudcPo8ELm\n I0loLjz0nN1Mb2fQRULYpJAG+Nj/fdS0xft7348Cpd/TKRAOSVXzp6arLMRjKvW06ncd\n bITCXHwS2MQnpiZgnMDzUrPjO/k0dYQxbrQjUq1FjrNDM8Tx7l1tarjVDMtIoUIoHHBB\n YBYGpHQbYaFjEuHLIA1jvXMrFMolUf0w0K0rY5wXurRE3Q4Q0kXZpG1Yfm5Hy4msLjGn\n 8fmg==",
        "X-Gm-Message-State": "AOJu0Yy/+afEQEefF95k+0VtGUHfhsgZfcEVmPViK6DpeARBIsiNByFF\n ins5i0q4ha0rzhqwg/0bBqA+GieYoqD6CQ7HDWE5W5EfliLVU3S4AU13CVUr6BYoAvrbch4hva+\n 39kti",
        "X-Gm-Gg": "AeBDietLqN39R+nXqdUrLUuLBtHSgESzCBXOTpRA/KE7Hv8Hhx5WFtlBB1tBgIbseet\n 9kDAOAT0ZA41HiVZxRsaBmbAzTAHkpvWONfvcy8u7EbsQ35C/4/eyB0OMX2d9UiC6PmuAs+BMj9\n F3sLh2Lw3mTcAKH4Oah2ra1Q0T4q6c8YPrpLrygwzEN0hw4/xf2iGx4Nc9Wyy9s8OoXITZVbiR2\n zjYqP/CWnmYFxBq0WGQtB5su82RRzbnP74XgpEQw3phN0/E8w3/j9yQdpHuFvVKj0sTpmoABCvy\n 0H4cQ/P2QXgid92AQArexQoOSHvKxFFmbWVrUX7HX/oKKPB8S0LTe1L/c/FaxxfU2d1wZFXx99c\n p0JFpuCMxCYrhSDXXa7ctjFpp638/nZuXho0LnMwsgxYsuy3rYo73G3UNULKgNqTGaM/58yO4br\n LnG69YlP5PTRhL7QstqHMiCePd8rsjNtiEEWp1LDEntjxHTuxfY6NVeaTHPHb1Be8FhowSqNyIV\n 9vzzZ8mLf6BHlJR3dxEhgdhxw/tCY8D",
        "X-Received": "by 2002:a05:7022:2224:b0:12c:8eb:80b9 with SMTP id\n a92af1059eb24-1323aa6552cmr3715480c88.6.1778285086091;\n Fri, 08 May 2026 17:04:46 -0700 (PDT)",
        "From": "Aidan Garske <aidan@wolfssl.com>",
        "To": "u-boot@lists.denx.de",
        "Cc": "David Garske <david@wolfssl.com>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>",
        "Subject": "[PATCH v3 07/12] tpm: add wolfTPM driver helpers and Kconfig options",
        "Date": "Fri,  8 May 2026 17:04:14 -0700",
        "Message-ID": "\n <44fb6aa80d06ea63fe1fd7db92e07a363d2a4509.1778277334.git.aidan@wolfssl.com>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<cover.1778277334.git.aidan@wolfssl.com>",
        "References": "<cover.1778277334.git.aidan@wolfssl.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Approved-At": "Sat, 09 May 2026 02:40:11 +0200",
        "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": "From: Aidan <aidan@wolfssl.com>\n\nAdd wolfTPM helper functions and configuration options to the TPM\ndriver subsystem.\n\ndrivers/tpm/wolftpm_common.c:\n  Shared helper functions used by the wolfTPM command backend:\n  - TPM2_IFX_FwData_Cb(): firmware data callback for Infineon\n    firmware update streaming\n  - TPM2_IFX_GetOpModeStr(): converts Infineon operational mode\n    codes to human-readable strings\n  - TPM2_IFX_PrintInfo(): prints manufacturer, vendor, firmware\n    version, and operational mode from WOLFTPM2_CAPS\n  - TPM2_PCRs_Print(): enumerates and prints assigned PCR banks\n    and their selected PCR indices\n  - TPM2_Init_Device(): initializes wolfTPM with the TPM2_IoCb\n    HAL callback\n\ndrivers/tpm/Kconfig:\n  Adds configuration options under TPM_V2:\n  - TPM2_SPI_SANDBOX: sandbox TPM SPI emulator for testing\n  - TPM_AUTODETECT: auto-detect TPM chip for swtpm/QEMU\n  - WOLFTPM_LINUX_DEV: use U-Boot driver model instead of\n    wolfTPM's native TIS layer\n  - WOLFTPM_SLB9672/SLB9673: Infineon chip-specific features\n  - WOLFTPM_FIRMWARE_UPGRADE: firmware update support\n\ndrivers/tpm/Makefile:\n  Compiles wolftpm_common.o and sets wolfTPM include paths and\n  -DWOLFTPM_USER_SETTINGS when CONFIG_TPM_WOLF is enabled.\n\nSigned-off-by: Aidan Garske <aidan@wolfssl.com>\n---\n drivers/tpm/Kconfig          |  44 +++++++++++\n drivers/tpm/Makefile         |   9 +++\n drivers/tpm/wolftpm_common.c | 137 +++++++++++++++++++++++++++++++++++\n 3 files changed, 190 insertions(+)\n create mode 100644 drivers/tpm/wolftpm_common.c",
    "diff": "diff --git a/drivers/tpm/Kconfig b/drivers/tpm/Kconfig\nindex 219ea606b50..a2897a0e040 100644\n--- a/drivers/tpm/Kconfig\n+++ b/drivers/tpm/Kconfig\n@@ -158,6 +158,14 @@ config TPM2_TIS_SANDBOX\n \t  such as basic configuration, PCR extension and PCR read. Extended\n \t  functionalities are not implemented.\n \n+config TPM2_SPI_SANDBOX\n+\tbool \"Enable sandbox TPM SPI emulator\"\n+\tdepends on TPM_V2 && SANDBOX && DM_SPI\n+\thelp\n+\t  This driver emulates a TPM connected via SPI for sandbox testing.\n+\t  It implements the TPM TIS SPI protocol and can be used to test\n+\t  wolfTPM SPI HAL code without physical hardware.\n+\n config TPM2_TIS_SPI\n \tbool \"Enable support for TPMv2.x SPI chips\"\n \tdepends on TPM_V2 && DM_SPI\n@@ -200,6 +208,42 @@ config TPM2_EVENT_LOG_SIZE\n \t  allocated twice. One for the eventlog it self and one for the\n \t  configuration table that is required from the TCG2 spec\n \n+config TPM_AUTODETECT\n+    bool \"wolfTPM auto-detect TPM chip (for swtpm/QEMU)\"\n+    depends on TPM_V2 && TPM_WOLF\n+    help\n+      Enable wolfTPM chip auto-detection instead of using a specific\n+      chip type (SLB9672/SLB9673). Use this for swtpm/QEMU testing\n+      where no specific hardware chip is present.\n+\n+config WOLFTPM_LINUX_DEV\n+    bool \"Use device-level TPM interface (bypass wolfTPM TIS layer)\"\n+    depends on TPM_V2 && TPM_WOLF\n+    default y\n+    help\n+      Enable wolfTPM to use the underlying TPM driver instead of its own\n+      TIS (TPM Interface Specification) layer. On U-Boot, this uses the\n+      U-Boot TPM driver model (tpm_xfer). On Linux, this uses /dev/tpm0.\n+      This is the recommended setting for U-Boot.\n+\n+config WOLFTPM_SLB9672\n+    bool \"Enable support for Infineon SLB9672 TPM\"\n+    depends on TPM_V2 && TPM_WOLF\n+    help\n+      Enable support for Infineon SLB9672 TPM features in wolfTPM.\n+\n+config WOLFTPM_SLB9673\n+    bool \"Enable support for Infineon SLB9673 TPM\"\n+    depends on TPM_V2 && TPM_WOLF\n+    help\n+      Enable support for Infineon SLB9673 TPM features in wolfTPM.\n+\n+config WOLFTPM_FIRMWARE_UPGRADE\n+    bool \"Enable firmware upgrade support for wolfTPM\"\n+    depends on TPM_V2 && TPM_WOLF\n+    help\n+      Enable support for Infineon TPM firmware upgrade commands in wolfTPM.\n+\n endif # TPM_V2\n \n endmenu\ndiff --git a/drivers/tpm/Makefile b/drivers/tpm/Makefile\nindex b83ce703ec0..bee4193e9fc 100644\n--- a/drivers/tpm/Makefile\n+++ b/drivers/tpm/Makefile\n@@ -10,7 +10,16 @@ obj-$(CONFIG_TPM_TIS_SANDBOX) += tpm_tis_sandbox.o sandbox_common.o\n \n obj-$(CONFIG_$(PHASE_)TPM2_CR50_I2C) += cr50_i2c.o\n obj-$(CONFIG_TPM2_TIS_SANDBOX) += tpm2_tis_sandbox.o sandbox_common.o\n+obj-$(CONFIG_TPM2_SPI_SANDBOX) += tpm_spi_sandbox.o\n obj-$(CONFIG_TPM2_TIS_SPI) += tpm2_tis_core.o tpm2_tis_spi.o\n obj-$(CONFIG_TPM2_TIS_I2C) += tpm2_tis_core.o tpm2_tis_i2c.o\n obj-$(CONFIG_TPM2_FTPM_TEE) += tpm2_ftpm_tee.o\n obj-$(CONFIG_TPM2_MMIO) += tpm2_tis_core.o tpm2_tis_mmio.o\n+\n+# wolfTPM helper functions\n+ifeq ($(CONFIG_TPM_WOLF),y)\n+ccflags-y += -I$(srctree)/lib/wolftpm \\\n+             -I$(srctree)/include/configs \\\n+             -DWOLFTPM_USER_SETTINGS\n+obj-y += wolftpm_common.o\n+endif\ndiff --git a/drivers/tpm/wolftpm_common.c b/drivers/tpm/wolftpm_common.c\nnew file mode 100644\nindex 00000000000..bea36cf0229\n--- /dev/null\n+++ b/drivers/tpm/wolftpm_common.c\n@@ -0,0 +1,137 @@\n+// SPDX-License-Identifier: GPL-2.0+\n+/*\n+ * wolfTPM common helper functions for U-Boot\n+ *\n+ * Copyright (C) 2025 wolfSSL Inc.\n+ * Author: Aidan Garske <aidan@wolfssl.com>\n+ */\n+\n+#define LOG_CATEGORY UCLASS_BOOTSTD\n+\n+#include <wolftpm.h>\n+#include <wolftpm/tpm2.h>\n+#include <wolftpm/tpm2_wrap.h>\n+#include <wolftpm/tpm2_packet.h>\n+#include <hal/tpm_io.h>\n+#include <stdio.h>\n+#include <string.h>\n+#include <log.h>\n+#include <hash.h>\n+#include <examples/wrap/wrap_test.h>\n+\n+#ifndef WOLFTPM2_NO_WRAPPER\n+#ifdef WOLFTPM_FIRMWARE_UPGRADE\n+\n+/******************************************************************************/\n+/* --- BEGIN helper functions -- */\n+/******************************************************************************/\n+\n+struct fw_info {\n+\tbyte *manifest_buf;\n+\tbyte *firmware_buf;\n+\tsize_t manifest_bufSz;\n+\tsize_t firmware_bufSz;\n+};\n+\n+int TPM2_IFX_FwData_Cb(uint8_t *data, uint32_t data_req_sz,\n+\t\t\tuint32_t offset, void *cb_ctx)\n+{\n+\tstruct fw_info *fwinfo = (struct fw_info *)cb_ctx;\n+\n+\tif (offset > fwinfo->firmware_bufSz)\n+\t\treturn BUFFER_E;\n+\tif (offset + data_req_sz > (uint32_t)fwinfo->firmware_bufSz)\n+\t\tdata_req_sz = (uint32_t)fwinfo->firmware_bufSz - offset;\n+\tif (data_req_sz > 0)\n+\t\tmemcpy(data, &fwinfo->firmware_buf[offset], data_req_sz);\n+\treturn data_req_sz;\n+}\n+\n+const char *TPM2_IFX_GetOpModeStr(int opMode)\n+{\n+\tconst char *opModeStr = \"Unknown\";\n+\n+\tswitch (opMode) {\n+\tcase 0x00:\n+\t\topModeStr = \"Normal TPM operational mode\";\n+\t\tbreak;\n+\tcase 0x01:\n+\t\topModeStr = \"TPM firmware update mode (abandon possible)\";\n+\t\tbreak;\n+\tcase 0x02:\n+\t\topModeStr = \"TPM firmware update mode (abandon not possible)\";\n+\t\tbreak;\n+\tcase 0x03:\n+\t\topModeStr = \"After successful update, but before finalize\";\n+\t\tbreak;\n+\tcase 0x04:\n+\t\topModeStr = \"After finalize or abandon, reboot required\";\n+\t\tbreak;\n+\tdefault:\n+\t\tbreak;\n+\t}\n+\treturn opModeStr;\n+}\n+\n+void TPM2_IFX_PrintInfo(WOLFTPM2_CAPS *caps)\n+{\n+\tprintf(\"Mfg %s (%d), Vendor %s, Fw %u.%u (0x%x)\\n\",\n+\t\tcaps->mfgStr, caps->mfg, caps->vendorStr, caps->fwVerMajor,\n+\t\tcaps->fwVerMinor, caps->fwVerVendor);\n+\tprintf(\"Operational mode: %s (0x%x)\\n\",\n+\t\tTPM2_IFX_GetOpModeStr(caps->opMode), caps->opMode);\n+\tprintf(\"KeyGroupId 0x%x, FwCounter %d (%d same)\\n\",\n+\t\tcaps->keyGroupId, caps->fwCounter, caps->fwCounterSame);\n+}\n+#endif /* WOLFTPM_FIRMWARE_UPGRADE */\n+\n+int TPM2_PCRs_Print(void)\n+{\n+\tint rc;\n+\tint pcrCount, pcrIndex;\n+\tGetCapability_In  capIn;\n+\tGetCapability_Out capOut;\n+\tTPML_PCR_SELECTION *pcrSel;\n+\n+\tmemset(&capIn, 0, sizeof(capIn));\n+\tcapIn.capability = TPM_CAP_PCRS;\n+\tcapIn.property = 0;\n+\tcapIn.propertyCount = 1;\n+\trc = TPM2_GetCapability(&capIn, &capOut);\n+\tif (rc != TPM_RC_SUCCESS) {\n+\t\tlog_debug(\"TPM2_GetCapability failed rc=%d (%s)\\n\",\n+\t\t\t  rc, TPM2_GetRCString(rc));\n+\t\treturn rc;\n+\t}\n+\tpcrSel = &capOut.capabilityData.data.assignedPCR;\n+\tprintf(\"Assigned PCR's:\\n\");\n+\tfor (pcrCount = 0; pcrCount < (int)pcrSel->count; pcrCount++) {\n+\t\tprintf(\"\\t%s: \",\n+\t\t       TPM2_GetAlgName(pcrSel->pcrSelections[pcrCount].hash));\n+\t\tfor (pcrIndex = 0;\n+\t\t     pcrIndex < pcrSel->pcrSelections[pcrCount].sizeofSelect * 8;\n+\t\t     pcrIndex++) {\n+\t\t\tif ((pcrSel->pcrSelections[pcrCount].pcrSelect[pcrIndex / 8] &\n+\t\t\t     ((1 << (pcrIndex % 8)))) != 0)\n+\t\t\t\tprintf(\" %d\", pcrIndex);\n+\t\t}\n+\t\tprintf(\"\\n\");\n+\t}\n+\treturn TPM_RC_SUCCESS;\n+}\n+\n+int TPM2_Init_Device(WOLFTPM2_DEV *dev, void *userCtx)\n+{\n+\tint rc;\n+\n+\t/* Use TPM2_IoCb callback for packet-level access */\n+\trc = wolfTPM2_Init(dev, TPM2_IoCb, userCtx);\n+\tlog_debug(\"tpm2 init: rc = %d (%s)\\n\", rc, TPM2_GetRCString(rc));\n+\treturn rc;\n+}\n+\n+#endif /* WOLFTPM2_NO_WRAPPER */\n+\n+/******************************************************************************/\n+/* --- END helper functions -- */\n+/******************************************************************************/\n",
    "prefixes": [
        "v3",
        "07/12"
    ]
}