aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManish V Badarkhe <Manish.Badarkhe@arm.com>2020-08-23 09:58:44 +0100
committerManish V Badarkhe <manish.badarkhe@arm.com>2020-08-28 09:50:36 +0000
commit14d095c3446e2fd7316f696b8391df7d9520b514 (patch)
treea1338d9411cccd4a772bd5e35f709a4008a730d8 /include
parent699d8a12658f4024e35a39325d8253baa20a5773 (diff)
downloadtrusted-firmware-a-14d095c3446e2fd7316f696b8391df7d9520b514.tar.gz
plat/arm: Get the base address of nv-counters from device tree
Using the Fconf, register base address of the various nv-counters (currently, trusted, non-trusted nv-counters) are moved to the device tree and retrieved during run-time. This feature is enabled using the build option COT_DESC_IN_DTB. Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com> Change-Id: I236f532e63cea63b179f60892cb406fc05cd5830
Diffstat (limited to 'include')
-rw-r--r--include/plat/arm/common/fconf_nv_cntr_getter.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/plat/arm/common/fconf_nv_cntr_getter.h b/include/plat/arm/common/fconf_nv_cntr_getter.h
new file mode 100644
index 0000000000..80a6000497
--- /dev/null
+++ b/include/plat/arm/common/fconf_nv_cntr_getter.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2020, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef FCONF_NV_CNTR_GETTER_H
+#define FCONF_NV_CNTR_GETTER_H
+
+#include <common/nv_cntr_ids.h>
+#include <lib/fconf/fconf.h>
+
+#define cot__nv_cntr_addr_getter(id) nv_cntr_base_addr[id]
+
+extern uintptr_t nv_cntr_base_addr[MAX_NV_CTR_IDS];
+
+#endif /* FCONF_NV_CNTR_GETTER_H */