blob: bdf0a47a17ab2d66158d21b0bb33f7200a9cbbed [file] [log] [blame]
Jianliang Shendb114b52023-02-20 14:28:05 +08001
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
Roman Mazurak0a79e672024-08-14 16:48:13 +030019 config CONFIG_TFM_DISABLE_CP10CP11
20 bool "Disable CP10/CP11 coprocessors"
21 default n
22 depends on !CONFIG_TFM_ENABLE_CP10CP11
23 help
24 This disables the coprocessors CP10-CP11.
25
Jianliang Shendb114b52023-02-20 14:28:05 +080026 config CONFIG_TFM_ENABLE_CP10CP11
27 bool
28 default n
29 help
30 Make FPU and MVE operational when SPE and/or NSPE require FPU or MVE usage.
31 This alone only enables the coprocessors CP10-CP11, whereas CONFIG_TFM_FLOAT_ABI=hard
32 along with CONFIG_TFM_ENABLE_FP, CONFIG_TFM_ENABLE_MVE or CONFIG_TFM_ENABLE_MVE_FP
33 compiles the code with hardware FP or MVE instructions and ABI.
34
35 config CONFIG_TFM_ENABLE_FP
36 #TODO: depends on toolchain type
37 bool "Enable FP usage"
38 depends on CONFIG_TFM_FP_ARCH != ""
39 default n
40 imply CONFIG_TFM_LAZY_STACKING
41 select CONFIG_TFM_ENABLE_CP10CP11
42
43 config CONFIG_TFM_ENABLE_MVE
44 #TODO: depends on v8.1
45 bool "Enable integer MVE usage"
46 default n
47 imply CONFIG_TFM_LAZY_STACKING
48 select CONFIG_TFM_ENABLE_CP10CP11
49
50 config CONFIG_TFM_ENABLE_MVE_FP
51 bool "Enable floating-point MVE usage"
52 depends on CONFIG_TFM_FP_ARCH != ""
53 default n
54 imply CONFIG_TFM_LAZY_STACKING
55 select CONFIG_TFM_ENABLE_CP10CP11
56
57 config CONFIG_TFM_FLOAT_ABI
58 #TODO: shall be int to align with compile options
59 string
60 default "hard" if CONFIG_TFM_ENABLE_FP || CONFIG_TFM_ENABLE_MVE || CONFIG_TFM_ENABLE_MVE_FP
61 default "soft"
62 help
63 Set float abi hard to enable hardware floating-point instructions and
64 hardware floating-point linkage.
65
66 Set float abi soft, meaning software library functions for
67 floating-point operations and software floating-point linkage.
68
69endmenu