summaryrefslogtreecommitdiffstats
path: root/lib/extensions/trf/aarch32
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extensions/trf/aarch32')
-rw-r--r--lib/extensions/trf/aarch32/trf.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/extensions/trf/aarch32/trf.c b/lib/extensions/trf/aarch32/trf.c
new file mode 100644
index 0000000..321c089
--- /dev/null
+++ b/lib/extensions/trf/aarch32/trf.c
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2021-2023, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <stdbool.h>
+
+#include <arch.h>
+#include <arch_helpers.h>
+#include <lib/extensions/trf.h>
+
+void trf_init_el3(void)
+{
+ uint32_t val;
+
+ /*
+ * Allow access of trace filter control registers from
+ * non-monitor mode.
+ */
+ val = read_sdcr();
+ val &= ~(SDCR_TTRF_BIT);
+ write_sdcr(val);
+}