Kconfig.cpu 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. # SPDX-License-Identifier: GPL-2.0
  2. # Put here option for CPU selection and depending optimization
  3. choice
  4. prompt "Processor family"
  5. default M686 if X86_32
  6. default GENERIC_CPU if X86_64
  7. help
  8. This is the processor type of your CPU. This information is
  9. used for optimizing purposes. In order to compile a kernel
  10. that can run on all supported x86 CPU types (albeit not
  11. optimally fast), you can specify "486" here.
  12. Note that the 386 is no longer supported, this includes
  13. AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI 486DLC/DLC2,
  14. UMC 486SX-S and the NexGen Nx586.
  15. The kernel will not necessarily run on earlier architectures than
  16. the one you have chosen, e.g. a Pentium optimized kernel will run on
  17. a PPro, but not necessarily on a i486.
  18. Here are the settings recommended for greatest speed:
  19. - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
  20. SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
  21. - "586" for generic Pentium CPUs lacking the TSC
  22. (time stamp counter) register.
  23. - "Pentium-Classic" for the Intel Pentium.
  24. - "Pentium-MMX" for the Intel Pentium MMX.
  25. - "Pentium-Pro" for the Intel Pentium Pro.
  26. - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron.
  27. - "Pentium-III" for the Intel Pentium III or Coppermine Celeron.
  28. - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.
  29. - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
  30. - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
  31. - "Opteron/Athlon64/Hammer/K8" for all K8 and newer AMD CPUs.
  32. - "Crusoe" for the Transmeta Crusoe series.
  33. - "Efficeon" for the Transmeta Efficeon series.
  34. - "Winchip-C6" for original IDT Winchip.
  35. - "Winchip-2" for IDT Winchips with 3dNow! capabilities.
  36. - "AMD Elan" for the 32-bit AMD Elan embedded CPU.
  37. - "GeodeGX1" for Geode GX1 (Cyrix MediaGX).
  38. - "Geode GX/LX" For AMD Geode GX and LX processors.
  39. - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
  40. - "VIA C3-2" for VIA C3-2 "Nehemiah" (model 9 and above).
  41. - "VIA C7" for VIA C7.
  42. - "Intel P4" for the Pentium 4/Netburst microarchitecture.
  43. - "Core 2/newer Xeon" for all core2 and newer Intel CPUs.
  44. - "Intel Atom" for the Atom-microarchitecture CPUs.
  45. - "Generic-x86-64" for a kernel which runs on any x86-64 CPU.
  46. See each option's help text for additional details. If you don't know
  47. what to do, choose "486".
  48. config M486SX
  49. bool "486SX"
  50. depends on X86_32
  51. help
  52. Select this for an 486-class CPU without an FPU such as
  53. AMD/Cyrix/IBM/Intel SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5S.
  54. config M486
  55. bool "486DX"
  56. depends on X86_32
  57. help
  58. Select this for an 486-class CPU such as AMD/Cyrix/IBM/Intel
  59. 486DX/DX2/DX4 and UMC U5D.
  60. config M586
  61. bool "586/K5/5x86/6x86/6x86MX"
  62. depends on X86_32
  63. help
  64. Select this for an 586 or 686 series processor such as the AMD K5,
  65. the Cyrix 5x86, 6x86 and 6x86MX. This choice does not
  66. assume the RDTSC (Read Time Stamp Counter) instruction.
  67. config M586TSC
  68. bool "Pentium-Classic"
  69. depends on X86_32
  70. help
  71. Select this for a Pentium Classic processor with the RDTSC (Read
  72. Time Stamp Counter) instruction for benchmarking.
  73. config M586MMX
  74. bool "Pentium-MMX"
  75. depends on X86_32
  76. help
  77. Select this for a Pentium with the MMX graphics/multimedia
  78. extended instructions.
  79. config M686
  80. bool "Pentium-Pro"
  81. depends on X86_32
  82. help
  83. Select this for Intel Pentium Pro chips. This enables the use of
  84. Pentium Pro extended instructions, and disables the init-time guard
  85. against the f00f bug found in earlier Pentiums.
  86. config MPENTIUMII
  87. bool "Pentium-II/Celeron(pre-Coppermine)"
  88. depends on X86_32
  89. help
  90. Select this for Intel chips based on the Pentium-II and
  91. pre-Coppermine Celeron core. This option enables an unaligned
  92. copy optimization, compiles the kernel with optimization flags
  93. tailored for the chip, and applies any applicable Pentium Pro
  94. optimizations.
  95. config MPENTIUMIII
  96. bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
  97. depends on X86_32
  98. help
  99. Select this for Intel chips based on the Pentium-III and
  100. Celeron-Coppermine core. This option enables use of some
  101. extended prefetch instructions in addition to the Pentium II
  102. extensions.
  103. config MPENTIUMM
  104. bool "Pentium M"
  105. depends on X86_32
  106. help
  107. Select this for Intel Pentium M (not Pentium-4 M)
  108. notebook chips.
  109. config MPENTIUM4
  110. bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon"
  111. depends on X86_32
  112. help
  113. Select this for Intel Pentium 4 chips. This includes the
  114. Pentium 4, Pentium D, P4-based Celeron and Xeon, and
  115. Pentium-4 M (not Pentium M) chips. This option enables compile
  116. flags optimized for the chip, uses the correct cache line size, and
  117. applies any applicable optimizations.
  118. CPUIDs: F[0-6][1-A] (in /proc/cpuinfo show = cpu family : 15 )
  119. Select this for:
  120. Pentiums (Pentium 4, Pentium D, Celeron, Celeron D) corename:
  121. -Willamette
  122. -Northwood
  123. -Mobile Pentium 4
  124. -Mobile Pentium 4 M
  125. -Extreme Edition (Gallatin)
  126. -Prescott
  127. -Prescott 2M
  128. -Cedar Mill
  129. -Presler
  130. -Smithfiled
  131. Xeons (Intel Xeon, Xeon MP, Xeon LV, Xeon MV) corename:
  132. -Foster
  133. -Prestonia
  134. -Gallatin
  135. -Nocona
  136. -Irwindale
  137. -Cranford
  138. -Potomac
  139. -Paxville
  140. -Dempsey
  141. config MK6
  142. bool "K6/K6-II/K6-III"
  143. depends on X86_32
  144. help
  145. Select this for an AMD K6-family processor. Enables use of
  146. some extended instructions, and passes appropriate optimization
  147. flags to GCC.
  148. config MK7
  149. bool "Athlon/Duron/K7"
  150. depends on X86_32
  151. help
  152. Select this for an AMD Athlon K7-family processor. Enables use of
  153. some extended instructions, and passes appropriate optimization
  154. flags to GCC.
  155. config MK8
  156. bool "Opteron/Athlon64/Hammer/K8"
  157. help
  158. Select this for an AMD Opteron or Athlon64 Hammer-family processor.
  159. Enables use of some extended instructions, and passes appropriate
  160. optimization flags to GCC.
  161. config MCRUSOE
  162. bool "Crusoe"
  163. depends on X86_32
  164. help
  165. Select this for a Transmeta Crusoe processor. Treats the processor
  166. like a 586 with TSC, and sets some GCC optimization flags (like a
  167. Pentium Pro with no alignment requirements).
  168. config MEFFICEON
  169. bool "Efficeon"
  170. depends on X86_32
  171. help
  172. Select this for a Transmeta Efficeon processor.
  173. config MWINCHIPC6
  174. bool "Winchip-C6"
  175. depends on X86_32
  176. help
  177. Select this for an IDT Winchip C6 chip. Linux and GCC
  178. treat this chip as a 586TSC with some extended instructions
  179. and alignment requirements.
  180. config MWINCHIP3D
  181. bool "Winchip-2/Winchip-2A/Winchip-3"
  182. depends on X86_32
  183. help
  184. Select this for an IDT Winchip-2, 2A or 3. Linux and GCC
  185. treat this chip as a 586TSC with some extended instructions
  186. and alignment requirements. Also enable out of order memory
  187. stores for this CPU, which can increase performance of some
  188. operations.
  189. config MELAN
  190. bool "AMD Elan"
  191. depends on X86_32
  192. help
  193. Select this for an AMD Elan processor.
  194. Do not use this option for K6/Athlon/Opteron processors!
  195. config MGEODEGX1
  196. bool "GeodeGX1"
  197. depends on X86_32
  198. help
  199. Select this for a Geode GX1 (Cyrix MediaGX) chip.
  200. config MGEODE_LX
  201. bool "Geode GX/LX"
  202. depends on X86_32
  203. help
  204. Select this for AMD Geode GX and LX processors.
  205. config MCYRIXIII
  206. bool "CyrixIII/VIA-C3"
  207. depends on X86_32
  208. help
  209. Select this for a Cyrix III or C3 chip. Presently Linux and GCC
  210. treat this chip as a generic 586. Whilst the CPU is 686 class,
  211. it lacks the cmov extension which gcc assumes is present when
  212. generating 686 code.
  213. Note that Nehemiah (Model 9) and above will not boot with this
  214. kernel due to them lacking the 3DNow! instructions used in earlier
  215. incarnations of the CPU.
  216. config MVIAC3_2
  217. bool "VIA C3-2 (Nehemiah)"
  218. depends on X86_32
  219. help
  220. Select this for a VIA C3 "Nehemiah". Selecting this enables usage
  221. of SSE and tells gcc to treat the CPU as a 686.
  222. Note, this kernel will not boot on older (pre model 9) C3s.
  223. config MVIAC7
  224. bool "VIA C7"
  225. depends on X86_32
  226. help
  227. Select this for a VIA C7. Selecting this uses the correct cache
  228. shift and tells gcc to treat the CPU as a 686.
  229. config MPSC
  230. bool "Intel P4 / older Netburst based Xeon"
  231. depends on X86_64
  232. help
  233. Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey
  234. Xeon CPUs with Intel 64bit which is compatible with x86-64.
  235. Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the
  236. Netburst core and shouldn't use this option. You can distinguish them
  237. using the cpu family field
  238. in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one.
  239. config MCORE2
  240. bool "Core 2/newer Xeon"
  241. help
  242. Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and
  243. 53xx) CPUs. You can distinguish newer from older Xeons by the CPU
  244. family in /proc/cpuinfo. Newer ones have 6 and older ones 15
  245. (not a typo)
  246. config MATOM
  247. bool "Intel Atom"
  248. help
  249. Select this for the Intel Atom platform. Intel Atom CPUs have an
  250. in-order pipelining architecture and thus can benefit from
  251. accordingly optimized code. Use a recent GCC with specific Atom
  252. support in order to fully benefit from selecting this option.
  253. config GENERIC_CPU
  254. bool "Generic-x86-64"
  255. depends on X86_64
  256. help
  257. Generic x86-64 CPU.
  258. Run equally well on all x86-64 CPUs.
  259. endchoice
  260. config X86_GENERIC
  261. bool "Generic x86 support"
  262. depends on X86_32
  263. help
  264. Instead of just including optimizations for the selected
  265. x86 variant (e.g. PII, Crusoe or Athlon), include some more
  266. generic optimizations as well. This will make the kernel
  267. perform better on x86 CPUs other than that selected.
  268. This is really intended for distributors who need more
  269. generic optimizations.
  270. #
  271. # Define implied options from the CPU selection here
  272. config X86_INTERNODE_CACHE_SHIFT
  273. int
  274. default "12" if X86_VSMP
  275. default X86_L1_CACHE_SHIFT
  276. config X86_L1_CACHE_SHIFT
  277. int
  278. default "7" if MPENTIUM4 || MPSC
  279. default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU
  280. default "4" if MELAN || M486SX || M486 || MGEODEGX1
  281. default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX
  282. config X86_F00F_BUG
  283. def_bool y
  284. depends on M586MMX || M586TSC || M586 || M486SX || M486
  285. config X86_INVD_BUG
  286. def_bool y
  287. depends on M486SX || M486
  288. config X86_ALIGNMENT_16
  289. def_bool y
  290. depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486SX || M486 || MVIAC3_2 || MGEODEGX1
  291. config X86_INTEL_USERCOPY
  292. def_bool y
  293. depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2
  294. config X86_USE_PPRO_CHECKSUM
  295. def_bool y
  296. depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM
  297. #
  298. # P6_NOPs are a relatively minor optimization that require a family >=
  299. # 6 processor, except that it is broken on certain VIA chips.
  300. # Furthermore, AMD chips prefer a totally different sequence of NOPs
  301. # (which work on all CPUs). In addition, it looks like Virtual PC
  302. # does not understand them.
  303. #
  304. # As a result, disallow these if we're not compiling for X86_64 (these
  305. # NOPs do work on all x86-64 capable chips); the list of processors in
  306. # the right-hand clause are the cores that benefit from this optimization.
  307. #
  308. config X86_P6_NOP
  309. def_bool y
  310. depends on X86_64
  311. depends on (MCORE2 || MPENTIUM4 || MPSC)
  312. config X86_TSC
  313. def_bool y
  314. depends on (MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) || X86_64
  315. config X86_CMPXCHG64
  316. def_bool y
  317. depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8
  318. # this should be set for all -march=.. options where the compiler
  319. # generates cmov.
  320. config X86_CMOV
  321. def_bool y
  322. depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX)
  323. config X86_MINIMUM_CPU_FAMILY
  324. int
  325. default "64" if X86_64
  326. default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8)
  327. default "5" if X86_32 && X86_CMPXCHG64
  328. default "4"
  329. config X86_DEBUGCTLMSR
  330. def_bool y
  331. depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486SX || M486) && !UML
  332. config IA32_FEAT_CTL
  333. def_bool y
  334. depends on CPU_SUP_INTEL || CPU_SUP_CENTAUR || CPU_SUP_ZHAOXIN
  335. config X86_VMX_FEATURE_NAMES
  336. def_bool y
  337. depends on IA32_FEAT_CTL && X86_FEATURE_NAMES
  338. menuconfig PROCESSOR_SELECT
  339. bool "Supported processor vendors" if EXPERT
  340. help
  341. This lets you choose what x86 vendor support code your kernel
  342. will include.
  343. config CPU_SUP_INTEL
  344. default y
  345. bool "Support Intel processors" if PROCESSOR_SELECT
  346. help
  347. This enables detection, tunings and quirks for Intel processors
  348. You need this enabled if you want your kernel to run on an
  349. Intel CPU. Disabling this option on other types of CPUs
  350. makes the kernel a tiny bit smaller. Disabling it on an Intel
  351. CPU might render the kernel unbootable.
  352. If unsure, say N.
  353. config CPU_SUP_CYRIX_32
  354. default y
  355. bool "Support Cyrix processors" if PROCESSOR_SELECT
  356. depends on M486SX || M486 || M586 || M586TSC || M586MMX || (EXPERT && !64BIT)
  357. help
  358. This enables detection, tunings and quirks for Cyrix processors
  359. You need this enabled if you want your kernel to run on a
  360. Cyrix CPU. Disabling this option on other types of CPUs
  361. makes the kernel a tiny bit smaller. Disabling it on a Cyrix
  362. CPU might render the kernel unbootable.
  363. If unsure, say N.
  364. config CPU_SUP_AMD
  365. default y
  366. bool "Support AMD processors" if PROCESSOR_SELECT
  367. help
  368. This enables detection, tunings and quirks for AMD processors
  369. You need this enabled if you want your kernel to run on an
  370. AMD CPU. Disabling this option on other types of CPUs
  371. makes the kernel a tiny bit smaller. Disabling it on an AMD
  372. CPU might render the kernel unbootable.
  373. If unsure, say N.
  374. config CPU_SUP_HYGON
  375. default y
  376. bool "Support Hygon processors" if PROCESSOR_SELECT
  377. select CPU_SUP_AMD
  378. help
  379. This enables detection, tunings and quirks for Hygon processors
  380. You need this enabled if you want your kernel to run on an
  381. Hygon CPU. Disabling this option on other types of CPUs
  382. makes the kernel a tiny bit smaller. Disabling it on an Hygon
  383. CPU might render the kernel unbootable.
  384. If unsure, say N.
  385. config CPU_SUP_CENTAUR
  386. default y
  387. bool "Support Centaur processors" if PROCESSOR_SELECT
  388. help
  389. This enables detection, tunings and quirks for Centaur processors
  390. You need this enabled if you want your kernel to run on a
  391. Centaur CPU. Disabling this option on other types of CPUs
  392. makes the kernel a tiny bit smaller. Disabling it on a Centaur
  393. CPU might render the kernel unbootable.
  394. If unsure, say N.
  395. config CPU_SUP_TRANSMETA_32
  396. default y
  397. bool "Support Transmeta processors" if PROCESSOR_SELECT
  398. depends on !64BIT
  399. help
  400. This enables detection, tunings and quirks for Transmeta processors
  401. You need this enabled if you want your kernel to run on a
  402. Transmeta CPU. Disabling this option on other types of CPUs
  403. makes the kernel a tiny bit smaller. Disabling it on a Transmeta
  404. CPU might render the kernel unbootable.
  405. If unsure, say N.
  406. config CPU_SUP_UMC_32
  407. default y
  408. bool "Support UMC processors" if PROCESSOR_SELECT
  409. depends on M486SX || M486 || (EXPERT && !64BIT)
  410. help
  411. This enables detection, tunings and quirks for UMC processors
  412. You need this enabled if you want your kernel to run on a
  413. UMC CPU. Disabling this option on other types of CPUs
  414. makes the kernel a tiny bit smaller. Disabling it on a UMC
  415. CPU might render the kernel unbootable.
  416. If unsure, say N.
  417. config CPU_SUP_ZHAOXIN
  418. default y
  419. bool "Support Zhaoxin processors" if PROCESSOR_SELECT
  420. help
  421. This enables detection, tunings and quirks for Zhaoxin processors
  422. You need this enabled if you want your kernel to run on a
  423. Zhaoxin CPU. Disabling this option on other types of CPUs
  424. makes the kernel a tiny bit smaller. Disabling it on a Zhaoxin
  425. CPU might render the kernel unbootable.
  426. If unsure, say N.
  427. config CPU_SUP_VORTEX_32
  428. default y
  429. bool "Support Vortex processors" if PROCESSOR_SELECT
  430. depends on X86_32
  431. help
  432. This enables detection, tunings and quirks for Vortex processors
  433. You need this enabled if you want your kernel to run on a
  434. Vortex CPU. Disabling this option on other types of CPUs
  435. makes the kernel a tiny bit smaller.
  436. If unsure, say N.