1# Intel64-specific X86 subarchitecture options
2
3# Copyright (c) 2019 Intel Corp.
4# SPDX-License-Identifier: Apache-2.0
5
6if X86_64
7
8config MAIN_STACK_SIZE
9	default 8192
10
11config IDLE_STACK_SIZE
12	default 4096
13
14config ISR_STACK_SIZE
15	default 16384
16
17config TEST_EXTRA_STACK_SIZE
18	default 4096
19
20config SYSTEM_WORKQUEUE_STACK_SIZE
21	default 8192
22
23config X86_EXCEPTION_STACK_SIZE
24	int "Size of the exception stack(s)"
25	default 4096
26	help
27	  The exception stack(s) (one per CPU) are used both for exception
28	  processing and early kernel/CPU initialization. They need only
29	  support limited call-tree depth and must fit into the low core,
30	  so they are typically smaller than the ISR stacks.
31
32config X86_EXCEPTION_STACK_TRACE
33	bool
34	default y
35	depends on EXCEPTION_STACK_TRACE
36	depends on NO_OPTIMIZATIONS
37	help
38	  Internal config to enable runtime stack traces on fatal exceptions.
39
40config SCHED_IPI_VECTOR
41	int "IDT vector to use for scheduler IPI"
42	default 34
43	range 33 255
44	depends on SMP
45
46config TLB_IPI_VECTOR
47	int "IDT vector to use for TLB shootdown IPI"
48	default 35
49	range 33 255
50	depends on SMP
51
52# We should really only have to provide one of the following two values,
53# but a bug in the Zephyr SDK for x86 precludes the use of division in
54# the assembler. For now, we require that these values be specified manually,
55# and we check to be sure they're a valid combination in arch.h. yes, ugh.
56
57config ISR_DEPTH
58	int "Maximum IRQ nesting depth"
59	default 4
60	help
61	  The more nesting allowed, the more room is required for IRQ stacks.
62
63config ISR_SUBSTACK_SIZE
64	int "Size of ISR substacks"
65	default 4096
66	help
67	  Number of bytes from the ISR stack to reserve for each nested IRQ
68	  level. Must be a multiple of 16 to main stack alignment. Note that
69	  CONFIG_ISR_SUBSTACK_SIZE * CONFIG_ISR_DEPTH must be equal to
70	  CONFIG_ISR_STACK_SIZE.
71
72config X86_STACK_PROTECTION
73	bool
74	default y if HW_STACK_PROTECTION
75	select THREAD_STACK_INFO
76	help
77	  This option leverages the MMU to cause a system fatal error if the
78	  bounds of the current process stack are overflowed. This is done
79	  by preceding all stack areas with a 4K guard page.
80
81config X86_USERSPACE
82	bool
83	default y if USERSPACE
84	select THREAD_STACK_INFO
85	help
86	 This option enables APIs to drop a thread's privileges down to ring 3,
87	 supporting user-level threads that are protected from each other and
88	 from crashing the kernel.
89
90config MP_MAX_NUM_CPUS
91	range 1 4
92
93endif # X86_64
94