From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web09.5737.1582709716231619814 for ; Wed, 26 Feb 2020 01:35:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GCDF8EeO; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: marcandre.lureau@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582709715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9TTBjn6izuoXPpBvJLUmImbxTI5qzTZhrcKieZ/uPbo=; b=GCDF8EeOnlqkEn3wYYbT6FhgCpyC3k2idgbKuB6Nl74wP14Dxn+BELjv9C+4Nq+xLsyr4P RJfvPTZFZrpzD5cEGZLWBY9iy+aqtLPyx8efi1XMuktS9w7yQV+QrSaZ7HjxY0zg8zC+tg xYghjaieS4nndoiHQZixW5LrSZu2MB4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-69-wkL5KoDGPLquJxhqtKuIbA-1; Wed, 26 Feb 2020 04:35:13 -0500 X-MC-Unique: wkL5KoDGPLquJxhqtKuIbA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B84EDBB9; Wed, 26 Feb 2020 09:35:12 +0000 (UTC) Received: from localhost (ovpn-112-63.ams2.redhat.com [10.36.112.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD7F760C81; Wed, 26 Feb 2020 09:35:11 +0000 (UTC) From: marcandre.lureau@redhat.com To: devel@edk2.groups.io Cc: lersek@redhat.com, simon.hardy@itdev.co.uk, stefanb@linux.ibm.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v3 2/6] OvmfPkg: detect TPM 1.2 in Tcg2ConfigPei Date: Wed, 26 Feb 2020 10:34:55 +0100 Message-Id: <20200226093459.1131530-3-marcandre.lureau@redhat.com> In-Reply-To: <20200226093459.1131530-1-marcandre.lureau@redhat.com> References: <20200226093459.1131530-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 RnJvbTogTWFyYy1BbmRyw6kgTHVyZWF1IDxtYXJjYW5kcmUubHVyZWF1QHJlZGhhdC5jb20+CgpD b21wbGVtZW50IGNvbW1pdCA2Y2YxODgwZmI1YiAoIk92bWZQa2c6IGFkZCBjdXN0b21pemVkIFRj ZzJDb25maWdQZWkKY2xvbmUiLCAyMDE4LTAzLTA5KSBieSBkZXRlY3RpbmcgVFBNIDEuMiBkZXZp Y2VzLgoKU2luY2UgVHBtMTJSZXF1ZXN0VXNlVHBtKCkgcmV0dXJucyBzdWNjZXNzIG9uIGFueSBU UE0gaW50ZXJmYWNlLAooaW5jbHVkaW5nIEZJRk8gJiBDUkIgd2hpY2ggYXJlIFRQTSAyLjApLCB0 cnkgdG8gc2VuZCBhIEdldFRpY2tzIFRQTQoxLjIgY29tbWFuZCB0byBwcm9iZSB0aGUgdmVyc2lv bi4gSW4gY2FzZSBvZiBmYWlsdXJlLCBmYWxsYmFjayBvbiBUUE0KMi4wIHBhdGguCgpTaWduZWQt b2ZmLWJ5OiBNYXJjLUFuZHLDqSBMdXJlYXUgPG1hcmNhbmRyZS5sdXJlYXVAcmVkaGF0LmNvbT4K LS0tCiBPdm1mUGtnL092bWZQa2dJYTMyLmRzYyAgICAgICAgIC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