Arthur Heymans | 67f29e8 | 2022-04-17 10:37:13 +0200 | [diff] [blame] | 1 | if ARCH_X86 |
| 2 | |
Stefan Reinauer | 9d5e36e | 2015-04-27 13:40:16 -0700 | [diff] [blame] | 3 | config PARALLEL_MP |
Kyösti Mälkki | 41a2c73 | 2021-05-29 21:23:18 +0300 | [diff] [blame] | 4 | def_bool y |
| 5 | depends on !LEGACY_SMP_INIT |
Raul E Rangel | 99c8478 | 2021-10-08 13:10:38 -0600 | [diff] [blame] | 6 | select CPU_INFO_V2 |
Stefan Reinauer | 9d5e36e | 2015-04-27 13:40:16 -0700 | [diff] [blame] | 7 | help |
| 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. |
Arthur Heymans | 48fbf2f | 2021-11-26 14:50:42 +0100 | [diff] [blame] | 11 | The code also works for just initialising the BSP in case there |
| 12 | are no APs. |
Stefan Reinauer | 9d5e36e | 2015-04-27 13:40:16 -0700 | [diff] [blame] | 13 | |
Aaron Durbin | b21e362 | 2016-12-07 00:32:19 -0600 | [diff] [blame] | 14 | config PARALLEL_MP_AP_WORK |
| 15 | def_bool n |
| 16 | depends on PARALLEL_MP |
| 17 | help |
| 18 | Allow APs to do other work after initialization instead of going |
| 19 | to sleep. |
Stefan Reinauer | 9d5e36e | 2015-04-27 13:40:16 -0700 | [diff] [blame] | 20 | |
Kyösti Mälkki | 41a2c73 | 2021-05-29 21:23:18 +0300 | [diff] [blame] | 21 | config LEGACY_SMP_INIT |
| 22 | bool |
| 23 | |
Subrata Banik | 64c04e0 | 2022-05-25 01:25:55 +0530 | [diff] [blame] | 24 | config DEFAULT_X2APIC |
| 25 | def_bool n |
| 26 | help |
| 27 | Allow SoC code to set LAPIC_ACCESS_MODE to X2APIC. |
| 28 | |
| 29 | config DEFAULT_X2APIC_RUNTIME |
| 30 | def_bool n |
| 31 | help |
| 32 | Allow SoC code to set LAPIC_ACCESS_MODE to X2APIC_RUNTIME. |
| 33 | |
Subrata Banik | 55d300c | 2022-07-12 11:06:15 +0000 | [diff] [blame] | 34 | config DEFAULT_X2APIC_LATE_WORKAROUND |
| 35 | def_bool n |
| 36 | help |
| 37 | Allow SoC code to set LAPIC_ACCESS_MODE to X2APIC_LATE_WORKAROUND. |
| 38 | |
Kyösti Mälkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 39 | choice LAPIC_ACCESS_MODE |
| 40 | prompt "APIC operation mode" |
Subrata Banik | 64c04e0 | 2022-05-25 01:25:55 +0530 | [diff] [blame] | 41 | default X2APIC_ONLY if DEFAULT_X2APIC |
| 42 | default X2APIC_RUNTIME if DEFAULT_X2APIC_RUNTIME |
Subrata Banik | 55d300c | 2022-07-12 11:06:15 +0000 | [diff] [blame] | 43 | default X2APIC_LATE_WORKAROUND if DEFAULT_X2APIC_LATE_WORKAROUND |
Kyösti Mälkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 44 | default XAPIC_ONLY |
| 45 | |
| 46 | config XAPIC_ONLY |
| 47 | prompt "Set XAPIC mode" |
| 48 | bool |
| 49 | |
| 50 | config X2APIC_ONLY |
| 51 | prompt "Set X2APIC mode" |
| 52 | bool |
| 53 | depends on PARALLEL_MP |
Kyösti Mälkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 54 | |
| 55 | config X2APIC_RUNTIME |
| 56 | prompt "Support both XAPIC and X2APIC" |
| 57 | bool |
| 58 | depends on PARALLEL_MP |
Kyösti Mälkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 59 | |
Subrata Banik | 2125a17 | 2022-07-12 10:55:21 +0000 | [diff] [blame] | 60 | config X2APIC_LATE_WORKAROUND |
| 61 | prompt "Use XAPIC for AP bringup, then change to X2APIC" |
| 62 | bool |
| 63 | depends on PARALLEL_MP && MAX_CPUS < 255 |
| 64 | help |
| 65 | Choose this option if the platform supports dynamic switching between |
| 66 | XAPIC to X2APIC. The initial Application Processors (APs) are configured |
| 67 | in XAPIC mode at reset and later enable X2APIC as a CPU feature. |
| 68 | All access mechanisms between XAPIC (mmio) and X2APIC (msr) switches |
| 69 | at runtime when this option is enabled. |
| 70 | |
Kyösti Mälkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 71 | endchoice |
| 72 | |
Patrick Georgi | 0e9a925 | 2009-10-06 20:48:07 +0000 | [diff] [blame] | 73 | config UDELAY_LAPIC |
| 74 | bool |
| 75 | default n |
| 76 | |
Aaron Durbin | fd8291c | 2013-04-29 17:18:49 -0500 | [diff] [blame] | 77 | config LAPIC_MONOTONIC_TIMER |
| 78 | def_bool n |
| 79 | depends on UDELAY_LAPIC |
Aaron Durbin | fd8291c | 2013-04-29 17:18:49 -0500 | [diff] [blame] | 80 | help |
Elyes HAOUAS | d6e9686 | 2016-08-21 10:12:15 +0200 | [diff] [blame] | 81 | Expose monotonic time using the local APIC. |
Aaron Durbin | fd8291c | 2013-04-29 17:18:49 -0500 | [diff] [blame] | 82 | |
Patrick Georgi | e135ac5 | 2012-11-20 11:53:47 +0100 | [diff] [blame] | 83 | config UDELAY_LAPIC_FIXED_FSB |
| 84 | int |
| 85 | |
Ronald G. Minnich | 669c4a9 | 2009-08-29 03:00:51 +0000 | [diff] [blame] | 86 | config UDELAY_TSC |
| 87 | bool |
| 88 | default n |
| 89 | |
Kyösti Mälkki | 0d6ddf8 | 2019-10-31 14:52:20 +0200 | [diff] [blame] | 90 | config UNKNOWN_TSC_RATE |
| 91 | bool |
| 92 | default y if LAPIC_MONOTONIC_TIMER |
Aaron Durbin | 8e73b5d | 2013-05-01 15:27:09 -0500 | [diff] [blame] | 93 | |
Aaron Durbin | e850164 | 2013-04-29 22:22:55 -0500 | [diff] [blame] | 94 | config TSC_MONOTONIC_TIMER |
| 95 | def_bool n |
| 96 | depends on UDELAY_TSC |
Aaron Durbin | e850164 | 2013-04-29 22:22:55 -0500 | [diff] [blame] | 97 | help |
| 98 | Expose monotonic time using the TSC. |
| 99 | |
Stefan Reinauer | 0db6820 | 2012-08-07 14:44:51 -0700 | [diff] [blame] | 100 | config TSC_SYNC_LFENCE |
| 101 | bool |
| 102 | default n |
| 103 | help |
| 104 | The CPU driver should select this if the CPU needs |
| 105 | to execute an lfence instruction in order to synchronize |
| 106 | rdtsc. This is true for all modern AMD CPUs. |
| 107 | |
| 108 | config TSC_SYNC_MFENCE |
| 109 | bool |
| 110 | default n |
| 111 | help |
| 112 | The CPU driver should select this if the CPU needs |
| 113 | to execute an mfence instruction in order to synchronize |
| 114 | rdtsc. This is true for all modern Intel CPUs. |
| 115 | |
Arthur Heymans | 47be2d9 | 2019-10-12 17:32:09 +0200 | [diff] [blame] | 116 | config SETUP_XIP_CACHE |
| 117 | bool |
Arthur Heymans | 47be2d9 | 2019-10-12 17:32:09 +0200 | [diff] [blame] | 118 | depends on !NO_XIP_EARLY_STAGES |
| 119 | help |
| 120 | Select this option to set up an MTRR to cache XIP stages loaded |
| 121 | from the bootblock. This is useful on platforms lacking a |
| 122 | non-eviction mode and therefore need to be careful to avoid |
| 123 | eviction. |
| 124 | |
Stefan Reinauer | 8aedcbc | 2010-12-16 23:37:17 +0000 | [diff] [blame] | 125 | config LOGICAL_CPUS |
| 126 | bool |
| 127 | default y |
| 128 | |
Kyösti Mälkki | 4d372c7 | 2019-07-08 13:48:57 +0300 | [diff] [blame] | 129 | config HAVE_SMI_HANDLER |
| 130 | bool |
| 131 | default n |
| 132 | depends on (SMM_ASEG || SMM_TSEG) |
| 133 | |
Kyösti Mälkki | 8abf66e | 2019-07-08 09:56:00 +0300 | [diff] [blame] | 134 | config NO_SMM |
Kyösti Mälkki | 4d372c7 | 2019-07-08 13:48:57 +0300 | [diff] [blame] | 135 | bool |
| 136 | default n |
| 137 | |
Kyösti Mälkki | 8abf66e | 2019-07-08 09:56:00 +0300 | [diff] [blame] | 138 | config SMM_ASEG |
Duncan Laurie | 8bb7723 | 2012-01-09 22:11:25 -0800 | [diff] [blame] | 139 | bool |
| 140 | default n |
Kyösti Mälkki | 8abf66e | 2019-07-08 09:56:00 +0300 | [diff] [blame] | 141 | depends on !NO_SMM |
| 142 | |
| 143 | config SMM_TSEG |
| 144 | bool |
| 145 | default y |
| 146 | depends on !(NO_SMM || SMM_ASEG) |
| 147 | |
Kyösti Mälkki | 894f6f8 | 2022-01-29 14:05:58 +0200 | [diff] [blame] | 148 | config SMM_LEGACY_ASEG |
| 149 | bool |
| 150 | default y if HAVE_SMI_HANDLER && SMM_ASEG && LEGACY_SMP_INIT |
| 151 | help |
| 152 | SMM support without PARALLEL_MP, to be deprecated. |
| 153 | |
Arthur Heymans | b4ba289 | 2021-10-28 16:48:36 +0200 | [diff] [blame] | 154 | if HAVE_SMI_HANDLER && !SMM_LEGACY_ASEG |
Aaron Durbin | 50a3464 | 2013-01-03 17:38:47 -0600 | [diff] [blame] | 155 | |
Raul E Rangel | d3b8393 | 2018-06-12 10:43:09 -0600 | [diff] [blame] | 156 | config SMM_MODULE_STACK_SIZE |
| 157 | hex |
Patrick Rudolph | ed8d777 | 2021-06-12 06:21:27 +0200 | [diff] [blame] | 158 | default 0x800 if ARCH_RAMSTAGE_X86_64 |
Raul E Rangel | d3b8393 | 2018-06-12 10:43:09 -0600 | [diff] [blame] | 159 | default 0x400 |
Raul E Rangel | d3b8393 | 2018-06-12 10:43:09 -0600 | [diff] [blame] | 160 | help |
| 161 | This option determines the size of the stack within the SMM handler |
| 162 | modules. |
| 163 | |
Marshall Dawson | 46fc6847 | 2018-10-25 13:01:55 -0600 | [diff] [blame] | 164 | config SMM_STUB_STACK_SIZE |
| 165 | hex |
| 166 | default 0x400 |
Marshall Dawson | 46fc6847 | 2018-10-25 13:01:55 -0600 | [diff] [blame] | 167 | help |
| 168 | This option determines the size of the stack within the SMM handler |
| 169 | modules. |
| 170 | |
Kyösti Mälkki | 8abf66e | 2019-07-08 09:56:00 +0300 | [diff] [blame] | 171 | endif |
| 172 | |
Patrick Georgi | ce2564a | 2015-09-05 20:21:24 +0200 | [diff] [blame] | 173 | config SMM_LAPIC_REMAP_MITIGATION |
| 174 | bool |
| 175 | default y if NORTHBRIDGE_INTEL_I945 |
| 176 | default y if NORTHBRIDGE_INTEL_GM45 |
Angel Pons | 95de231 | 2020-02-17 13:08:53 +0100 | [diff] [blame] | 177 | default y if NORTHBRIDGE_INTEL_IRONLAKE |
Patrick Georgi | ce2564a | 2015-09-05 20:21:24 +0200 | [diff] [blame] | 178 | default n |
| 179 | |
Aaron Durbin | 57686f8 | 2013-03-20 15:50:59 -0500 | [diff] [blame] | 180 | config X86_AMD_FIXED_MTRRS |
| 181 | bool |
| 182 | default n |
| 183 | help |
| 184 | This option informs the MTRR code to use the RdMem and WrMem fields |
| 185 | in the fixed MTRR MSRs. |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 186 | |
Subrata Banik | 9f91ced | 2021-07-28 15:38:32 +0530 | [diff] [blame] | 187 | config X86_INIT_NEED_1_SIPI |
Marshall Dawson | 98f43a1 | 2019-08-05 16:18:56 -0600 | [diff] [blame] | 188 | bool |
| 189 | default n |
| 190 | help |
| 191 | This option limits the number of SIPI signals sent during during the |
| 192 | common AP setup. Intel documentation specifies an INIT SIPI SIPI |
Subrata Banik | 9f91ced | 2021-07-28 15:38:32 +0530 | [diff] [blame] | 193 | sequence, however this doesn't work on some AMD and Intel platforms. |
| 194 | These newer AMD and Intel platforms don't need the 10ms wait between |
| 195 | INIT and SIPI, so skip that too to save some time. |
Marshall Dawson | 98f43a1 | 2019-08-05 16:18:56 -0600 | [diff] [blame] | 196 | |
Lee Leahy | ae738ac | 2016-07-24 08:03:37 -0700 | [diff] [blame] | 197 | config SOC_SETS_MSRS |
| 198 | bool |
| 199 | default n |
| 200 | help |
| 201 | The SoC requires different access methods for reading and writing |
| 202 | the MSRs. Use SoC specific routines to handle the MSR access. |
Tim Wawrzynczak | 6fcc46d | 2021-04-19 13:47:36 -0600 | [diff] [blame] | 203 | |
| 204 | config RESERVE_MTRRS_FOR_OS |
| 205 | bool |
| 206 | default n |
| 207 | help |
| 208 | This option allows a platform to reserve 2 MTRRs for the OS usage. |
| 209 | The Intel SDM documents that the the first 6 MTRRs are intended for |
| 210 | the system BIOS and the last 2 are to be reserved for OS usage. |
| 211 | However, modern OSes use PAT to control cacheability instead of |
| 212 | using MTRRs. |
Raul E Rangel | b2346a5 | 2021-09-22 14:56:51 -0600 | [diff] [blame] | 213 | |
| 214 | config CPU_INFO_V2 |
| 215 | bool |
| 216 | depends on PARALLEL_MP |
| 217 | help |
| 218 | Enables the new method of locating struct cpu_info. This new method |
| 219 | uses the %gs segment to locate the cpu_info pointer. The old method |
| 220 | relied on the stack being CONFIG_STACK_SIZE aligned. |
Arthur Heymans | 67f29e8 | 2022-04-17 10:37:13 +0200 | [diff] [blame] | 221 | |
| 222 | endif # ARCH_X86 |