sysreg128.h 714 B

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