cputable.c 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651
  1. /*
  2. * Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
  3. *
  4. * Modifications for ppc64:
  5. * Copyright (C) 2003 Dave Engebretsen <engebret@us.ibm.com>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version
  10. * 2 of the License, or (at your option) any later version.
  11. */
  12. #include <linux/string.h>
  13. #include <linux/sched.h>
  14. #include <linux/threads.h>
  15. #include <linux/init.h>
  16. #include <linux/module.h>
  17. #include <asm/oprofile_impl.h>
  18. #include <asm/cputable.h>
  19. #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
  20. struct cpu_spec* cur_cpu_spec = NULL;
  21. EXPORT_SYMBOL(cur_cpu_spec);
  22. /* NOTE:
  23. * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
  24. * the responsibility of the appropriate CPU save/restore functions to
  25. * eventually copy these settings over. Those save/restore aren't yet
  26. * part of the cputable though. That has to be fixed for both ppc32
  27. * and ppc64
  28. */
  29. #ifdef CONFIG_PPC32
  30. extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
  31. extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
  32. extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
  33. extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
  34. extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
  35. extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
  36. extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
  37. extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
  38. extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
  39. extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
  40. extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
  41. extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
  42. extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
  43. extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
  44. extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
  45. #endif /* CONFIG_PPC32 */
  46. #ifdef CONFIG_PPC64
  47. extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
  48. extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
  49. extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
  50. extern void __restore_cpu_pa6t(void);
  51. extern void __restore_cpu_ppc970(void);
  52. extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
  53. extern void __restore_cpu_power7(void);
  54. #endif /* CONFIG_PPC64 */
  55. /* This table only contains "desktop" CPUs, it need to be filled with embedded
  56. * ones as well...
  57. */
  58. #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
  59. PPC_FEATURE_HAS_MMU)
  60. #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
  61. #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
  62. #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
  63. PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
  64. #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
  65. PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
  66. #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
  67. PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
  68. PPC_FEATURE_TRUE_LE | \
  69. PPC_FEATURE_PSERIES_PERFMON_COMPAT)
  70. #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
  71. PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
  72. PPC_FEATURE_TRUE_LE | \
  73. PPC_FEATURE_PSERIES_PERFMON_COMPAT)
  74. #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
  75. PPC_FEATURE_TRUE_LE | \
  76. PPC_FEATURE_HAS_ALTIVEC_COMP)
  77. #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
  78. PPC_FEATURE_BOOKE)
  79. static struct cpu_spec __initdata cpu_specs[] = {
  80. #ifdef CONFIG_PPC64
  81. { /* Power3 */
  82. .pvr_mask = 0xffff0000,
  83. .pvr_value = 0x00400000,
  84. .cpu_name = "POWER3 (630)",
  85. .cpu_features = CPU_FTRS_POWER3,
  86. .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
  87. .icache_bsize = 128,
  88. .dcache_bsize = 128,
  89. .num_pmcs = 8,
  90. .pmc_type = PPC_PMC_IBM,
  91. .oprofile_cpu_type = "ppc64/power3",
  92. .oprofile_type = PPC_OPROFILE_RS64,
  93. .machine_check = machine_check_generic,
  94. .platform = "power3",
  95. },
  96. { /* Power3+ */
  97. .pvr_mask = 0xffff0000,
  98. .pvr_value = 0x00410000,
  99. .cpu_name = "POWER3 (630+)",
  100. .cpu_features = CPU_FTRS_POWER3,
  101. .cpu_user_features = COMMON_USER_PPC64|PPC_FEATURE_PPC_LE,
  102. .icache_bsize = 128,
  103. .dcache_bsize = 128,
  104. .num_pmcs = 8,
  105. .pmc_type = PPC_PMC_IBM,
  106. .oprofile_cpu_type = "ppc64/power3",
  107. .oprofile_type = PPC_OPROFILE_RS64,
  108. .machine_check = machine_check_generic,
  109. .platform = "power3",
  110. },
  111. { /* Northstar */
  112. .pvr_mask = 0xffff0000,
  113. .pvr_value = 0x00330000,
  114. .cpu_name = "RS64-II (northstar)",
  115. .cpu_features = CPU_FTRS_RS64,
  116. .cpu_user_features = COMMON_USER_PPC64,
  117. .icache_bsize = 128,
  118. .dcache_bsize = 128,
  119. .num_pmcs = 8,
  120. .pmc_type = PPC_PMC_IBM,
  121. .oprofile_cpu_type = "ppc64/rs64",
  122. .oprofile_type = PPC_OPROFILE_RS64,
  123. .machine_check = machine_check_generic,
  124. .platform = "rs64",
  125. },
  126. { /* Pulsar */
  127. .pvr_mask = 0xffff0000,
  128. .pvr_value = 0x00340000,
  129. .cpu_name = "RS64-III (pulsar)",
  130. .cpu_features = CPU_FTRS_RS64,
  131. .cpu_user_features = COMMON_USER_PPC64,
  132. .icache_bsize = 128,
  133. .dcache_bsize = 128,
  134. .num_pmcs = 8,
  135. .pmc_type = PPC_PMC_IBM,
  136. .oprofile_cpu_type = "ppc64/rs64",
  137. .oprofile_type = PPC_OPROFILE_RS64,
  138. .machine_check = machine_check_generic,
  139. .platform = "rs64",
  140. },
  141. { /* I-star */
  142. .pvr_mask = 0xffff0000,
  143. .pvr_value = 0x00360000,
  144. .cpu_name = "RS64-III (icestar)",
  145. .cpu_features = CPU_FTRS_RS64,
  146. .cpu_user_features = COMMON_USER_PPC64,
  147. .icache_bsize = 128,
  148. .dcache_bsize = 128,
  149. .num_pmcs = 8,
  150. .pmc_type = PPC_PMC_IBM,
  151. .oprofile_cpu_type = "ppc64/rs64",
  152. .oprofile_type = PPC_OPROFILE_RS64,
  153. .machine_check = machine_check_generic,
  154. .platform = "rs64",
  155. },
  156. { /* S-star */
  157. .pvr_mask = 0xffff0000,
  158. .pvr_value = 0x00370000,
  159. .cpu_name = "RS64-IV (sstar)",
  160. .cpu_features = CPU_FTRS_RS64,
  161. .cpu_user_features = COMMON_USER_PPC64,
  162. .icache_bsize = 128,
  163. .dcache_bsize = 128,
  164. .num_pmcs = 8,
  165. .pmc_type = PPC_PMC_IBM,
  166. .oprofile_cpu_type = "ppc64/rs64",
  167. .oprofile_type = PPC_OPROFILE_RS64,
  168. .machine_check = machine_check_generic,
  169. .platform = "rs64",
  170. },
  171. { /* Power4 */
  172. .pvr_mask = 0xffff0000,
  173. .pvr_value = 0x00350000,
  174. .cpu_name = "POWER4 (gp)",
  175. .cpu_features = CPU_FTRS_POWER4,
  176. .cpu_user_features = COMMON_USER_POWER4,
  177. .icache_bsize = 128,
  178. .dcache_bsize = 128,
  179. .num_pmcs = 8,
  180. .pmc_type = PPC_PMC_IBM,
  181. .oprofile_cpu_type = "ppc64/power4",
  182. .oprofile_type = PPC_OPROFILE_POWER4,
  183. .machine_check = machine_check_generic,
  184. .platform = "power4",
  185. },
  186. { /* Power4+ */
  187. .pvr_mask = 0xffff0000,
  188. .pvr_value = 0x00380000,
  189. .cpu_name = "POWER4+ (gq)",
  190. .cpu_features = CPU_FTRS_POWER4,
  191. .cpu_user_features = COMMON_USER_POWER4,
  192. .icache_bsize = 128,
  193. .dcache_bsize = 128,
  194. .num_pmcs = 8,
  195. .pmc_type = PPC_PMC_IBM,
  196. .oprofile_cpu_type = "ppc64/power4",
  197. .oprofile_type = PPC_OPROFILE_POWER4,
  198. .machine_check = machine_check_generic,
  199. .platform = "power4",
  200. },
  201. { /* PPC970 */
  202. .pvr_mask = 0xffff0000,
  203. .pvr_value = 0x00390000,
  204. .cpu_name = "PPC970",
  205. .cpu_features = CPU_FTRS_PPC970,
  206. .cpu_user_features = COMMON_USER_POWER4 |
  207. PPC_FEATURE_HAS_ALTIVEC_COMP,
  208. .icache_bsize = 128,
  209. .dcache_bsize = 128,
  210. .num_pmcs = 8,
  211. .pmc_type = PPC_PMC_IBM,
  212. .cpu_setup = __setup_cpu_ppc970,
  213. .cpu_restore = __restore_cpu_ppc970,
  214. .oprofile_cpu_type = "ppc64/970",
  215. .oprofile_type = PPC_OPROFILE_POWER4,
  216. .machine_check = machine_check_generic,
  217. .platform = "ppc970",
  218. },
  219. { /* PPC970FX */
  220. .pvr_mask = 0xffff0000,
  221. .pvr_value = 0x003c0000,
  222. .cpu_name = "PPC970FX",
  223. .cpu_features = CPU_FTRS_PPC970,
  224. .cpu_user_features = COMMON_USER_POWER4 |
  225. PPC_FEATURE_HAS_ALTIVEC_COMP,
  226. .icache_bsize = 128,
  227. .dcache_bsize = 128,
  228. .num_pmcs = 8,
  229. .pmc_type = PPC_PMC_IBM,
  230. .cpu_setup = __setup_cpu_ppc970,
  231. .cpu_restore = __restore_cpu_ppc970,
  232. .oprofile_cpu_type = "ppc64/970",
  233. .oprofile_type = PPC_OPROFILE_POWER4,
  234. .machine_check = machine_check_generic,
  235. .platform = "ppc970",
  236. },
  237. { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
  238. .pvr_mask = 0xffffffff,
  239. .pvr_value = 0x00440100,
  240. .cpu_name = "PPC970MP",
  241. .cpu_features = CPU_FTRS_PPC970,
  242. .cpu_user_features = COMMON_USER_POWER4 |
  243. PPC_FEATURE_HAS_ALTIVEC_COMP,
  244. .icache_bsize = 128,
  245. .dcache_bsize = 128,
  246. .num_pmcs = 8,
  247. .pmc_type = PPC_PMC_IBM,
  248. .cpu_setup = __setup_cpu_ppc970,
  249. .cpu_restore = __restore_cpu_ppc970,
  250. .oprofile_cpu_type = "ppc64/970MP",
  251. .oprofile_type = PPC_OPROFILE_POWER4,
  252. .machine_check = machine_check_generic,
  253. .platform = "ppc970",
  254. },
  255. { /* PPC970MP */
  256. .pvr_mask = 0xffff0000,
  257. .pvr_value = 0x00440000,
  258. .cpu_name = "PPC970MP",
  259. .cpu_features = CPU_FTRS_PPC970,
  260. .cpu_user_features = COMMON_USER_POWER4 |
  261. PPC_FEATURE_HAS_ALTIVEC_COMP,
  262. .icache_bsize = 128,
  263. .dcache_bsize = 128,
  264. .num_pmcs = 8,
  265. .pmc_type = PPC_PMC_IBM,
  266. .cpu_setup = __setup_cpu_ppc970MP,
  267. .cpu_restore = __restore_cpu_ppc970,
  268. .oprofile_cpu_type = "ppc64/970MP",
  269. .oprofile_type = PPC_OPROFILE_POWER4,
  270. .machine_check = machine_check_generic,
  271. .platform = "ppc970",
  272. },
  273. { /* PPC970GX */
  274. .pvr_mask = 0xffff0000,
  275. .pvr_value = 0x00450000,
  276. .cpu_name = "PPC970GX",
  277. .cpu_features = CPU_FTRS_PPC970,
  278. .cpu_user_features = COMMON_USER_POWER4 |
  279. PPC_FEATURE_HAS_ALTIVEC_COMP,
  280. .icache_bsize = 128,
  281. .dcache_bsize = 128,
  282. .num_pmcs = 8,
  283. .pmc_type = PPC_PMC_IBM,
  284. .cpu_setup = __setup_cpu_ppc970,
  285. .oprofile_cpu_type = "ppc64/970",
  286. .oprofile_type = PPC_OPROFILE_POWER4,
  287. .machine_check = machine_check_generic,
  288. .platform = "ppc970",
  289. },
  290. { /* Power5 GR */
  291. .pvr_mask = 0xffff0000,
  292. .pvr_value = 0x003a0000,
  293. .cpu_name = "POWER5 (gr)",
  294. .cpu_features = CPU_FTRS_POWER5,
  295. .cpu_user_features = COMMON_USER_POWER5,
  296. .icache_bsize = 128,
  297. .dcache_bsize = 128,
  298. .num_pmcs = 6,
  299. .pmc_type = PPC_PMC_IBM,
  300. .oprofile_cpu_type = "ppc64/power5",
  301. .oprofile_type = PPC_OPROFILE_POWER4,
  302. /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
  303. * and above but only works on POWER5 and above
  304. */
  305. .oprofile_mmcra_sihv = MMCRA_SIHV,
  306. .oprofile_mmcra_sipr = MMCRA_SIPR,
  307. .machine_check = machine_check_generic,
  308. .platform = "power5",
  309. },
  310. { /* Power5++ */
  311. .pvr_mask = 0xffffff00,
  312. .pvr_value = 0x003b0300,
  313. .cpu_name = "POWER5+ (gs)",
  314. .cpu_features = CPU_FTRS_POWER5,
  315. .cpu_user_features = COMMON_USER_POWER5_PLUS,
  316. .icache_bsize = 128,
  317. .dcache_bsize = 128,
  318. .num_pmcs = 6,
  319. .oprofile_cpu_type = "ppc64/power5++",
  320. .oprofile_type = PPC_OPROFILE_POWER4,
  321. .oprofile_mmcra_sihv = MMCRA_SIHV,
  322. .oprofile_mmcra_sipr = MMCRA_SIPR,
  323. .machine_check = machine_check_generic,
  324. .platform = "power5+",
  325. },
  326. { /* Power5 GS */
  327. .pvr_mask = 0xffff0000,
  328. .pvr_value = 0x003b0000,
  329. .cpu_name = "POWER5+ (gs)",
  330. .cpu_features = CPU_FTRS_POWER5,
  331. .cpu_user_features = COMMON_USER_POWER5_PLUS,
  332. .icache_bsize = 128,
  333. .dcache_bsize = 128,
  334. .num_pmcs = 6,
  335. .pmc_type = PPC_PMC_IBM,
  336. .oprofile_cpu_type = "ppc64/power5+",
  337. .oprofile_type = PPC_OPROFILE_POWER4,
  338. .oprofile_mmcra_sihv = MMCRA_SIHV,
  339. .oprofile_mmcra_sipr = MMCRA_SIPR,
  340. .machine_check = machine_check_generic,
  341. .platform = "power5+",
  342. },
  343. { /* POWER6 in P5+ mode; 2.04-compliant processor */
  344. .pvr_mask = 0xffffffff,
  345. .pvr_value = 0x0f000001,
  346. .cpu_name = "POWER5+",
  347. .cpu_features = CPU_FTRS_POWER5,
  348. .cpu_user_features = COMMON_USER_POWER5_PLUS,
  349. .icache_bsize = 128,
  350. .dcache_bsize = 128,
  351. .machine_check = machine_check_generic,
  352. .platform = "power5+",
  353. },
  354. { /* Power6 */
  355. .pvr_mask = 0xffff0000,
  356. .pvr_value = 0x003e0000,
  357. .cpu_name = "POWER6 (raw)",
  358. .cpu_features = CPU_FTRS_POWER6,
  359. .cpu_user_features = COMMON_USER_POWER6 |
  360. PPC_FEATURE_POWER6_EXT,
  361. .icache_bsize = 128,
  362. .dcache_bsize = 128,
  363. .num_pmcs = 6,
  364. .pmc_type = PPC_PMC_IBM,
  365. .oprofile_cpu_type = "ppc64/power6",
  366. .oprofile_type = PPC_OPROFILE_POWER4,
  367. .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
  368. .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
  369. .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
  370. POWER6_MMCRA_OTHER,
  371. .machine_check = machine_check_generic,
  372. .platform = "power6x",
  373. },
  374. { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
  375. .pvr_mask = 0xffffffff,
  376. .pvr_value = 0x0f000002,
  377. .cpu_name = "POWER6 (architected)",
  378. .cpu_features = CPU_FTRS_POWER6,
  379. .cpu_user_features = COMMON_USER_POWER6,
  380. .icache_bsize = 128,
  381. .dcache_bsize = 128,
  382. .machine_check = machine_check_generic,
  383. .platform = "power6",
  384. },
  385. { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
  386. .pvr_mask = 0xffffffff,
  387. .pvr_value = 0x0f000003,
  388. .cpu_name = "POWER7 (architected)",
  389. .cpu_features = CPU_FTRS_POWER7,
  390. .cpu_user_features = COMMON_USER_POWER7,
  391. .icache_bsize = 128,
  392. .dcache_bsize = 128,
  393. .machine_check = machine_check_generic,
  394. .platform = "power7",
  395. },
  396. { /* Power7 */
  397. .pvr_mask = 0xffff0000,
  398. .pvr_value = 0x003f0000,
  399. .cpu_name = "POWER7 (raw)",
  400. .cpu_features = CPU_FTRS_POWER7,
  401. .cpu_user_features = COMMON_USER_POWER7,
  402. .icache_bsize = 128,
  403. .dcache_bsize = 128,
  404. .num_pmcs = 6,
  405. .pmc_type = PPC_PMC_IBM,
  406. .cpu_setup = __setup_cpu_power7,
  407. .cpu_restore = __restore_cpu_power7,
  408. .oprofile_cpu_type = "ppc64/power7",
  409. .oprofile_type = PPC_OPROFILE_POWER4,
  410. .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
  411. .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
  412. .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
  413. POWER6_MMCRA_OTHER,
  414. .platform = "power7",
  415. },
  416. { /* Cell Broadband Engine */
  417. .pvr_mask = 0xffff0000,
  418. .pvr_value = 0x00700000,
  419. .cpu_name = "Cell Broadband Engine",
  420. .cpu_features = CPU_FTRS_CELL,
  421. .cpu_user_features = COMMON_USER_PPC64 |
  422. PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
  423. PPC_FEATURE_SMT,
  424. .icache_bsize = 128,
  425. .dcache_bsize = 128,
  426. .num_pmcs = 4,
  427. .pmc_type = PPC_PMC_IBM,
  428. .oprofile_cpu_type = "ppc64/cell-be",
  429. .oprofile_type = PPC_OPROFILE_CELL,
  430. .machine_check = machine_check_generic,
  431. .platform = "ppc-cell-be",
  432. },
  433. { /* PA Semi PA6T */
  434. .pvr_mask = 0x7fff0000,
  435. .pvr_value = 0x00900000,
  436. .cpu_name = "PA6T",
  437. .cpu_features = CPU_FTRS_PA6T,
  438. .cpu_user_features = COMMON_USER_PA6T,
  439. .icache_bsize = 64,
  440. .dcache_bsize = 64,
  441. .num_pmcs = 6,
  442. .pmc_type = PPC_PMC_PA6T,
  443. .cpu_setup = __setup_cpu_pa6t,
  444. .cpu_restore = __restore_cpu_pa6t,
  445. .oprofile_cpu_type = "ppc64/pa6t",
  446. .oprofile_type = PPC_OPROFILE_PA6T,
  447. .machine_check = machine_check_generic,
  448. .platform = "pa6t",
  449. },
  450. { /* default match */
  451. .pvr_mask = 0x00000000,
  452. .pvr_value = 0x00000000,
  453. .cpu_name = "POWER4 (compatible)",
  454. .cpu_features = CPU_FTRS_COMPATIBLE,
  455. .cpu_user_features = COMMON_USER_PPC64,
  456. .icache_bsize = 128,
  457. .dcache_bsize = 128,
  458. .num_pmcs = 6,
  459. .pmc_type = PPC_PMC_IBM,
  460. .machine_check = machine_check_generic,
  461. .platform = "power4",
  462. }
  463. #endif /* CONFIG_PPC64 */
  464. #ifdef CONFIG_PPC32
  465. #if CLASSIC_PPC
  466. { /* 601 */
  467. .pvr_mask = 0xffff0000,
  468. .pvr_value = 0x00010000,
  469. .cpu_name = "601",
  470. .cpu_features = CPU_FTRS_PPC601,
  471. .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
  472. PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
  473. .icache_bsize = 32,
  474. .dcache_bsize = 32,
  475. .machine_check = machine_check_generic,
  476. .platform = "ppc601",
  477. },
  478. { /* 603 */
  479. .pvr_mask = 0xffff0000,
  480. .pvr_value = 0x00030000,
  481. .cpu_name = "603",
  482. .cpu_features = CPU_FTRS_603,
  483. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  484. .icache_bsize = 32,
  485. .dcache_bsize = 32,
  486. .cpu_setup = __setup_cpu_603,
  487. .machine_check = machine_check_generic,
  488. .platform = "ppc603",
  489. },
  490. { /* 603e */
  491. .pvr_mask = 0xffff0000,
  492. .pvr_value = 0x00060000,
  493. .cpu_name = "603e",
  494. .cpu_features = CPU_FTRS_603,
  495. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  496. .icache_bsize = 32,
  497. .dcache_bsize = 32,
  498. .cpu_setup = __setup_cpu_603,
  499. .machine_check = machine_check_generic,
  500. .platform = "ppc603",
  501. },
  502. { /* 603ev */
  503. .pvr_mask = 0xffff0000,
  504. .pvr_value = 0x00070000,
  505. .cpu_name = "603ev",
  506. .cpu_features = CPU_FTRS_603,
  507. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  508. .icache_bsize = 32,
  509. .dcache_bsize = 32,
  510. .cpu_setup = __setup_cpu_603,
  511. .machine_check = machine_check_generic,
  512. .platform = "ppc603",
  513. },
  514. { /* 604 */
  515. .pvr_mask = 0xffff0000,
  516. .pvr_value = 0x00040000,
  517. .cpu_name = "604",
  518. .cpu_features = CPU_FTRS_604,
  519. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  520. .icache_bsize = 32,
  521. .dcache_bsize = 32,
  522. .num_pmcs = 2,
  523. .cpu_setup = __setup_cpu_604,
  524. .machine_check = machine_check_generic,
  525. .platform = "ppc604",
  526. },
  527. { /* 604e */
  528. .pvr_mask = 0xfffff000,
  529. .pvr_value = 0x00090000,
  530. .cpu_name = "604e",
  531. .cpu_features = CPU_FTRS_604,
  532. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  533. .icache_bsize = 32,
  534. .dcache_bsize = 32,
  535. .num_pmcs = 4,
  536. .cpu_setup = __setup_cpu_604,
  537. .machine_check = machine_check_generic,
  538. .platform = "ppc604",
  539. },
  540. { /* 604r */
  541. .pvr_mask = 0xffff0000,
  542. .pvr_value = 0x00090000,
  543. .cpu_name = "604r",
  544. .cpu_features = CPU_FTRS_604,
  545. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  546. .icache_bsize = 32,
  547. .dcache_bsize = 32,
  548. .num_pmcs = 4,
  549. .cpu_setup = __setup_cpu_604,
  550. .machine_check = machine_check_generic,
  551. .platform = "ppc604",
  552. },
  553. { /* 604ev */
  554. .pvr_mask = 0xffff0000,
  555. .pvr_value = 0x000a0000,
  556. .cpu_name = "604ev",
  557. .cpu_features = CPU_FTRS_604,
  558. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  559. .icache_bsize = 32,
  560. .dcache_bsize = 32,
  561. .num_pmcs = 4,
  562. .cpu_setup = __setup_cpu_604,
  563. .machine_check = machine_check_generic,
  564. .platform = "ppc604",
  565. },
  566. { /* 740/750 (0x4202, don't support TAU ?) */
  567. .pvr_mask = 0xffffffff,
  568. .pvr_value = 0x00084202,
  569. .cpu_name = "740/750",
  570. .cpu_features = CPU_FTRS_740_NOTAU,
  571. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  572. .icache_bsize = 32,
  573. .dcache_bsize = 32,
  574. .num_pmcs = 4,
  575. .cpu_setup = __setup_cpu_750,
  576. .machine_check = machine_check_generic,
  577. .platform = "ppc750",
  578. },
  579. { /* 750CX (80100 and 8010x?) */
  580. .pvr_mask = 0xfffffff0,
  581. .pvr_value = 0x00080100,
  582. .cpu_name = "750CX",
  583. .cpu_features = CPU_FTRS_750,
  584. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  585. .icache_bsize = 32,
  586. .dcache_bsize = 32,
  587. .num_pmcs = 4,
  588. .cpu_setup = __setup_cpu_750cx,
  589. .machine_check = machine_check_generic,
  590. .platform = "ppc750",
  591. },
  592. { /* 750CX (82201 and 82202) */
  593. .pvr_mask = 0xfffffff0,
  594. .pvr_value = 0x00082200,
  595. .cpu_name = "750CX",
  596. .cpu_features = CPU_FTRS_750,
  597. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  598. .icache_bsize = 32,
  599. .dcache_bsize = 32,
  600. .num_pmcs = 4,
  601. .cpu_setup = __setup_cpu_750cx,
  602. .machine_check = machine_check_generic,
  603. .platform = "ppc750",
  604. },
  605. { /* 750CXe (82214) */
  606. .pvr_mask = 0xfffffff0,
  607. .pvr_value = 0x00082210,
  608. .cpu_name = "750CXe",
  609. .cpu_features = CPU_FTRS_750,
  610. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  611. .icache_bsize = 32,
  612. .dcache_bsize = 32,
  613. .num_pmcs = 4,
  614. .cpu_setup = __setup_cpu_750cx,
  615. .machine_check = machine_check_generic,
  616. .platform = "ppc750",
  617. },
  618. { /* 750CXe "Gekko" (83214) */
  619. .pvr_mask = 0xffffffff,
  620. .pvr_value = 0x00083214,
  621. .cpu_name = "750CXe",
  622. .cpu_features = CPU_FTRS_750,
  623. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  624. .icache_bsize = 32,
  625. .dcache_bsize = 32,
  626. .num_pmcs = 4,
  627. .cpu_setup = __setup_cpu_750cx,
  628. .machine_check = machine_check_generic,
  629. .platform = "ppc750",
  630. },
  631. { /* 750CL */
  632. .pvr_mask = 0xfffff0f0,
  633. .pvr_value = 0x00087010,
  634. .cpu_name = "750CL",
  635. .cpu_features = CPU_FTRS_750CL,
  636. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  637. .icache_bsize = 32,
  638. .dcache_bsize = 32,
  639. .num_pmcs = 4,
  640. .cpu_setup = __setup_cpu_750,
  641. .machine_check = machine_check_generic,
  642. .platform = "ppc750",
  643. },
  644. { /* 745/755 */
  645. .pvr_mask = 0xfffff000,
  646. .pvr_value = 0x00083000,
  647. .cpu_name = "745/755",
  648. .cpu_features = CPU_FTRS_750,
  649. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  650. .icache_bsize = 32,
  651. .dcache_bsize = 32,
  652. .num_pmcs = 4,
  653. .cpu_setup = __setup_cpu_750,
  654. .machine_check = machine_check_generic,
  655. .platform = "ppc750",
  656. },
  657. { /* 750FX rev 1.x */
  658. .pvr_mask = 0xffffff00,
  659. .pvr_value = 0x70000100,
  660. .cpu_name = "750FX",
  661. .cpu_features = CPU_FTRS_750FX1,
  662. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  663. .icache_bsize = 32,
  664. .dcache_bsize = 32,
  665. .num_pmcs = 4,
  666. .cpu_setup = __setup_cpu_750,
  667. .machine_check = machine_check_generic,
  668. .platform = "ppc750",
  669. },
  670. { /* 750FX rev 2.0 must disable HID0[DPM] */
  671. .pvr_mask = 0xffffffff,
  672. .pvr_value = 0x70000200,
  673. .cpu_name = "750FX",
  674. .cpu_features = CPU_FTRS_750FX2,
  675. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  676. .icache_bsize = 32,
  677. .dcache_bsize = 32,
  678. .num_pmcs = 4,
  679. .cpu_setup = __setup_cpu_750,
  680. .machine_check = machine_check_generic,
  681. .platform = "ppc750",
  682. },
  683. { /* 750FX (All revs except 2.0) */
  684. .pvr_mask = 0xffff0000,
  685. .pvr_value = 0x70000000,
  686. .cpu_name = "750FX",
  687. .cpu_features = CPU_FTRS_750FX,
  688. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  689. .icache_bsize = 32,
  690. .dcache_bsize = 32,
  691. .num_pmcs = 4,
  692. .cpu_setup = __setup_cpu_750fx,
  693. .machine_check = machine_check_generic,
  694. .platform = "ppc750",
  695. },
  696. { /* 750GX */
  697. .pvr_mask = 0xffff0000,
  698. .pvr_value = 0x70020000,
  699. .cpu_name = "750GX",
  700. .cpu_features = CPU_FTRS_750GX,
  701. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  702. .icache_bsize = 32,
  703. .dcache_bsize = 32,
  704. .num_pmcs = 4,
  705. .cpu_setup = __setup_cpu_750fx,
  706. .machine_check = machine_check_generic,
  707. .platform = "ppc750",
  708. },
  709. { /* 740/750 (L2CR bit need fixup for 740) */
  710. .pvr_mask = 0xffff0000,
  711. .pvr_value = 0x00080000,
  712. .cpu_name = "740/750",
  713. .cpu_features = CPU_FTRS_740,
  714. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  715. .icache_bsize = 32,
  716. .dcache_bsize = 32,
  717. .num_pmcs = 4,
  718. .cpu_setup = __setup_cpu_750,
  719. .machine_check = machine_check_generic,
  720. .platform = "ppc750",
  721. },
  722. { /* 7400 rev 1.1 ? (no TAU) */
  723. .pvr_mask = 0xffffffff,
  724. .pvr_value = 0x000c1101,
  725. .cpu_name = "7400 (1.1)",
  726. .cpu_features = CPU_FTRS_7400_NOTAU,
  727. .cpu_user_features = COMMON_USER |
  728. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  729. .icache_bsize = 32,
  730. .dcache_bsize = 32,
  731. .num_pmcs = 4,
  732. .cpu_setup = __setup_cpu_7400,
  733. .machine_check = machine_check_generic,
  734. .platform = "ppc7400",
  735. },
  736. { /* 7400 */
  737. .pvr_mask = 0xffff0000,
  738. .pvr_value = 0x000c0000,
  739. .cpu_name = "7400",
  740. .cpu_features = CPU_FTRS_7400,
  741. .cpu_user_features = COMMON_USER |
  742. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  743. .icache_bsize = 32,
  744. .dcache_bsize = 32,
  745. .num_pmcs = 4,
  746. .cpu_setup = __setup_cpu_7400,
  747. .machine_check = machine_check_generic,
  748. .platform = "ppc7400",
  749. },
  750. { /* 7410 */
  751. .pvr_mask = 0xffff0000,
  752. .pvr_value = 0x800c0000,
  753. .cpu_name = "7410",
  754. .cpu_features = CPU_FTRS_7400,
  755. .cpu_user_features = COMMON_USER |
  756. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  757. .icache_bsize = 32,
  758. .dcache_bsize = 32,
  759. .num_pmcs = 4,
  760. .cpu_setup = __setup_cpu_7410,
  761. .machine_check = machine_check_generic,
  762. .platform = "ppc7400",
  763. },
  764. { /* 7450 2.0 - no doze/nap */
  765. .pvr_mask = 0xffffffff,
  766. .pvr_value = 0x80000200,
  767. .cpu_name = "7450",
  768. .cpu_features = CPU_FTRS_7450_20,
  769. .cpu_user_features = COMMON_USER |
  770. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  771. .icache_bsize = 32,
  772. .dcache_bsize = 32,
  773. .num_pmcs = 6,
  774. .cpu_setup = __setup_cpu_745x,
  775. .oprofile_cpu_type = "ppc/7450",
  776. .oprofile_type = PPC_OPROFILE_G4,
  777. .machine_check = machine_check_generic,
  778. .platform = "ppc7450",
  779. },
  780. { /* 7450 2.1 */
  781. .pvr_mask = 0xffffffff,
  782. .pvr_value = 0x80000201,
  783. .cpu_name = "7450",
  784. .cpu_features = CPU_FTRS_7450_21,
  785. .cpu_user_features = COMMON_USER |
  786. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  787. .icache_bsize = 32,
  788. .dcache_bsize = 32,
  789. .num_pmcs = 6,
  790. .cpu_setup = __setup_cpu_745x,
  791. .oprofile_cpu_type = "ppc/7450",
  792. .oprofile_type = PPC_OPROFILE_G4,
  793. .machine_check = machine_check_generic,
  794. .platform = "ppc7450",
  795. },
  796. { /* 7450 2.3 and newer */
  797. .pvr_mask = 0xffff0000,
  798. .pvr_value = 0x80000000,
  799. .cpu_name = "7450",
  800. .cpu_features = CPU_FTRS_7450_23,
  801. .cpu_user_features = COMMON_USER |
  802. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  803. .icache_bsize = 32,
  804. .dcache_bsize = 32,
  805. .num_pmcs = 6,
  806. .cpu_setup = __setup_cpu_745x,
  807. .oprofile_cpu_type = "ppc/7450",
  808. .oprofile_type = PPC_OPROFILE_G4,
  809. .machine_check = machine_check_generic,
  810. .platform = "ppc7450",
  811. },
  812. { /* 7455 rev 1.x */
  813. .pvr_mask = 0xffffff00,
  814. .pvr_value = 0x80010100,
  815. .cpu_name = "7455",
  816. .cpu_features = CPU_FTRS_7455_1,
  817. .cpu_user_features = COMMON_USER |
  818. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  819. .icache_bsize = 32,
  820. .dcache_bsize = 32,
  821. .num_pmcs = 6,
  822. .cpu_setup = __setup_cpu_745x,
  823. .oprofile_cpu_type = "ppc/7450",
  824. .oprofile_type = PPC_OPROFILE_G4,
  825. .machine_check = machine_check_generic,
  826. .platform = "ppc7450",
  827. },
  828. { /* 7455 rev 2.0 */
  829. .pvr_mask = 0xffffffff,
  830. .pvr_value = 0x80010200,
  831. .cpu_name = "7455",
  832. .cpu_features = CPU_FTRS_7455_20,
  833. .cpu_user_features = COMMON_USER |
  834. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  835. .icache_bsize = 32,
  836. .dcache_bsize = 32,
  837. .num_pmcs = 6,
  838. .cpu_setup = __setup_cpu_745x,
  839. .oprofile_cpu_type = "ppc/7450",
  840. .oprofile_type = PPC_OPROFILE_G4,
  841. .machine_check = machine_check_generic,
  842. .platform = "ppc7450",
  843. },
  844. { /* 7455 others */
  845. .pvr_mask = 0xffff0000,
  846. .pvr_value = 0x80010000,
  847. .cpu_name = "7455",
  848. .cpu_features = CPU_FTRS_7455,
  849. .cpu_user_features = COMMON_USER |
  850. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  851. .icache_bsize = 32,
  852. .dcache_bsize = 32,
  853. .num_pmcs = 6,
  854. .cpu_setup = __setup_cpu_745x,
  855. .oprofile_cpu_type = "ppc/7450",
  856. .oprofile_type = PPC_OPROFILE_G4,
  857. .machine_check = machine_check_generic,
  858. .platform = "ppc7450",
  859. },
  860. { /* 7447/7457 Rev 1.0 */
  861. .pvr_mask = 0xffffffff,
  862. .pvr_value = 0x80020100,
  863. .cpu_name = "7447/7457",
  864. .cpu_features = CPU_FTRS_7447_10,
  865. .cpu_user_features = COMMON_USER |
  866. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  867. .icache_bsize = 32,
  868. .dcache_bsize = 32,
  869. .num_pmcs = 6,
  870. .cpu_setup = __setup_cpu_745x,
  871. .oprofile_cpu_type = "ppc/7450",
  872. .oprofile_type = PPC_OPROFILE_G4,
  873. .machine_check = machine_check_generic,
  874. .platform = "ppc7450",
  875. },
  876. { /* 7447/7457 Rev 1.1 */
  877. .pvr_mask = 0xffffffff,
  878. .pvr_value = 0x80020101,
  879. .cpu_name = "7447/7457",
  880. .cpu_features = CPU_FTRS_7447_10,
  881. .cpu_user_features = COMMON_USER |
  882. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  883. .icache_bsize = 32,
  884. .dcache_bsize = 32,
  885. .num_pmcs = 6,
  886. .cpu_setup = __setup_cpu_745x,
  887. .oprofile_cpu_type = "ppc/7450",
  888. .oprofile_type = PPC_OPROFILE_G4,
  889. .machine_check = machine_check_generic,
  890. .platform = "ppc7450",
  891. },
  892. { /* 7447/7457 Rev 1.2 and later */
  893. .pvr_mask = 0xffff0000,
  894. .pvr_value = 0x80020000,
  895. .cpu_name = "7447/7457",
  896. .cpu_features = CPU_FTRS_7447,
  897. .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  898. .icache_bsize = 32,
  899. .dcache_bsize = 32,
  900. .num_pmcs = 6,
  901. .cpu_setup = __setup_cpu_745x,
  902. .oprofile_cpu_type = "ppc/7450",
  903. .oprofile_type = PPC_OPROFILE_G4,
  904. .machine_check = machine_check_generic,
  905. .platform = "ppc7450",
  906. },
  907. { /* 7447A */
  908. .pvr_mask = 0xffff0000,
  909. .pvr_value = 0x80030000,
  910. .cpu_name = "7447A",
  911. .cpu_features = CPU_FTRS_7447A,
  912. .cpu_user_features = COMMON_USER |
  913. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  914. .icache_bsize = 32,
  915. .dcache_bsize = 32,
  916. .num_pmcs = 6,
  917. .cpu_setup = __setup_cpu_745x,
  918. .oprofile_cpu_type = "ppc/7450",
  919. .oprofile_type = PPC_OPROFILE_G4,
  920. .machine_check = machine_check_generic,
  921. .platform = "ppc7450",
  922. },
  923. { /* 7448 */
  924. .pvr_mask = 0xffff0000,
  925. .pvr_value = 0x80040000,
  926. .cpu_name = "7448",
  927. .cpu_features = CPU_FTRS_7448,
  928. .cpu_user_features = COMMON_USER |
  929. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  930. .icache_bsize = 32,
  931. .dcache_bsize = 32,
  932. .num_pmcs = 6,
  933. .cpu_setup = __setup_cpu_745x,
  934. .oprofile_cpu_type = "ppc/7450",
  935. .oprofile_type = PPC_OPROFILE_G4,
  936. .machine_check = machine_check_generic,
  937. .platform = "ppc7450",
  938. },
  939. { /* 82xx (8240, 8245, 8260 are all 603e cores) */
  940. .pvr_mask = 0x7fff0000,
  941. .pvr_value = 0x00810000,
  942. .cpu_name = "82xx",
  943. .cpu_features = CPU_FTRS_82XX,
  944. .cpu_user_features = COMMON_USER,
  945. .icache_bsize = 32,
  946. .dcache_bsize = 32,
  947. .cpu_setup = __setup_cpu_603,
  948. .machine_check = machine_check_generic,
  949. .platform = "ppc603",
  950. },
  951. { /* All G2_LE (603e core, plus some) have the same pvr */
  952. .pvr_mask = 0x7fff0000,
  953. .pvr_value = 0x00820000,
  954. .cpu_name = "G2_LE",
  955. .cpu_features = CPU_FTRS_G2_LE,
  956. .cpu_user_features = COMMON_USER,
  957. .icache_bsize = 32,
  958. .dcache_bsize = 32,
  959. .cpu_setup = __setup_cpu_603,
  960. .machine_check = machine_check_generic,
  961. .platform = "ppc603",
  962. },
  963. { /* e300c1 (a 603e core, plus some) on 83xx */
  964. .pvr_mask = 0x7fff0000,
  965. .pvr_value = 0x00830000,
  966. .cpu_name = "e300c1",
  967. .cpu_features = CPU_FTRS_E300,
  968. .cpu_user_features = COMMON_USER,
  969. .icache_bsize = 32,
  970. .dcache_bsize = 32,
  971. .cpu_setup = __setup_cpu_603,
  972. .machine_check = machine_check_generic,
  973. .platform = "ppc603",
  974. },
  975. { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
  976. .pvr_mask = 0x7fff0000,
  977. .pvr_value = 0x00840000,
  978. .cpu_name = "e300c2",
  979. .cpu_features = CPU_FTRS_E300C2,
  980. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  981. .icache_bsize = 32,
  982. .dcache_bsize = 32,
  983. .cpu_setup = __setup_cpu_603,
  984. .machine_check = machine_check_generic,
  985. .platform = "ppc603",
  986. },
  987. { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
  988. .pvr_mask = 0x7fff0000,
  989. .pvr_value = 0x00850000,
  990. .cpu_name = "e300c3",
  991. .cpu_features = CPU_FTRS_E300,
  992. .cpu_user_features = COMMON_USER,
  993. .icache_bsize = 32,
  994. .dcache_bsize = 32,
  995. .cpu_setup = __setup_cpu_603,
  996. .num_pmcs = 4,
  997. .oprofile_cpu_type = "ppc/e300",
  998. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  999. .platform = "ppc603",
  1000. },
  1001. { /* e300c4 (e300c1, plus one IU) */
  1002. .pvr_mask = 0x7fff0000,
  1003. .pvr_value = 0x00860000,
  1004. .cpu_name = "e300c4",
  1005. .cpu_features = CPU_FTRS_E300,
  1006. .cpu_user_features = COMMON_USER,
  1007. .icache_bsize = 32,
  1008. .dcache_bsize = 32,
  1009. .cpu_setup = __setup_cpu_603,
  1010. .machine_check = machine_check_generic,
  1011. .num_pmcs = 4,
  1012. .oprofile_cpu_type = "ppc/e300",
  1013. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  1014. .platform = "ppc603",
  1015. },
  1016. { /* default match, we assume split I/D cache & TB (non-601)... */
  1017. .pvr_mask = 0x00000000,
  1018. .pvr_value = 0x00000000,
  1019. .cpu_name = "(generic PPC)",
  1020. .cpu_features = CPU_FTRS_CLASSIC32,
  1021. .cpu_user_features = COMMON_USER,
  1022. .icache_bsize = 32,
  1023. .dcache_bsize = 32,
  1024. .machine_check = machine_check_generic,
  1025. .platform = "ppc603",
  1026. },
  1027. #endif /* CLASSIC_PPC */
  1028. #ifdef CONFIG_8xx
  1029. { /* 8xx */
  1030. .pvr_mask = 0xffff0000,
  1031. .pvr_value = 0x00500000,
  1032. .cpu_name = "8xx",
  1033. /* CPU_FTR_MAYBE_CAN_DOZE is possible,
  1034. * if the 8xx code is there.... */
  1035. .cpu_features = CPU_FTRS_8XX,
  1036. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  1037. .icache_bsize = 16,
  1038. .dcache_bsize = 16,
  1039. .platform = "ppc823",
  1040. },
  1041. #endif /* CONFIG_8xx */
  1042. #ifdef CONFIG_40x
  1043. { /* 403GC */
  1044. .pvr_mask = 0xffffff00,
  1045. .pvr_value = 0x00200200,
  1046. .cpu_name = "403GC",
  1047. .cpu_features = CPU_FTRS_40X,
  1048. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  1049. .icache_bsize = 16,
  1050. .dcache_bsize = 16,
  1051. .machine_check = machine_check_4xx,
  1052. .platform = "ppc403",
  1053. },
  1054. { /* 403GCX */
  1055. .pvr_mask = 0xffffff00,
  1056. .pvr_value = 0x00201400,
  1057. .cpu_name = "403GCX",
  1058. .cpu_features = CPU_FTRS_40X,
  1059. .cpu_user_features = PPC_FEATURE_32 |
  1060. PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
  1061. .icache_bsize = 16,
  1062. .dcache_bsize = 16,
  1063. .machine_check = machine_check_4xx,
  1064. .platform = "ppc403",
  1065. },
  1066. { /* 403G ?? */
  1067. .pvr_mask = 0xffff0000,
  1068. .pvr_value = 0x00200000,
  1069. .cpu_name = "403G ??",
  1070. .cpu_features = CPU_FTRS_40X,
  1071. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  1072. .icache_bsize = 16,
  1073. .dcache_bsize = 16,
  1074. .machine_check = machine_check_4xx,
  1075. .platform = "ppc403",
  1076. },
  1077. { /* 405GP */
  1078. .pvr_mask = 0xffff0000,
  1079. .pvr_value = 0x40110000,
  1080. .cpu_name = "405GP",
  1081. .cpu_features = CPU_FTRS_40X,
  1082. .cpu_user_features = PPC_FEATURE_32 |
  1083. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1084. .icache_bsize = 32,
  1085. .dcache_bsize = 32,
  1086. .machine_check = machine_check_4xx,
  1087. .platform = "ppc405",
  1088. },
  1089. { /* STB 03xxx */
  1090. .pvr_mask = 0xffff0000,
  1091. .pvr_value = 0x40130000,
  1092. .cpu_name = "STB03xxx",
  1093. .cpu_features = CPU_FTRS_40X,
  1094. .cpu_user_features = PPC_FEATURE_32 |
  1095. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1096. .icache_bsize = 32,
  1097. .dcache_bsize = 32,
  1098. .machine_check = machine_check_4xx,
  1099. .platform = "ppc405",
  1100. },
  1101. { /* STB 04xxx */
  1102. .pvr_mask = 0xffff0000,
  1103. .pvr_value = 0x41810000,
  1104. .cpu_name = "STB04xxx",
  1105. .cpu_features = CPU_FTRS_40X,
  1106. .cpu_user_features = PPC_FEATURE_32 |
  1107. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1108. .icache_bsize = 32,
  1109. .dcache_bsize = 32,
  1110. .machine_check = machine_check_4xx,
  1111. .platform = "ppc405",
  1112. },
  1113. { /* NP405L */
  1114. .pvr_mask = 0xffff0000,
  1115. .pvr_value = 0x41610000,
  1116. .cpu_name = "NP405L",
  1117. .cpu_features = CPU_FTRS_40X,
  1118. .cpu_user_features = PPC_FEATURE_32 |
  1119. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1120. .icache_bsize = 32,
  1121. .dcache_bsize = 32,
  1122. .machine_check = machine_check_4xx,
  1123. .platform = "ppc405",
  1124. },
  1125. { /* NP4GS3 */
  1126. .pvr_mask = 0xffff0000,
  1127. .pvr_value = 0x40B10000,
  1128. .cpu_name = "NP4GS3",
  1129. .cpu_features = CPU_FTRS_40X,
  1130. .cpu_user_features = PPC_FEATURE_32 |
  1131. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1132. .icache_bsize = 32,
  1133. .dcache_bsize = 32,
  1134. .machine_check = machine_check_4xx,
  1135. .platform = "ppc405",
  1136. },
  1137. { /* NP405H */
  1138. .pvr_mask = 0xffff0000,
  1139. .pvr_value = 0x41410000,
  1140. .cpu_name = "NP405H",
  1141. .cpu_features = CPU_FTRS_40X,
  1142. .cpu_user_features = PPC_FEATURE_32 |
  1143. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1144. .icache_bsize = 32,
  1145. .dcache_bsize = 32,
  1146. .machine_check = machine_check_4xx,
  1147. .platform = "ppc405",
  1148. },
  1149. { /* 405GPr */
  1150. .pvr_mask = 0xffff0000,
  1151. .pvr_value = 0x50910000,
  1152. .cpu_name = "405GPr",
  1153. .cpu_features = CPU_FTRS_40X,
  1154. .cpu_user_features = PPC_FEATURE_32 |
  1155. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1156. .icache_bsize = 32,
  1157. .dcache_bsize = 32,
  1158. .machine_check = machine_check_4xx,
  1159. .platform = "ppc405",
  1160. },
  1161. { /* STBx25xx */
  1162. .pvr_mask = 0xffff0000,
  1163. .pvr_value = 0x51510000,
  1164. .cpu_name = "STBx25xx",
  1165. .cpu_features = CPU_FTRS_40X,
  1166. .cpu_user_features = PPC_FEATURE_32 |
  1167. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1168. .icache_bsize = 32,
  1169. .dcache_bsize = 32,
  1170. .machine_check = machine_check_4xx,
  1171. .platform = "ppc405",
  1172. },
  1173. { /* 405LP */
  1174. .pvr_mask = 0xffff0000,
  1175. .pvr_value = 0x41F10000,
  1176. .cpu_name = "405LP",
  1177. .cpu_features = CPU_FTRS_40X,
  1178. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  1179. .icache_bsize = 32,
  1180. .dcache_bsize = 32,
  1181. .machine_check = machine_check_4xx,
  1182. .platform = "ppc405",
  1183. },
  1184. { /* Xilinx Virtex-II Pro */
  1185. .pvr_mask = 0xfffff000,
  1186. .pvr_value = 0x20010000,
  1187. .cpu_name = "Virtex-II Pro",
  1188. .cpu_features = CPU_FTRS_40X,
  1189. .cpu_user_features = PPC_FEATURE_32 |
  1190. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1191. .icache_bsize = 32,
  1192. .dcache_bsize = 32,
  1193. .machine_check = machine_check_4xx,
  1194. .platform = "ppc405",
  1195. },
  1196. { /* Xilinx Virtex-4 FX */
  1197. .pvr_mask = 0xfffff000,
  1198. .pvr_value = 0x20011000,
  1199. .cpu_name = "Virtex-4 FX",
  1200. .cpu_features = CPU_FTRS_40X,
  1201. .cpu_user_features = PPC_FEATURE_32 |
  1202. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1203. .icache_bsize = 32,
  1204. .dcache_bsize = 32,
  1205. .machine_check = machine_check_4xx,
  1206. .platform = "ppc405",
  1207. },
  1208. { /* 405EP */
  1209. .pvr_mask = 0xffff0000,
  1210. .pvr_value = 0x51210000,
  1211. .cpu_name = "405EP",
  1212. .cpu_features = CPU_FTRS_40X,
  1213. .cpu_user_features = PPC_FEATURE_32 |
  1214. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1215. .icache_bsize = 32,
  1216. .dcache_bsize = 32,
  1217. .machine_check = machine_check_4xx,
  1218. .platform = "ppc405",
  1219. },
  1220. { /* 405EX */
  1221. .pvr_mask = 0xffff0004,
  1222. .pvr_value = 0x12910004,
  1223. .cpu_name = "405EX",
  1224. .cpu_features = CPU_FTRS_40X,
  1225. .cpu_user_features = PPC_FEATURE_32 |
  1226. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1227. .icache_bsize = 32,
  1228. .dcache_bsize = 32,
  1229. .machine_check = machine_check_4xx,
  1230. .platform = "ppc405",
  1231. },
  1232. { /* 405EXr */
  1233. .pvr_mask = 0xffff0004,
  1234. .pvr_value = 0x12910000,
  1235. .cpu_name = "405EXr",
  1236. .cpu_features = CPU_FTRS_40X,
  1237. .cpu_user_features = PPC_FEATURE_32 |
  1238. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1239. .icache_bsize = 32,
  1240. .dcache_bsize = 32,
  1241. .machine_check = machine_check_4xx,
  1242. .platform = "ppc405",
  1243. },
  1244. { /* default match */
  1245. .pvr_mask = 0x00000000,
  1246. .pvr_value = 0x00000000,
  1247. .cpu_name = "(generic 40x PPC)",
  1248. .cpu_features = CPU_FTRS_40X,
  1249. .cpu_user_features = PPC_FEATURE_32 |
  1250. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1251. .icache_bsize = 32,
  1252. .dcache_bsize = 32,
  1253. .machine_check = machine_check_4xx,
  1254. .platform = "ppc405",
  1255. }
  1256. #endif /* CONFIG_40x */
  1257. #ifdef CONFIG_44x
  1258. {
  1259. .pvr_mask = 0xf0000fff,
  1260. .pvr_value = 0x40000850,
  1261. .cpu_name = "440GR Rev. A",
  1262. .cpu_features = CPU_FTRS_44X,
  1263. .cpu_user_features = COMMON_USER_BOOKE,
  1264. .icache_bsize = 32,
  1265. .dcache_bsize = 32,
  1266. .machine_check = machine_check_4xx,
  1267. .platform = "ppc440",
  1268. },
  1269. { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
  1270. .pvr_mask = 0xf0000fff,
  1271. .pvr_value = 0x40000858,
  1272. .cpu_name = "440EP Rev. A",
  1273. .cpu_features = CPU_FTRS_44X,
  1274. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1275. .icache_bsize = 32,
  1276. .dcache_bsize = 32,
  1277. .cpu_setup = __setup_cpu_440ep,
  1278. .machine_check = machine_check_4xx,
  1279. .platform = "ppc440",
  1280. },
  1281. {
  1282. .pvr_mask = 0xf0000fff,
  1283. .pvr_value = 0x400008d3,
  1284. .cpu_name = "440GR Rev. B",
  1285. .cpu_features = CPU_FTRS_44X,
  1286. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1287. .icache_bsize = 32,
  1288. .dcache_bsize = 32,
  1289. .machine_check = machine_check_4xx,
  1290. .platform = "ppc440",
  1291. },
  1292. { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
  1293. .pvr_mask = 0xf0000ff7,
  1294. .pvr_value = 0x400008d4,
  1295. .cpu_name = "440EP Rev. C",
  1296. .cpu_features = CPU_FTRS_44X,
  1297. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1298. .icache_bsize = 32,
  1299. .dcache_bsize = 32,
  1300. .cpu_setup = __setup_cpu_440ep,
  1301. .machine_check = machine_check_4xx,
  1302. .platform = "ppc440",
  1303. },
  1304. { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
  1305. .pvr_mask = 0xf0000fff,
  1306. .pvr_value = 0x400008db,
  1307. .cpu_name = "440EP Rev. B",
  1308. .cpu_features = CPU_FTRS_44X,
  1309. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1310. .icache_bsize = 32,
  1311. .dcache_bsize = 32,
  1312. .cpu_setup = __setup_cpu_440ep,
  1313. .machine_check = machine_check_4xx,
  1314. .platform = "ppc440",
  1315. },
  1316. { /* 440GRX */
  1317. .pvr_mask = 0xf0000ffb,
  1318. .pvr_value = 0x200008D0,
  1319. .cpu_name = "440GRX",
  1320. .cpu_features = CPU_FTRS_44X,
  1321. .cpu_user_features = COMMON_USER_BOOKE,
  1322. .icache_bsize = 32,
  1323. .dcache_bsize = 32,
  1324. .cpu_setup = __setup_cpu_440grx,
  1325. .machine_check = machine_check_440A,
  1326. .platform = "ppc440",
  1327. },
  1328. { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
  1329. .pvr_mask = 0xf0000ffb,
  1330. .pvr_value = 0x200008D8,
  1331. .cpu_name = "440EPX",
  1332. .cpu_features = CPU_FTRS_44X,
  1333. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1334. .icache_bsize = 32,
  1335. .dcache_bsize = 32,
  1336. .cpu_setup = __setup_cpu_440epx,
  1337. .machine_check = machine_check_440A,
  1338. .platform = "ppc440",
  1339. },
  1340. { /* 440GP Rev. B */
  1341. .pvr_mask = 0xf0000fff,
  1342. .pvr_value = 0x40000440,
  1343. .cpu_name = "440GP Rev. B",
  1344. .cpu_features = CPU_FTRS_44X,
  1345. .cpu_user_features = COMMON_USER_BOOKE,
  1346. .icache_bsize = 32,
  1347. .dcache_bsize = 32,
  1348. .machine_check = machine_check_4xx,
  1349. .platform = "ppc440gp",
  1350. },
  1351. { /* 440GP Rev. C */
  1352. .pvr_mask = 0xf0000fff,
  1353. .pvr_value = 0x40000481,
  1354. .cpu_name = "440GP Rev. C",
  1355. .cpu_features = CPU_FTRS_44X,
  1356. .cpu_user_features = COMMON_USER_BOOKE,
  1357. .icache_bsize = 32,
  1358. .dcache_bsize = 32,
  1359. .machine_check = machine_check_4xx,
  1360. .platform = "ppc440gp",
  1361. },
  1362. { /* 440GX Rev. A */
  1363. .pvr_mask = 0xf0000fff,
  1364. .pvr_value = 0x50000850,
  1365. .cpu_name = "440GX Rev. A",
  1366. .cpu_features = CPU_FTRS_44X,
  1367. .cpu_user_features = COMMON_USER_BOOKE,
  1368. .icache_bsize = 32,
  1369. .dcache_bsize = 32,
  1370. .cpu_setup = __setup_cpu_440gx,
  1371. .machine_check = machine_check_440A,
  1372. .platform = "ppc440",
  1373. },
  1374. { /* 440GX Rev. B */
  1375. .pvr_mask = 0xf0000fff,
  1376. .pvr_value = 0x50000851,
  1377. .cpu_name = "440GX Rev. B",
  1378. .cpu_features = CPU_FTRS_44X,
  1379. .cpu_user_features = COMMON_USER_BOOKE,
  1380. .icache_bsize = 32,
  1381. .dcache_bsize = 32,
  1382. .cpu_setup = __setup_cpu_440gx,
  1383. .machine_check = machine_check_440A,
  1384. .platform = "ppc440",
  1385. },
  1386. { /* 440GX Rev. C */
  1387. .pvr_mask = 0xf0000fff,
  1388. .pvr_value = 0x50000892,
  1389. .cpu_name = "440GX Rev. C",
  1390. .cpu_features = CPU_FTRS_44X,
  1391. .cpu_user_features = COMMON_USER_BOOKE,
  1392. .icache_bsize = 32,
  1393. .dcache_bsize = 32,
  1394. .cpu_setup = __setup_cpu_440gx,
  1395. .machine_check = machine_check_440A,
  1396. .platform = "ppc440",
  1397. },
  1398. { /* 440GX Rev. F */
  1399. .pvr_mask = 0xf0000fff,
  1400. .pvr_value = 0x50000894,
  1401. .cpu_name = "440GX Rev. F",
  1402. .cpu_features = CPU_FTRS_44X,
  1403. .cpu_user_features = COMMON_USER_BOOKE,
  1404. .icache_bsize = 32,
  1405. .dcache_bsize = 32,
  1406. .cpu_setup = __setup_cpu_440gx,
  1407. .machine_check = machine_check_440A,
  1408. .platform = "ppc440",
  1409. },
  1410. { /* 440SP Rev. A */
  1411. .pvr_mask = 0xfff00fff,
  1412. .pvr_value = 0x53200891,
  1413. .cpu_name = "440SP Rev. A",
  1414. .cpu_features = CPU_FTRS_44X,
  1415. .cpu_user_features = COMMON_USER_BOOKE,
  1416. .icache_bsize = 32,
  1417. .dcache_bsize = 32,
  1418. .machine_check = machine_check_4xx,
  1419. .platform = "ppc440",
  1420. },
  1421. { /* 440SPe Rev. A */
  1422. .pvr_mask = 0xfff00fff,
  1423. .pvr_value = 0x53400890,
  1424. .cpu_name = "440SPe Rev. A",
  1425. .cpu_features = CPU_FTRS_44X,
  1426. .cpu_user_features = COMMON_USER_BOOKE,
  1427. .icache_bsize = 32,
  1428. .dcache_bsize = 32,
  1429. .cpu_setup = __setup_cpu_440spe,
  1430. .machine_check = machine_check_440A,
  1431. .platform = "ppc440",
  1432. },
  1433. { /* 440SPe Rev. B */
  1434. .pvr_mask = 0xfff00fff,
  1435. .pvr_value = 0x53400891,
  1436. .cpu_name = "440SPe Rev. B",
  1437. .cpu_features = CPU_FTRS_44X,
  1438. .cpu_user_features = COMMON_USER_BOOKE,
  1439. .icache_bsize = 32,
  1440. .dcache_bsize = 32,
  1441. .cpu_setup = __setup_cpu_440spe,
  1442. .machine_check = machine_check_440A,
  1443. .platform = "ppc440",
  1444. },
  1445. { /* 440 in Xilinx Virtex-5 FXT */
  1446. .pvr_mask = 0xfffffff0,
  1447. .pvr_value = 0x7ff21910,
  1448. .cpu_name = "440 in Virtex-5 FXT",
  1449. .cpu_features = CPU_FTRS_44X,
  1450. .cpu_user_features = COMMON_USER_BOOKE,
  1451. .icache_bsize = 32,
  1452. .dcache_bsize = 32,
  1453. .platform = "ppc440",
  1454. },
  1455. { /* 460EX */
  1456. .pvr_mask = 0xffff0002,
  1457. .pvr_value = 0x13020002,
  1458. .cpu_name = "460EX",
  1459. .cpu_features = CPU_FTRS_44X,
  1460. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1461. .icache_bsize = 32,
  1462. .dcache_bsize = 32,
  1463. .cpu_setup = __setup_cpu_460ex,
  1464. .machine_check = machine_check_440A,
  1465. .platform = "ppc440",
  1466. },
  1467. { /* 460GT */
  1468. .pvr_mask = 0xffff0002,
  1469. .pvr_value = 0x13020000,
  1470. .cpu_name = "460GT",
  1471. .cpu_features = CPU_FTRS_44X,
  1472. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1473. .icache_bsize = 32,
  1474. .dcache_bsize = 32,
  1475. .cpu_setup = __setup_cpu_460gt,
  1476. .machine_check = machine_check_440A,
  1477. .platform = "ppc440",
  1478. },
  1479. { /* default match */
  1480. .pvr_mask = 0x00000000,
  1481. .pvr_value = 0x00000000,
  1482. .cpu_name = "(generic 44x PPC)",
  1483. .cpu_features = CPU_FTRS_44X,
  1484. .cpu_user_features = COMMON_USER_BOOKE,
  1485. .icache_bsize = 32,
  1486. .dcache_bsize = 32,
  1487. .machine_check = machine_check_4xx,
  1488. .platform = "ppc440",
  1489. }
  1490. #endif /* CONFIG_44x */
  1491. #ifdef CONFIG_E200
  1492. { /* e200z5 */
  1493. .pvr_mask = 0xfff00000,
  1494. .pvr_value = 0x81000000,
  1495. .cpu_name = "e200z5",
  1496. /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
  1497. .cpu_features = CPU_FTRS_E200,
  1498. .cpu_user_features = COMMON_USER_BOOKE |
  1499. PPC_FEATURE_HAS_EFP_SINGLE |
  1500. PPC_FEATURE_UNIFIED_CACHE,
  1501. .dcache_bsize = 32,
  1502. .machine_check = machine_check_e200,
  1503. .platform = "ppc5554",
  1504. },
  1505. { /* e200z6 */
  1506. .pvr_mask = 0xfff00000,
  1507. .pvr_value = 0x81100000,
  1508. .cpu_name = "e200z6",
  1509. /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
  1510. .cpu_features = CPU_FTRS_E200,
  1511. .cpu_user_features = COMMON_USER_BOOKE |
  1512. PPC_FEATURE_HAS_SPE_COMP |
  1513. PPC_FEATURE_HAS_EFP_SINGLE_COMP |
  1514. PPC_FEATURE_UNIFIED_CACHE,
  1515. .dcache_bsize = 32,
  1516. .machine_check = machine_check_e200,
  1517. .platform = "ppc5554",
  1518. },
  1519. { /* default match */
  1520. .pvr_mask = 0x00000000,
  1521. .pvr_value = 0x00000000,
  1522. .cpu_name = "(generic E200 PPC)",
  1523. .cpu_features = CPU_FTRS_E200,
  1524. .cpu_user_features = COMMON_USER_BOOKE |
  1525. PPC_FEATURE_HAS_EFP_SINGLE |
  1526. PPC_FEATURE_UNIFIED_CACHE,
  1527. .dcache_bsize = 32,
  1528. .machine_check = machine_check_e200,
  1529. .platform = "ppc5554",
  1530. }
  1531. #endif /* CONFIG_E200 */
  1532. #ifdef CONFIG_E500
  1533. { /* e500 */
  1534. .pvr_mask = 0xffff0000,
  1535. .pvr_value = 0x80200000,
  1536. .cpu_name = "e500",
  1537. .cpu_features = CPU_FTRS_E500,
  1538. .cpu_user_features = COMMON_USER_BOOKE |
  1539. PPC_FEATURE_HAS_SPE_COMP |
  1540. PPC_FEATURE_HAS_EFP_SINGLE_COMP,
  1541. .icache_bsize = 32,
  1542. .dcache_bsize = 32,
  1543. .num_pmcs = 4,
  1544. .oprofile_cpu_type = "ppc/e500",
  1545. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  1546. .machine_check = machine_check_e500,
  1547. .platform = "ppc8540",
  1548. },
  1549. { /* e500v2 */
  1550. .pvr_mask = 0xffff0000,
  1551. .pvr_value = 0x80210000,
  1552. .cpu_name = "e500v2",
  1553. .cpu_features = CPU_FTRS_E500_2,
  1554. .cpu_user_features = COMMON_USER_BOOKE |
  1555. PPC_FEATURE_HAS_SPE_COMP |
  1556. PPC_FEATURE_HAS_EFP_SINGLE_COMP |
  1557. PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
  1558. .icache_bsize = 32,
  1559. .dcache_bsize = 32,
  1560. .num_pmcs = 4,
  1561. .oprofile_cpu_type = "ppc/e500",
  1562. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  1563. .machine_check = machine_check_e500,
  1564. .platform = "ppc8548",
  1565. },
  1566. { /* e500mc */
  1567. .pvr_mask = 0xffff0000,
  1568. .pvr_value = 0x80230000,
  1569. .cpu_name = "e500mc",
  1570. .cpu_features = CPU_FTRS_E500MC,
  1571. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1572. .icache_bsize = 64,
  1573. .dcache_bsize = 64,
  1574. .num_pmcs = 4,
  1575. .oprofile_cpu_type = "ppc/e500", /* xxx - galak, e500mc? */
  1576. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  1577. .machine_check = machine_check_e500,
  1578. .platform = "ppce500mc",
  1579. },
  1580. { /* default match */
  1581. .pvr_mask = 0x00000000,
  1582. .pvr_value = 0x00000000,
  1583. .cpu_name = "(generic E500 PPC)",
  1584. .cpu_features = CPU_FTRS_E500,
  1585. .cpu_user_features = COMMON_USER_BOOKE |
  1586. PPC_FEATURE_HAS_SPE_COMP |
  1587. PPC_FEATURE_HAS_EFP_SINGLE_COMP,
  1588. .icache_bsize = 32,
  1589. .dcache_bsize = 32,
  1590. .machine_check = machine_check_e500,
  1591. .platform = "powerpc",
  1592. }
  1593. #endif /* CONFIG_E500 */
  1594. #endif /* CONFIG_PPC32 */
  1595. };
  1596. static struct cpu_spec the_cpu_spec;
  1597. struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
  1598. {
  1599. struct cpu_spec *s = cpu_specs;
  1600. struct cpu_spec *t = &the_cpu_spec;
  1601. int i;
  1602. s = PTRRELOC(s);
  1603. t = PTRRELOC(t);
  1604. for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++)
  1605. if ((pvr & s->pvr_mask) == s->pvr_value) {
  1606. /*
  1607. * If we are overriding a previous value derived
  1608. * from the real PVR with a new value obtained
  1609. * using a logical PVR value, don't modify the
  1610. * performance monitor fields.
  1611. */
  1612. if (t->num_pmcs && !s->num_pmcs) {
  1613. t->cpu_name = s->cpu_name;
  1614. t->cpu_features = s->cpu_features;
  1615. t->cpu_user_features = s->cpu_user_features;
  1616. t->icache_bsize = s->icache_bsize;
  1617. t->dcache_bsize = s->dcache_bsize;
  1618. t->cpu_setup = s->cpu_setup;
  1619. t->cpu_restore = s->cpu_restore;
  1620. t->platform = s->platform;
  1621. } else
  1622. *t = *s;
  1623. *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
  1624. #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
  1625. /* ppc64 and booke expect identify_cpu to also call
  1626. * setup_cpu for that processor. I will consolidate
  1627. * that at a later time, for now, just use #ifdef.
  1628. * we also don't need to PTRRELOC the function pointer
  1629. * on ppc64 and booke as we are running at 0 in real
  1630. * mode on ppc64 and reloc_offset is always 0 on booke.
  1631. */
  1632. if (s->cpu_setup) {
  1633. s->cpu_setup(offset, s);
  1634. }
  1635. #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
  1636. return s;
  1637. }
  1638. BUG();
  1639. return NULL;
  1640. }