From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web12.764.1582789303362337664 for ; Wed, 26 Feb 2020 23:41:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h4knihKP; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582789302; 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=RzS/yxbLWYpys93LtG33MUEh3x2de581vwX4LtMLM84=; b=h4knihKPLFgjKHFPGR30DP9FWpmtxWXNcDD8CSHsMmUE9uQEzNT8xOYDFCIW4epcRp6/Yk 449ceZ6M+T+YSpYgt3FGcE84p5ZyoNA/2/xoRJKUjV2POqq+qeebrn5ug81QXVkyp7ifZN LqlIbv8A3aBTuDlWiHGBaQLhtKNTbsc= 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-98-x35xA6aVOr6USZdlzOuu5w-1; Thu, 27 Feb 2020 02:41:38 -0500 X-MC-Unique: x35xA6aVOr6USZdlzOuu5w-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BCD5A801E70; Thu, 27 Feb 2020 07:41:37 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-46.ams2.redhat.com [10.36.116.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37D055C28E; Thu, 27 Feb 2020 07:41:31 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v3 3/9] ArmVirtPkg/PlatformPeiLib: discover the TPM base address from the DT To: devel@edk2.groups.io, ard.biesheuvel@linaro.org Cc: eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> <20200226190514.31395-4-ard.biesheuvel@linaro.org> From: "Laszlo Ersek" Message-ID: <642a9a01-c445-5c8a-e76e-fb1bb3389228@redhat.com> Date: Thu, 27 Feb 2020 08:41:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20200226190514.31395-4-ard.biesheuvel@linaro.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 02/26/20 20:05, Ard Biesheuvel wrote: > Introduce a boolean PCD that tells us whether TPM support is enabled > in the build, and if it is, record the TPM base address in the existing > routine that traverses the device tree in the platform PEIM. > > If a TPM is found, install the gOvmfTpmDiscoveredPpiGuid signalling PPI > that will unlock the dispatch of OvmfPkg's Tcg2ConfigPei. If TPM2 > support is enabled in the build but no TPM2 device is found, install the > gPeiTpmInitializationDonePpiGuid PPI, which is normally installed by > Tcg2ConfigPei if no TPM2 is found, but in our case Tcg2ConfigPei will > never run so let's do it here instead. > > Signed-off-by: Ard Biesheuvel > --- > ArmVirtPkg/ArmVirtPkg.dec | 6 ++ > ArmVirtPkg/ArmVirtQemu.dsc | 5 + > ArmVirtPkg/ArmVirtQemuKernel.dsc | 6 ++ > ArmVirtPkg/ArmVirtXen.dsc | 6 ++ > ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c | 101 ++++++++++++++++++-- > ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.inf | 19 +++- > 6 files changed, 129 insertions(+), 14 deletions(-) Thanks for the update! Acked-by: Laszlo Ersek Laszlo