From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) by mx.groups.io with SMTP id smtpd.web10.603.1582743929521034145 for ; Wed, 26 Feb 2020 11:05:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=UlZwNl0j; spf=pass (domain: linaro.org, ip: 209.85.221.49, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f49.google.com with SMTP id v2so31272wrp.12 for ; Wed, 26 Feb 2020 11:05:29 -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:in-reply-to:references; bh=xpb5R0IzibosM2HV6WKktNI/hGW1k3X5OOqIJ21IuH4=; b=UlZwNl0jgPU3rVYCOhL3qKe5m6gKr6FTx0Ux3udb7pW8jy3wYERc8OWjlNsz+c4Vlz 9ZwgIw97j3qeMKKiD/JGLxq/6aeF+4bclv8p+ys3KSeo++SLzKPlV0nsdAT2/jGdiQmP cTTGhpBqr2uUktpTiYaLJIaGtL6DT6up+7CdTFkn/aOCZy4/ejia93wgFh0BqozZ+XGz 0sL+unl/Nhou5D9n9SF6wKHEPR0dkIJjXXUn9xzTXMq3LcrPrEM2RLqLi8kEm3ywYheG eGIkX3QKs5F5W0vBvNOUI4sOzuOj2EDGwcKnCKwGeHbHjJns8wG2a4XUzH0lu+AOfqUY YByA== 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:in-reply-to :references; bh=xpb5R0IzibosM2HV6WKktNI/hGW1k3X5OOqIJ21IuH4=; b=NHDOoBXoj2SWQmo84CLmIPK1WlOdw+efWIZYXHQ5FurlKuGmXlr+bG6bejVbTPqZty XVPOtDHZc7tYG6M82bZN67lFTnsCBgdfV+A0fD8jWk/yCInMq8QrFBGWecU/fkX2KEOU +8kWsxdn+VyKepC1aE2HMIX8LJ65xMxVMfmk0sjKMH5oNKvjp5CXBhZfXTEPQvMVbKN7 qNIsdgQgUMJ+W/TAR0kckTDMwibSicy6Agy99fbfiQ+7vvJ/yU9EYmyuXqVMEniQ1BEr NoJ7KRVGyVxI9Cmmo+6QMLFZ3D3zalCqP4LATxf43QJubXZURcOcg9rLcX3VBTMn4/Xr kAJA== X-Gm-Message-State: APjAAAU0dcTAadxQYwc98txBfVCRAxpxmDOpXJAa8AlRcspeW3U8O5io ScpEvUYBBWBN85sJO+Z3geVgscxjCNxe9g== X-Google-Smtp-Source: APXvYqy7nVHnTuNoRh+4eHEY+8pzBTYxeqeYL+icbLxANB0TqM1QnAZi0ABvK4u8KsNkinLYscJQIw== X-Received: by 2002:a5d:5224:: with SMTP id i4mr67079wra.285.1582743927818; Wed, 26 Feb 2020 11:05:27 -0800 (PST) Return-Path: Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id z1sm3932823wmf.42.2020.02.26.11.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:27 -0800 (PST) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , lersek@redhat.com, eric.auger@redhat.com, philmd@redhat.com, marcandre.lureau@redhat.com, stefanb@linux.ibm.com, leif@nuviainc.com Subject: [PATCH v3 7/9] ArmVirtPkg/ArmVirtQemu: enable the DXE phase TPM2 support module Date: Wed, 26 Feb 2020 20:05:12 +0100 Message-Id: <20200226190514.31395-8-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200226190514.31395-1-ard.biesheuvel@linaro.org> References: <20200226190514.31395-1-ard.biesheuvel@linaro.org> Enable the TPM2 support module in the DXE phase, and the associated libraries and PCDs that it requires. This will be wired into the measured boot support code in a subsequent patch. Note that Tcg2Dxe.inf is added to ArmVirtQemuFvMain.fdf.inc, which is shared with other platforms in ArmVirtPkg, but as those will not set the TPM2_ENABLE define, this change does not affect them. Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc | 23 ++++++++++++++++++++ ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 7 ++++++ 2 files changed, 30 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 8950116dacab..9fe5ab37611c 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -77,6 +77,8 @@ [LibraryClasses.common] !if $(TPM2_ENABLE) == TRUE Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf + Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibQemu/DxeTcg2PhysicalPresenceLib.inf + TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf !endif [LibraryClasses.common.PEIM] @@ -91,6 +93,10 @@ [LibraryClasses.common.PEIM] [LibraryClasses.common.DXE_DRIVER] ReportStatusCodeLib|MdeModulePkg/Library/DxeReportStatusCodeLib/DxeReportStatusCodeLib.inf +!if $(TPM2_ENABLE) == TRUE + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibTcg2/Tpm2DeviceLibTcg2.inf +!endif + [LibraryClasses.common.UEFI_DRIVER] UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf @@ -469,6 +475,23 @@ [Components.common] MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf + # + # TPM2 support + # +!if $(TPM2_ENABLE) == TRUE + SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf { + + HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterDxe.inf + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibRouter/Tpm2DeviceLibRouterDxe.inf + NULL|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2InstanceLibDTpm.inf + NULL|SecurityPkg/Library/HashInstanceLibSha1/HashInstanceLibSha1.inf + NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf + NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf + NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf + NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf + } +!endif + # # ACPI Support # diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc index 31f615a9d0f9..63247fd10058 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -182,3 +182,10 @@ [FV.FvMain] # Ramdisk support # INF MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf + + # + # TPM2 support + # +!if $(TPM2_ENABLE) == TRUE + INF SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf +!endif -- 2.17.1