mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00

This patch enables support of FEAT_FPMR by enabling access to FPMR register. It achieves it by setting the EnFPM bit of SCR_EL3. This feature is currently enabled for NS world only. Reference: https://developer.arm.com/documentation/109697/2024_09/ Feature-descriptions/The-Armv9-5-architecture-extension?lang=en Change-Id: I580c409b9b22f8ead0737502280fb9093a3d5dd2 Signed-off-by: Arvind Ram Prakash <arvind.ramprakash@arm.com>
20 lines
439 B
C
20 lines
439 B
C
/*
|
|
* Copyright (c) 2024, Arm Limited. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <arch.h>
|
|
#include <arch_features.h>
|
|
#include <arch_helpers.h>
|
|
#include <lib/extensions/fpmr.h>
|
|
|
|
void fpmr_enable_per_world(per_world_context_t *per_world_ctx)
|
|
{
|
|
u_register_t reg;
|
|
|
|
/* Disable Floating point Trap in CPTR_EL3. */
|
|
reg = per_world_ctx->ctx_cptr_el3;
|
|
reg &= ~TFP_BIT;
|
|
per_world_ctx->ctx_cptr_el3 = reg;
|
|
}
|