From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mx.groups.io with SMTP id smtpd.web11.2254.1582627504706648637 for ; Tue, 25 Feb 2020 02:45:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=bq5FTpBL; spf=pass (domain: linaro.org, ip: 209.85.128.44, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wm1-f44.google.com with SMTP id p9so2472637wmc.2 for ; Tue, 25 Feb 2020 02:45:04 -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; bh=SqWvivLiLcHky39/7vq95InVB/OYsu2a8LPPPPKy84E=; b=bq5FTpBL6R++hzfCTDYD5XEfH/SP07Ti8B8kJpsSjxA0YcHuvhAwOZCRqjmZgcVG/2 lEaBvX+FPjGA6/c+VKnU/KGH0r+LEmVoCZx9Khz6a85n2OWNY9VqxqtHRlQS4vgGz7Uf Q9MF0SXzt3ZPap8uBJw310mHVkPDwIwZIDrmb9iUJGoXF9f+2qGS9v9kIQSjECqyM+kR nnXOUGQlEfwLjmHX7EuKWI4x0s2S0xBvaR4LNNlfmIvkn1GgMB2Q2uQn8iRXruWUxvg0 0RAcD/nwAVjDOXPgpy4oGcPpJ7JopLI1JbJuJZZonD9k/49JIXFZh1SFg0d36vyk/eml CuLQ== 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; bh=SqWvivLiLcHky39/7vq95InVB/OYsu2a8LPPPPKy84E=; b=rb/XI3P/Z2P4aACpiXTfuvQD3kJbRRASpsef2+JrTVgoC2HHb0TP8IKplNbg1o6ABw Fr66PzqjL/tca5uyUVh4Q8JRYSBQl5Oh3y0hsoGasLdzS6x2qLFPzdAGIk9zAXPH/c/m WGcFE8Zs4rxcIV8PUQY9y6dYFiL+0KsK1ky5IWqbm0xKfijGKsoxSp89gNv9Ec9X+bw+ gkjEJJT1+CuK3oAQ3ESEu1DkNkDo5hxbdqw4LYyYgEmvyD2hNR+b5vIlY3nx+T4nZMQL xeOHoJ72T9MF1o620/3+55PCm4SplG5cwTVt4P73T1QrY0UM8rKpK7U3xe01Tv4CNyNY mEVw== X-Gm-Message-State: APjAAAVvZMVYInYN8jU0rIcKODdHHRuc6CqbWB2pSVWStLjm+QwlbSoJ X+yCn33pFZ5K/E3/IVpWfqKsklhNBpllGg== X-Google-Smtp-Source: APXvYqw1GPUMM20iSIdRd5SkA15qsnyy59BIuwgsXvBQQ1CkJzNIuCnE2AN+6KbIOKMeRyN+Vmf/gg== X-Received: by 2002:a05:600c:2254:: with SMTP id a20mr4620357wmm.188.1582627503062; Tue, 25 Feb 2020 02:45:03 -0800 (PST) Return-Path: Received: from e123331-lin.home ([2a01:cb1d:112:6f00:816e:ff0d:fb69:f613]) by smtp.gmail.com with ESMTPSA id g14sm13218913wrv.58.2020.02.25.02.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 02:45:02 -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 v2 0/5] ArmVirtPkg: implement measured boot for ArmVirtQemu Date: Tue, 25 Feb 2020 11:44:44 +0100 Message-Id: <20200225104449.22453-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 Wire up the various existing pieces so that we can implement measured boot on ArmVirtQemu based on the TPM support in QEMU, just like it has been implemented for x86 in OvmfPkg. The main difference is that on ARM, we first need to discover the TPM base address from the device tree provided by QEMU, as well as the PSCI method used to perform a cold reset. Changes since v1: - use a separate ResetSystemLib instance based on on-demand parsing of the DT, and expose it via the ResetSystem PPI to other client PEIMs - add Laszlo's ack to #1 - incorporate Laszlo's review feedback across the board Cc: lersek@redhat.com Cc: eric.auger@redhat.com Cc: philmd@redhat.com Cc: marcandre.lureau@redhat.com Cc: stefanb@linux.ibm.com Cc: leif@nuviainc.com Ard Biesheuvel (5): OvmfPkg/Tcg2ConfigPei: introduce a signalling PPI to depex on ArmVirtPkg/PlatformPeiLib: make PcdLib dependency explicit in .INF ArmVirtPkg/PlatformPeiLib: discover the TPM base address from the DT ArmVirtPkg: implement ArmVirtPsciResetSystemPeiLib ArmVirtPkg/ArmVirtQemu: add optional support for TPM2 measured boot ArmVirtPkg/ArmVirt.dsc.inc | 6 + ArmVirtPkg/ArmVirtPkg.dec | 6 + ArmVirtPkg/ArmVirtQemu.dsc | 75 ++++++ ArmVirtPkg/ArmVirtQemu.fdf | 6 + ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 10 + .../ArmVirtPsciResetSystemPeiLib.c | 232 ++++++++++++++++++ .../ArmVirtPsciResetSystemPeiLib.inf | 39 +++ .../Library/PlatformPeiLib/PlatformPeiLib.c | 101 +++++++- .../Library/PlatformPeiLib/PlatformPeiLib.inf | 20 +- OvmfPkg/OvmfPkg.dec | 5 + OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf | 6 +- 11 files changed, 491 insertions(+), 15 deletions(-) create mode 100644 ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.c create mode 100644 ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf -- 2.17.1