aboutsummaryrefslogtreecommitdiff
path: root/docs/design_documents
diff options
context:
space:
mode:
authorShawn Shan <Shawn.Shan@arm.com>2020-10-30 15:07:47 +0800
committerKen Liu <ken.liu@arm.com>2020-11-03 03:52:49 +0000
commit50996c475c3c8d5d2c6e689065694ba90d362bc1 (patch)
tree5c5d80fb9793d531dc2568fe5e12376bfa1eda36 /docs/design_documents
parent561f7ca2a0c36844be761fab275221ac25198312 (diff)
downloadtrusted-firmware-m-50996c475c3c8d5d2c6e689065694ba90d362bc1.tar.gz
SPM: Add a log level to support output ERROR log
Add a log level TFM_SPM_LOG_ERROR to just enable the SPMLOG_ERRMSGVAL and SPMLOG_ERRMSG. Change-Id: I16de565f8059a80c197b94bf82f8020530ccbcac Signed-off-by: Shawn Shan <Shawn.Shan@arm.com>
Diffstat (limited to 'docs/design_documents')
-rw-r--r--docs/design_documents/tfm_log_system_design_document.rst58
1 files changed, 30 insertions, 28 deletions
diff --git a/docs/design_documents/tfm_log_system_design_document.rst b/docs/design_documents/tfm_log_system_design_document.rst
index 4f88198ce7..fe40383d91 100644
--- a/docs/design_documents/tfm_log_system_design_document.rst
+++ b/docs/design_documents/tfm_log_system_design_document.rst
@@ -46,11 +46,12 @@ Level Control
Three log levels for SPM log system are defined:
- TFM_SPM_LOG_LEVEL_DEBUG
- - TFM_SPM_LOG_LEVEL_RELEASE
+ - TFM_SPM_LOG_LEVEL_INFO
+ - TFM_SPM_LOG_LEVEL_ERROR
- TFM_SPM_LOG_LEVEL_SILENCE
Then a macro ``TFM_SPM_LOG_LEVEL`` is defined as an indicator, it should
-be equal to one of the three log levels.
+be equal to one of the four log levels.
API Definition
--------------
@@ -97,21 +98,21 @@ The following three APIs output a message in string.
Here is a table about the effective APIs with different SPM log level.
-+------------------+-------------------------+---------------------------+---------------------------+
-| | TFM_SPM_LOG_LEVEL_DEBUG | TFM_SPM_LOG_LEVEL_RELEASE | TFM_SPM_LOG_LEVEL_SILENCE |
-+==================+=========================+===========================+===========================+
-| SPMLOG_DBGMSGVAL | Yes | No | No |
-+------------------+-------------------------+---------------------------+---------------------------+
-| SPMLOG_INFMSGVAL | Yes | Yes | No |
-+------------------+-------------------------+---------------------------+---------------------------+
-| SPMLOG_ERRMSGVAL | Yes | Yes | No |
-+------------------+-------------------------+---------------------------+---------------------------+
-| SPMLOG_DBGMSG | Yes | No | No |
-+------------------+-------------------------+---------------------------+---------------------------+
-| SPMLOG_INFMSG | Yes | Yes | No |
-+------------------+-------------------------+---------------------------+---------------------------+
-| SPMLOG_ERRMSG | Yes | Yes | No |
-+------------------+-------------------------+---------------------------+---------------------------+
++------------------+-------------------------+---------------------------+---------------------------+-----------------------------+
+| | TFM_SPM_LOG_LEVEL_DEBUG | TFM_SPM_LOG_LEVEL_INFO | TFM_SPM_LOG_LEVEL_ERROR | TFM_SPM_LOG_LEVEL_SILENCE |
++==================+=========================+===========================+===========================+=============================+
+| SPMLOG_DBGMSGVAL | Yes | No | No | No |
++------------------+-------------------------+---------------------------+---------------------------+-----------------------------+
+| SPMLOG_INFMSGVAL | Yes | Yes | No | No |
++------------------+-------------------------+---------------------------+---------------------------+-----------------------------+
+| SPMLOG_ERRMSGVAL | Yes | Yes | Yes | No |
++------------------+-------------------------+---------------------------+---------------------------+-----------------------------+
+| SPMLOG_DBGMSG | Yes | No | No | No |
++------------------+-------------------------+---------------------------+---------------------------+-----------------------------+
+| SPMLOG_INFMSG | Yes | Yes | No | No |
++------------------+-------------------------+---------------------------+---------------------------+-----------------------------+
+| SPMLOG_ERRMSG | Yes | Yes | Yes | No |
++------------------+-------------------------+---------------------------+---------------------------+-----------------------------+
HAL API
-------
@@ -141,11 +142,12 @@ Level Control
Three log levels for partition log system are defined:
- TFM_PARTITION_LOG_LEVEL_DEBUG
- - TFM_PARTITION_LOG_LEVEL_RELEASE
+ - TFM_PARTITION_LOG_LEVEL_INFO
+ - TFM_PARTITION_LOG_LEVEL_ERROR
- TFM_PARTITION_LOG_LEVEL_SILENCE
Then a macro ``TFM_PARTITION_LOG_LEVEL`` is defined as an indicator. It should
-be equal to one of the three log levels and it is an overall setting for all
+be equal to one of the four log levels and it is an overall setting for all
partitions.
Log Format
@@ -173,15 +175,15 @@ Define partition log APIs:
Here is a table about the effective APIs with different partition log level.
-+------------+-------------------------------+---------------------------------+---------------------------------+
-| | TFM_PARTITION_LOG_LEVEL_DEBUG | TFM_PARTITION_LOG_LEVEL_RELEASE | TFM_PARTITION_LOG_LEVEL_SILENCE |
-+============+===============================+=================================+=================================+
-| LOG_DBGFMT | Yes | No | No |
-+------------+-------------------------------+---------------------------------+---------------------------------+
-| LOG_INFFMT | Yes | Yes | No |
-+------------+-------------------------------+---------------------------------+---------------------------------+
-| LOG_ERRFMT | Yes | Yes | No |
-+------------+-------------------------------+---------------------------------+---------------------------------+
++------------+-------------------------------+---------------------------------+---------------------------------+---------------------------------+
+| | TFM_PARTITION_LOG_LEVEL_DEBUG | TFM_PARTITION_LOG_LEVEL_INFO | TFM_PARTITION_LOG_LEVEL_ERROR | TFM_PARTITION_LOG_LEVEL_SILENCE |
++============+===============================+=================================+=================================+---------------------------------+
+| LOG_DBGFMT | Yes | No | No | No |
++------------+-------------------------------+---------------------------------+---------------------------------+---------------------------------+
+| LOG_INFFMT | Yes | Yes | No | No |
++------------+-------------------------------+---------------------------------+---------------------------------+---------------------------------+
+| LOG_ERRFMT | Yes | Yes | Yes | No |
++------------+-------------------------------+---------------------------------+---------------------------------+---------------------------------+
HAL API
-------