tlcl: use different NV_Read authorizations for fw and userland
authorAndrey Pronin <apronin@google.com>
Mon, 18 Jul 2016 18:24:55 +0000 (11:24 -0700)
committerVadim Bendebury <vbendeb@chromium.org>
Fri, 22 Jul 2016 14:42:54 +0000 (14:42 +0000)
commitbea3f7979a4c3088da74accd1b68830214e0934d
tree99d3aefa513cf9b255c079d2945cd4b5c5f18832
parenta071c7697883e3a73570cf0c75fa5673cc83673d
tlcl: use different NV_Read authorizations for fw and userland

Let's use an earlier version of CL 360944 that relies on the
global flag to decide if the platform authorization is to
be used.

As it turned out, we can't read NVRAM with empty
password authorization if platform hierarchy is still enabled
(as it is in firmware), so we keep platform authorization for
firmware, and use empty password only for userland utilities,
like tpmc.

BRANCH=none
BUG=chrome-os-partner:55531
TEST=Run 'initctl stop trunksd; tpmc read 0x1008 0xd" on
     kevin, verify that it returns the right output.

Change-Id: Ic878ebde9086e803d2487d90c55c0f19001cf94b
Signed-off-by: Andrey Pronin <apronin@google.com>
Reviewed-on: https://chromium-review.googlesource.com/362520
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Andrey Pronin <apronin@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
firmware/include/tlcl.h
firmware/include/tpm2_marshaling.h
firmware/lib/tpm2_lite/marshaling.c
firmware/lib/tpm2_lite/tlcl.c
firmware/lib/tpm_lite/tlcl.c
utility/tpmc.c