From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web12.4817.1582814462354879202 for ; Thu, 27 Feb 2020 06:41:02 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=mHyRb1Q8; spf=pass (domain: linaro.org, ip: 209.85.221.67, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f67.google.com with SMTP id v2so3610033wrp.12 for ; Thu, 27 Feb 2020 06:41:02 -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 :mime-version:content-transfer-encoding; bh=AnR+B3R1MgAtI26aLOtp9ueriClPqFcuXCMJgVG8DNE=; b=mHyRb1Q8nMJmI+R4GZ8fNA6mmPWMa2EWFxqa01oPEn/m51DMHawFBSdzp+MuzlDCtt 7XY0UzPYpVwqWgJiVO0fg8YMRjuz2g9dCcM+yZ4aUgfCcQmh981ZKJZGFPM8vXnte8K4 whaIN3FIslgnj94Z/1CPCGVxnixtF5dP9Wj+LAlqS4oBAR1UEaXiX/5wea/yfMqY74qe xuc/ep3Iv6wQqPwNbCnfFSwP8zTJV5CqSJ4Ho2yRFcOESU5fiFcQAHPOoxuc9WgOZxcL RMgDr9nT0PjRXqoXPmx7/Y7NiRzumFZoduGcbcKK82a9La/Mt1RGvTfSHJoasy/fvgNy NOEw== 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:mime-version:content-transfer-encoding; bh=AnR+B3R1MgAtI26aLOtp9ueriClPqFcuXCMJgVG8DNE=; b=eeWspb+fTuMsiIQfWK3pR3+dRmwSO9Qh765wZUTr5oItEKXZDB2H1KUxI5tmFzli3k kBBO55TmC16DBOFMw5ETNvJNpl/36GbriHbrhAGfTJa4KWW4xou5T5Fm5MFSGmPZk5pz 8dmaY/PuwuWmAOB5Viq/7Z5ljN/LT1oi35UVUr6iacBGJQOJ4Hut0zsmlRaTlFsSI2cl gpNwp1IPyAJMCFoOPBZD6ywESugf4QkSnYSXlpnb8DELbwlpSCId0VdHu2IYr63NnM6A sBYmsQhcXZ7yQfxn64DL7ySM71XYilAqs+w/okK2UtJFbZg0YiuRw0Qs9H8nSa2ikRI2 9xjA== X-Gm-Message-State: APjAAAXTphMqIqPjvtVXZxjGiHzNGk5ramcUzxfHqT3ejVRc8x0GwfyK /knMKomo9yn+aMPOWd/rKpq/BwZkgYw= X-Google-Smtp-Source: APXvYqx2vEWhL99zzhkocNshgQlyANAU62A1VYcwq4Iru/xFF0V0DDbcmx6ejut/13Yl5G6qrIcCCw== X-Received: by 2002:a5d:6604:: with SMTP id n4mr4990006wru.136.1582814460636; Thu, 27 Feb 2020 06:41:00 -0800 (PST) Return-Path: Received: from localhost.localdomain (aaubervilliers-682-1-29-142.w90-88.abo.wanadoo.fr. [90.88.192.142]) by smtp.gmail.com with ESMTPSA id k7sm8273575wrq.12.2020.02.27.06.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 06:40:59 -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 v4 01/11] OvmfPkg/Tcg2ConfigPei: introduce a signalling PPI to depex on Date: Thu, 27 Feb 2020 15:40:46 +0100 Message-Id: <20200227144056.56988-2-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200227144056.56988-1-ard.biesheuvel@linaro.org> References: <20200227144056.56988-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On ARM systems, the TPM does not live at a fixed address, and so we need the platform to discover it first. So introduce a PPI that signals that the TPM address has been discovered and recorded in the appropriate PCD, and make Tcg2ConfigPei depex on it when built for ARM or AARCH64. Signed-off-by: Ard Biesheuvel Reviewed-by: Laszlo Ersek --- OvmfPkg/OvmfPkg.dec | 5 +++++ OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 4c5b6511cb97..30faecb7a5c8 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -87,6 +87,11 @@ [Guids] gEfiLegacyBiosGuid = {0x2E3044AC, 0x879F, 0x490F, {0x97, 0x60, 0xBB, 0xDF, 0xAF, 0x69, 0x5F, 0x50}} gEfiLegacyDevOrderVariableGuid = {0xa56074db, 0x65fe, 0x45f7, {0xbd, 0x21, 0x2d, 0x2b, 0xdd, 0x8e, 0x96, 0x52}} +[Ppis] + # PPI whose presence in the PPI database signals that the TPM base address + # has been discovered and recorded + gOvmfTpmDiscoveredPpiGuid = {0xb9a61ad0, 0x2802, 0x41f3, {0xb5, 0x13, 0x96, 0x51, 0xce, 0x6b, 0xd5, 0x75}} + [Protocols] gVirtioDeviceProtocolGuid = {0xfa920010, 0x6785, 0x4941, {0xb6, 0xec, 0x49, 0x8c, 0x57, 0x9f, 0x16, 0x0a}} gXenBusProtocolGuid = {0x3d3ca290, 0xb9a5, 0x11e3, {0xb7, 0x5d, 0xb8, 0xac, 0x6f, 0x7d, 0x65, 0xe6}} diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf index e34cd6210611..55684ba045b3 100644 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf @@ -25,6 +25,7 @@ [Sources] [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec + OvmfPkg/OvmfPkg.dec SecurityPkg/SecurityPkg.dec [LibraryClasses] @@ -43,5 +44,8 @@ [Ppis] [Pcd] gEfiSecurityPkgTokenSpaceGuid.PcdTpmInstanceGuid ## PRODUCES -[Depex] +[Depex.IA32, Depex.X64] TRUE + +[Depex.ARM, Depex.AARCH64] + gOvmfTpmDiscoveredPpiGuid -- 2.20.1