Kconfig.cpu 16 KB

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