forked from apache/nuttx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKconfig
More file actions
1602 lines (1350 loc) · 43.2 KB
/
Copy pathKconfig
File metadata and controls
1602 lines (1350 loc) · 43.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
choice
prompt "CPU Architecture"
default ARCH_ARM
config ARCH_ARM
bool "ARM"
select ARCH_HAVE_BACKTRACE
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_FORK
select ARCH_HAVE_STACKCHECK
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_STDARG_H
select ARCH_HAVE_SETJMP if !ARCH_TOOLCHAIN_IAR
select ARCH_HAVE_SYSCALL_HOOKS
select ARCH_HAVE_RDWR_MEM_CPU_RUN
select ARCH_HAVE_TCBINFO
select ARCH_HAVE_THREAD_LOCAL
---help---
The ARM architectures
config ARCH_ARM64
bool "ARM64"
select ALARM_ARCH
select ARCH_64BIT
select ARCH_HAVE_BACKTRACE
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_FORK if !BUILD_KERNEL && !BUILD_PROTECTED
select ARCH_HAVE_STACKCHECK
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_STDARG_H
select ARCH_HAVE_SETJMP
select ARCH_HAVE_SYSCALL_HOOKS
select ARCH_HAVE_RDWR_MEM_CPU_RUN
select ARCH_HAVE_TCBINFO
select ARCH_HAVE_THREAD_LOCAL
select ARCH_HAVE_PERF_EVENTS
select ONESHOT
select ONESHOT_COUNT
---help---
The ARM64 architectures
config ARCH_AVR
bool "AVR"
select ARCH_NOINTC
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_CUSTOMOPT
---help---
Atmel 8-bit bit AVR and 32-bit AVR32 architectures
config ARCH_HC
bool "Freescale HC"
select ARCH_NOINTC
select ARCH_HAVE_INTERRUPTSTACK
---help---
Freescale HC architectures (M9S12)
config ARCH_MIPS
bool "MIPS"
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_CUSTOMOPT
---help---
MIPS architectures (PIC32)
config ARCH_MISOC
bool "MISOC"
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_STDARG_H
---help---
MISOC
config ARCH_RENESAS
bool "Renesas"
select ARCH_NOINTC
select ARCH_HAVE_INTERRUPTSTACK
---help---
Renesas architectures (SH and M16C).
config ARCH_RISCV
bool "RISC-V"
select ARCH_HAVE_BACKTRACE
select ARCH_HAVE_CPUINFO
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_STACKCHECK
select ARCH_HAVE_FORK
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_SETJMP
select ARCH_HAVE_STDARG_H
select ARCH_HAVE_SYSCALL_HOOKS
select ARCH_HAVE_RDWR_MEM_CPU_RUN
select ARCH_HAVE_TCBINFO
select ARCH_HAVE_THREAD_LOCAL
select ARCH_HAVE_POWEROFF
select ARCH_HAVE_LAZYFPU if ARCH_HAVE_FPU
select ARCH_HAVE_CPUID_MAPPING if ARCH_HAVE_MULTICPU
---help---
RISC-V 32 and 64-bit RV32 / RV64 architectures.
config ARCH_SIM
bool "Simulation"
select ARCH_HAVE_BACKTRACE
select ARCH_HAVE_MULTICPU if !CONFIG_WINDOWS_NATIVE
select ARCH_HAVE_RTC_SUBSECONDS
select ARCH_HAVE_SERIAL_TERMIOS
select ARCH_HAVE_SYSCALL_HOOKS
select ARCH_HAVE_TICKLESS
select ARCH_HAVE_POWEROFF
select ARCH_HAVE_TESTSET
select ARCH_HAVE_FORK if !HOST_WINDOWS
select ARCH_HAVE_SETJMP
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_TCBINFO
select ARCH_HAVE_TEXT_HEAP
select ARCH_SETJMP_H
select ALARM_ARCH
select ONESHOT
select ONESHOT_COUNT
select SERIAL_CONSOLE
select SERIAL_IFLOWCONTROL
select SCHED_HPWORK
select ARCH_HAVE_CPUINFO
---help---
Linux/Cygwin user-mode simulation.
config ARCH_X86
bool "x86"
select ARCH_HAVE_TCBINFO
---help---
Intel x86 architectures.
config ARCH_X86_64
bool "x86_64"
select ARCH_64BIT
select ARCH_HAVE_TCBINFO
select ARCH_HAVE_FPU
select ARCH_HAVE_DPFPU
select ARCH_HAVE_MULTICPU
select ARCH_HAVE_TESTSET
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_THREAD_LOCAL
select PCI_LATE_DRIVERS_REGISTER if PCI
select ARCH_TOOLCHAIN_GNU
select ARCH_HAVE_BACKTRACE
select ARCH_HAVE_FORK if !BUILD_KERNEL
select ARCH_HAVE_SETJMP
select ARCH_HAVE_PERF_EVENTS
select ARCH_HAVE_POWEROFF
---help---
x86-64 architectures.
config ARCH_XTENSA
bool "Xtensa"
select ARCH_HAVE_BACKTRACE
select ARCH_HAVE_CPUINFO
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_STACKCHECK
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_THREAD_LOCAL
select ARCH_HAVE_TCBINFO
select ARCH_HAVE_STDARG_H
select ARCH_HAVE_SETJMP if ARCH_TOOLCHAIN_GNU
select ARCH_HAVE_SYSCALL_HOOKS
select ARCH_HAVE_PERF_EVENTS
---help---
Cadence® Tensilica® Xtensa® actictures.
config ARCH_Z16
bool "ZNEO"
select ARCH_HAVE_HEAP2
---help---
ZiLOG ZNEO 16-bit architectures (z16f).
config ARCH_Z80
bool "z80"
select ARCH_HAVE_HEAP2
---help---
ZiLOG 8-bit architectures (z80, ez80, z8).
config ARCH_OR1K
bool "OpenRISC"
---help---
OpenRISC architectures.
config ARCH_SPARC
bool "SPARC"
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_TCBINFO
---help---
SPARC architectures (SPARC V8)
config ARCH_TRICORE
bool "Infineon TriCore"
select ARCH_HAVE_BACKTRACE
select ARCH_HAVE_INTERRUPTSTACK
select ARCH_HAVE_STACKCHECK
select ARCH_HAVE_SYSCALL_HOOKS
select ARCH_HAVE_CUSTOMOPT
select ARCH_HAVE_TCBINFO
select ARCH_HAVE_REGCPY
---help---
Infineon 32-bit AURIX TriCore architectures
endchoice
config ARCH
string
default "arm" if ARCH_ARM
default "arm64" if ARCH_ARM64
default "avr" if ARCH_AVR
default "hc" if ARCH_HC
default "mips" if ARCH_MIPS
default "misoc" if ARCH_MISOC
default "renesas" if ARCH_RENESAS
default "risc-v" if ARCH_RISCV
default "sim" if ARCH_SIM
default "x86" if ARCH_X86
default "x86_64" if ARCH_X86_64
default "xtensa" if ARCH_XTENSA
default "z16" if ARCH_Z16
default "z80" if ARCH_Z80
default "or1k" if ARCH_OR1K
default "sparc" if ARCH_SPARC
default "tricore" if ARCH_TRICORE
if ARCH_ARM
source "arch/arm/Kconfig"
endif
if ARCH_ARM64
source "arch/arm64/Kconfig"
endif
if ARCH_AVR
source "arch/avr/Kconfig"
endif
if ARCH_HC
source "arch/hc/Kconfig"
endif
if ARCH_MIPS
source "arch/mips/Kconfig"
endif
if ARCH_MISOC
source "arch/misoc/Kconfig"
endif
if ARCH_RENESAS
source "arch/renesas/Kconfig"
endif
if ARCH_RISCV
source "arch/risc-v/Kconfig"
endif
if ARCH_SIM
source "arch/sim/Kconfig"
endif
if ARCH_X86
source "arch/x86/Kconfig"
endif
if ARCH_X86_64
source "arch/x86_64/Kconfig"
endif
if ARCH_XTENSA
source "arch/xtensa/Kconfig"
endif
if ARCH_Z16
source "arch/z16/Kconfig"
endif
if ARCH_Z80
source "arch/z80/Kconfig"
endif
if ARCH_OR1K
source "arch/or1k/Kconfig"
endif
if ARCH_SPARC
source "arch/sparc/Kconfig"
endif
if ARCH_TRICORE
source "arch/tricore/Kconfig"
endif
config ARCH_CHIP_CUSTOM
bool "Custom Chip Support"
default n
if ARCH_CHIP_CUSTOM
menu "Custom Chip Configuration"
config ARCH_CHIP_CUSTOM_NAME
string "Custom chip name"
default ""
---help---
This is a name for the chip. It is not used except to return the
information via the NSH uname command.
config ARCH_CHIP_CUSTOM_DIR
string "Custom chip directory"
default ""
---help---
If the custom chip configuration is selected, then it is necessary
to also tell the build system where it can find the chip directory
for the custom chip.
In this case, the chip directory is assumed to lie outside the
NuttX directory. The provided path must then be a full, absolute
path to some location outside of the NuttX source tree (like
"~/projects/mychip").
config ARCH_CHIP_CUSTOM_DIR_RELPATH
bool "Relative custom chip directory"
default y
---help---
Specifies that the chip directory is relative to the NuttX directory.
endmenu # Custom Chip Configuration
endif #ARCH_CHIP_CUSTOM
source "$BINDIR/arch/dummy/Kconfig"
config ARCH_TOOLCHAIN_GNU
bool
default n
config ARCH_TOOLCHAIN_ARMCLANG
bool
select ARCH_TOOLCHAIN_GNU
default n
config ARCH_TOOLCHAIN_CLANG
bool
select ARCH_TOOLCHAIN_GNU
default n
config ARCH_TOOLCHAIN_GCC
bool
select ARCH_TOOLCHAIN_GNU
default n
config ARCH_TOOLCHAIN_GHS
bool
select ARCH_TOOLCHAIN_GNU
default n
config ARCH_TOOLCHAIN_IAR
bool
default n
config ARCH_TOOLCHAIN_TASKING
bool
default n
config ARCH_GNU_NO_WEAKFUNCTIONS
bool
depends on ARCH_TOOLCHAIN_GNU
default n
---help---
Disable support for weak functions.
config ARCH_SIZET_LONG
bool "size_t is type long"
default n
---help---
size_t may be type long or type int. This matters for some
C++ library routines because the NuttX size_t might not have
the same underlying type as your toolchain's size_t.
config ARCH_INSTRUMENT_ALL
bool "Instrument All"
default n
---help---
Add instrument to all source files. we can use instrument_register
to register the instrument function.
comment "Architecture Options"
config ARCH_64BIT
bool
default n
---help---
Indicates that the current architecture is 64-bit.
config ARCH_NOINTC
bool
default n
config ARCH_VECNOTIRQ
bool
default n
config ARCH_HAVE_IRQTRIGGER
bool
default n
depends on !ARCH_NOINTC
config ARCH_DMA
bool
default n
config ARCH_DMA_NO_FLASH_TRANSFER
bool
default n
config ARCH_HAVE_IRQPRIO
bool
default n
config ARCH_ICACHE
bool
default n
config ARCH_ICACHE_LOCK
bool
depends on ARCH_ICACHE
default n
config ARCH_DCACHE
bool
default n
config ARCH_DCACHE_LOCK
bool
depends on ARCH_DCACHE
default n
config ARCH_L2CACHE
bool
default n
config ARCH_HAVE_ADDRENV
bool
default n
config ARCH_NEED_ADDRENV_MAPPING
bool
default n
config ARCH_HAVE_EXTRA_HEAPS
bool
default n
---help---
Special memory regions used as separate heaps
config ARCH_HAVE_TEXT_HEAP
bool
default n
---help---
Special memory region for dynamic code loading
config ARCH_HAVE_TEXT_HEAP_SEPARATE_DATA_ADDRESS
bool
default n
---help---
Textheap might have separate instruction/data mappings
config ARCH_HAVE_TEXT_HEAP_WORD_ALIGNED_READ
bool
default n
---help---
Loads from the instruction mapping of textheap need to be word-aligned
config ARCH_HAVE_DATA_HEAP
bool
default n
---help---
Special memory region for dynamic data loading
config ARCH_HAVE_COPY_SECTION
bool
default n
---help---
Section copying for dynamic code loading
config ARCH_HAVE_MULTICPU
bool
default n
config ARCH_HAVE_CPUID_MAPPING
bool
default n
depends on ARCH_HAVE_MULTICPU
config ARCH_HAVE_FORK
bool
default n
config ARCH_HAVE_CRC32
bool
default n
---help---
Architecture supports CRC32 instruction
config ARCH_HAVE_FPU
bool
default n
config ARCH_HAVE_DPFPU
bool
default n
select ARCH_HAVE_FPU
config ARCH_HAVE_QPFPU
bool
default n
select ARCH_HAVE_DPFPU
config ARCH_HAVE_LAZYFPU
bool
default n
depends on ARCH_HAVE_FPU
config ARCH_HAVE_MMU
bool
default n
config ARCH_HAVE_MPU
bool
default n
config ARCH_NAND_HWECC
bool
default n
config ARCH_HAVE_EXTCLK
bool
default n
config ARCH_HAVE_POWEROFF
bool
default n
config ARCH_HAVE_PROGMEM
bool
default n
config ARCH_HAVE_PROGMEM_READ
bool
default n
depends on ARCH_HAVE_PROGMEM
config ARCH_HAVE_RESET
bool
default n
config ARCH_LDST_16BIT_NOT_ATOMIC
bool
default n
select ARCH_HAVE_8BIT_SERIAL_BUFSIZE
---help---
This configuration option denotes architecture incapable of loading
16-bit values atomically, ie. in a single instruction. If this is set,
it means that the architecture needs two (or more) instructions
to perform such load AND that a interrupt service routine may run
between their execution. The same applies for stores.
If set, any code running in non-interrupt context that reads 16-bit
variable that may be written in interrupt context must disable
interrupts or use another method that makes the read atomic.
(The same applies for non-interrupt context write and interrupt
context read.)
config ARCH_HAVE_UDELAY
bool
default n
---help---
This configuration option is set for architectures that define
their own version of up_udelay. That function is defined as weak
but due to linker behaviour with regards to static libraries,
it was found that the overriding definition is not included
in the resulting binary, the default (weak) one is still used.
(Found with GCC 14.2 on AVR and Risc-V but likely present
elsewhere too. Manifests when up_udelay override is the only
function in the source file.)
If set, the default up_udelay function is excluded from build.
config ARCH_HAVE_DYNAMIC_UDELAY
bool
default n
depends on ARCH_HAVE_UDELAY
---help---
This configuration option is set if architecture-specific up_udelay
function does not use CONFIG_BOARD_LOOPSPERMSEC. This should be used
for architectures/boards where the user has the option to choose
clock frequency of the CPU.
(Keep in mind that up_udelay function may also be used in situations
after a failure - the implementation should always re-read current
hardware settings as anything stored in memory may be corrupted.)
config ARCH_HAVE_TESTSET
bool
default n
config ARCH_HAVE_CUSTOM_TESTSET
bool
default n
select ARCH_HAVE_TESTSET
config ARCH_HAVE_THREAD_LOCAL
bool
default n
config ARCH_HAVE_FETCHADD
bool
default n
config ARCH_HAVE_RTC_SUBSECONDS
bool
default n
config ARCH_HAVE_SYSCALL_HOOKS
bool
default n
---help---
Indicates that the architecture supports the system call hooks as
required if CONFIG_SCHED_INSTRUMENTATION_SYSCALL is enabled. Refer
to sched/Kconfig for additional information.
config ARCH_HAVE_BACKTRACE
bool
default n
config ARCH_HAVE_DEBUG
bool "Architecture have debug support"
default n
config ARCH_HAVE_MEMTAG
bool "Architecture have memory tagging support"
default n
config ARCH_HAVE_PERF_EVENTS
bool
default n
---help---
The architecture supports hardware performance counting.
config ARCH_HAVE_PERF_EVENTS_USER_ACCESS
bool
default n
select ARCH_HAVE_PERF_EVENTS
---help---
Select if hardware allows userspace perf counter access.
config ARCH_PERF_EVENTS
bool "Configure hardware performance counting"
default y if SCHED_CRITMONITOR || SCHED_IRQMONITOR || RPMSG_PING || SEGGER_SYSVIEW
default n
depends on ARCH_HAVE_PERF_EVENTS
---help---
Enable hardware performance counter support for perf events. If
disabled, perf events will use software events only.
config ARCH_PERF_COUNT_BITWIDTH
int "Bit width of the perf count"
default 31 if ARCH_TRICORE
default 32 if !ARCH_TRICORE
depends on PERF_OVERFLOW_CORRECTION
---help---
Bit width of the perf count. When arch is tricore, the value is 31.
When arch is not tricore, the value is 32.
config ARCH_HAVE_BOOTLOADER
bool
default n
config ARCH_HAVE_CPUINFO
bool
default n
config ARCH_CPUINFO_FREQ_KHZ
int "Default CPU frequency"
default 0
depends on ARCH_HAVE_CPUINFO
---help---
Defines the CPU's default maximum frequency. Frequency unit KHZ.
config ARCH_HAVE_TCBINFO
bool
default n
config ARCH_HAVE_ELF_EXECUTABLE
bool
default n
config ARCH_HAVE_TRUSTZONE
bool
default n
---help---
Automatically selected to indicate that the ARM CPU supports
TrustZone.
choice
prompt "TrustZone Configuration"
default ARCH_TRUSTZONE_DISABLED
depends on ARCH_HAVE_TRUSTZONE
config ARCH_TRUSTZONE_DISABLED
bool "TrustZone disabled, all CPUs operate in secure state"
config ARCH_TRUSTZONE_SECURE
bool "TrustZone enabled, all CPUs operate secure state"
config ARCH_TRUSTZONE_NONSECURE
bool "TrustZone enabled, all CPUs operate non-secure state"
endchoice # TrustZone Configuration
config ARCH_FPU
bool "FPU support"
default y
depends on ARCH_HAVE_FPU
---help---
Build in support for the Floating Point Unit (FPU).
Check your chip specifications first; not all chips support the FPU.
config ARCH_DPFPU
bool "Double precision FPU support"
default y
depends on ARCH_FPU && ARCH_HAVE_DPFPU
---help---
Enable toolchain support for double precision (64-bit) floating
point if both the toolchain and the hardware support it.
config ARCH_QPFPU
bool "Quad-Precision FPU support"
default y
depends on ARCH_FPU && ARCH_HAVE_DPFPU && ARCH_HAVE_QPFPU
---help---
Enable toolchain support for quadruple precision (128 bits or 16 bytes) floating
point if both the toolchain and the hardware support it.
config ARCH_LAZYFPU
bool "Enable lazy FPU state save / restore"
default n
depends on ARCH_FPU && ARCH_HAVE_LAZYFPU
---help---
Enable lazy FPU state save and restore. Normally FPU state is saved
and restored with the integer context registers, if the task is using
FPU. The state is typically saved into the task's user stack upon
exception entry or context switch out, and restored when the
exception returns or context switches back in.
As the kernel does not use FPU, this can be optimized with the help
of the FPU hardware status and a bit of code logic inside the kernel.
The logic keeps track of the FPU state, which can be "unused",
"dirty" or "clean". A clean state means the FPU has not been used
since the last state save, while the dirty state indicates that the
FPU has been used.
The optimization saves / restores FPU registers only if:
- A context change has happened, save and restore does not happen
during exception entry / return to the same task
- FPU is in use (state is not unused) and
- FPU status is dirty, i.e. FPU has been used after the last
- FPU restore happens when status is in dirty or clean
This saves CPU time as the FPU registers do not have to be moved in
and out when handling an exception that does not result in a context
switch.
The tradeoff with the lazy FPU feature is that it requires a static
memory allocation from the task's TCB to store the FPU registers,
while the non-lazy style can use stack memory for storing the FPU
registers, saving memory as the stack frame for the FPU registers can
be skipped if the FPU is not in use.
config ARCH_USE_MMU
bool "Enable MMU"
default n
depends on ARCH_HAVE_MMU
---help---
The architecture supports supports an MMU. Enable this option in
order to enable use of the MMU. For most architectures, this is
not really an option: It is required to use the MMU. In those
cases, this selection will always be forced.
config ARCH_USE_MPU
bool "Enable MPU"
default n
depends on ARCH_HAVE_MPU
---help---
The architecture supports supports an MPU. Enable this option in
order to enable use of the MPU. For most architectures, this option
is enabled by other, platform-specific logic. In those cases, this
selection will always be forced.
config ARCH_USE_TEXT_HEAP
bool "Enable separate text allocation for dynamic code loading"
default n
depends on ARCH_HAVE_TEXT_HEAP
---help---
This option enables architecture-specific memory allocator
for dynamic code loading. For example, ESP32 has separate memory
regions for instruction and data and the memory region used for
usual malloc doesn't work for instruction.
config ARCH_USE_DATA_HEAP
bool "Enable separate data allocation for dynamic data loading"
default n
depends on ARCH_HAVE_DATA_HEAP
---help---
This option enables architecture-specific memory allocator
for dynamic data loading.
config ARCH_USE_SEPARATED_SECTION
bool "Enable separate section allocation for dynamic loading"
default n
depends on ARCH_USE_TEXT_HEAP || ARCH_USE_DATA_HEAP
---help---
This option enables loading different sections into different
memory areas, allowing for different speeds.
menuconfig ARCH_ADDRENV
bool "Address environments"
default n
depends on ARCH_HAVE_ADDRENV && SCHED_LPWORK
---help---
Support per-task address environments using the MMU... i.e., support
"processes"
config ARCH_USE_COPY_SECTION
bool "Enable arch copy section by self for dynamic code loading"
default n
depends on ARCH_HAVE_COPY_SECTION
---help---
This option enables architecture-specific memory copy for
dynamic code loading. For example, Ambiq has MRAM regions
for instruction which can't load by the memcpy directly.
if ARCH_ADDRENV && ARCH_NEED_ADDRENV_MAPPING
config ARCH_TEXT_VBASE
hex "Virtual .text base"
default 0x0
---help---
The virtual address of the beginning the .text region
config ARCH_DATA_VBASE
hex "Virtual .bss/.data base"
default 0x0
---help---
The virtual address of the beginning of the .bss/.data region.
config ARCH_HEAP_VBASE
hex "Virtual heap base"
default 0x0
---help---
The virtual address of the beginning of the heap region.
config ARCH_VMA_MAPPING
bool "Support runtime memory mapping into SHM area"
default n
config ARCH_KVMA_MAPPING
bool
default n
config ARCH_SHM_VBASE
hex "Shared memory base"
depends on ARCH_VMA_MAPPING
---help---
The virtual address of the beginning of the shared memory region.
config ARCH_KMAP_VBASE
hex "Kernel dynamic virtual mappings base"
depends on ARCH_KVMA_MAPPING
---help---
The virtual address of the beginning of the kernel dynamic mapping
region.
config ARCH_TEXT_NPAGES
int "Max .text pages"
default 1
---help---
The maximum number of pages that can allocated for the .text region.
This, along with knowledge of the page size, determines the size of
the .text virtual address space. Default is 1.
config ARCH_DATA_NPAGES
int "Max .bss/.data pages"
default 1
---help---
The maximum number of pages that can allocated for the .bss/.data
region. This, along with knowledge of the page size, determines the
size of the .bss/.data virtual address space. Default is 1.
config ARCH_HEAP_NPAGES
int "Max heap pages"
default 1
---help---
The maximum number of pages that can allocated for the heap region.
This, along with knowledge of the page size, determines the size of
the heap virtual address space. Default is 1.
if ARCH_VMA_MAPPING
config ARCH_SHM_MAXREGIONS
int "Max shared memory regions"
default 1
---help---
The maximum number of regions that can be used with SysV shared
memory interface. This hard-coded value permits static allocation of
the shared memory data structures and serves no other purpose.
Default is 1.
config ARCH_SHM_NPAGES
int "Max size of userspace VM mapping in pages"
default 1
---help---
The max size of the virtual memory region for shared memory,
userspace device mappings etc.
endif # ARCH_VMA_MAPPING
config ARCH_KMAP_NPAGES
int "Max kernel dynamic mapping pages"
default 1
depends on ARCH_KVMA_MAPPING
---help---
The maximum amount of pages that a kernel can use for dynamically
mapping physical pages to itself.
config ARCH_STACK_DYNAMIC
bool "Dynamic user stack"
default n
depends on BUILD_KERNEL && EXPERIMENTAL
---help---
Select this option if the user process stack resides in its own
address space. The naming of this selection implies that dynamic
stack allocation is supported. Certainly this option must be set if
dynamic stack allocation is supported by a platform. But the more
general meaning of this configuration environment is simply that the
stack has its own address space.
NOTE: This option not yet fully implemented in the code base.
Hence, it is marked EXPERIMENTAL: Do not enable it unless you plan
finish the implementation.
if ARCH_STACK_DYNAMIC
config ARCH_STACK_VBASE
hex "Virtual stack base"
---help---
The virtual address of the beginning the stack region
config ARCH_STACK_NPAGES
int "Max. stack pages"
default 1
---help---
The maximum number of pages that can allocated for the stack region.
This, along with knowledge of the page size, determines the size of
the stack virtual address space. Default is 1.
endif # ARCH_STACK_DYNAMIC
config ARCH_KERNEL_STACK
bool "Kernel process stack"
default LIBC_EXECFUNCS
depends on BUILD_KERNEL || BUILD_PROTECTED
---help---
It this option is selected, then every user process will have two
stacks: A large, potentially dynamically sized user stack and small
kernel stack that is used during system call process.
If this option is not selected, then kernel system calls will simply
use the caller's user stack. So, in most cases, this option is not
required. However, this option is *required* if both BUILD_KERNEL
and LIBC_EXECFUNCS are selected. Why? Because when we instantiate
and initialize the address environment of the new user process, we
will temporarily lose the address environment of the old user
process, including its stack contents. The kernel C logic will
crash immediately with no valid stack in place.
When this option is selected, the smaller kernel stack stays in
place during system call processing event though the original user
stack may or may not be accessible.
if ARCH_KERNEL_STACK
config ARCH_KERNEL_STACKSIZE
int "Kernel stack size"
default 1568
---help---
The common size of each process's kernel stack
endif # ARCH_KERNEL_STACK
config ARCH_PGPOOL_MAPPING
bool "Have page pool mapping"
default n
---help---
If there is a MMU mapping in place for the page pool memory, then
this mapping can be utilized to simplify some page table operations.
Otherwise, a temporary mapping will have to be established each time
it is necessary to modify the contents of a page.
if ARCH_PGPOOL_MAPPING