Olivier Deprez | 2661ba5 | 2024-02-19 18:50:53 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
| 11 | static 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 | |
| 22 | void 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 | } |