trf.c 408 B

123456789101112131415161718192021222324
  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/trf.h>
  10. void trf_init_el3(void)
  11. {
  12. uint32_t val;
  13. /*
  14. * Allow access of trace filter control registers from
  15. * non-monitor mode.
  16. */
  17. val = read_sdcr();
  18. val &= ~(SDCR_TTRF_BIT);
  19. write_sdcr(val);
  20. }