From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8681C4338F for ; Sat, 24 Jul 2021 21:14:02 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 256AE60E92 for ; Sat, 24 Jul 2021 21:14:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 256AE60E92 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2DA978322A; Sat, 24 Jul 2021 23:13:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VdHR8sbW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A14DA831CA; Sat, 24 Jul 2021 23:12:19 +0200 (CEST) Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DFA30831BD for ; Sat, 24 Jul 2021 23:12:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-wr1-x42f.google.com with SMTP id l4so6243881wrs.4 for ; Sat, 24 Jul 2021 14:12:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:from:in-reply-to:references:date:message-id :subject:to:cc; bh=K4fsWatUjAh8zHkKJb/mu2W9MauBy0mPNAmZfM+8Hng=; b=VdHR8sbWp71HMEbb4kCa4KTUCNyhX86KpaejDfj3CrHWsp77OZsAPIRr1IYzExf/ux VT8+UE1DFSO7lCyk1PUn10tjzd0kUw2IlK2Fz5uvN69gyqS2uwn85hAtw/48guY0nMbg lh70Kx/7jxaiUADvSCrKluVK5FPZPtsB9O1gY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:in-reply-to:references :date:message-id:subject:to:cc; bh=K4fsWatUjAh8zHkKJb/mu2W9MauBy0mPNAmZfM+8Hng=; b=aZ1eusw9aLp3pk68lJae4KEzPXoYxHeSSG40RSQfSDMXpwRZf1+CJ5J9hMoz3mAQpK qcSLopK7M6Q8NDQJT+brwogrPk5Cxo0wRapr2JX4P3FWo1yUyl7al7pbACgkBwwW9uNa BSiP43NTyt0LWl/hQEbFi/NLA4aX5oHsZHplsGBnhmjGb8fwB3Jnm2zOBuxY0h8suJbt MGf1kI7hp/mVy7aTQsv1B6prLGpUeBQFpTUspiH+HV6Styf88i4d4ZRD+8fF3stwAzia BeRAD9lw/plFILfNMZi8ct8uJdOKeqNKzudElYGfJgx/erjmQ+DFP5mYn9xhD/Au0Whl pvyw== X-Gm-Message-State: AOAM532RZnpvcT7og1OPD9op7pAZLIANV4WzC4xrMimP8U/eoB+aJwN3 TwW+5PUIMung0s4PnN421voiuBMmjtDr2daA9kQoLw== X-Google-Smtp-Source: ABdhPJxpSd+BiwQvvOY5M6AeZdDordQ8G9FfNwOFxkvLnS6Rl8wkfYvt91mke+wwKmn6CH/NMKy1EcVdx1eDJX75CPs= X-Received: by 2002:adf:e409:: with SMTP id g9mr12077954wrm.66.1627161133136; Sat, 24 Jul 2021 14:12:13 -0700 (PDT) Received: from 480794996271 named unknown by gmailapi.google.com with HTTPREST; Sat, 24 Jul 2021 14:12:10 -0700 MIME-Version: 1.0 From: Simon Glass In-Reply-To: <20210718201806.761202-2-sjg@chromium.org> References: <20210718201806.761202-2-sjg@chromium.org> <20210718201806.761202-1-sjg@chromium.org> Date: Sat, 24 Jul 2021 14:12:10 -0700 X-Google-Sender-Auth: 9Z2nMYv8k5mXr-RGe1RubKU3sDc Message-ID: Subject: Re: [PATCH v2 01/10] sandbox: tpm: Split out common nvdata code To: Simon Glass Cc: Ilias Apalodimas , Thirupathaiah Annapureddy , U-Boot Mailing List Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean We want to support nvdata in TPM2 as well. To avoid code duplicating the associated code, move it into a common file. Drop the special-case logic for the kernel space. This can be handled by the higher-level code now, i.e. in vboot itself. Signed-off-by: Simon Glass --- (no changes since v1) drivers/tpm/Makefile | 4 +- drivers/tpm/sandbox_common.c | 66 ++++++++++++++++++++ drivers/tpm/sandbox_common.h | 96 +++++++++++++++++++++++++++++ drivers/tpm/tpm_tis_sandbox.c | 111 +++------------------------------- 4 files changed, 172 insertions(+), 105 deletions(-) create mode 100644 drivers/tpm/sandbox_common.c create mode 100644 drivers/tpm/sandbox_common.h Applied to u-boot-dm, thanks!