blob: cd27f1611b7b29979da21200d2c3cd1e9d041205 [file] [log] [blame]
Andre Przywara2230a592025-03-10 17:19:34 +00001/*
2 * Copyright (c) 2025, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <test_helpers.h>
8#include <tftf_lib.h>
9#include <tftf.h>
10
11/*
12 * FEAT_RAS introduces EL1 system registers to query error records, those
13 * CPU specific parts of the RAS extension can be accessed independently of
14 * any FFH/KFH handling setup or any system specific RAS implementation.
15 * Reading these registers will trap to EL3 and crash when EL3 has not
16 * allowed access, which is controlled by the SCR_EL3.TERR bit.
17 */
18
19test_result_t test_ras_reg_access(void)
20{
21 SKIP_TEST_IF_AARCH32();
22
23#ifdef __aarch64__
24 SKIP_TEST_IF_RAS_NOT_SUPPORTED();
25
26 read_erridr_el1();
27
28 return TEST_RESULT_SUCCESS;
29#endif
30}