blob: a05dbf3212df3090934d1581da4cf167fd49ae74 [file] [log] [blame]
Olivier Deprez2661ba52024-02-19 18:50:53 +01001/*
2 * Copyright (c) 2024, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <sp_helpers.h>
8
9#include <arch_features.h>
10
11static void cpu_check_id_regs(void)
12{
13 /* ID_AA64PFR0_EL1 */
14 EXPECT(is_feat_advsimd_present(), true);
15 EXPECT(is_feat_fp_present(), true);
16 EXPECT(is_armv8_2_sve_present(), false);
17
18 /* ID_AA64PFR1_EL1 */
19 EXPECT(is_feat_sme_supported(), false);
20}
21
22void cpu_feature_tests(void)
23{
24 const char *test_cpu_str = "CPU tests";
25
26 announce_test_section_start(test_cpu_str);
27 cpu_check_id_regs();
28 announce_test_section_end(test_cpu_str);
29}