blob: 2b09ba07f9a3e04aaa8f74bf02b107f0157382b6 [file] [log] [blame]
Antonio Nino Diazc326c342019-01-11 11:20:10 +00001/*
2 * Copyright (c) 2019, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef ARCH_FEATURES_H
8#define ARCH_FEATURES_H
9
10#include <stdbool.h>
11
12#include <arch_helpers.h>
13
14static inline bool is_armv8_2_ttcnp_present(void)
15{
16 return ((read_id_aa64mmfr2_el1() >> ID_AA64MMFR2_EL1_CNP_SHIFT) &
17 ID_AA64MMFR2_EL1_CNP_MASK) != 0U;
18}
19
20#endif /* ARCH_FEATURES_H */