aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-12-09 02:47:22 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-12-09 02:47:22 +0000
commitf91bf20527dae2d21fa017703093b889e7765463 (patch)
tree4d638b10f3160aec9d3bbb2f789bafd685f0eed9
parent1e1db6bea186eb965b8f45d4ef6d4c7564fb56ce (diff)
parentc456225bd529067d237dc7242c954e22479b1fea (diff)
downloadtpm2-f91bf20527dae2d21fa017703093b889e7765463.tar.gz
NV: allow reading FWMP before startup
am: c456225bd5 Change-Id: I6ffef8f2e89b57ff437943abe0e4c633188adc88
-rw-r--r--NV.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/NV.c b/NV.c
index 0099c19..3e639ea 100644
--- a/NV.c
+++ b/NV.c
@@ -1045,7 +1045,15 @@ NvIndexIsAccessible(
// indicated as present
if(nvIndex.publicArea.attributes.TPMA_NV_PLATFORMCREATE == CLEAR)
{
- if(gc.shEnable == FALSE)
+ /*
+ * FWMP is a Chrome OS specific object saved at address 0x100a, it
+ * needs to be available for reading even before TPM2_Startup
+ * command is issued.
+ */
+ UINT32 isFwmpRead = (handle == 0x100100a) &&
+ IsReadOperation(commandCode);
+
+ if((gc.shEnable == FALSE) && !isFwmpRead)
return TPM_RC_HANDLE;
}
// if phEnableNV is CLEAR, a platform created Index should not