From patchwork Mon Nov 30 09:47:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 1408113 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=C2bs4CV5; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cl0lm3znFz9sTc for ; Mon, 30 Nov 2020 20:48:04 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0715682648; Mon, 30 Nov 2020 10:47:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="C2bs4CV5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 448758261F; Mon, 30 Nov 2020 10:47:49 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (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 1125A825A5 for ; Mon, 30 Nov 2020 10:47:46 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wm1-x344.google.com with SMTP id a6so4157217wmc.2 for ; Mon, 30 Nov 2020 01:47:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=htXJJ/U3M9rqgUS/jSfXnjzTybHNk8f3/onkg26djjw=; b=C2bs4CV52Amq2zx73r55ez6rjVf7glSwf5+R9BfWRKmxHO1D6mG4p5Tj2aS7mn34hh CQkQQGO29eELN5DhODwDigKDJ03up4pjy7U92QVGVF05LSJGUlfZ+hZziaawpY6CSqzP PSMBNYgcD6Qw1v3PY0ThJjwAXomZMwSRhtQFvSZWbG4riIN49p29mS/PcIzf2TThy0MF cFo71yf/F52I1GMJCgOG9pjRuwnHOmDspsV98vthlRQ41lTzTlT24sBlKmo10ejCHcUC 8uOha5htBaqmIaLDmExOOl7thWYAFSiTcaLgGbzcsT5BIG9OJRZ9AXFxH9dRpxT0ojes yRTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=htXJJ/U3M9rqgUS/jSfXnjzTybHNk8f3/onkg26djjw=; b=L4AM0eogZp06NrzFOHImrkBw4qO+kGruZaYcRpdgjiuv0j24YXhQ0P5p0az9Cj48rk QTHHhlM85/haNRT2l1Lvjtpk4GyKBxLIAWMe9N6NC7fmXrHt66Xw8rGIbKd41b3zHcl4 OSVXGhwCu0lrs/BGU2fZuGYZX+4VVcn3FsyxcdkbhVjJ7mGuhUE/tZj2ZXqFvSzXWQYa Y/Kr61a1rC/s85LneMWYdPi/kit3zTuWZpDl7xfxNmOghMPIgZEJ1lHUFuFr3R6GY/TF 9wEUON3ybq5EYkBbGu7yWeHJjV8nC2bnxAFlZXAiy8hVnAh0bbPLl034pHQdohx0OX13 pw9w== X-Gm-Message-State: AOAM5314fCUsiG6R3Rft39ZH86lCgaYOeSA6OqrEtqxV6b+ArKbH6mAF yTxLSroi1qK/oHvDPVfJywH9Tg== X-Google-Smtp-Source: ABdhPJwrScWnXDLCPx45/+m/Qu4TpW2GzYb2JYwaXpHvJ4NF8Br9rMaf7Rvn8LuU9ZX9g7EBCetheA== X-Received: by 2002:a1c:3dd6:: with SMTP id k205mr8241973wma.128.1606729665582; Mon, 30 Nov 2020 01:47:45 -0800 (PST) Received: from apalos.home ([2a02:587:4641:1e88:2e56:dcff:fe9a:8f06]) by smtp.gmail.com with ESMTPSA id b18sm28006795wrt.54.2020.11.30.01.47.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 01:47:45 -0800 (PST) From: Ilias Apalodimas To: xypron.glpk@gmx.de Cc: ard.biesheuvel@arm.com, Ilias Apalodimas , Alexander Graf , Simon Glass , Bin Meng , Dhananjay Phadke , u-boot@lists.denx.de Subject: [PATCH 0/3 v2] extend EFI_TCG2_PROTOCOL support Date: Mon, 30 Nov 2020 11:47:38 +0200 Message-Id: <20201130094742.2088573-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean Hi! This is v2 of [1]. The issues regarding comments have been addressed and all of the newly added structures now have Sphinx style comments. Changes since v1: - Eventlog size is now a Kconfig instead of a #define. The default size has been kept to 4096b - Replaced struct tpm_digest with u8 digest[TPM2_SHA1_DIGEST_SIZE]. This is effectively the same thing, but closer to what the spec defines - Add Sphinx style comments on new structs - Remove _put_unaligned_le usage from u8 values - Remove definitions of algorithms that were duplicated by mistake in efi_tcg.h [1] https://lists.denx.de/pipermail/u-boot/2020-November/433629.html Ilias Apalodimas (3): tpm: Add tpm2 headers for TCG2 eventlog support efi_loader: Introduce eventlog support for TCG2_PROTOCOL cmd: efidebug: Add support for TCG2 final events table cmd/efidebug.c | 4 + include/efi_api.h | 4 + include/efi_tcg2.h | 71 ++++- include/tpm-v2.h | 82 ++++++ lib/efi_loader/Kconfig | 9 + lib/efi_loader/efi_setup.c | 12 +- lib/efi_loader/efi_tcg2.c | 553 +++++++++++++++++++++++++++++++++++-- 7 files changed, 711 insertions(+), 24 deletions(-)