blob: 6c784b4c5dad1adc73a2804b24bbad80eb2b79cc [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
Martin Roth53b19292023-05-10 13:28:42 -060031 Allow SoC code to set LAPIC access mode to X2APIC.
Subrata Banik64c04e02022-05-25 01:25:55 +053032
33config DEFAULT_X2APIC_RUNTIME
34 def_bool n
35 help
Martin Roth53b19292023-05-10 13:28:42 -060036 Allow SoC code to set LAPIC access mode to X2APIC_RUNTIME.
Subrata Banik64c04e02022-05-25 01:25:55 +053037
Subrata Banik55d300c2022-07-12 11:06:15 +000038config DEFAULT_X2APIC_LATE_WORKAROUND
39 def_bool n
40 help
Martin Roth53b19292023-05-10 13:28:42 -060041 Allow SoC code to set LAPIC access mode to X2APIC_LATE_WORKAROUND.
Subrata Banik55d300c2022-07-12 11:06:15 +000042
Martin Roth53b19292023-05-10 13:28:42 -060043choice
Kyösti Mälkki176c8872021-05-29 20:33:22 +030044 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
Kyösti Mälkkia52b93b2023-06-30 18:44:26 +030053 help
54 coreboot and SMM runtime only use XAPIC mode.
55 FIXME: DMAR should have X2APIC optout bit set.
Kyösti Mälkki176c8872021-05-29 20:33:22 +030056
57config X2APIC_ONLY
58 prompt "Set X2APIC mode"
59 bool
60 depends on PARALLEL_MP
Kyösti Mälkkia52b93b2023-06-30 18:44:26 +030061 help
62 coreboot and SMM runtime only use X2APIC mode.
63 Note: OS switches back to XAPIC mode if VT-d is disabled.
64 FIXME: S3 resume (and SMM runtime) will break if OS makes the switch.
Kyösti Mälkki176c8872021-05-29 20:33:22 +030065
66config X2APIC_RUNTIME
67 prompt "Support both XAPIC and X2APIC"
68 bool
69 depends on PARALLEL_MP
Kyösti Mälkkia52b93b2023-06-30 18:44:26 +030070 help
71 The switch to X2APIC mode happens early in ramstage. SMM runtime can
72 support either mode in case the OS switches back to XAPIC.
Kyösti Mälkki176c8872021-05-29 20:33:22 +030073
Subrata Banik2125a172022-07-12 10:55:21 +000074config X2APIC_LATE_WORKAROUND
75 prompt "Use XAPIC for AP bringup, then change to X2APIC"
76 bool
Subrata Banikfb287992022-07-24 11:19:04 +053077 depends on PARALLEL_MP && MAX_CPUS < 256
Subrata Banik2125a172022-07-12 10:55:21 +000078 help
79 Choose this option if the platform supports dynamic switching between
80 XAPIC to X2APIC. The initial Application Processors (APs) are configured
81 in XAPIC mode at reset and later enable X2APIC as a CPU feature.
82 All access mechanisms between XAPIC (mmio) and X2APIC (msr) switches
83 at runtime when this option is enabled.
84
Kyösti Mälkki176c8872021-05-29 20:33:22 +030085endchoice
86
Patrick Georgi0e9a9252009-10-06 20:48:07 +000087config UDELAY_LAPIC
88 bool
89 default n
90
Aaron Durbinfd8291c2013-04-29 17:18:49 -050091config LAPIC_MONOTONIC_TIMER
92 def_bool n
93 depends on UDELAY_LAPIC
Aaron Durbinfd8291c2013-04-29 17:18:49 -050094 help
Elyes HAOUASd6e96862016-08-21 10:12:15 +020095 Expose monotonic time using the local APIC.
Aaron Durbinfd8291c2013-04-29 17:18:49 -050096
Patrick Georgie135ac52012-11-20 11:53:47 +010097config UDELAY_LAPIC_FIXED_FSB
98 int
99
Ronald G. Minnich669c4a92009-08-29 03:00:51 +0000100config UDELAY_TSC
101 bool
102 default n
103
Kyösti Mälkki0d6ddf82019-10-31 14:52:20 +0200104config UNKNOWN_TSC_RATE
105 bool
106 default y if LAPIC_MONOTONIC_TIMER
Aaron Durbin8e73b5d2013-05-01 15:27:09 -0500107
Aaron Durbine8501642013-04-29 22:22:55 -0500108config TSC_MONOTONIC_TIMER
109 def_bool n
110 depends on UDELAY_TSC
Aaron Durbine8501642013-04-29 22:22:55 -0500111 help
112 Expose monotonic time using the TSC.
113
Stefan Reinauer0db68202012-08-07 14:44:51 -0700114config TSC_SYNC_LFENCE
115 bool
116 default n
117 help
118 The CPU driver should select this if the CPU needs
119 to execute an lfence instruction in order to synchronize
120 rdtsc. This is true for all modern AMD CPUs.
121
122config TSC_SYNC_MFENCE
123 bool
124 default n
125 help
126 The CPU driver should select this if the CPU needs
127 to execute an mfence instruction in order to synchronize
128 rdtsc. This is true for all modern Intel CPUs.
129
Arthur Heymans47be2d92019-10-12 17:32:09 +0200130config SETUP_XIP_CACHE
131 bool
Arthur Heymans47be2d92019-10-12 17:32:09 +0200132 depends on !NO_XIP_EARLY_STAGES
133 help
134 Select this option to set up an MTRR to cache XIP stages loaded
135 from the bootblock. This is useful on platforms lacking a
136 non-eviction mode and therefore need to be careful to avoid
137 eviction.
138
Arthur Heymans3134a812019-11-25 12:20:01 +0100139config X86_CLFLUSH_CAR
140 bool
141 help
142 Select this on platforms that allow CLFLUSH while operating in CAR.
143
Kyösti Mälkki4d372c72019-07-08 13:48:57 +0300144config HAVE_SMI_HANDLER
145 bool
146 default n
147 depends on (SMM_ASEG || SMM_TSEG)
148
Kyösti Mälkki8abf66e2019-07-08 09:56:00 +0300149config NO_SMM
Kyösti Mälkki4d372c72019-07-08 13:48:57 +0300150 bool
151 default n
152
Ashish Kumar Mishraecbc2432024-01-16 16:23:03 +0530153config USE_1G_PAGES_TLB
154 bool
155 default n
156 help
157 Select this option to enable access to up to 512 GiB of memory
158 by using 1 GiB large pages.
159
Kyösti Mälkki8abf66e2019-07-08 09:56:00 +0300160config SMM_ASEG
Duncan Laurie8bb77232012-01-09 22:11:25 -0800161 bool
162 default n
Kyösti Mälkki8abf66e2019-07-08 09:56:00 +0300163 depends on !NO_SMM
164
165config SMM_TSEG
166 bool
167 default y
168 depends on !(NO_SMM || SMM_ASEG)
169
Arthur Heymans66b28882022-11-01 23:45:59 +0100170if HAVE_SMI_HANDLER
Aaron Durbin50a34642013-01-03 17:38:47 -0600171
Raul E Rangeld3b83932018-06-12 10:43:09 -0600172config SMM_MODULE_STACK_SIZE
173 hex
Patrick Rudolphed8d7772021-06-12 06:21:27 +0200174 default 0x800 if ARCH_RAMSTAGE_X86_64
Raul E Rangeld3b83932018-06-12 10:43:09 -0600175 default 0x400
Raul E Rangeld3b83932018-06-12 10:43:09 -0600176 help
177 This option determines the size of the stack within the SMM handler
178 modules.
179
Kyösti Mälkki8abf66e2019-07-08 09:56:00 +0300180endif
181
Patrick Georgice2564a2015-09-05 20:21:24 +0200182config SMM_LAPIC_REMAP_MITIGATION
183 bool
Arthur Heymans912a2622019-11-28 09:48:26 +0100184 default y if NORTHBRIDGE_INTEL_I945 || NORTHBRIDGE_INTEL_GM45 \
185 || NORTHBRIDGE_INTEL_X4X || NORTHBRIDGE_INTEL_PINEVIEW \
Kyösti Mälkki7b73e8522022-11-08 04:43:41 +0000186 || NORTHBRIDGE_INTEL_E7505 || NORTHBRIDGE_INTEL_IRONLAKE
Patrick Georgice2564a2015-09-05 20:21:24 +0200187 default n
188
Robert Ziebaac8c3782022-09-07 16:25:15 -0600189config SMM_PCI_RESOURCE_STORE
190 bool
191 default n
192 help
193 This option enables support for storing PCI resources in SMRAM so
194 SMM can tell if they've been altered.
195
196config SMM_PCI_RESOURCE_STORE_NUM_SLOTS
197 int
198 default 8
199 help
200 Number of slots available to store PCI BARs in SMRAM
201
Aaron Durbin57686f82013-03-20 15:50:59 -0500202config X86_AMD_FIXED_MTRRS
203 bool
204 default n
205 help
206 This option informs the MTRR code to use the RdMem and WrMem fields
207 in the fixed MTRR MSRs.
Aaron Durbine0785c02013-10-21 12:15:29 -0500208
Subrata Banik9f91ced2021-07-28 15:38:32 +0530209config X86_INIT_NEED_1_SIPI
Marshall Dawson98f43a12019-08-05 16:18:56 -0600210 bool
211 default n
212 help
Alexander Goncharov893c3ae82023-02-04 15:20:37 +0400213 This option limits the number of SIPI signals sent during the
Marshall Dawson98f43a12019-08-05 16:18:56 -0600214 common AP setup. Intel documentation specifies an INIT SIPI SIPI
Subrata Banik9f91ced2021-07-28 15:38:32 +0530215 sequence, however this doesn't work on some AMD and Intel platforms.
216 These newer AMD and Intel platforms don't need the 10ms wait between
217 INIT and SIPI, so skip that too to save some time.
Marshall Dawson98f43a12019-08-05 16:18:56 -0600218
Lee Leahyae738ac2016-07-24 08:03:37 -0700219config SOC_SETS_MSRS
220 bool
221 default n
222 help
223 The SoC requires different access methods for reading and writing
224 the MSRs. Use SoC specific routines to handle the MSR access.
Tim Wawrzynczak6fcc46d2021-04-19 13:47:36 -0600225
226config RESERVE_MTRRS_FOR_OS
227 bool
228 default n
229 help
230 This option allows a platform to reserve 2 MTRRs for the OS usage.
Alexander Goncharov893c3ae82023-02-04 15:20:37 +0400231 The Intel SDM documents that the first 6 MTRRs are intended for
Tim Wawrzynczak6fcc46d2021-04-19 13:47:36 -0600232 the system BIOS and the last 2 are to be reserved for OS usage.
233 However, modern OSes use PAT to control cacheability instead of
234 using MTRRs.
Raul E Rangelb2346a52021-09-22 14:56:51 -0600235
Arthur Heymans4d75dbd2022-11-01 23:57:24 +0100236config AP_STACK_SIZE
237 hex
238 default 0x800
239 help
240 This is the amount of stack each AP needs. The BSP stack size can be
241 larger and is set with STACK_SIZE.
242
Johnny Lin107e7aa2021-01-14 17:49:08 +0800243config RUNTIME_CONFIGURABLE_SMM_LOGLEVEL
244 bool
245 default n
246 depends on DEBUG_SMI && CONSOLE_OVERRIDE_LOGLEVEL
247 help
248 This enables setting the SMM console log level at runtime for more
249 flexibility to use different log levels for each stage. Another reason
250 is that reading the log level from non-volatile memory such as flash
251 VPD or CMOS is not very ideal to be done in SMM, with this option the
252 value can be passed via the member variable in struct smm_runtime and
253 be referenced directly in SMM.
254
Arthur Heymans67f29e82022-04-17 10:37:13 +0200255endif # ARCH_X86