trunksd: do not disable platform hierarchy on startup
Currently trunksd examines at startup the state of the TPM and
proceeds to disable Platform Hierarchy in case it was not disabled by
But the only case Platform Hierarchy is not disabled by the firmware
is when the device is booted in recovery mode, and TPM needs to be
available to recovering.
Let's not invoke TpmUtilityImpl::InitializeTpm() in the course of
trunksd initialization, introduce instead a function which would check
current state of the TPM and report warnings as appropriate.
Separate driver initialization and some basic checks into a private
function to be used by both InitializeTpm() and CheckState().
The only reason to report the state failure is failure to initialize
TEST=verified that it is now possible to write into firmware and
kernel spaces after stopping trunksd in recovery mode. It is
still not possible to write into the spaces in normal and
It is still possible to login to a reef device running this new
Signed-off-by: Vadim Bendebury <firstname.lastname@example.org>
Reviewed-by: Darren Krahn <email@example.com>
Reviewed-by: Andrey Pronin <firstname.lastname@example.org>
(cherry picked from commit c06b57117c840a15e93dbe5cd34ce6c44f477ada)
6 files changed