From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.web09.600.1582743928375448381 for ; Wed, 26 Feb 2020 11:05:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=hsraYSJG; spf=pass (domain: linaro.org, ip: 209.85.221.42, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f42.google.com with SMTP id v2so31201wrp.12 for ; Wed, 26 Feb 2020 11:05:28 -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=O5BOGJjfoyJ8O0K2fqj70RU7ZrD23JzxpMGhdhgNhRc=; b=hsraYSJGqvLLPPLkNspJ408cU22+lNN5nvKjvbHYvUp6totNhxG7dgzmLYSjai78YJ TBE3p/e2ZKiCuaxaxlxLGDRtupVZz1/kfYN5Zjaz3NZpaKnaCMcD21bBSz0VTKBLHBPu wKu1xG0J8htkC/0Xor5Qg9+k3H/xzn3fIID+8/ZsHv0kI1qjpri38X7m2/JjunF/dwf8 f/0H8inc4psRwp8hvPxNdFD10V92zA9hG2HTyUrQdVcPY/RdyYVUWnT8tPHn5oq5Gmhe 8CTNJKIsOlXAJ0FVJb/TJEvkB8kwYTXUkTQsg5WA4B+kBcqUO+7E1tvcMvQoXdU6PS7Y fHrQ== 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=O5BOGJjfoyJ8O0K2fqj70RU7ZrD23JzxpMGhdhgNhRc=; b=XRU/ZrqoUsc7Gg95xF6IZt5OguyNVZtgC9FLRrBipI62/2RQCUsCKJCLrNGMVuXPhH 080kzihSFcdPeHQdZ3MPD4Gw59YVsxleZCMMAxwI/kNjRQbn3aBsqrJXbVmZPyI1vJ3i vrkLy6+oUKBxWGI2O06MCiKEHtDvLWiN8rT3eIKDDNQj5CpNOYJouIFcZ1iCY3pESXgf C3FCwPXWYMa+bu8+GDBC9D6z7dKxsI3xVA5VdkbYsHtwNNT6Uvwh/5R8Gldk+CSTyZq+ 90BNNeTY33hnPxW2VGAGH/lTgwWKOuXD3icjAwE/apl5iLDhGFP62zbgVGzy3LKhrM+P io7A== X-Gm-Message-State: APjAAAUAg6tL/mk9gLCNMim30yv2cx8pS/Voh4gVpaW0KkWSW6FxPvpd XQVV84GyhN3614G+dWgsB6W8BZTtgq7vHA== X-Google-Smtp-Source: APXvYqwU8DSYEpvYLiTkF4G1n4o0MiSxDLIhZW5eyTMBS/4CDT0KEXmpPHSkgXz3VrY8vKYgrvXMfw== X-Received: by 2002:adf:8b59:: with SMTP id v25mr67596wra.419.1582743926102; Wed, 26 Feb 2020 11:05:26 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:25 -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 6/9] ArmVirtPkg/ArmVirtQemu: enable TPM2 support in the PEI phase Date: Wed, 26 Feb 2020 20:05:11 +0100 Message-Id: <20200226190514.31395-7-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> Incorporate the PEI components and the associated library class resolutions and PCD declarations to enable TPM2 support in the PEI phase. Signed-off-by: Ard Biesheuvel --- ArmVirtPkg/ArmVirtQemu.dsc | 20 ++++++++++++++++++++ ArmVirtPkg/ArmVirtQemu.fdf | 2 ++ 2 files changed, 22 insertions(+) diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index d1757cdba671..8950116dacab 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -75,11 +75,17 @@ [LibraryClasses.common] PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf +!if $(TPM2_ENABLE) == TRUE + Tpm2CommandLib|SecurityPkg/Library/Tpm2CommandLib/Tpm2CommandLib.inf +!endif + [LibraryClasses.common.PEIM] ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf !if $(TPM2_ENABLE) == TRUE + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf ResetSystemLib|MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.inf + Tpm2DeviceLib|SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2DeviceLibDTpm.inf !endif [LibraryClasses.common.DXE_DRIVER] @@ -248,6 +254,10 @@ [PcdsDynamicDefault.common] # TPM2 support # gEfiSecurityPkgTokenSpaceGuid.PcdTpmBaseAddress|0x0 +!if $(TPM2_ENABLE) == TRUE + gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid|{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} + gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0 +!endif [PcdsDynamicHii] gArmVirtTokenSpaceGuid.PcdForceNoAcpi|L"ForceNoAcpi"|gArmVirtVariableGuid|0x0|FALSE|NV,BS @@ -278,6 +288,16 @@ [Components.common] ResetSystemLib|ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf } + OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf + SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf { + + HashLib|SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterPei.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 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf { diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf index f55918d26b06..b5e2253295fe 100644 --- a/ArmVirtPkg/ArmVirtQemu.fdf +++ b/ArmVirtPkg/ArmVirtQemu.fdf @@ -115,6 +115,8 @@ [FV.FVMAIN_COMPACT] !if $(TPM2_ENABLE) == TRUE INF MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.inf + INF OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf + INF SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.inf !endif FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { -- 2.17.1