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: 334708 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp4489246ilb; Mon, 30 Nov 2020 01:47:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyK+aRIO3HKC+MpqDJ4MItUa98NV0bQlBxtY3s6zx+PCgTSN/0P5too39Dn5qdZHSNDHHKP X-Received: by 2002:a17:906:3d69:: with SMTP id r9mr20205893ejf.43.1606729676078; Mon, 30 Nov 2020 01:47:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606729676; cv=none; d=google.com; s=arc-20160816; b=jua3G4DpYqe6416OTuKIHLUJRmhQcmcES0bxLecs1lm+3xTuDrhHqWlIKc8E/pnhFR nqMmlxoh5LeNdYEm/U3HJAVI0i0RlLx115W5TuVwAK8SS7pj5tvBgkrjpZJ+vf/dJCAZ FsJHXFMYmddR+Pg+i6ZLtq2EqZrQNKDIEPW78PhsJ0N47Iw6xXz26rrA2jG9Iq5nMhGw OTqRZBGjOKzebzEdtI4RM4jM9nL7k1Jw4l+0UvVhMRtgr6u0Mgw92W9BlOzDgyAiWNWe BO/BF0NTKldh1ECHOUUS7lfiizi51S6W9X6DktiA+AbRDKiplkUrK5IZkSsMWZMTkqMs vbDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=htXJJ/U3M9rqgUS/jSfXnjzTybHNk8f3/onkg26djjw=; b=AUYo4hw3PylyY/HtMOr/Rs9dXXkKmptlGdaqSQ+BXVhPdpTLVtjjjJPMFPDFddmK97 CwZOIWn7ioqSCLaqFTlTSneXEAxnDz1S5aMEIGWuMDxMbChGKNCqqtxhS0ffs3zqb2DG EV+rBsGqN6mAieZEE/E+g83SThxP6104cKimZ8hUrp1BwK+Jebb4JBvaASMCjidRdqgT ziLs8trNKHNcVIPPg7GG657uwWWuKfBNnOs5NYmI2U3pqLy8p+6KiVDQLL77fLeO8fR+ k2251VjqPJjTvfrRyAM2xG21xUE8tICtcJHn49bVihA0euWXh3rzRf3c5QwZElII2++b mI1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C2bs4CV5; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [85.214.62.61]) by mx.google.com with ESMTPS id u20si10544371edr.287.2020.11.30.01.47.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 01:47:56 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C2bs4CV5; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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(-) -- 2.29.2