Platform: Add NS NV counters

Add a configurable amount of NS NV counters (up to 3), and expose them
to the NS caller.

Change-Id: I8adda25c1fae49c4dae36ccb562360f45ecbfc0a
Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/config/check_config.cmake b/config/check_config.cmake
index 2730889..58e0f2f 100644
--- a/config/check_config.cmake
+++ b/config/check_config.cmake
@@ -82,6 +82,7 @@
 tfm_invalid_config(OTP_NV_COUNTERS_RAM_EMULATION AND NOT (PLATFORM_DEFAULT_OTP OR PLATFORM_DEFAULT_NV_COUNTERS))
 tfm_invalid_config(PLATFORM_DEFAULT_NV_COUNTERS AND  NOT PLATFORM_DEFAULT_OTP_WRITEABLE)
 tfm_invalid_config(TFM_DUMMY_PROVISIONING AND  NOT PLATFORM_DEFAULT_OTP_WRITEABLE)
+tfm_invalid_config(TFM_NS_NV_COUNTER_AMOUNT GREATER 3)
 
 ####################### Firmware Update Parttion ###############################
 
diff --git a/config/config_default.cmake b/config/config_default.cmake
index 6d7e097..398339c 100755
--- a/config/config_default.cmake
+++ b/config/config_default.cmake
@@ -80,6 +80,7 @@
 set(CRYPTO_HW_ACCELERATOR               OFF         CACHE BOOL      "Whether to enable the crypto hardware accelerator on supported platforms")
 
 set(OTP_NV_COUNTERS_RAM_EMULATION       OFF         CACHE BOOL      "Enable OTP/NV_COUNTERS emulation in RAM. Has no effect on non-default implementations of the OTP and NV_COUNTERS")
+set(TFM_NS_NV_COUNTER_AMOUNT            0           CACHE STRING    "How many NS NV counters are enabled")
 
 set(PLATFORM_DEFAULT_BL1                ON          CACHE STRING    "Whether to use default BL1 or platform-specific one")