fpmr.c 439 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (c) 2024, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <arch.h>
  7. #include <arch_features.h>
  8. #include <arch_helpers.h>
  9. #include <lib/extensions/fpmr.h>
  10. void fpmr_enable_per_world(per_world_context_t *per_world_ctx)
  11. {
  12. u_register_t reg;
  13. /* Disable Floating point Trap in CPTR_EL3. */
  14. reg = per_world_ctx->ctx_cptr_el3;
  15. reg &= ~TFP_BIT;
  16. per_world_ctx->ctx_cptr_el3 = reg;
  17. }