From 699d8a12658f4024e35a39325d8253baa20a5773 Mon Sep 17 00:00:00 2001 From: Manish V Badarkhe Date: Sun, 23 Aug 2020 09:47:02 +0100 Subject: [PATCH] dtsi: Update the nv-counter node in the device tree Created a header file defining the id of the various nv-counters used in the system. Also, updated the device tree to add 'id' property for the trusted and non-trusted nv-counters. Signed-off-by: Manish V Badarkhe Change-Id: Ia41a557f7e56ad4ed536aee11c7a59e078ae07c0 --- fdts/cot_descriptors.dtsi | 18 ++++++++++-------- include/common/nv_cntr_ids.h | 9 +++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 include/common/nv_cntr_ids.h diff --git a/fdts/cot_descriptors.dtsi b/fdts/cot_descriptors.dtsi index 9308e1789..411bae6c1 100644 --- a/fdts/cot_descriptors.dtsi +++ b/fdts/cot_descriptors.dtsi @@ -6,6 +6,7 @@ #include #include +#include cot { manifests { @@ -301,18 +302,19 @@ cot { }; }; -non-volatile-counters { +non_volatile_counters: non_volatile_counters { compatible = "arm, non-volatile-counter"; #address-cells = <1>; #size-cells = <0>; - counters { - trusted_nv_counter: trusted_nv_counter { - oid = TRUSTED_FW_NVCOUNTER_OID; - }; - non_trusted_nv_counter: non_trusted_nv_counter { - oid = NON_TRUSTED_FW_NVCOUNTER_OID; - }; + trusted_nv_counter: trusted_nv_counter { + id = ; + oid = TRUSTED_FW_NVCOUNTER_OID; + }; + + non_trusted_nv_counter: non_trusted_nv_counter { + id = ; + oid = NON_TRUSTED_FW_NVCOUNTER_OID; }; }; diff --git a/include/common/nv_cntr_ids.h b/include/common/nv_cntr_ids.h new file mode 100644 index 000000000..a15c431d0 --- /dev/null +++ b/include/common/nv_cntr_ids.h @@ -0,0 +1,9 @@ +/* + * Copyright (c) 2020, Arm Limited. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#define TRUSTED_NV_CTR_ID U(0) +#define NON_TRUSTED_NV_CTR_ID U(1) +#define MAX_NV_CTR_IDS U(2)