diff options
author | Varun Wadekar <vwadekar@nvidia.com> | 2014-04-09 11:04:10 +0530 |
---|---|---|
committer | Bharat Nihalani <bnihalani@nvidia.com> | 2014-04-09 21:32:30 -0700 |
commit | ae19265e71df6e7aacd157b7d012c8833ee7e060 (patch) | |
tree | c1b9f40bae8f7e13abb1770c19984ab041931f62 /security | |
parent | ba886a5a969cbec915bda418cf4b2351d4875c79 (diff) |
security: tlk: enable logging only if secure firmware supports it
We send an SMC to the secure firmware to see if it supports logging.
If it returns failure, then we disable it from the kernel too.
Change-Id: Icc59fc221f6f59d1806815333f3e71a35a45ea90
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/393217
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/tlk_driver/ote_log.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/security/tlk_driver/ote_log.c b/security/tlk_driver/ote_log.c index 9a70077dbe7b..0e8f6b290f30 100644 --- a/security/tlk_driver/ote_log.c +++ b/security/tlk_driver/ote_log.c @@ -186,9 +186,11 @@ static int __init ote_logger_init(void) smc_args[0] = TE_SMC_INIT_LOGGER; smc_args[1] = (uintptr_t)cb; - tlk_generic_smc(smc_args[0], smc_args[1], 0); - ote_logging_enabled = 1; + /* enable logging only if secure firmware supports it */ + if (!tlk_generic_smc(smc_args[0], smc_args[1], 0)) + ote_logging_enabled = 1; + ote_print_logs(); #else smc_args[0] = TE_SMC_INIT_LOGGER; |