mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 18:14:24 +00:00

At the moment we only support FEAT_SPE to be either unconditionally compiled in, or to be not supported at all. Add support for runtime detection (ENABLE_SPE_FOR_NS=2), by splitting is_armv8_2_feat_spe_present() into an ID register reading function and a second function to report the support status. That function considers both build time settings and runtime information (if needed), and is used before we access SPE related registers. Previously SPE was enabled unconditionally for all platforms, change this now to the runtime detection version. Change-Id: I830c094107ce6a398bf1f4aef7ffcb79d4f36552 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
24 lines
359 B
C
24 lines
359 B
C
/*
|
|
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef SPE_H
|
|
#define SPE_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
#if ENABLE_SPE_FOR_NS
|
|
void spe_enable(bool el2_unused);
|
|
void spe_disable(void);
|
|
#else
|
|
void spe_enable(bool el2_unused)
|
|
{
|
|
}
|
|
void spe_disable(void)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
#endif /* SPE_H */
|