1 ## SPDX-License-Identifier: GPL-2.0-only
8 This option uses common MP infrastructure for bringing up APs
9 in parallel. It additionally provides a more flexible mechanism
10 for sequencing the steps of bringing up the APs.
11 The code also works for just initialising the BSP in case there
14 config PARALLEL_MP_AP_WORK
16 depends on PARALLEL_MP
18 Allow APs to do other work after initialization instead of going
21 config X86_SMM_SKIP_RELOCATION_HANDLER
24 depends on PARALLEL_MP && HAVE_SMI_HANDLER
26 Skip SMM relocation using a relocation handler running in SMM
27 with a stub at 0x30000. This is useful on platforms that have
28 an alternative way to set SMBASE.
33 Allow SoC code to set LAPIC access mode to X2APIC.
35 config DEFAULT_X2APIC_RUNTIME
38 Allow SoC code to set LAPIC access mode to X2APIC_RUNTIME.
40 config DEFAULT_X2APIC_LATE_WORKAROUND
43 Allow SoC code to set LAPIC access mode to X2APIC_LATE_WORKAROUND.
46 prompt "APIC operation mode"
47 default X2APIC_ONLY if DEFAULT_X2APIC
48 default X2APIC_RUNTIME if DEFAULT_X2APIC_RUNTIME
49 default X2APIC_LATE_WORKAROUND if DEFAULT_X2APIC_LATE_WORKAROUND
53 prompt "Set XAPIC mode"
56 coreboot and SMM runtime only use XAPIC mode.
57 FIXME: DMAR should have X2APIC optout bit set.
60 prompt "Set X2APIC mode"
62 depends on PARALLEL_MP
64 coreboot and SMM runtime only use X2APIC mode.
65 Note: OS switches back to XAPIC mode if VT-d is disabled.
66 FIXME: S3 resume (and SMM runtime) will break if OS makes the switch.
69 prompt "Support both XAPIC and X2APIC"
71 depends on PARALLEL_MP
73 The switch to X2APIC mode happens early in ramstage. SMM runtime can
74 support either mode in case the OS switches back to XAPIC.
76 config X2APIC_LATE_WORKAROUND
77 prompt "Use XAPIC for AP bringup, then change to X2APIC"
79 depends on PARALLEL_MP && MAX_CPUS < 256
81 Choose this option if the platform supports dynamic switching between
82 XAPIC to X2APIC. The initial Application Processors (APs) are configured
83 in XAPIC mode at reset and later enable X2APIC as a CPU feature.
84 All access mechanisms between XAPIC (mmio) and X2APIC (msr) switches
85 at runtime when this option is enabled.
93 config LAPIC_MONOTONIC_TIMER
95 depends on UDELAY_LAPIC
97 Expose monotonic time using the local APIC.
99 config UDELAY_LAPIC_FIXED_FSB
106 config UNKNOWN_TSC_RATE
108 default y if LAPIC_MONOTONIC_TIMER
110 config TSC_MONOTONIC_TIMER
112 depends on UDELAY_TSC
114 Expose monotonic time using the TSC.
116 config TSC_SYNC_LFENCE
120 The CPU driver should select this if the CPU needs
121 to execute an lfence instruction in order to synchronize
122 rdtsc. This is true for all modern AMD CPUs.
124 config TSC_SYNC_MFENCE
128 The CPU driver should select this if the CPU needs
129 to execute an mfence instruction in order to synchronize
130 rdtsc. This is true for all modern Intel CPUs.
132 config SETUP_XIP_CACHE
134 depends on !NO_XIP_EARLY_STAGES
136 Select this option to set up an MTRR to cache XIP stages loaded
137 from the bootblock. This is useful on platforms lacking a
138 non-eviction mode and therefore need to be careful to avoid
141 config X86_CLFLUSH_CAR
144 Select this on platforms that allow CLFLUSH while operating in CAR.
146 config HAVE_SMI_HANDLER
149 depends on (SMM_ASEG || SMM_TSEG)
155 config USE_1G_PAGES_TLB
159 Select this option to enable access to up to 512 GiB of memory
160 by using 1 GiB large pages.
170 depends on !(NO_SMM || SMM_ASEG)
174 config SMM_MODULE_STACK_SIZE
176 default 0x800 if ARCH_RAMSTAGE_X86_64
179 This option determines the size of the stack within the SMM handler
184 config SMM_LAPIC_REMAP_MITIGATION
186 default y if NORTHBRIDGE_INTEL_I945 || NORTHBRIDGE_INTEL_GM45 \
187 || NORTHBRIDGE_INTEL_X4X || NORTHBRIDGE_INTEL_PINEVIEW \
188 || NORTHBRIDGE_INTEL_E7505 || NORTHBRIDGE_INTEL_IRONLAKE
191 config SMM_PCI_RESOURCE_STORE
195 This option enables support for storing PCI resources in SMRAM so
196 SMM can tell if they've been altered.
198 config SMM_PCI_RESOURCE_STORE_NUM_SLOTS
202 Number of slots available to store PCI BARs in SMRAM
204 config X86_AMD_FIXED_MTRRS
208 This option informs the MTRR code to use the RdMem and WrMem fields
209 in the fixed MTRR MSRs.
211 config X86_INIT_NEED_1_SIPI
215 This option limits the number of SIPI signals sent during the
216 common AP setup. Intel documentation specifies an INIT SIPI SIPI
217 sequence, however this doesn't work on some AMD and Intel platforms.
218 These newer AMD and Intel platforms don't need the 10ms wait between
219 INIT and SIPI, so skip that too to save some time.
225 The SoC requires different access methods for reading and writing
226 the MSRs. Use SoC specific routines to handle the MSR access.
228 config RESERVE_MTRRS_FOR_OS
232 This option allows a platform to reserve 2 MTRRs for the OS usage.
233 The Intel SDM documents that the first 6 MTRRs are intended for
234 the system BIOS and the last 2 are to be reserved for OS usage.
235 However, modern OSes use PAT to control cacheability instead of
242 This is the amount of stack each AP needs. The BSP stack size can be
243 larger and is set with STACK_SIZE.
245 config RUNTIME_CONFIGURABLE_SMM_LOGLEVEL
248 depends on DEBUG_SMI && CONSOLE_OVERRIDE_LOGLEVEL
250 This enables setting the SMM console log level at runtime for more
251 flexibility to use different log levels for each stage. Another reason
252 is that reading the log level from non-volatile memory such as flash
253 VPD or CMOS is not very ideal to be done in SMM, with this option the
254 value can be passed via the member variable in struct smm_runtime and
255 be referenced directly in SMM.