]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - arch/Config.in.arm
arch: tidy up mmu config
[coffee/buildroot.git] / arch / Config.in.arm
1 # arm cpu features
2 config BR2_ARM_CPU_HAS_NEON
3         bool
4
5 # for some cores, NEON support is optional
6 config BR2_ARM_CPU_MAYBE_HAS_NEON
7         bool
8
9 # for some cores, VFPv2 is optional
10 config BR2_ARM_CPU_MAYBE_HAS_VFPV2
11         bool
12
13 config BR2_ARM_CPU_HAS_VFPV2
14         bool
15
16 # for some cores, VFPv3 is optional
17 config BR2_ARM_CPU_MAYBE_HAS_VFPV3
18         bool
19         select BR2_ARM_CPU_MAYBE_HAS_VFPV2
20
21 config BR2_ARM_CPU_HAS_VFPV3
22         bool
23         select BR2_ARM_CPU_HAS_VFPV2
24
25 # for some cores, VFPv4 is optional
26 config BR2_ARM_CPU_MAYBE_HAS_VFPV4
27         bool
28         select BR2_ARM_CPU_MAYBE_HAS_VFPV3
29
30 config BR2_ARM_CPU_HAS_VFPV4
31         bool
32         select BR2_ARM_CPU_HAS_VFPV3
33
34 config BR2_ARM_CPU_HAS_ARM
35         bool
36
37 config BR2_ARM_CPU_HAS_THUMB
38         bool
39
40 config BR2_ARM_CPU_HAS_THUMB2
41         bool
42
43 config BR2_ARM_CPU_ARMV4
44         bool
45
46 config BR2_ARM_CPU_ARMV5
47         bool
48
49 config BR2_ARM_CPU_ARMV6
50         bool
51
52 config BR2_ARM_CPU_ARMV7A
53         bool
54
55 choice
56         prompt "Target Architecture Variant"
57         depends on BR2_arm || BR2_armeb
58         default BR2_arm926t
59         help
60           Specific CPU variant to use
61
62 config BR2_arm920t
63         bool "arm920t"
64         select BR2_ARM_CPU_HAS_ARM
65         select BR2_ARM_CPU_HAS_THUMB
66         select BR2_ARM_CPU_ARMV4
67         select BR2_ARCH_HAS_MMU_OPTIONAL
68 config BR2_arm922t
69         bool "arm922t"
70         select BR2_ARM_CPU_HAS_ARM
71         select BR2_ARM_CPU_HAS_THUMB
72         select BR2_ARM_CPU_ARMV4
73         select BR2_ARCH_HAS_MMU_OPTIONAL
74 config BR2_arm926t
75         bool "arm926t"
76         select BR2_ARM_CPU_HAS_ARM
77         select BR2_ARM_CPU_MAYBE_HAS_VFPV2
78         select BR2_ARM_CPU_HAS_THUMB
79         select BR2_ARM_CPU_ARMV5
80         select BR2_ARCH_HAS_MMU_OPTIONAL
81 config BR2_arm1136jf_s
82         bool "arm1136jf-s"
83         select BR2_ARM_CPU_HAS_ARM
84         select BR2_ARM_CPU_HAS_VFPV2
85         select BR2_ARM_CPU_HAS_THUMB
86         select BR2_ARM_CPU_ARMV6
87         select BR2_ARCH_HAS_MMU_OPTIONAL
88 config BR2_arm1176jz_s
89         bool "arm1176jz-s"
90         select BR2_ARM_CPU_HAS_ARM
91         select BR2_ARM_CPU_HAS_THUMB
92         select BR2_ARM_CPU_ARMV6
93         select BR2_ARCH_HAS_MMU_OPTIONAL
94 config BR2_arm1176jzf_s
95         bool "arm1176jzf-s"
96         select BR2_ARM_CPU_HAS_ARM
97         select BR2_ARM_CPU_HAS_VFPV2
98         select BR2_ARM_CPU_HAS_THUMB
99         select BR2_ARM_CPU_ARMV6
100         select BR2_ARCH_HAS_MMU_OPTIONAL
101 config BR2_cortex_a5
102         bool "cortex-A5"
103         select BR2_ARM_CPU_HAS_ARM
104         select BR2_ARM_CPU_MAYBE_HAS_NEON
105         select BR2_ARM_CPU_MAYBE_HAS_VFPV4
106         select BR2_ARM_CPU_HAS_THUMB2
107         select BR2_ARM_CPU_ARMV7A
108         select BR2_ARCH_HAS_MMU_OPTIONAL
109 config BR2_cortex_a7
110         bool "cortex-A7"
111         select BR2_ARM_CPU_HAS_ARM
112         select BR2_ARM_CPU_HAS_NEON
113         select BR2_ARM_CPU_HAS_VFPV4
114         select BR2_ARM_CPU_HAS_THUMB2
115         select BR2_ARM_CPU_ARMV7A
116         select BR2_ARCH_HAS_MMU_OPTIONAL
117 config BR2_cortex_a8
118         bool "cortex-A8"
119         select BR2_ARM_CPU_HAS_ARM
120         select BR2_ARM_CPU_HAS_NEON
121         select BR2_ARM_CPU_HAS_VFPV3
122         select BR2_ARM_CPU_HAS_THUMB2
123         select BR2_ARM_CPU_ARMV7A
124         select BR2_ARCH_HAS_MMU_OPTIONAL
125 config BR2_cortex_a9
126         bool "cortex-A9"
127         select BR2_ARM_CPU_HAS_ARM
128         select BR2_ARM_CPU_MAYBE_HAS_NEON
129         select BR2_ARM_CPU_MAYBE_HAS_VFPV3
130         select BR2_ARM_CPU_HAS_THUMB2
131         select BR2_ARM_CPU_ARMV7A
132         select BR2_ARCH_HAS_MMU_OPTIONAL
133 config BR2_cortex_a12
134         bool "cortex-A12"
135         select BR2_ARM_CPU_HAS_ARM
136         select BR2_ARM_CPU_HAS_NEON
137         select BR2_ARM_CPU_HAS_VFPV4
138         select BR2_ARM_CPU_HAS_THUMB2
139         select BR2_ARM_CPU_ARMV7A
140         select BR2_ARCH_HAS_MMU_OPTIONAL
141 config BR2_cortex_a15
142         bool "cortex-A15"
143         select BR2_ARM_CPU_HAS_ARM
144         select BR2_ARM_CPU_HAS_NEON
145         select BR2_ARM_CPU_HAS_VFPV4
146         select BR2_ARM_CPU_HAS_THUMB2
147         select BR2_ARM_CPU_ARMV7A
148         select BR2_ARCH_HAS_MMU_OPTIONAL
149 config BR2_fa526
150         bool "fa526/626"
151         select BR2_ARM_CPU_HAS_ARM
152         select BR2_ARM_CPU_ARMV4
153         select BR2_ARCH_HAS_MMU_OPTIONAL
154 config BR2_pj4
155         bool "pj4"
156         select BR2_ARM_CPU_HAS_ARM
157         select BR2_ARM_CPU_HAS_VFPV3
158         select BR2_ARM_CPU_ARMV7A
159         select BR2_ARCH_HAS_MMU_OPTIONAL
160 config BR2_strongarm
161         bool "strongarm sa110/sa1100"
162         select BR2_ARM_CPU_HAS_ARM
163         select BR2_ARM_CPU_ARMV4
164         select BR2_ARCH_HAS_MMU_OPTIONAL
165 config BR2_xscale
166         bool "xscale"
167         select BR2_ARM_CPU_HAS_ARM
168         select BR2_ARM_CPU_HAS_THUMB
169         select BR2_ARM_CPU_ARMV5
170         select BR2_ARCH_HAS_MMU_OPTIONAL
171 config BR2_iwmmxt
172         bool "iwmmxt"
173         select BR2_ARM_CPU_HAS_ARM
174         select BR2_ARM_CPU_ARMV5
175         select BR2_ARCH_HAS_MMU_OPTIONAL
176 endchoice
177
178 choice
179         prompt "Target ABI"
180         depends on BR2_arm || BR2_armeb
181         default BR2_ARM_EABI
182         help
183           Application Binary Interface to use. The Application Binary
184           Interface describes the calling conventions (how arguments
185           are passed to functions, how the return value is passed, how
186           system calls are made, etc.).
187
188 config BR2_ARM_EABI
189         bool "EABI"
190         help
191           The EABI is currently the standard ARM ABI, which is used in
192           most projects. It supports both the 'soft' floating point
193           model (in which floating point instructions are emulated in
194           software) and the 'softfp' floating point model (in which
195           floating point instructions are executed using an hardware
196           floating point unit, but floating point arguments to
197           functions are passed in integer registers).
198
199           The 'softfp' floating point model is link-compatible with
200           the 'soft' floating point model, i.e you can link a library
201           built 'soft' with some other code built 'softfp'.
202
203           However, passing the floating point arguments in integer
204           registers is a bit inefficient, so if your ARM processor has
205           a floating point unit, and you don't have pre-compiled
206           'soft' or 'softfp' code, using the EABIhf ABI will provide
207           better floating point performances.
208
209           If your processor does not have a floating point unit, then
210           you must use this ABI.
211
212 config BR2_ARM_EABIHF
213         bool "EABIhf"
214         depends on BR2_ARM_CPU_MAYBE_HAS_VFPV2 || BR2_ARM_CPU_HAS_VFPV2
215         help
216           The EABIhf is an extension of EABI which supports the 'hard'
217           floating point model. This model uses the floating point
218           unit to execute floating point instructions, and passes
219           floating point arguments in floating point registers.
220
221           It is more efficient than EABI for floating point related
222           workload. However, it does not allow to link against code
223           that has been pre-built for the 'soft' or 'softfp' floating
224           point models.
225
226           If your processor has a floating point unit, and you don't
227           depend on existing pre-compiled code, this option is most
228           likely the best choice.
229
230 endchoice
231
232 config BR2_ARM_ENABLE_NEON
233         bool "Enable NEON SIMD extension support"
234         depends on BR2_ARM_CPU_MAYBE_HAS_NEON
235         select BR2_ARM_CPU_HAS_NEON
236         help
237           For some CPU cores, the NEON SIMD extension is optional.
238           Select this option if you are certain your particular
239           implementation has NEON support and you want to use it.
240
241 choice
242         prompt "Floating point strategy"
243         depends on BR2_ARM_EABI || BR2_ARM_EABIHF
244         default BR2_ARM_FPU_VFPV4D16 if BR2_ARM_CPU_HAS_VFPV4
245         default BR2_ARM_FPU_VFPV3D16 if BR2_ARM_CPU_HAS_VFPV3
246         default BR2_ARM_FPU_VFPV2 if BR2_ARM_CPU_HAS_VFPV2
247         default BR2_ARM_SOFT_FLOAT if !BR2_ARM_CPU_HAS_VFPV2
248
249 config BR2_ARM_SOFT_FLOAT
250         bool "Soft float"
251         depends on BR2_ARM_EABI
252         select BR2_SOFT_FLOAT
253         help
254           This option allows to use software emulated floating
255           point. It should be used for ARM cores that do not include a
256           Vector Floating Point unit, such as ARMv5 cores (ARM926 for
257           example) or certain ARMv6 cores.
258
259 config BR2_ARM_FPU_VFPV2
260         bool "VFPv2"
261         depends on BR2_ARM_CPU_HAS_VFPV2 || BR2_ARM_CPU_MAYBE_HAS_VFPV2
262         help
263           This option allows to use the VFPv2 floating point unit, as
264           available in some ARMv5 processors (ARM926EJ-S) and some
265           ARMv6 processors (ARM1136JF-S, ARM1176JZF-S and ARM11
266           MPCore).
267
268           Note that this option is also safe to use for newer cores
269           such as Cortex-A, because the VFPv3 and VFPv4 units are
270           backward compatible with VFPv2.
271
272 config BR2_ARM_FPU_VFPV3
273         bool "VFPv3"
274         depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3
275         help
276           This option allows to use the VFPv3 floating point unit, as
277           available in some ARMv7 processors (Cortex-A{8, 9}). This
278           option requires a VFPv3 unit that has 32 double-precision
279           registers, which is not necessarily the case in all SOCs
280           based on Cortex-A{8, 9}. If you're unsure, use VFPv3-D16
281           instead, which is guaranteed to work on all Cortex-A{8, 9}.
282
283           Note that this option is also safe to use for newer cores
284           that have a VFPv4 unit, because VFPv4 is backward compatible
285           with VFPv3. They must of course also have 32
286           double-precision registers.
287
288 config BR2_ARM_FPU_VFPV3D16
289         bool "VFPv3-D16"
290         depends on BR2_ARM_CPU_HAS_VFPV3 || BR2_ARM_CPU_MAYBE_HAS_VFPV3
291         help
292           This option allows to use the VFPv3 floating point unit, as
293           available in some ARMv7 processors (Cortex-A{8, 9}). This
294           option requires a VFPv3 unit that has 16 double-precision
295           registers, which is generally the case in all SOCs based on
296           Cortex-A{8, 9}, even though VFPv3 is technically optional on
297           Cortex-A9. This is the safest option for those cores.
298
299           Note that this option is also safe to use for newer cores
300           such that have a VFPv4 unit, because the VFPv4 is backward
301           compatible with VFPv3.
302
303 config BR2_ARM_FPU_VFPV4
304         bool "VFPv4"
305         depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4
306         help
307           This option allows to use the VFPv4 floating point unit, as
308           available in some ARMv7 processors (Cortex-A{5, 7, 12,
309           15}). This option requires a VFPv4 unit that has 32
310           double-precision registers, which is not necessarily the
311           case in all SOCs based on Cortex-A{5, 7, 12, 15}. If you're
312           unsure, you should probably use VFPv4-D16 instead.
313
314           Note that if you want binary code that works on all ARMv7
315           cores, including the earlier Cortex-A{8, 9}, you should
316           instead select VFPv3.
317
318 config BR2_ARM_FPU_VFPV4D16
319         bool "VFPv4-D16"
320         depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4
321         help
322           This option allows to use the VFPv4 floating point unit, as
323           available in some ARMv7 processors (Cortex-A{5, 7, 12,
324           15}). This option requires a VFPv4 unit that has 16
325           double-precision registers, which is always available on
326           Cortex-A12 and Cortex-A15, but optional on Cortex-A5 and
327           Cortex-A7.
328
329           Note that if you want binary code that works on all ARMv7
330           cores, including the earlier Cortex-A{8, 9}, you should
331           instead select VFPv3-D16.
332
333 config BR2_ARM_FPU_NEON
334         bool "NEON"
335         depends on BR2_ARM_CPU_HAS_NEON
336         help
337           This option allows to use the NEON SIMD unit, as available
338           in some ARMv7 processors, as a floating-point unit. It
339           should however be noted that using NEON for floating point
340           operations doesn't provide a complete compatibility with the
341           IEEE 754.
342
343 config BR2_ARM_FPU_NEON_VFPV4
344         bool "NEON/VFPv4"
345         depends on BR2_ARM_CPU_HAS_VFPV4 || BR2_ARM_CPU_MAYBE_HAS_VFPV4
346         depends on BR2_ARM_CPU_HAS_NEON
347         help
348           This option allows to use both the VFPv4 and the NEON SIMD
349           units for floating point operations. Note that some ARMv7
350           cores do not necessarily have VFPv4 and/or NEON support, for
351           example on Cortex-A5 and Cortex-A7, support for VFPv4 and
352           NEON is optional.
353
354 endchoice
355
356 choice
357         prompt "ARM instruction set"
358
359 config BR2_ARM_INSTRUCTIONS_ARM
360         bool "ARM"
361         depends on BR2_ARM_CPU_HAS_ARM
362         help
363           This option instructs the compiler to generate regular ARM
364           instructions, that are all 32 bits wide.
365
366 config BR2_ARM_INSTRUCTIONS_THUMB
367         bool "Thumb"
368         depends on BR2_ARM_CPU_HAS_THUMB
369         help
370           This option instructions the compiler to generate Thumb
371           instructions, which allows to mix 16 bits instructions and
372           32 bits instructions. This generally provides a much smaller
373           compiled binary size.
374
375 config BR2_ARM_INSTRUCTIONS_THUMB2
376         bool "Thumb2"
377         depends on BR2_ARM_CPU_HAS_THUMB2
378         help
379           This option instructions the compiler to generate Thumb2
380           instructions, which allows to mix 16 bits instructions and
381           32 bits instructions. This generally provides a much smaller
382           compiled binary size.
383
384 endchoice
385
386 config BR2_ARCH
387         default "arm"   if BR2_arm
388         default "armeb" if BR2_armeb
389
390 config BR2_ENDIAN
391         default "LITTLE" if BR2_arm
392         default "BIG"    if BR2_armeb
393
394 config BR2_ARCH_HAS_ATOMICS
395         default y
396
397 config BR2_GCC_TARGET_CPU
398         default "arm920t"       if BR2_arm920t
399         default "arm922t"       if BR2_arm922t
400         default "arm926ej-s"    if BR2_arm926t
401         default "arm1136j-s"    if BR2_arm1136j_s
402         default "arm1136jf-s"   if BR2_arm1136jf_s
403         default "arm1176jz-s"   if BR2_arm1176jz_s
404         default "arm1176jzf-s"  if BR2_arm1176jzf_s
405         default "cortex-a5"     if BR2_cortex_a5
406         default "cortex-a7"     if BR2_cortex_a7
407         default "cortex-a8"     if BR2_cortex_a8
408         default "cortex-a9"     if BR2_cortex_a9
409         default "cortex-a12"    if BR2_cortex_a12
410         default "cortex-a15"    if BR2_cortex_a15
411         default "fa526"         if BR2_fa526
412         default "marvell-pj4"   if BR2_pj4
413         default "strongarm"     if BR2_strongarm
414         default "xscale"        if BR2_xscale
415         default "iwmmxt"        if BR2_iwmmxt
416
417 config BR2_GCC_TARGET_ABI
418         default "aapcs-linux"
419
420 config BR2_GCC_TARGET_FPU
421         default "vfp"           if BR2_ARM_FPU_VFPV2
422         default "vfpv3"         if BR2_ARM_FPU_VFPV3
423         default "vfpv3-d16"     if BR2_ARM_FPU_VFPV3D16
424         default "vfpv4"         if BR2_ARM_FPU_VFPV4
425         default "vfpv4-d16"     if BR2_ARM_FPU_VFPV4D16
426         default "neon"          if BR2_ARM_FPU_NEON
427         default "neon-vfpv4"    if BR2_ARM_FPU_NEON_VFPV4
428
429 config BR2_GCC_TARGET_FLOAT_ABI
430         default "soft"          if BR2_ARM_SOFT_FLOAT
431         default "softfp"        if !BR2_ARM_SOFT_FLOAT && BR2_ARM_EABI
432         default "hard"          if !BR2_ARM_SOFT_FLOAT && BR2_ARM_EABIHF
433
434 config BR2_GCC_TARGET_MODE
435         default "arm"           if BR2_ARM_INSTRUCTIONS_ARM
436         default "thumb"         if BR2_ARM_INSTRUCTIONS_THUMB || BR2_ARM_INSTRUCTIONS_THUMB2