diff --git a/platform/NVMem.c b/platform/NVMem.c index fad411b..3a70174 100644 --- a/platform/NVMem.c +++ b/platform/NVMem.c @@ -157,7 +157,7 @@ _plat__NvInitFromStorage() objID = s_StorageObjectID + i; // Attempt to open TEE persistent storage object. - Result = TEE_OpenPersistentObject(TEE_STORAGE_PRIVATE, + Result = TEE_OpenPersistentObject(CFG_FTPM_TA_TEE_STORAGE_ID, (void *)&objID, sizeof(objID), TA_STORAGE_FLAGS, @@ -175,7 +175,7 @@ _plat__NvInitFromStorage() } // Storage object was not found, create it. - Result = TEE_CreatePersistentObject(TEE_STORAGE_PRIVATE, + Result = TEE_CreatePersistentObject(CFG_FTPM_TA_TEE_STORAGE_ID, (void *)&objID, sizeof(objID), TA_STORAGE_FLAGS, @@ -313,7 +313,7 @@ _plat__NvWriteBack() // Force storage stack to update its backing store TEE_CloseObject(s_NVStore[i]); - Result = TEE_OpenPersistentObject(TEE_STORAGE_PRIVATE, + Result = TEE_OpenPersistentObject(CFG_FTPM_TA_TEE_STORAGE_ID, (void *)&objID, sizeof(objID), TA_STORAGE_FLAGS, diff --git a/sub.mk b/sub.mk index e317865..492ceab 100644 --- a/sub.mk +++ b/sub.mk @@ -1,4 +1,5 @@ CFG_FTPM_EMULATE_PPI ?= n +CFG_FTPM_TA_TEE_STORAGE_ID ?= TEE_STORAGE_PRIVATE # # The fTPM needs to overwrite some of the header files used in the @@ -77,6 +78,8 @@ cflags-platform/EventLogPrint.c-y += -Wno-pointer-arith cflags-platform/EventLogPrint.c-y += -Wno-format-truncation cflags-platform/EventLogPrint.c-y += -Wno-restrict +cppflags-y += -DCFG_FTPM_TA_TEE_STORAGE_ID=$(CFG_FTPM_TA_TEE_STORAGE_ID) + srcs-y += platform/AdminPPI.c srcs-y += platform/Cancel.c srcs-y += platform/Clock.c