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