From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.web09.597.1582743919426936856 for ; Wed, 26 Feb 2020 11:05:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=VSaTBKXG; spf=pass (domain: linaro.org, ip: 209.85.221.54, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f54.google.com with SMTP id v2so30518wrp.12 for ; Wed, 26 Feb 2020 11:05:19 -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=zNADzgXJF331YPfqg6AH3Q9Vdw9tNtx6zGCEiqvAcdY=; b=VSaTBKXG+4W48y3SmudK54nSrQdEvmSapl0dtMTzj7dP6BQF48rmbc/ZilcLeeVVY7 r3okYFaj8UpSSnujaFEdh6roJvZHqC0k3GD/arkN/Trm3WooiMUooUkZAQMOcqaSR6sS gcDgpJcgrtl5obN7PIFjacnR8Z3ZeWb2I8kBF8RrWJVa4ucqibpcianMt3FHzf3xfcBE HfhYGHujEGuSKySLfojhYRU/TmcRQ3QPZltN/Q4b5jG36kKofXtN0tfYZb6bKwzpLeBy kkMjOSUV7xhlGpCDqcHzuz9dIH5IRl8+AclnFdBtDQwoJoCkLSvWGk80Yk1xJn/Tktgd ArHA== 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=zNADzgXJF331YPfqg6AH3Q9Vdw9tNtx6zGCEiqvAcdY=; b=KMFRr+UTyLdzYFy+L6zm9kI6K2ItT32YsMFpyt9XzC3azI81TTjK5ABv9Cg7hm5z+N uX3RUhzAQYxj7Tek8cAIdJLoQz5wO84YP2tHvRvfRUpuPz96vcJ7237KzMXF250YVNIZ 1YUNamgmdUvVsDZrDrUT0O5X2NK50oZZyQj85jeDUQ+cA7BcxfBqUlnT7pCX2WPPHtyj fz6k4eUo7+tgqH9IlhSHjk0mRQu3BGkQBEka52xH2AhQ5aC8ZYNCxnVVH1BY7OM45nEH xwx+BedBOht9gzM/8cDK3s8+dml8qSZo3EJBie1xU8cqQfjsGunOmdKloiTWtbV28fM8 dWJg== X-Gm-Message-State: APjAAAU/BHiFpTcYJjBY47IjupFX9fzbd6AiksLvI2oX5aSZkuDJ19YV ALAssmmCpr5Mz57QdqXHVjeKKg4NefcW5g== X-Google-Smtp-Source: APXvYqxWHPaq2qZ6TsO2GyFLsEGA9iE4I96bDmYXo+X95PHVf1jcW5xU1w2Qup4esh8Dv/RpLIYMNw== X-Received: by 2002:adf:f288:: with SMTP id k8mr76355wro.301.1582743917652; Wed, 26 Feb 2020 11:05:17 -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.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 11:05:17 -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 0/9] ArmVirtPkg: implement measured boot for ArmVirtQemu Date: Wed, 26 Feb 2020 20:05:05 +0100 Message-Id: <20200226190514.31395-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 v2: - add Laszlo's ack to patches #2 and #4 - add PcdTpm2SupportEnabled PCD declarations to all individual platforms in ArmVirtPkg, even though only ArmVirtQemu really needs it - split patch #5 into several patches 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 Code can also be found at: https://github.com/ardbiesheuvel/edk2/tree/armvirt-tpm 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 (9): 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 ResetSystem PEIM for upcoming TPM2 support ArmVirtPkg/ArmVirtQemu: enable TPM2 support in the PEI phase ArmVirtPkg/ArmVirtQemu: enable the DXE phase TPM2 support module ArmVirtPkg/ArmVirtQemu: enable the TPM2 configuration module ArmVirtPkg/ArmVirtQemu: enable TPM2 based measured boot ArmVirtPkg/ArmVirtPkg.dec | 6 + ArmVirtPkg/ArmVirtQemu.dsc | 74 ++++++ ArmVirtPkg/ArmVirtQemu.fdf | 6 + ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 10 + ArmVirtPkg/ArmVirtQemuKernel.dsc | 6 + ArmVirtPkg/ArmVirtXen.dsc | 6 + .../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 +- 12 files changed, 496 insertions(+), 15 deletions(-) create mode 100644 ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.c create mode 100644 ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiLib.inf -- 2.17.1