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 |
Stefan Reinauer | 9d5e36e | 2015-04-27 13:40:16 -0700 | [diff] [blame] | 5 | 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 Heymans | 48fbf2f | 2021-11-26 14:50:42 +0100 | [diff] [blame] | 9 | The code also works for just initialising the BSP in case there |
| 10 | are no APs. |
Stefan Reinauer | 9d5e36e | 2015-04-27 13:40:16 -0700 | [diff] [blame] | 11 | |
Aaron Durbin | b21e362 | 2016-12-07 00:32:19 -0600 | [diff] [blame] | 12 | config 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 Reinauer | 9d5e36e | 2015-04-27 13:40:16 -0700 | [diff] [blame] | 18 | |
Arthur Heymans | 56776a1 | 2022-05-19 11:31:10 +0200 | [diff] [blame] | 19 | config 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 Banik | 64c04e0 | 2022-05-25 01:25:55 +0530 | [diff] [blame] | 28 | config DEFAULT_X2APIC |
| 29 | def_bool n |
| 30 | help |
| 31 | Allow SoC code to set LAPIC_ACCESS_MODE to X2APIC. |
| 32 | |
| 33 | config DEFAULT_X2APIC_RUNTIME |
| 34 | def_bool n |
| 35 | help |
| 36 | Allow SoC code to set LAPIC_ACCESS_MODE to X2APIC_RUNTIME. |
| 37 | |
Subrata Banik | 55d300c | 2022-07-12 11:06:15 +0000 | [diff] [blame] | 38 | config 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älkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 43 | choice LAPIC_ACCESS_MODE |
| 44 | prompt "APIC operation mode" |
Subrata Banik | 64c04e0 | 2022-05-25 01:25:55 +0530 | [diff] [blame] | 45 | default X2APIC_ONLY if DEFAULT_X2APIC |
| 46 | default X2APIC_RUNTIME if DEFAULT_X2APIC_RUNTIME |
Subrata Banik | 55d300c | 2022-07-12 11:06:15 +0000 | [diff] [blame] | 47 | default X2APIC_LATE_WORKAROUND if DEFAULT_X2APIC_LATE_WORKAROUND |
Kyösti Mälkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 48 | default XAPIC_ONLY |
| 49 | |
| 50 | config XAPIC_ONLY |
| 51 | prompt "Set XAPIC mode" |
| 52 | bool |
| 53 | |
| 54 | config X2APIC_ONLY |
| 55 | prompt "Set X2APIC mode" |
| 56 | bool |
| 57 | depends on PARALLEL_MP |
Kyösti Mälkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 58 | |
| 59 | config X2APIC_RUNTIME |
| 60 | prompt "Support both XAPIC and X2APIC" |
| 61 | bool |
| 62 | depends on PARALLEL_MP |
Kyösti Mälkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 63 | |
Subrata Banik | 2125a17 | 2022-07-12 10:55:21 +0000 | [diff] [blame] | 64 | config X2APIC_LATE_WORKAROUND |
| 65 | prompt "Use XAPIC for AP bringup, then change to X2APIC" |
| 66 | bool |
Subrata Banik | fb28799 | 2022-07-24 11:19:04 +0530 | [diff] [blame] | 67 | depends on PARALLEL_MP && MAX_CPUS < 256 |
Subrata Banik | 2125a17 | 2022-07-12 10:55:21 +0000 | [diff] [blame] | 68 | 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älkki | 176c887 | 2021-05-29 20:33:22 +0300 | [diff] [blame] | 75 | endchoice |
| 76 | |
Patrick Georgi | 0e9a925 | 2009-10-06 20:48:07 +0000 | [diff] [blame] | 77 | config UDELAY_LAPIC |
| 78 | bool |
| 79 | default n |
| 80 | |
Aaron Durbin | fd8291c | 2013-04-29 17:18:49 -0500 | [diff] [blame] | 81 | config LAPIC_MONOTONIC_TIMER |
| 82 | def_bool n |
| 83 | depends on UDELAY_LAPIC |
Aaron Durbin | fd8291c | 2013-04-29 17:18:49 -0500 | [diff] [blame] | 84 | help |
Elyes HAOUAS | d6e9686 | 2016-08-21 10:12:15 +0200 | [diff] [blame] | 85 | Expose monotonic time using the local APIC. |
Aaron Durbin | fd8291c | 2013-04-29 17:18:49 -0500 | [diff] [blame] | 86 | |
Patrick Georgi | e135ac5 | 2012-11-20 11:53:47 +0100 | [diff] [blame] | 87 | config UDELAY_LAPIC_FIXED_FSB |
| 88 | int |
| 89 | |
Ronald G. Minnich | 669c4a9 | 2009-08-29 03:00:51 +0000 | [diff] [blame] | 90 | config UDELAY_TSC |
| 91 | bool |
| 92 | default n |
| 93 | |
Kyösti Mälkki | 0d6ddf8 | 2019-10-31 14:52:20 +0200 | [diff] [blame] | 94 | config UNKNOWN_TSC_RATE |
| 95 | bool |
| 96 | default y if LAPIC_MONOTONIC_TIMER |
Aaron Durbin | 8e73b5d | 2013-05-01 15:27:09 -0500 | [diff] [blame] | 97 | |
Aaron Durbin | e850164 | 2013-04-29 22:22:55 -0500 | [diff] [blame] | 98 | config TSC_MONOTONIC_TIMER |
| 99 | def_bool n |
| 100 | depends on UDELAY_TSC |
Aaron Durbin | e850164 | 2013-04-29 22:22:55 -0500 | [diff] [blame] | 101 | help |
| 102 | Expose monotonic time using the TSC. |
| 103 | |
Stefan Reinauer | 0db6820 | 2012-08-07 14:44:51 -0700 | [diff] [blame] | 104 | config 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 | |
| 112 | config 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 Heymans | 47be2d9 | 2019-10-12 17:32:09 +0200 | [diff] [blame] | 120 | config SETUP_XIP_CACHE |
| 121 | bool |
Arthur Heymans | 47be2d9 | 2019-10-12 17:32:09 +0200 | [diff] [blame] | 122 | 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 Reinauer | 8aedcbc | 2010-12-16 23:37:17 +0000 | [diff] [blame] | 129 | config LOGICAL_CPUS |
| 130 | bool |
| 131 | default y |
| 132 | |
Kyösti Mälkki | 4d372c7 | 2019-07-08 13:48:57 +0300 | [diff] [blame] | 133 | config HAVE_SMI_HANDLER |
| 134 | bool |
| 135 | default n |
| 136 | depends on (SMM_ASEG || SMM_TSEG) |
| 137 | |
Kyösti Mälkki | 8abf66e | 2019-07-08 09:56:00 +0300 | [diff] [blame] | 138 | config NO_SMM |
Kyösti Mälkki | 4d372c7 | 2019-07-08 13:48:57 +0300 | [diff] [blame] | 139 | bool |
| 140 | default n |
| 141 | |
Kyösti Mälkki | 8abf66e | 2019-07-08 09:56:00 +0300 | [diff] [blame] | 142 | config SMM_ASEG |
Duncan Laurie | 8bb7723 | 2012-01-09 22:11:25 -0800 | [diff] [blame] | 143 | bool |
| 144 | default n |
Kyösti Mälkki | 8abf66e | 2019-07-08 09:56:00 +0300 | [diff] [blame] | 145 | depends on !NO_SMM |
| 146 | |
| 147 | config SMM_TSEG |
| 148 | bool |
| 149 | default y |
| 150 | depends on !(NO_SMM || SMM_ASEG) |
| 151 | |
Arthur Heymans | 66b2888 | 2022-11-01 23:45:59 +0100 | [diff] [blame] | 152 | if HAVE_SMI_HANDLER |
Aaron Durbin | 50a3464 | 2013-01-03 17:38:47 -0600 | [diff] [blame] | 153 | |
Raul E Rangel | d3b8393 | 2018-06-12 10:43:09 -0600 | [diff] [blame] | 154 | config SMM_MODULE_STACK_SIZE |
| 155 | hex |
Patrick Rudolph | ed8d777 | 2021-06-12 06:21:27 +0200 | [diff] [blame] | 156 | default 0x800 if ARCH_RAMSTAGE_X86_64 |
Raul E Rangel | d3b8393 | 2018-06-12 10:43:09 -0600 | [diff] [blame] | 157 | default 0x400 |
Raul E Rangel | d3b8393 | 2018-06-12 10:43:09 -0600 | [diff] [blame] | 158 | help |
| 159 | This option determines the size of the stack within the SMM handler |
| 160 | modules. |
| 161 | |
Marshall Dawson | 46fc6847 | 2018-10-25 13:01:55 -0600 | [diff] [blame] | 162 | config SMM_STUB_STACK_SIZE |
| 163 | hex |
| 164 | default 0x400 |
Marshall Dawson | 46fc6847 | 2018-10-25 13:01:55 -0600 | [diff] [blame] | 165 | help |
| 166 | This option determines the size of the stack within the SMM handler |
| 167 | modules. |
| 168 | |
Kyösti Mälkki | 8abf66e | 2019-07-08 09:56:00 +0300 | [diff] [blame] | 169 | endif |
| 170 | |
Patrick Georgi | ce2564a | 2015-09-05 20:21:24 +0200 | [diff] [blame] | 171 | config SMM_LAPIC_REMAP_MITIGATION |
| 172 | bool |
Arthur Heymans | 912a262 | 2019-11-28 09:48:26 +0100 | [diff] [blame] | 173 | default y if NORTHBRIDGE_INTEL_I945 || NORTHBRIDGE_INTEL_GM45 \ |
| 174 | || NORTHBRIDGE_INTEL_X4X || NORTHBRIDGE_INTEL_PINEVIEW \ |
Arthur Heymans | eb76a45 | 2022-11-01 23:26:07 +0100 | [diff] [blame] | 175 | || NORTHBRIDGE_INTEL_IRONLAKE |
Patrick Georgi | ce2564a | 2015-09-05 20:21:24 +0200 | [diff] [blame] | 176 | default n |
| 177 | |
Aaron Durbin | 57686f8 | 2013-03-20 15:50:59 -0500 | [diff] [blame] | 178 | config X86_AMD_FIXED_MTRRS |
| 179 | bool |
| 180 | default n |
| 181 | help |
| 182 | This option informs the MTRR code to use the RdMem and WrMem fields |
| 183 | in the fixed MTRR MSRs. |
Aaron Durbin | e0785c0 | 2013-10-21 12:15:29 -0500 | [diff] [blame] | 184 | |
Subrata Banik | 9f91ced | 2021-07-28 15:38:32 +0530 | [diff] [blame] | 185 | config X86_INIT_NEED_1_SIPI |
Marshall Dawson | 98f43a1 | 2019-08-05 16:18:56 -0600 | [diff] [blame] | 186 | bool |
| 187 | default n |
| 188 | help |
| 189 | This option limits the number of SIPI signals sent during during the |
| 190 | common AP setup. Intel documentation specifies an INIT SIPI SIPI |
Subrata Banik | 9f91ced | 2021-07-28 15:38:32 +0530 | [diff] [blame] | 191 | sequence, however this doesn't work on some AMD and Intel platforms. |
| 192 | These newer AMD and Intel platforms don't need the 10ms wait between |
| 193 | INIT and SIPI, so skip that too to save some time. |
Marshall Dawson | 98f43a1 | 2019-08-05 16:18:56 -0600 | [diff] [blame] | 194 | |
Lee Leahy | ae738ac | 2016-07-24 08:03:37 -0700 | [diff] [blame] | 195 | config SOC_SETS_MSRS |
| 196 | bool |
| 197 | default n |
| 198 | help |
| 199 | The SoC requires different access methods for reading and writing |
| 200 | the MSRs. Use SoC specific routines to handle the MSR access. |
Tim Wawrzynczak | 6fcc46d | 2021-04-19 13:47:36 -0600 | [diff] [blame] | 201 | |
| 202 | config RESERVE_MTRRS_FOR_OS |
| 203 | bool |
| 204 | default n |
| 205 | help |
| 206 | This option allows a platform to reserve 2 MTRRs for the OS usage. |
| 207 | The Intel SDM documents that the the first 6 MTRRs are intended for |
| 208 | the system BIOS and the last 2 are to be reserved for OS usage. |
| 209 | However, modern OSes use PAT to control cacheability instead of |
| 210 | using MTRRs. |
Raul E Rangel | b2346a5 | 2021-09-22 14:56:51 -0600 | [diff] [blame] | 211 | |
Arthur Heymans | 67f29e8 | 2022-04-17 10:37:13 +0200 | [diff] [blame] | 212 | endif # ARCH_X86 |