1
2#-------------------------------------------------------------------------------
3# Copyright (c) 2023, Arm Limited. All rights reserved.
4#
5# SPDX-License-Identifier: BSD-3-Clause
6#
7#-------------------------------------------------------------------------------
8
9################################# FPU ####################################
10
11menu "FPU/MVE"
12
13    config CONFIG_TFM_LAZY_STACKING
14        bool
15        default n
16        help
17          Enable lazy stacking
18
19    config CONFIG_TFM_ENABLE_CP10CP11
20        bool
21        default n
22        help
23          Make FPU and MVE operational when SPE and/or NSPE require FPU or MVE usage.
24          This alone only enables the coprocessors CP10-CP11, whereas CONFIG_TFM_FLOAT_ABI=hard
25          along with CONFIG_TFM_ENABLE_FP, CONFIG_TFM_ENABLE_MVE or CONFIG_TFM_ENABLE_MVE_FP
26          compiles the code with hardware FP or MVE instructions and ABI.
27
28    config CONFIG_TFM_ENABLE_FP
29        #TODO: depends on toolchain type
30        bool "Enable FP usage"
31        depends on CONFIG_TFM_FP_ARCH != ""
32        default n
33        imply CONFIG_TFM_LAZY_STACKING
34        select CONFIG_TFM_ENABLE_CP10CP11
35
36    config CONFIG_TFM_ENABLE_MVE
37        #TODO: depends on v8.1
38        bool "Enable integer MVE usage"
39        default n
40        imply CONFIG_TFM_LAZY_STACKING
41        select CONFIG_TFM_ENABLE_CP10CP11
42
43    config CONFIG_TFM_ENABLE_MVE_FP
44        bool "Enable floating-point MVE usage"
45        depends on CONFIG_TFM_FP_ARCH != ""
46        default n
47        imply CONFIG_TFM_LAZY_STACKING
48        select CONFIG_TFM_ENABLE_CP10CP11
49
50    config CONFIG_TFM_FLOAT_ABI
51        #TODO: shall be int to align with compile options
52        string
53        default "hard"  if CONFIG_TFM_ENABLE_FP || CONFIG_TFM_ENABLE_MVE || CONFIG_TFM_ENABLE_MVE_FP
54        default "soft"
55        help
56          Set float abi hard to enable hardware floating-point instructions and
57          hardware floating-point linkage.
58
59          Set float abi soft, meaning software library functions for
60          floating-point operations and software floating-point linkage.
61
62endmenu
63