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