Skip to content

Commit

Permalink
ftpm: disable PPI emulation by default
Browse files Browse the repository at this point in the history
Add the configuration variable CFG_FTPM_EMULATE_PPI, default disabled,
to control whether PPI emulation is enabled.

Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
jenswi-linaro committed Oct 17, 2024
1 parent b0a3d15 commit 6b5c2d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ta/ftpm/fTPM.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@

#define STR_TRACE_USER_TA "fTPM"

#include <config.h>
#include <tee_internal_api.h>
#include <tee_internal_api_extensions.h>
#include <string.h>
Expand Down Expand Up @@ -467,6 +468,8 @@ TEE_Result TA_InvokeCommandEntryPoint(void *sess_ctx,
}

case TA_FTPM_EMULATE_PPI: {
if (!IS_ENABLED(CFG_FTPM_EMULATE_PPI))
return TEE_ERROR_NOT_SUPPORTED;
return fTPM_Emulate_PPI(param_types, params);
}

Expand Down
2 changes: 2 additions & 0 deletions ta/ftpm/sub.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CFG_FTPM_EMULATE_PPI ?= n

#
# The fTPM needs to overwrite some of the header files used in the
# reference implementation. The search order GCC uses is dependent on the
Expand Down

0 comments on commit 6b5c2d0

Please sign in to comment.