blob: 7e5817537ef504728a61307e9c9dca30b1c15b41 [file] [log] [blame]
Arthur Heymans67f29e82022-04-17 10:37:13 +02001if ARCH_X86
2
Stefan Reinauer9d5e36e2015-04-27 13:40:16 -07003config PARALLEL_MP
Kyösti Mälkki41a2c732021-05-29 21:23:18 +03004 def_bool y
Stefan Reinauer9d5e36e2015-04-27 13:40:16 -07005 help
6 This option uses common MP infrastructure for bringing up APs
7 in parallel. It additionally provides a more flexible mechanism
8 for sequencing the steps of bringing up the APs.
Arthur Heymans48fbf2f2021-11-26 14:50:42 +01009 The code also works for just initialising the BSP in case there
10 are no APs.
Stefan Reinauer9d5e36e2015-04-27 13:40:16 -070011
Aaron Durbinb21e3622016-12-07 00:32:19 -060012config PARALLEL_MP_AP_WORK
13 def_bool n
14 depends on PARALLEL_MP
15 help
16 Allow APs to do other work after initialization instead of going
17 to sleep.
Stefan Reinauer9d5e36e2015-04-27 13:40:16 -070018
Arthur Heymans56776a12022-05-19 11:31:10 +020019config X86_SMM_SKIP_RELOCATION_HANDLER
20 bool
21 default n
22 depends on PARALLEL_MP && HAVE_SMI_HANDLER
23 help
24 Skip SMM relocation using a relocation handler running in SMM
25 with a stub at 0x30000. This is useful on platforms that have
26 an alternative way to set SMBASE.
27
Subrata Banik64c04e02022-05-25 01:25:55 +053028config DEFAULT_X2APIC
29 def_bool n
30 help
31 Allow SoC code to set LAPIC_ACCESS_MODE to X2APIC.
32
33config DEFAULT_X2APIC_RUNTIME
34 def_bool n
35 help
36 Allow SoC code to set LAPIC_ACCESS_MODE to X2APIC_RUNTIME.
37
Subrata Banik55d300c2022-07-12 11:06:15 +000038config DEFAULT_X2APIC_LATE_WORKAROUND
39 def_bool n
40 help
41 Allow SoC code to set LAPIC_ACCESS_MODE to X2APIC_LATE_WORKAROUND.
42
Kyösti Mälkki176c8872021-05-29 20:33:22 +030043choice LAPIC_ACCESS_MODE
44 prompt "APIC operation mode"
Subrata Banik64c04e02022-05-25 01:25:55 +053045 default X2APIC_ONLY if DEFAULT_X2APIC
46 default X2APIC_RUNTIME if DEFAULT_X2APIC_RUNTIME
Subrata Banik55d300c2022-07-12 11:06:15 +000047 default X2APIC_LATE_WORKAROUND if DEFAULT_X2APIC_LATE_WORKAROUND
Kyösti Mälkki176c8872021-05-29 20:33:22 +030048 default XAPIC_ONLY
49
50config XAPIC_ONLY
51 prompt "Set XAPIC mode"
52 bool
53
54config X2APIC_ONLY
55 prompt "Set X2APIC mode"
56 bool
57 depends on PARALLEL_MP
Kyösti Mälkki176c8872021-05-29 20:33:22 +030058
59config X2APIC_RUNTIME
60 prompt "Support both XAPIC and X2APIC"
61 bool
62 depends on PARALLEL_MP
Kyösti Mälkki176c8872021-05-29 20:33:22 +030063
Subrata Banik2125a172022-07-12 10:55:21 +000064config X2APIC_LATE_WORKAROUND
65 prompt "Use XAPIC for AP bringup, then change to X2APIC"
66 bool
Subrata Banikfb287992022-07-24 11:19:04 +053067 depends on PARALLEL_MP && MAX_CPUS < 256
Subrata Banik2125a172022-07-12 10:55:21 +000068 help
69 Choose this option if the platform supports dynamic switching between
70 XAPIC to X2APIC. The initial Application Processors (APs) are configured
71 in XAPIC mode at reset and later enable X2APIC as a CPU feature.
72 All access mechanisms between XAPIC (mmio) and X2APIC (msr) switches
73 at runtime when this option is enabled.
74
Kyösti Mälkki176c8872021-05-29 20:33:22 +030075endchoice
76
Patrick Georgi0e9a9252009-10-06 20:48:07 +000077config UDELAY_LAPIC
78 bool
79 default n
80
Aaron Durbinfd8291c2013-04-29 17:18:49 -050081config LAPIC_MONOTONIC_TIMER
82 def_bool n
83 depends on UDELAY_LAPIC
Aaron Durbinfd8291c2013-04-29 17:18:49 -050084 help
Elyes HAOUASd6e96862016-08-21 10:12:15 +020085 Expose monotonic time using the local APIC.
Aaron Durbinfd8291c2013-04-29 17:18:49 -050086
Patrick Georgie135ac52012-11-20 11:53:47 +010087config UDELAY_LAPIC_FIXED_FSB
88 int
89
Ronald G. Minnich669c4a92009-08-29 03:00:51 +000090config UDELAY_TSC
91 bool
92 default n
93
Kyösti Mälkki0d6ddf82019-10-31 14:52:20 +020094config UNKNOWN_TSC_RATE
95 bool
96 default y if LAPIC_MONOTONIC_TIMER
Aaron Durbin8e73b5d2013-05-01 15:27:09 -050097
Aaron Durbine8501642013-04-29 22:22:55 -050098config TSC_MONOTONIC_TIMER
99 def_bool n
100 depends on UDELAY_TSC
Aaron Durbine8501642013-04-29 22:22:55 -0500101 help
102 Expose monotonic time using the TSC.
103
Stefan Reinauer0db68202012-08-07 14:44:51 -0700104config TSC_SYNC_LFENCE
105 bool
106 default n
107 help
108 The CPU driver should select this if the CPU needs
109 to execute an lfence instruction in order to synchronize
110 rdtsc. This is true for all modern AMD CPUs.
111
112config TSC_SYNC_MFENCE
113 bool
114 default n
115 help
116 The CPU driver should select this if the CPU needs
117 to execute an mfence instruction in order to synchronize
118 rdtsc. This is true for all modern Intel CPUs.
119
Arthur Heymans47be2d92019-10-12 17:32:09 +0200120config SETUP_XIP_CACHE
121 bool
Arthur Heymans47be2d92019-10-12 17:32:09 +0200122 depends on !NO_XIP_EARLY_STAGES
123 help
124 Select this option to set up an MTRR to cache XIP stages loaded
125 from the bootblock. This is useful on platforms lacking a
126 non-eviction mode and therefore need to be careful to avoid
127 eviction.
128
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000129config LOGICAL_CPUS
130 bool
131 default y
132
Kyösti Mälkki4d372c72019-07-08 13:48:57 +0300133config HAVE_SMI_HANDLER
134 bool
135 default n
136 depends on (SMM_ASEG || SMM_TSEG)
137
Kyösti Mälkki8abf66e2019-07-08 09:56:00 +0300138config NO_SMM
Kyösti Mälkki4d372c72019-07-08 13:48:57 +0300139 bool
140 default n
141
Kyösti Mälkki8abf66e2019-07-08 09:56:00 +0300142config SMM_ASEG
Duncan Laurie8bb77232012-01-09 22:11:25 -0800143 bool
144 default n
Kyösti Mälkki8abf66e2019-07-08 09:56:00 +0300145 depends on !NO_SMM
146
147config SMM_TSEG
148 bool
149 default y
150 depends on !(NO_SMM || SMM_ASEG)
151
Arthur Heymans66b28882022-11-01 23:45:59 +0100152if HAVE_SMI_HANDLER
Aaron Durbin50a34642013-01-03 17:38:47 -0600153
Raul E Rangeld3b83932018-06-12 10:43:09 -0600154config SMM_MODULE_STACK_SIZE
155 hex
Patrick Rudolphed8d7772021-06-12 06:21:27 +0200156 default 0x800 if ARCH_RAMSTAGE_X86_64
Raul E Rangeld3b83932018-06-12 10:43:09 -0600157 default 0x400
Raul E Rangeld3b83932018-06-12 10:43:09 -0600158 help
159 This option determines the size of the stack within the SMM handler
160 modules.
161
Kyösti Mälkki8abf66e2019-07-08 09:56:00 +0300162endif
163
Patrick Georgice2564a2015-09-05 20:21:24 +0200164config SMM_LAPIC_REMAP_MITIGATION
165 bool
Arthur Heymans912a2622019-11-28 09:48:26 +0100166 default y if NORTHBRIDGE_INTEL_I945 || NORTHBRIDGE_INTEL_GM45 \
167 || NORTHBRIDGE_INTEL_X4X || NORTHBRIDGE_INTEL_PINEVIEW \
Kyösti Mälkki7b73e8522022-11-08 04:43:41 +0000168 || NORTHBRIDGE_INTEL_E7505 || NORTHBRIDGE_INTEL_IRONLAKE
Patrick Georgice2564a2015-09-05 20:21:24 +0200169 default n
170
Aaron Durbin57686f82013-03-20 15:50:59 -0500171config X86_AMD_FIXED_MTRRS
172 bool
173 default n
174 help
175 This option informs the MTRR code to use the RdMem and WrMem fields
176 in the fixed MTRR MSRs.
Aaron Durbine0785c02013-10-21 12:15:29 -0500177
Subrata Banik9f91ced2021-07-28 15:38:32 +0530178config X86_INIT_NEED_1_SIPI
Marshall Dawson98f43a12019-08-05 16:18:56 -0600179 bool
180 default n
181 help
182 This option limits the number of SIPI signals sent during during the
183 common AP setup. Intel documentation specifies an INIT SIPI SIPI
Subrata Banik9f91ced2021-07-28 15:38:32 +0530184 sequence, however this doesn't work on some AMD and Intel platforms.
185 These newer AMD and Intel platforms don't need the 10ms wait between
186 INIT and SIPI, so skip that too to save some time.
Marshall Dawson98f43a12019-08-05 16:18:56 -0600187
Lee Leahyae738ac2016-07-24 08:03:37 -0700188config SOC_SETS_MSRS
189 bool
190 default n
191 help
192 The SoC requires different access methods for reading and writing
193 the MSRs. Use SoC specific routines to handle the MSR access.
Tim Wawrzynczak6fcc46d2021-04-19 13:47:36 -0600194
195config RESERVE_MTRRS_FOR_OS
196 bool
197 default n
198 help
199 This option allows a platform to reserve 2 MTRRs for the OS usage.
200 The Intel SDM documents that the the first 6 MTRRs are intended for
201 the system BIOS and the last 2 are to be reserved for OS usage.
202 However, modern OSes use PAT to control cacheability instead of
203 using MTRRs.
Raul E Rangelb2346a52021-09-22 14:56:51 -0600204
Arthur Heymans4d75dbd2022-11-01 23:57:24 +0100205config AP_STACK_SIZE
206 hex
207 default 0x800
208 help
209 This is the amount of stack each AP needs. The BSP stack size can be
210 larger and is set with STACK_SIZE.
211
Arthur Heymans67f29e82022-04-17 10:37:13 +0200212endif # ARCH_X86