sys_reg_trace.c 446 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2021-2023, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <stdbool.h>
  7. #include <arch.h>
  8. #include <arch_helpers.h>
  9. #include <lib/extensions/sys_reg_trace.h>
  10. void sys_reg_trace_init_el3(void)
  11. {
  12. uint32_t val;
  13. /*
  14. * NSACR.NSTRCDIS = b0
  15. * enable NS system register access to implemented trace
  16. * registers.
  17. */
  18. val = read_nsacr();
  19. val &= ~NSTRCDIS_BIT;
  20. write_nsacr(val);
  21. }