blob: 8854856b6d1274ca22a0ee402a5743d03a4ee2e8 [file] [log] [blame]
Govindraj Rajae63794e2024-09-06 15:43:43 +01001/*
2 * Copyright (c) 2024, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef SYSREG128_H
8#define SYSREG128_H
9
10#ifndef __ASSEMBLER__
11
12#if ENABLE_FEAT_D128
13#include <stdint.h>
14
15typedef uint128_t sysreg_t;
16
17#define PAR_EL1_D128 (((sysreg_t)(1ULL)) << (64))
18
19#define _DECLARE_SYSREG128_READ_FUNC(_name) \
20uint128_t read_ ## _name(void);
21
22#define _DECLARE_SYSREG128_WRITE_FUNC(_name) \
23void write_ ## _name(uint128_t v);
24
25#define DECLARE_SYSREG128_RW_FUNCS(_name) \
26 _DECLARE_SYSREG128_READ_FUNC(_name) \
27 _DECLARE_SYSREG128_WRITE_FUNC(_name)
28#else
29
30typedef uint64_t sysreg_t;
31
32#endif /* ENABLE_FEAT_D128 */
33
34#endif /* __ASSEMBLER__ */
35
36#endif /* SYSREG128_H */