LIB: Replace SPM log with tfm_log

Replace the existing SPM log library with the new tfm_log library. This
patch aims to maintain existing behaviour by using a format specifier
which matches the existing implementation.

Change-Id: I5871b5429e4f051fdede87063bfe3ebbe49847f9
Signed-off-by: Jackson Cooper-Driver <jackson.cooper-driver@arm.com>
diff --git a/config/build_type/Kconfig.debug b/config/build_type/Kconfig.debug
index 32b4f0b..11538b7 100644
--- a/config/build_type/Kconfig.debug
+++ b/config/build_type/Kconfig.debug
@@ -15,7 +15,7 @@
     default y
 
 choice SPM_LOG_LEVEL
-    default SPM_LOG_LEVEL_DEBUG
+    default LOG_LEVEL_VERBOSE
 endchoice
 
 choice PARTITION_LOG_LEVEL
diff --git a/config/build_type/Kconfig.minsizerel b/config/build_type/Kconfig.minsizerel
index 3642ec9..ceac9e5 100644
--- a/config/build_type/Kconfig.minsizerel
+++ b/config/build_type/Kconfig.minsizerel
@@ -11,7 +11,7 @@
 endif
 
 choice SPM_LOG_LEVEL
-    default SPM_LOG_LEVEL_SILENCE
+    default LOG_LEVEL_NONE
 endchoice
 
 choice PARTITION_LOG_LEVEL
diff --git a/config/build_type/Kconfig.release b/config/build_type/Kconfig.release
index c400f35..9ba7c02 100644
--- a/config/build_type/Kconfig.release
+++ b/config/build_type/Kconfig.release
@@ -17,7 +17,7 @@
 endif
 
 choice SPM_LOG_LEVEL
-    default SPM_LOG_LEVEL_SILENCE
+    default LOG_LEVEL_NONE
 endchoice
 
 choice PARTITION_LOG_LEVEL
diff --git a/config/build_type/debug.cmake b/config/build_type/debug.cmake
index 78c02bb..0f826ca 100644
--- a/config/build_type/debug.cmake
+++ b/config/build_type/debug.cmake
@@ -7,7 +7,7 @@
 
 set(MBEDCRYPTO_BUILD_TYPE               relwithdebinfo CACHE STRING "Build type of Mbed Crypto library")
 set(BL1_2_BUILD_TYPE                    relwithdebinfo CACHE STRING "Build type of BL1_2")
-set(TFM_SPM_LOG_LEVEL                   TFM_SPM_LOG_LEVEL_DEBUG CACHE STRING "Set debug SPM log level as Debug level")
+set(TFM_SPM_LOG_LEVEL                   LOG_LEVEL_VERBOSE CACHE STRING "Set debug SPM log level as Debug level")
 set(TFM_PARTITION_LOG_LEVEL             LOG_LEVEL_VERBOSE CACHE STRING "Set debug SP log level as Debug level")
 
 set(CONFIG_TFM_HALT_ON_CORE_PANIC       ON         CACHE BOOL      "On fatal errors in the secure firmware, halt instead of rebooting.")
diff --git a/config/build_type/minsizerel.cmake b/config/build_type/minsizerel.cmake
index 595b336..0cf7e4c 100644
--- a/config/build_type/minsizerel.cmake
+++ b/config/build_type/minsizerel.cmake
@@ -6,6 +6,6 @@
 #-------------------------------------------------------------------------------
 
 set(MCUBOOT_LOG_LEVEL                   "OFF"      CACHE STRING    "Level of logging to use for MCUboot [OFF, ERROR, WARNING, INFO, DEBUG]")
-set(TFM_SPM_LOG_LEVEL                   TFM_SPM_LOG_LEVEL_SILENCE CACHE STRING "Set minsizerel SPM log level as Silence level")
+set(TFM_SPM_LOG_LEVEL                   LOG_LEVEL_NONE CACHE STRING "Set minsizerel SPM log level as Silence level")
 set(TFM_PARTITION_LOG_LEVEL             LOG_LEVEL_NONE CACHE STRING "Set minsizerel SP log level as Silence level")
 set(TFM_BL1_LOG_LEVEL                   LOG_LEVEL_NONE CACHE STRING  "The level of BL1 logging to uart")
diff --git a/config/build_type/release.cmake b/config/build_type/release.cmake
index 562259e..1d48b04 100644
--- a/config/build_type/release.cmake
+++ b/config/build_type/release.cmake
@@ -8,6 +8,6 @@
 set(MBEDCRYPTO_BUILD_TYPE               minsizerel CACHE STRING    "Build type of Mbed Crypto library")
 set(BL1_2_BUILD_TYPE                    minsizerel CACHE STRING    "Build type of BL1_2")
 set(MCUBOOT_LOG_LEVEL                   "OFF"      CACHE STRING    "Level of logging to use for MCUboot [OFF, ERROR, WARNING, INFO, DEBUG]")
-set(TFM_SPM_LOG_LEVEL                   TFM_SPM_LOG_LEVEL_SILENCE CACHE STRING "Set release SPM log level as Silence level")
+set(TFM_SPM_LOG_LEVEL                   LOG_LEVEL_NONE CACHE STRING "Set release SPM log level as Silence level")
 set(TFM_PARTITION_LOG_LEVEL             LOG_LEVEL_NONE CACHE STRING "Set release SP log level as Silence level")
 set(TFM_BL1_LOG_LEVEL                   LOG_LEVEL_NONE CACHE STRING  "The level of BL1 logging to uart")
diff --git a/config/tfm_secure_log.cmake b/config/tfm_secure_log.cmake
index 7a8b0ac..9c1ec10 100644
--- a/config/tfm_secure_log.cmake
+++ b/config/tfm_secure_log.cmake
@@ -5,7 +5,7 @@
 #
 #-------------------------------------------------------------------------------
 
-set(TFM_SPM_LOG_LEVEL           TFM_SPM_LOG_LEVEL_SILENCE       CACHE STRING    "Set default SPM log level as INFO level")
+set(TFM_SPM_LOG_LEVEL           LOG_LEVEL_NONE   CACHE STRING    "Set default SPM log level as INFO level")
 set(TFM_PARTITION_LOG_LEVEL     LOG_LEVEL_NONE   CACHE STRING    "Set default Secure Partition log level as INFO level")
 
 # Secure regression tests also require SP log function
@@ -18,7 +18,7 @@
 
 # SP log relies on SPM log.
 # Enable SPM log when SPM log level is higher than silence or SP log is active.
-if ((NOT ${TFM_SPM_LOG_LEVEL} STREQUAL TFM_SPM_LOG_LEVEL_SILENCE)
+if ((NOT ${TFM_SPM_LOG_LEVEL} STREQUAL LOG_LEVEL_NONE)
     OR TFM_SP_LOG_RAW_ENABLED)
     set(TFM_SPM_LOG_RAW_ENABLED ON)
 endif()