blob: 8e37e7a91e3dafcdc7b42f42903a98ecddf0a949 [file] [log] [blame]
Arvind Ram Prakashe558f9c2024-11-11 14:32:37 -06001/*
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
12void 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}