cputable.c 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284
  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/export.h>
  17. #include <linux/jump_label.h>
  18. #include <asm/oprofile_impl.h>
  19. #include <asm/cputable.h>
  20. #include <asm/prom.h> /* for PTRRELOC on ARCH=ppc */
  21. #include <asm/mmu.h>
  22. #include <asm/setup.h>
  23. struct cpu_spec* cur_cpu_spec = NULL;
  24. EXPORT_SYMBOL(cur_cpu_spec);
  25. /* The platform string corresponding to the real PVR */
  26. const char *powerpc_base_platform;
  27. /* NOTE:
  28. * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
  29. * the responsibility of the appropriate CPU save/restore functions to
  30. * eventually copy these settings over. Those save/restore aren't yet
  31. * part of the cputable though. That has to be fixed for both ppc32
  32. * and ppc64
  33. */
  34. #ifdef CONFIG_PPC32
  35. extern void __setup_cpu_e200(unsigned long offset, struct cpu_spec* spec);
  36. extern void __setup_cpu_e500v1(unsigned long offset, struct cpu_spec* spec);
  37. extern void __setup_cpu_e500v2(unsigned long offset, struct cpu_spec* spec);
  38. extern void __setup_cpu_e500mc(unsigned long offset, struct cpu_spec* spec);
  39. extern void __setup_cpu_440ep(unsigned long offset, struct cpu_spec* spec);
  40. extern void __setup_cpu_440epx(unsigned long offset, struct cpu_spec* spec);
  41. extern void __setup_cpu_440gx(unsigned long offset, struct cpu_spec* spec);
  42. extern void __setup_cpu_440grx(unsigned long offset, struct cpu_spec* spec);
  43. extern void __setup_cpu_440spe(unsigned long offset, struct cpu_spec* spec);
  44. extern void __setup_cpu_440x5(unsigned long offset, struct cpu_spec* spec);
  45. extern void __setup_cpu_460ex(unsigned long offset, struct cpu_spec* spec);
  46. extern void __setup_cpu_460gt(unsigned long offset, struct cpu_spec* spec);
  47. extern void __setup_cpu_460sx(unsigned long offset, struct cpu_spec *spec);
  48. extern void __setup_cpu_apm821xx(unsigned long offset, struct cpu_spec *spec);
  49. extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
  50. extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
  51. extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
  52. extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
  53. extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
  54. extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
  55. extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
  56. extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
  57. #endif /* CONFIG_PPC32 */
  58. #ifdef CONFIG_PPC64
  59. extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
  60. extern void __setup_cpu_ppc970MP(unsigned long offset, struct cpu_spec* spec);
  61. extern void __setup_cpu_pa6t(unsigned long offset, struct cpu_spec* spec);
  62. extern void __restore_cpu_pa6t(void);
  63. extern void __restore_cpu_ppc970(void);
  64. extern void __setup_cpu_power7(unsigned long offset, struct cpu_spec* spec);
  65. extern void __restore_cpu_power7(void);
  66. extern void __setup_cpu_power8(unsigned long offset, struct cpu_spec* spec);
  67. extern void __restore_cpu_power8(void);
  68. extern void __setup_cpu_power9(unsigned long offset, struct cpu_spec* spec);
  69. extern void __restore_cpu_power9(void);
  70. extern void __flush_tlb_power7(unsigned int action);
  71. extern void __flush_tlb_power8(unsigned int action);
  72. extern void __flush_tlb_power9(unsigned int action);
  73. extern long __machine_check_early_realmode_p7(struct pt_regs *regs);
  74. extern long __machine_check_early_realmode_p8(struct pt_regs *regs);
  75. #endif /* CONFIG_PPC64 */
  76. #if defined(CONFIG_E500)
  77. extern void __setup_cpu_e5500(unsigned long offset, struct cpu_spec* spec);
  78. extern void __setup_cpu_e6500(unsigned long offset, struct cpu_spec* spec);
  79. extern void __restore_cpu_e5500(void);
  80. extern void __restore_cpu_e6500(void);
  81. #endif /* CONFIG_E500 */
  82. /* This table only contains "desktop" CPUs, it need to be filled with embedded
  83. * ones as well...
  84. */
  85. #define COMMON_USER (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \
  86. PPC_FEATURE_HAS_MMU)
  87. #define COMMON_USER_PPC64 (COMMON_USER | PPC_FEATURE_64)
  88. #define COMMON_USER_POWER4 (COMMON_USER_PPC64 | PPC_FEATURE_POWER4)
  89. #define COMMON_USER_POWER5 (COMMON_USER_PPC64 | PPC_FEATURE_POWER5 |\
  90. PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
  91. #define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
  92. PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
  93. #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
  94. PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
  95. PPC_FEATURE_TRUE_LE | \
  96. PPC_FEATURE_PSERIES_PERFMON_COMPAT)
  97. #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
  98. PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
  99. PPC_FEATURE_TRUE_LE | \
  100. PPC_FEATURE_PSERIES_PERFMON_COMPAT)
  101. #define COMMON_USER2_POWER7 (PPC_FEATURE2_DSCR)
  102. #define COMMON_USER_POWER8 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
  103. PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
  104. PPC_FEATURE_TRUE_LE | \
  105. PPC_FEATURE_PSERIES_PERFMON_COMPAT)
  106. #define COMMON_USER2_POWER8 (PPC_FEATURE2_ARCH_2_07 | \
  107. PPC_FEATURE2_HTM_COMP | \
  108. PPC_FEATURE2_HTM_NOSC_COMP | \
  109. PPC_FEATURE2_DSCR | \
  110. PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
  111. PPC_FEATURE2_VEC_CRYPTO)
  112. #define COMMON_USER_PA6T (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
  113. PPC_FEATURE_TRUE_LE | \
  114. PPC_FEATURE_HAS_ALTIVEC_COMP)
  115. #define COMMON_USER_POWER9 COMMON_USER_POWER8
  116. #define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
  117. PPC_FEATURE2_ARCH_3_00 | \
  118. PPC_FEATURE2_HAS_IEEE128)
  119. #ifdef CONFIG_PPC_BOOK3E_64
  120. #define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)
  121. #else
  122. #define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
  123. PPC_FEATURE_BOOKE)
  124. #endif
  125. static struct cpu_spec __initdata cpu_specs[] = {
  126. #ifdef CONFIG_PPC_BOOK3S_64
  127. { /* Power4 */
  128. .pvr_mask = 0xffff0000,
  129. .pvr_value = 0x00350000,
  130. .cpu_name = "POWER4 (gp)",
  131. .cpu_features = CPU_FTRS_POWER4,
  132. .cpu_user_features = COMMON_USER_POWER4,
  133. .mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
  134. .icache_bsize = 128,
  135. .dcache_bsize = 128,
  136. .num_pmcs = 8,
  137. .pmc_type = PPC_PMC_IBM,
  138. .oprofile_cpu_type = "ppc64/power4",
  139. .oprofile_type = PPC_OPROFILE_POWER4,
  140. .platform = "power4",
  141. },
  142. { /* Power4+ */
  143. .pvr_mask = 0xffff0000,
  144. .pvr_value = 0x00380000,
  145. .cpu_name = "POWER4+ (gq)",
  146. .cpu_features = CPU_FTRS_POWER4,
  147. .cpu_user_features = COMMON_USER_POWER4,
  148. .mmu_features = MMU_FTRS_POWER4 | MMU_FTR_TLBIE_CROP_VA,
  149. .icache_bsize = 128,
  150. .dcache_bsize = 128,
  151. .num_pmcs = 8,
  152. .pmc_type = PPC_PMC_IBM,
  153. .oprofile_cpu_type = "ppc64/power4",
  154. .oprofile_type = PPC_OPROFILE_POWER4,
  155. .platform = "power4",
  156. },
  157. { /* PPC970 */
  158. .pvr_mask = 0xffff0000,
  159. .pvr_value = 0x00390000,
  160. .cpu_name = "PPC970",
  161. .cpu_features = CPU_FTRS_PPC970,
  162. .cpu_user_features = COMMON_USER_POWER4 |
  163. PPC_FEATURE_HAS_ALTIVEC_COMP,
  164. .mmu_features = MMU_FTRS_PPC970,
  165. .icache_bsize = 128,
  166. .dcache_bsize = 128,
  167. .num_pmcs = 8,
  168. .pmc_type = PPC_PMC_IBM,
  169. .cpu_setup = __setup_cpu_ppc970,
  170. .cpu_restore = __restore_cpu_ppc970,
  171. .oprofile_cpu_type = "ppc64/970",
  172. .oprofile_type = PPC_OPROFILE_POWER4,
  173. .platform = "ppc970",
  174. },
  175. { /* PPC970FX */
  176. .pvr_mask = 0xffff0000,
  177. .pvr_value = 0x003c0000,
  178. .cpu_name = "PPC970FX",
  179. .cpu_features = CPU_FTRS_PPC970,
  180. .cpu_user_features = COMMON_USER_POWER4 |
  181. PPC_FEATURE_HAS_ALTIVEC_COMP,
  182. .mmu_features = MMU_FTRS_PPC970,
  183. .icache_bsize = 128,
  184. .dcache_bsize = 128,
  185. .num_pmcs = 8,
  186. .pmc_type = PPC_PMC_IBM,
  187. .cpu_setup = __setup_cpu_ppc970,
  188. .cpu_restore = __restore_cpu_ppc970,
  189. .oprofile_cpu_type = "ppc64/970",
  190. .oprofile_type = PPC_OPROFILE_POWER4,
  191. .platform = "ppc970",
  192. },
  193. { /* PPC970MP DD1.0 - no DEEPNAP, use regular 970 init */
  194. .pvr_mask = 0xffffffff,
  195. .pvr_value = 0x00440100,
  196. .cpu_name = "PPC970MP",
  197. .cpu_features = CPU_FTRS_PPC970,
  198. .cpu_user_features = COMMON_USER_POWER4 |
  199. PPC_FEATURE_HAS_ALTIVEC_COMP,
  200. .mmu_features = MMU_FTRS_PPC970,
  201. .icache_bsize = 128,
  202. .dcache_bsize = 128,
  203. .num_pmcs = 8,
  204. .pmc_type = PPC_PMC_IBM,
  205. .cpu_setup = __setup_cpu_ppc970,
  206. .cpu_restore = __restore_cpu_ppc970,
  207. .oprofile_cpu_type = "ppc64/970MP",
  208. .oprofile_type = PPC_OPROFILE_POWER4,
  209. .platform = "ppc970",
  210. },
  211. { /* PPC970MP */
  212. .pvr_mask = 0xffff0000,
  213. .pvr_value = 0x00440000,
  214. .cpu_name = "PPC970MP",
  215. .cpu_features = CPU_FTRS_PPC970,
  216. .cpu_user_features = COMMON_USER_POWER4 |
  217. PPC_FEATURE_HAS_ALTIVEC_COMP,
  218. .mmu_features = MMU_FTRS_PPC970,
  219. .icache_bsize = 128,
  220. .dcache_bsize = 128,
  221. .num_pmcs = 8,
  222. .pmc_type = PPC_PMC_IBM,
  223. .cpu_setup = __setup_cpu_ppc970MP,
  224. .cpu_restore = __restore_cpu_ppc970,
  225. .oprofile_cpu_type = "ppc64/970MP",
  226. .oprofile_type = PPC_OPROFILE_POWER4,
  227. .platform = "ppc970",
  228. },
  229. { /* PPC970GX */
  230. .pvr_mask = 0xffff0000,
  231. .pvr_value = 0x00450000,
  232. .cpu_name = "PPC970GX",
  233. .cpu_features = CPU_FTRS_PPC970,
  234. .cpu_user_features = COMMON_USER_POWER4 |
  235. PPC_FEATURE_HAS_ALTIVEC_COMP,
  236. .mmu_features = MMU_FTRS_PPC970,
  237. .icache_bsize = 128,
  238. .dcache_bsize = 128,
  239. .num_pmcs = 8,
  240. .pmc_type = PPC_PMC_IBM,
  241. .cpu_setup = __setup_cpu_ppc970,
  242. .oprofile_cpu_type = "ppc64/970",
  243. .oprofile_type = PPC_OPROFILE_POWER4,
  244. .platform = "ppc970",
  245. },
  246. { /* Power5 GR */
  247. .pvr_mask = 0xffff0000,
  248. .pvr_value = 0x003a0000,
  249. .cpu_name = "POWER5 (gr)",
  250. .cpu_features = CPU_FTRS_POWER5,
  251. .cpu_user_features = COMMON_USER_POWER5,
  252. .mmu_features = MMU_FTRS_POWER5,
  253. .icache_bsize = 128,
  254. .dcache_bsize = 128,
  255. .num_pmcs = 6,
  256. .pmc_type = PPC_PMC_IBM,
  257. .oprofile_cpu_type = "ppc64/power5",
  258. .oprofile_type = PPC_OPROFILE_POWER4,
  259. /* SIHV / SIPR bits are implemented on POWER4+ (GQ)
  260. * and above but only works on POWER5 and above
  261. */
  262. .oprofile_mmcra_sihv = MMCRA_SIHV,
  263. .oprofile_mmcra_sipr = MMCRA_SIPR,
  264. .platform = "power5",
  265. },
  266. { /* Power5++ */
  267. .pvr_mask = 0xffffff00,
  268. .pvr_value = 0x003b0300,
  269. .cpu_name = "POWER5+ (gs)",
  270. .cpu_features = CPU_FTRS_POWER5,
  271. .cpu_user_features = COMMON_USER_POWER5_PLUS,
  272. .mmu_features = MMU_FTRS_POWER5,
  273. .icache_bsize = 128,
  274. .dcache_bsize = 128,
  275. .num_pmcs = 6,
  276. .oprofile_cpu_type = "ppc64/power5++",
  277. .oprofile_type = PPC_OPROFILE_POWER4,
  278. .oprofile_mmcra_sihv = MMCRA_SIHV,
  279. .oprofile_mmcra_sipr = MMCRA_SIPR,
  280. .platform = "power5+",
  281. },
  282. { /* Power5 GS */
  283. .pvr_mask = 0xffff0000,
  284. .pvr_value = 0x003b0000,
  285. .cpu_name = "POWER5+ (gs)",
  286. .cpu_features = CPU_FTRS_POWER5,
  287. .cpu_user_features = COMMON_USER_POWER5_PLUS,
  288. .mmu_features = MMU_FTRS_POWER5,
  289. .icache_bsize = 128,
  290. .dcache_bsize = 128,
  291. .num_pmcs = 6,
  292. .pmc_type = PPC_PMC_IBM,
  293. .oprofile_cpu_type = "ppc64/power5+",
  294. .oprofile_type = PPC_OPROFILE_POWER4,
  295. .oprofile_mmcra_sihv = MMCRA_SIHV,
  296. .oprofile_mmcra_sipr = MMCRA_SIPR,
  297. .platform = "power5+",
  298. },
  299. { /* POWER6 in P5+ mode; 2.04-compliant processor */
  300. .pvr_mask = 0xffffffff,
  301. .pvr_value = 0x0f000001,
  302. .cpu_name = "POWER5+",
  303. .cpu_features = CPU_FTRS_POWER5,
  304. .cpu_user_features = COMMON_USER_POWER5_PLUS,
  305. .mmu_features = MMU_FTRS_POWER5,
  306. .icache_bsize = 128,
  307. .dcache_bsize = 128,
  308. .oprofile_cpu_type = "ppc64/ibm-compat-v1",
  309. .oprofile_type = PPC_OPROFILE_POWER4,
  310. .platform = "power5+",
  311. },
  312. { /* Power6 */
  313. .pvr_mask = 0xffff0000,
  314. .pvr_value = 0x003e0000,
  315. .cpu_name = "POWER6 (raw)",
  316. .cpu_features = CPU_FTRS_POWER6,
  317. .cpu_user_features = COMMON_USER_POWER6 |
  318. PPC_FEATURE_POWER6_EXT,
  319. .mmu_features = MMU_FTRS_POWER6,
  320. .icache_bsize = 128,
  321. .dcache_bsize = 128,
  322. .num_pmcs = 6,
  323. .pmc_type = PPC_PMC_IBM,
  324. .oprofile_cpu_type = "ppc64/power6",
  325. .oprofile_type = PPC_OPROFILE_POWER4,
  326. .oprofile_mmcra_sihv = POWER6_MMCRA_SIHV,
  327. .oprofile_mmcra_sipr = POWER6_MMCRA_SIPR,
  328. .oprofile_mmcra_clear = POWER6_MMCRA_THRM |
  329. POWER6_MMCRA_OTHER,
  330. .platform = "power6x",
  331. },
  332. { /* 2.05-compliant processor, i.e. Power6 "architected" mode */
  333. .pvr_mask = 0xffffffff,
  334. .pvr_value = 0x0f000002,
  335. .cpu_name = "POWER6 (architected)",
  336. .cpu_features = CPU_FTRS_POWER6,
  337. .cpu_user_features = COMMON_USER_POWER6,
  338. .mmu_features = MMU_FTRS_POWER6,
  339. .icache_bsize = 128,
  340. .dcache_bsize = 128,
  341. .oprofile_cpu_type = "ppc64/ibm-compat-v1",
  342. .oprofile_type = PPC_OPROFILE_POWER4,
  343. .platform = "power6",
  344. },
  345. { /* 2.06-compliant processor, i.e. Power7 "architected" mode */
  346. .pvr_mask = 0xffffffff,
  347. .pvr_value = 0x0f000003,
  348. .cpu_name = "POWER7 (architected)",
  349. .cpu_features = CPU_FTRS_POWER7,
  350. .cpu_user_features = COMMON_USER_POWER7,
  351. .cpu_user_features2 = COMMON_USER2_POWER7,
  352. .mmu_features = MMU_FTRS_POWER7,
  353. .icache_bsize = 128,
  354. .dcache_bsize = 128,
  355. .oprofile_type = PPC_OPROFILE_POWER4,
  356. .oprofile_cpu_type = "ppc64/ibm-compat-v1",
  357. .cpu_setup = __setup_cpu_power7,
  358. .cpu_restore = __restore_cpu_power7,
  359. .flush_tlb = __flush_tlb_power7,
  360. .machine_check_early = __machine_check_early_realmode_p7,
  361. .platform = "power7",
  362. },
  363. { /* 2.07-compliant processor, i.e. Power8 "architected" mode */
  364. .pvr_mask = 0xffffffff,
  365. .pvr_value = 0x0f000004,
  366. .cpu_name = "POWER8 (architected)",
  367. .cpu_features = CPU_FTRS_POWER8,
  368. .cpu_user_features = COMMON_USER_POWER8,
  369. .cpu_user_features2 = COMMON_USER2_POWER8,
  370. .mmu_features = MMU_FTRS_POWER8,
  371. .icache_bsize = 128,
  372. .dcache_bsize = 128,
  373. .oprofile_type = PPC_OPROFILE_INVALID,
  374. .oprofile_cpu_type = "ppc64/ibm-compat-v1",
  375. .cpu_setup = __setup_cpu_power8,
  376. .cpu_restore = __restore_cpu_power8,
  377. .flush_tlb = __flush_tlb_power8,
  378. .machine_check_early = __machine_check_early_realmode_p8,
  379. .platform = "power8",
  380. },
  381. { /* Power7 */
  382. .pvr_mask = 0xffff0000,
  383. .pvr_value = 0x003f0000,
  384. .cpu_name = "POWER7 (raw)",
  385. .cpu_features = CPU_FTRS_POWER7,
  386. .cpu_user_features = COMMON_USER_POWER7,
  387. .cpu_user_features2 = COMMON_USER2_POWER7,
  388. .mmu_features = MMU_FTRS_POWER7,
  389. .icache_bsize = 128,
  390. .dcache_bsize = 128,
  391. .num_pmcs = 6,
  392. .pmc_type = PPC_PMC_IBM,
  393. .oprofile_cpu_type = "ppc64/power7",
  394. .oprofile_type = PPC_OPROFILE_POWER4,
  395. .cpu_setup = __setup_cpu_power7,
  396. .cpu_restore = __restore_cpu_power7,
  397. .flush_tlb = __flush_tlb_power7,
  398. .machine_check_early = __machine_check_early_realmode_p7,
  399. .platform = "power7",
  400. },
  401. { /* Power7+ */
  402. .pvr_mask = 0xffff0000,
  403. .pvr_value = 0x004A0000,
  404. .cpu_name = "POWER7+ (raw)",
  405. .cpu_features = CPU_FTRS_POWER7,
  406. .cpu_user_features = COMMON_USER_POWER7,
  407. .cpu_user_features2 = COMMON_USER2_POWER7,
  408. .mmu_features = MMU_FTRS_POWER7,
  409. .icache_bsize = 128,
  410. .dcache_bsize = 128,
  411. .num_pmcs = 6,
  412. .pmc_type = PPC_PMC_IBM,
  413. .oprofile_cpu_type = "ppc64/power7",
  414. .oprofile_type = PPC_OPROFILE_POWER4,
  415. .cpu_setup = __setup_cpu_power7,
  416. .cpu_restore = __restore_cpu_power7,
  417. .flush_tlb = __flush_tlb_power7,
  418. .machine_check_early = __machine_check_early_realmode_p7,
  419. .platform = "power7+",
  420. },
  421. { /* Power8E */
  422. .pvr_mask = 0xffff0000,
  423. .pvr_value = 0x004b0000,
  424. .cpu_name = "POWER8E (raw)",
  425. .cpu_features = CPU_FTRS_POWER8E,
  426. .cpu_user_features = COMMON_USER_POWER8,
  427. .cpu_user_features2 = COMMON_USER2_POWER8,
  428. .mmu_features = MMU_FTRS_POWER8,
  429. .icache_bsize = 128,
  430. .dcache_bsize = 128,
  431. .num_pmcs = 6,
  432. .pmc_type = PPC_PMC_IBM,
  433. .oprofile_cpu_type = "ppc64/power8",
  434. .oprofile_type = PPC_OPROFILE_INVALID,
  435. .cpu_setup = __setup_cpu_power8,
  436. .cpu_restore = __restore_cpu_power8,
  437. .flush_tlb = __flush_tlb_power8,
  438. .machine_check_early = __machine_check_early_realmode_p8,
  439. .platform = "power8",
  440. },
  441. { /* Power8NVL */
  442. .pvr_mask = 0xffff0000,
  443. .pvr_value = 0x004c0000,
  444. .cpu_name = "POWER8NVL (raw)",
  445. .cpu_features = CPU_FTRS_POWER8,
  446. .cpu_user_features = COMMON_USER_POWER8,
  447. .cpu_user_features2 = COMMON_USER2_POWER8,
  448. .mmu_features = MMU_FTRS_POWER8,
  449. .icache_bsize = 128,
  450. .dcache_bsize = 128,
  451. .num_pmcs = 6,
  452. .pmc_type = PPC_PMC_IBM,
  453. .oprofile_cpu_type = "ppc64/power8",
  454. .oprofile_type = PPC_OPROFILE_INVALID,
  455. .cpu_setup = __setup_cpu_power8,
  456. .cpu_restore = __restore_cpu_power8,
  457. .flush_tlb = __flush_tlb_power8,
  458. .machine_check_early = __machine_check_early_realmode_p8,
  459. .platform = "power8",
  460. },
  461. { /* Power8 DD1: Does not support doorbell IPIs */
  462. .pvr_mask = 0xffffff00,
  463. .pvr_value = 0x004d0100,
  464. .cpu_name = "POWER8 (raw)",
  465. .cpu_features = CPU_FTRS_POWER8_DD1,
  466. .cpu_user_features = COMMON_USER_POWER8,
  467. .cpu_user_features2 = COMMON_USER2_POWER8,
  468. .mmu_features = MMU_FTRS_POWER8,
  469. .icache_bsize = 128,
  470. .dcache_bsize = 128,
  471. .num_pmcs = 6,
  472. .pmc_type = PPC_PMC_IBM,
  473. .oprofile_cpu_type = "ppc64/power8",
  474. .oprofile_type = PPC_OPROFILE_INVALID,
  475. .cpu_setup = __setup_cpu_power8,
  476. .cpu_restore = __restore_cpu_power8,
  477. .flush_tlb = __flush_tlb_power8,
  478. .machine_check_early = __machine_check_early_realmode_p8,
  479. .platform = "power8",
  480. },
  481. { /* Power8 */
  482. .pvr_mask = 0xffff0000,
  483. .pvr_value = 0x004d0000,
  484. .cpu_name = "POWER8 (raw)",
  485. .cpu_features = CPU_FTRS_POWER8,
  486. .cpu_user_features = COMMON_USER_POWER8,
  487. .cpu_user_features2 = COMMON_USER2_POWER8,
  488. .mmu_features = MMU_FTRS_POWER8,
  489. .icache_bsize = 128,
  490. .dcache_bsize = 128,
  491. .num_pmcs = 6,
  492. .pmc_type = PPC_PMC_IBM,
  493. .oprofile_cpu_type = "ppc64/power8",
  494. .oprofile_type = PPC_OPROFILE_INVALID,
  495. .cpu_setup = __setup_cpu_power8,
  496. .cpu_restore = __restore_cpu_power8,
  497. .flush_tlb = __flush_tlb_power8,
  498. .machine_check_early = __machine_check_early_realmode_p8,
  499. .platform = "power8",
  500. },
  501. { /* Power9 DD1*/
  502. .pvr_mask = 0xffffff00,
  503. .pvr_value = 0x004e0100,
  504. .cpu_name = "POWER9 (raw)",
  505. .cpu_features = CPU_FTRS_POWER9_DD1,
  506. .cpu_user_features = COMMON_USER_POWER9,
  507. .cpu_user_features2 = COMMON_USER2_POWER9,
  508. .mmu_features = MMU_FTRS_POWER9,
  509. .icache_bsize = 128,
  510. .dcache_bsize = 128,
  511. .num_pmcs = 6,
  512. .pmc_type = PPC_PMC_IBM,
  513. .oprofile_cpu_type = "ppc64/power9",
  514. .oprofile_type = PPC_OPROFILE_INVALID,
  515. .cpu_setup = __setup_cpu_power9,
  516. .cpu_restore = __restore_cpu_power9,
  517. .flush_tlb = __flush_tlb_power9,
  518. .platform = "power9",
  519. },
  520. { /* Power9 */
  521. .pvr_mask = 0xffff0000,
  522. .pvr_value = 0x004e0000,
  523. .cpu_name = "POWER9 (raw)",
  524. .cpu_features = CPU_FTRS_POWER9,
  525. .cpu_user_features = COMMON_USER_POWER9,
  526. .cpu_user_features2 = COMMON_USER2_POWER9,
  527. .mmu_features = MMU_FTRS_POWER9,
  528. .icache_bsize = 128,
  529. .dcache_bsize = 128,
  530. .num_pmcs = 6,
  531. .pmc_type = PPC_PMC_IBM,
  532. .oprofile_cpu_type = "ppc64/power9",
  533. .oprofile_type = PPC_OPROFILE_INVALID,
  534. .cpu_setup = __setup_cpu_power9,
  535. .cpu_restore = __restore_cpu_power9,
  536. .flush_tlb = __flush_tlb_power9,
  537. .platform = "power9",
  538. },
  539. { /* Cell Broadband Engine */
  540. .pvr_mask = 0xffff0000,
  541. .pvr_value = 0x00700000,
  542. .cpu_name = "Cell Broadband Engine",
  543. .cpu_features = CPU_FTRS_CELL,
  544. .cpu_user_features = COMMON_USER_PPC64 |
  545. PPC_FEATURE_CELL | PPC_FEATURE_HAS_ALTIVEC_COMP |
  546. PPC_FEATURE_SMT,
  547. .mmu_features = MMU_FTRS_CELL,
  548. .icache_bsize = 128,
  549. .dcache_bsize = 128,
  550. .num_pmcs = 4,
  551. .pmc_type = PPC_PMC_IBM,
  552. .oprofile_cpu_type = "ppc64/cell-be",
  553. .oprofile_type = PPC_OPROFILE_CELL,
  554. .platform = "ppc-cell-be",
  555. },
  556. { /* PA Semi PA6T */
  557. .pvr_mask = 0x7fff0000,
  558. .pvr_value = 0x00900000,
  559. .cpu_name = "PA6T",
  560. .cpu_features = CPU_FTRS_PA6T,
  561. .cpu_user_features = COMMON_USER_PA6T,
  562. .mmu_features = MMU_FTRS_PA6T,
  563. .icache_bsize = 64,
  564. .dcache_bsize = 64,
  565. .num_pmcs = 6,
  566. .pmc_type = PPC_PMC_PA6T,
  567. .cpu_setup = __setup_cpu_pa6t,
  568. .cpu_restore = __restore_cpu_pa6t,
  569. .oprofile_cpu_type = "ppc64/pa6t",
  570. .oprofile_type = PPC_OPROFILE_PA6T,
  571. .platform = "pa6t",
  572. },
  573. { /* default match */
  574. .pvr_mask = 0x00000000,
  575. .pvr_value = 0x00000000,
  576. .cpu_name = "POWER4 (compatible)",
  577. .cpu_features = CPU_FTRS_COMPATIBLE,
  578. .cpu_user_features = COMMON_USER_PPC64,
  579. .mmu_features = MMU_FTRS_DEFAULT_HPTE_ARCH_V2,
  580. .icache_bsize = 128,
  581. .dcache_bsize = 128,
  582. .num_pmcs = 6,
  583. .pmc_type = PPC_PMC_IBM,
  584. .platform = "power4",
  585. }
  586. #endif /* CONFIG_PPC_BOOK3S_64 */
  587. #ifdef CONFIG_PPC32
  588. #ifdef CONFIG_PPC_BOOK3S_32
  589. { /* 601 */
  590. .pvr_mask = 0xffff0000,
  591. .pvr_value = 0x00010000,
  592. .cpu_name = "601",
  593. .cpu_features = CPU_FTRS_PPC601,
  594. .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
  595. PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
  596. .mmu_features = MMU_FTR_HPTE_TABLE,
  597. .icache_bsize = 32,
  598. .dcache_bsize = 32,
  599. .machine_check = machine_check_generic,
  600. .platform = "ppc601",
  601. },
  602. { /* 603 */
  603. .pvr_mask = 0xffff0000,
  604. .pvr_value = 0x00030000,
  605. .cpu_name = "603",
  606. .cpu_features = CPU_FTRS_603,
  607. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  608. .mmu_features = 0,
  609. .icache_bsize = 32,
  610. .dcache_bsize = 32,
  611. .cpu_setup = __setup_cpu_603,
  612. .machine_check = machine_check_generic,
  613. .platform = "ppc603",
  614. },
  615. { /* 603e */
  616. .pvr_mask = 0xffff0000,
  617. .pvr_value = 0x00060000,
  618. .cpu_name = "603e",
  619. .cpu_features = CPU_FTRS_603,
  620. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  621. .mmu_features = 0,
  622. .icache_bsize = 32,
  623. .dcache_bsize = 32,
  624. .cpu_setup = __setup_cpu_603,
  625. .machine_check = machine_check_generic,
  626. .platform = "ppc603",
  627. },
  628. { /* 603ev */
  629. .pvr_mask = 0xffff0000,
  630. .pvr_value = 0x00070000,
  631. .cpu_name = "603ev",
  632. .cpu_features = CPU_FTRS_603,
  633. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  634. .mmu_features = 0,
  635. .icache_bsize = 32,
  636. .dcache_bsize = 32,
  637. .cpu_setup = __setup_cpu_603,
  638. .machine_check = machine_check_generic,
  639. .platform = "ppc603",
  640. },
  641. { /* 604 */
  642. .pvr_mask = 0xffff0000,
  643. .pvr_value = 0x00040000,
  644. .cpu_name = "604",
  645. .cpu_features = CPU_FTRS_604,
  646. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  647. .mmu_features = MMU_FTR_HPTE_TABLE,
  648. .icache_bsize = 32,
  649. .dcache_bsize = 32,
  650. .num_pmcs = 2,
  651. .cpu_setup = __setup_cpu_604,
  652. .machine_check = machine_check_generic,
  653. .platform = "ppc604",
  654. },
  655. { /* 604e */
  656. .pvr_mask = 0xfffff000,
  657. .pvr_value = 0x00090000,
  658. .cpu_name = "604e",
  659. .cpu_features = CPU_FTRS_604,
  660. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  661. .mmu_features = MMU_FTR_HPTE_TABLE,
  662. .icache_bsize = 32,
  663. .dcache_bsize = 32,
  664. .num_pmcs = 4,
  665. .cpu_setup = __setup_cpu_604,
  666. .machine_check = machine_check_generic,
  667. .platform = "ppc604",
  668. },
  669. { /* 604r */
  670. .pvr_mask = 0xffff0000,
  671. .pvr_value = 0x00090000,
  672. .cpu_name = "604r",
  673. .cpu_features = CPU_FTRS_604,
  674. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  675. .mmu_features = MMU_FTR_HPTE_TABLE,
  676. .icache_bsize = 32,
  677. .dcache_bsize = 32,
  678. .num_pmcs = 4,
  679. .cpu_setup = __setup_cpu_604,
  680. .machine_check = machine_check_generic,
  681. .platform = "ppc604",
  682. },
  683. { /* 604ev */
  684. .pvr_mask = 0xffff0000,
  685. .pvr_value = 0x000a0000,
  686. .cpu_name = "604ev",
  687. .cpu_features = CPU_FTRS_604,
  688. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  689. .mmu_features = MMU_FTR_HPTE_TABLE,
  690. .icache_bsize = 32,
  691. .dcache_bsize = 32,
  692. .num_pmcs = 4,
  693. .cpu_setup = __setup_cpu_604,
  694. .machine_check = machine_check_generic,
  695. .platform = "ppc604",
  696. },
  697. { /* 740/750 (0x4202, don't support TAU ?) */
  698. .pvr_mask = 0xffffffff,
  699. .pvr_value = 0x00084202,
  700. .cpu_name = "740/750",
  701. .cpu_features = CPU_FTRS_740_NOTAU,
  702. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  703. .mmu_features = MMU_FTR_HPTE_TABLE,
  704. .icache_bsize = 32,
  705. .dcache_bsize = 32,
  706. .num_pmcs = 4,
  707. .cpu_setup = __setup_cpu_750,
  708. .machine_check = machine_check_generic,
  709. .platform = "ppc750",
  710. },
  711. { /* 750CX (80100 and 8010x?) */
  712. .pvr_mask = 0xfffffff0,
  713. .pvr_value = 0x00080100,
  714. .cpu_name = "750CX",
  715. .cpu_features = CPU_FTRS_750,
  716. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  717. .mmu_features = MMU_FTR_HPTE_TABLE,
  718. .icache_bsize = 32,
  719. .dcache_bsize = 32,
  720. .num_pmcs = 4,
  721. .cpu_setup = __setup_cpu_750cx,
  722. .machine_check = machine_check_generic,
  723. .platform = "ppc750",
  724. },
  725. { /* 750CX (82201 and 82202) */
  726. .pvr_mask = 0xfffffff0,
  727. .pvr_value = 0x00082200,
  728. .cpu_name = "750CX",
  729. .cpu_features = CPU_FTRS_750,
  730. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  731. .mmu_features = MMU_FTR_HPTE_TABLE,
  732. .icache_bsize = 32,
  733. .dcache_bsize = 32,
  734. .num_pmcs = 4,
  735. .pmc_type = PPC_PMC_IBM,
  736. .cpu_setup = __setup_cpu_750cx,
  737. .machine_check = machine_check_generic,
  738. .platform = "ppc750",
  739. },
  740. { /* 750CXe (82214) */
  741. .pvr_mask = 0xfffffff0,
  742. .pvr_value = 0x00082210,
  743. .cpu_name = "750CXe",
  744. .cpu_features = CPU_FTRS_750,
  745. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  746. .mmu_features = MMU_FTR_HPTE_TABLE,
  747. .icache_bsize = 32,
  748. .dcache_bsize = 32,
  749. .num_pmcs = 4,
  750. .pmc_type = PPC_PMC_IBM,
  751. .cpu_setup = __setup_cpu_750cx,
  752. .machine_check = machine_check_generic,
  753. .platform = "ppc750",
  754. },
  755. { /* 750CXe "Gekko" (83214) */
  756. .pvr_mask = 0xffffffff,
  757. .pvr_value = 0x00083214,
  758. .cpu_name = "750CXe",
  759. .cpu_features = CPU_FTRS_750,
  760. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  761. .mmu_features = MMU_FTR_HPTE_TABLE,
  762. .icache_bsize = 32,
  763. .dcache_bsize = 32,
  764. .num_pmcs = 4,
  765. .pmc_type = PPC_PMC_IBM,
  766. .cpu_setup = __setup_cpu_750cx,
  767. .machine_check = machine_check_generic,
  768. .platform = "ppc750",
  769. },
  770. { /* 750CL (and "Broadway") */
  771. .pvr_mask = 0xfffff0e0,
  772. .pvr_value = 0x00087000,
  773. .cpu_name = "750CL",
  774. .cpu_features = CPU_FTRS_750CL,
  775. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  776. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  777. .icache_bsize = 32,
  778. .dcache_bsize = 32,
  779. .num_pmcs = 4,
  780. .pmc_type = PPC_PMC_IBM,
  781. .cpu_setup = __setup_cpu_750,
  782. .machine_check = machine_check_generic,
  783. .platform = "ppc750",
  784. .oprofile_cpu_type = "ppc/750",
  785. .oprofile_type = PPC_OPROFILE_G4,
  786. },
  787. { /* 745/755 */
  788. .pvr_mask = 0xfffff000,
  789. .pvr_value = 0x00083000,
  790. .cpu_name = "745/755",
  791. .cpu_features = CPU_FTRS_750,
  792. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  793. .mmu_features = MMU_FTR_HPTE_TABLE,
  794. .icache_bsize = 32,
  795. .dcache_bsize = 32,
  796. .num_pmcs = 4,
  797. .pmc_type = PPC_PMC_IBM,
  798. .cpu_setup = __setup_cpu_750,
  799. .machine_check = machine_check_generic,
  800. .platform = "ppc750",
  801. },
  802. { /* 750FX rev 1.x */
  803. .pvr_mask = 0xffffff00,
  804. .pvr_value = 0x70000100,
  805. .cpu_name = "750FX",
  806. .cpu_features = CPU_FTRS_750FX1,
  807. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  808. .mmu_features = MMU_FTR_HPTE_TABLE,
  809. .icache_bsize = 32,
  810. .dcache_bsize = 32,
  811. .num_pmcs = 4,
  812. .pmc_type = PPC_PMC_IBM,
  813. .cpu_setup = __setup_cpu_750,
  814. .machine_check = machine_check_generic,
  815. .platform = "ppc750",
  816. .oprofile_cpu_type = "ppc/750",
  817. .oprofile_type = PPC_OPROFILE_G4,
  818. },
  819. { /* 750FX rev 2.0 must disable HID0[DPM] */
  820. .pvr_mask = 0xffffffff,
  821. .pvr_value = 0x70000200,
  822. .cpu_name = "750FX",
  823. .cpu_features = CPU_FTRS_750FX2,
  824. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  825. .mmu_features = MMU_FTR_HPTE_TABLE,
  826. .icache_bsize = 32,
  827. .dcache_bsize = 32,
  828. .num_pmcs = 4,
  829. .pmc_type = PPC_PMC_IBM,
  830. .cpu_setup = __setup_cpu_750,
  831. .machine_check = machine_check_generic,
  832. .platform = "ppc750",
  833. .oprofile_cpu_type = "ppc/750",
  834. .oprofile_type = PPC_OPROFILE_G4,
  835. },
  836. { /* 750FX (All revs except 2.0) */
  837. .pvr_mask = 0xffff0000,
  838. .pvr_value = 0x70000000,
  839. .cpu_name = "750FX",
  840. .cpu_features = CPU_FTRS_750FX,
  841. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  842. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  843. .icache_bsize = 32,
  844. .dcache_bsize = 32,
  845. .num_pmcs = 4,
  846. .pmc_type = PPC_PMC_IBM,
  847. .cpu_setup = __setup_cpu_750fx,
  848. .machine_check = machine_check_generic,
  849. .platform = "ppc750",
  850. .oprofile_cpu_type = "ppc/750",
  851. .oprofile_type = PPC_OPROFILE_G4,
  852. },
  853. { /* 750GX */
  854. .pvr_mask = 0xffff0000,
  855. .pvr_value = 0x70020000,
  856. .cpu_name = "750GX",
  857. .cpu_features = CPU_FTRS_750GX,
  858. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  859. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  860. .icache_bsize = 32,
  861. .dcache_bsize = 32,
  862. .num_pmcs = 4,
  863. .pmc_type = PPC_PMC_IBM,
  864. .cpu_setup = __setup_cpu_750fx,
  865. .machine_check = machine_check_generic,
  866. .platform = "ppc750",
  867. .oprofile_cpu_type = "ppc/750",
  868. .oprofile_type = PPC_OPROFILE_G4,
  869. },
  870. { /* 740/750 (L2CR bit need fixup for 740) */
  871. .pvr_mask = 0xffff0000,
  872. .pvr_value = 0x00080000,
  873. .cpu_name = "740/750",
  874. .cpu_features = CPU_FTRS_740,
  875. .cpu_user_features = COMMON_USER | PPC_FEATURE_PPC_LE,
  876. .mmu_features = MMU_FTR_HPTE_TABLE,
  877. .icache_bsize = 32,
  878. .dcache_bsize = 32,
  879. .num_pmcs = 4,
  880. .pmc_type = PPC_PMC_IBM,
  881. .cpu_setup = __setup_cpu_750,
  882. .machine_check = machine_check_generic,
  883. .platform = "ppc750",
  884. },
  885. { /* 7400 rev 1.1 ? (no TAU) */
  886. .pvr_mask = 0xffffffff,
  887. .pvr_value = 0x000c1101,
  888. .cpu_name = "7400 (1.1)",
  889. .cpu_features = CPU_FTRS_7400_NOTAU,
  890. .cpu_user_features = COMMON_USER |
  891. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  892. .mmu_features = MMU_FTR_HPTE_TABLE,
  893. .icache_bsize = 32,
  894. .dcache_bsize = 32,
  895. .num_pmcs = 4,
  896. .pmc_type = PPC_PMC_G4,
  897. .cpu_setup = __setup_cpu_7400,
  898. .machine_check = machine_check_generic,
  899. .platform = "ppc7400",
  900. },
  901. { /* 7400 */
  902. .pvr_mask = 0xffff0000,
  903. .pvr_value = 0x000c0000,
  904. .cpu_name = "7400",
  905. .cpu_features = CPU_FTRS_7400,
  906. .cpu_user_features = COMMON_USER |
  907. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  908. .mmu_features = MMU_FTR_HPTE_TABLE,
  909. .icache_bsize = 32,
  910. .dcache_bsize = 32,
  911. .num_pmcs = 4,
  912. .pmc_type = PPC_PMC_G4,
  913. .cpu_setup = __setup_cpu_7400,
  914. .machine_check = machine_check_generic,
  915. .platform = "ppc7400",
  916. },
  917. { /* 7410 */
  918. .pvr_mask = 0xffff0000,
  919. .pvr_value = 0x800c0000,
  920. .cpu_name = "7410",
  921. .cpu_features = CPU_FTRS_7400,
  922. .cpu_user_features = COMMON_USER |
  923. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  924. .mmu_features = MMU_FTR_HPTE_TABLE,
  925. .icache_bsize = 32,
  926. .dcache_bsize = 32,
  927. .num_pmcs = 4,
  928. .pmc_type = PPC_PMC_G4,
  929. .cpu_setup = __setup_cpu_7410,
  930. .machine_check = machine_check_generic,
  931. .platform = "ppc7400",
  932. },
  933. { /* 7450 2.0 - no doze/nap */
  934. .pvr_mask = 0xffffffff,
  935. .pvr_value = 0x80000200,
  936. .cpu_name = "7450",
  937. .cpu_features = CPU_FTRS_7450_20,
  938. .cpu_user_features = COMMON_USER |
  939. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  940. .mmu_features = MMU_FTR_HPTE_TABLE,
  941. .icache_bsize = 32,
  942. .dcache_bsize = 32,
  943. .num_pmcs = 6,
  944. .pmc_type = PPC_PMC_G4,
  945. .cpu_setup = __setup_cpu_745x,
  946. .oprofile_cpu_type = "ppc/7450",
  947. .oprofile_type = PPC_OPROFILE_G4,
  948. .machine_check = machine_check_generic,
  949. .platform = "ppc7450",
  950. },
  951. { /* 7450 2.1 */
  952. .pvr_mask = 0xffffffff,
  953. .pvr_value = 0x80000201,
  954. .cpu_name = "7450",
  955. .cpu_features = CPU_FTRS_7450_21,
  956. .cpu_user_features = COMMON_USER |
  957. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  958. .mmu_features = MMU_FTR_HPTE_TABLE,
  959. .icache_bsize = 32,
  960. .dcache_bsize = 32,
  961. .num_pmcs = 6,
  962. .pmc_type = PPC_PMC_G4,
  963. .cpu_setup = __setup_cpu_745x,
  964. .oprofile_cpu_type = "ppc/7450",
  965. .oprofile_type = PPC_OPROFILE_G4,
  966. .machine_check = machine_check_generic,
  967. .platform = "ppc7450",
  968. },
  969. { /* 7450 2.3 and newer */
  970. .pvr_mask = 0xffff0000,
  971. .pvr_value = 0x80000000,
  972. .cpu_name = "7450",
  973. .cpu_features = CPU_FTRS_7450_23,
  974. .cpu_user_features = COMMON_USER |
  975. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  976. .mmu_features = MMU_FTR_HPTE_TABLE,
  977. .icache_bsize = 32,
  978. .dcache_bsize = 32,
  979. .num_pmcs = 6,
  980. .pmc_type = PPC_PMC_G4,
  981. .cpu_setup = __setup_cpu_745x,
  982. .oprofile_cpu_type = "ppc/7450",
  983. .oprofile_type = PPC_OPROFILE_G4,
  984. .machine_check = machine_check_generic,
  985. .platform = "ppc7450",
  986. },
  987. { /* 7455 rev 1.x */
  988. .pvr_mask = 0xffffff00,
  989. .pvr_value = 0x80010100,
  990. .cpu_name = "7455",
  991. .cpu_features = CPU_FTRS_7455_1,
  992. .cpu_user_features = COMMON_USER |
  993. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  994. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  995. .icache_bsize = 32,
  996. .dcache_bsize = 32,
  997. .num_pmcs = 6,
  998. .pmc_type = PPC_PMC_G4,
  999. .cpu_setup = __setup_cpu_745x,
  1000. .oprofile_cpu_type = "ppc/7450",
  1001. .oprofile_type = PPC_OPROFILE_G4,
  1002. .machine_check = machine_check_generic,
  1003. .platform = "ppc7450",
  1004. },
  1005. { /* 7455 rev 2.0 */
  1006. .pvr_mask = 0xffffffff,
  1007. .pvr_value = 0x80010200,
  1008. .cpu_name = "7455",
  1009. .cpu_features = CPU_FTRS_7455_20,
  1010. .cpu_user_features = COMMON_USER |
  1011. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  1012. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  1013. .icache_bsize = 32,
  1014. .dcache_bsize = 32,
  1015. .num_pmcs = 6,
  1016. .pmc_type = PPC_PMC_G4,
  1017. .cpu_setup = __setup_cpu_745x,
  1018. .oprofile_cpu_type = "ppc/7450",
  1019. .oprofile_type = PPC_OPROFILE_G4,
  1020. .machine_check = machine_check_generic,
  1021. .platform = "ppc7450",
  1022. },
  1023. { /* 7455 others */
  1024. .pvr_mask = 0xffff0000,
  1025. .pvr_value = 0x80010000,
  1026. .cpu_name = "7455",
  1027. .cpu_features = CPU_FTRS_7455,
  1028. .cpu_user_features = COMMON_USER |
  1029. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  1030. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  1031. .icache_bsize = 32,
  1032. .dcache_bsize = 32,
  1033. .num_pmcs = 6,
  1034. .pmc_type = PPC_PMC_G4,
  1035. .cpu_setup = __setup_cpu_745x,
  1036. .oprofile_cpu_type = "ppc/7450",
  1037. .oprofile_type = PPC_OPROFILE_G4,
  1038. .machine_check = machine_check_generic,
  1039. .platform = "ppc7450",
  1040. },
  1041. { /* 7447/7457 Rev 1.0 */
  1042. .pvr_mask = 0xffffffff,
  1043. .pvr_value = 0x80020100,
  1044. .cpu_name = "7447/7457",
  1045. .cpu_features = CPU_FTRS_7447_10,
  1046. .cpu_user_features = COMMON_USER |
  1047. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  1048. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  1049. .icache_bsize = 32,
  1050. .dcache_bsize = 32,
  1051. .num_pmcs = 6,
  1052. .pmc_type = PPC_PMC_G4,
  1053. .cpu_setup = __setup_cpu_745x,
  1054. .oprofile_cpu_type = "ppc/7450",
  1055. .oprofile_type = PPC_OPROFILE_G4,
  1056. .machine_check = machine_check_generic,
  1057. .platform = "ppc7450",
  1058. },
  1059. { /* 7447/7457 Rev 1.1 */
  1060. .pvr_mask = 0xffffffff,
  1061. .pvr_value = 0x80020101,
  1062. .cpu_name = "7447/7457",
  1063. .cpu_features = CPU_FTRS_7447_10,
  1064. .cpu_user_features = COMMON_USER |
  1065. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  1066. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  1067. .icache_bsize = 32,
  1068. .dcache_bsize = 32,
  1069. .num_pmcs = 6,
  1070. .pmc_type = PPC_PMC_G4,
  1071. .cpu_setup = __setup_cpu_745x,
  1072. .oprofile_cpu_type = "ppc/7450",
  1073. .oprofile_type = PPC_OPROFILE_G4,
  1074. .machine_check = machine_check_generic,
  1075. .platform = "ppc7450",
  1076. },
  1077. { /* 7447/7457 Rev 1.2 and later */
  1078. .pvr_mask = 0xffff0000,
  1079. .pvr_value = 0x80020000,
  1080. .cpu_name = "7447/7457",
  1081. .cpu_features = CPU_FTRS_7447,
  1082. .cpu_user_features = COMMON_USER | PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  1083. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  1084. .icache_bsize = 32,
  1085. .dcache_bsize = 32,
  1086. .num_pmcs = 6,
  1087. .pmc_type = PPC_PMC_G4,
  1088. .cpu_setup = __setup_cpu_745x,
  1089. .oprofile_cpu_type = "ppc/7450",
  1090. .oprofile_type = PPC_OPROFILE_G4,
  1091. .machine_check = machine_check_generic,
  1092. .platform = "ppc7450",
  1093. },
  1094. { /* 7447A */
  1095. .pvr_mask = 0xffff0000,
  1096. .pvr_value = 0x80030000,
  1097. .cpu_name = "7447A",
  1098. .cpu_features = CPU_FTRS_7447A,
  1099. .cpu_user_features = COMMON_USER |
  1100. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  1101. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  1102. .icache_bsize = 32,
  1103. .dcache_bsize = 32,
  1104. .num_pmcs = 6,
  1105. .pmc_type = PPC_PMC_G4,
  1106. .cpu_setup = __setup_cpu_745x,
  1107. .oprofile_cpu_type = "ppc/7450",
  1108. .oprofile_type = PPC_OPROFILE_G4,
  1109. .machine_check = machine_check_generic,
  1110. .platform = "ppc7450",
  1111. },
  1112. { /* 7448 */
  1113. .pvr_mask = 0xffff0000,
  1114. .pvr_value = 0x80040000,
  1115. .cpu_name = "7448",
  1116. .cpu_features = CPU_FTRS_7448,
  1117. .cpu_user_features = COMMON_USER |
  1118. PPC_FEATURE_HAS_ALTIVEC_COMP | PPC_FEATURE_PPC_LE,
  1119. .mmu_features = MMU_FTR_HPTE_TABLE | MMU_FTR_USE_HIGH_BATS,
  1120. .icache_bsize = 32,
  1121. .dcache_bsize = 32,
  1122. .num_pmcs = 6,
  1123. .pmc_type = PPC_PMC_G4,
  1124. .cpu_setup = __setup_cpu_745x,
  1125. .oprofile_cpu_type = "ppc/7450",
  1126. .oprofile_type = PPC_OPROFILE_G4,
  1127. .machine_check = machine_check_generic,
  1128. .platform = "ppc7450",
  1129. },
  1130. { /* 82xx (8240, 8245, 8260 are all 603e cores) */
  1131. .pvr_mask = 0x7fff0000,
  1132. .pvr_value = 0x00810000,
  1133. .cpu_name = "82xx",
  1134. .cpu_features = CPU_FTRS_82XX,
  1135. .cpu_user_features = COMMON_USER,
  1136. .mmu_features = 0,
  1137. .icache_bsize = 32,
  1138. .dcache_bsize = 32,
  1139. .cpu_setup = __setup_cpu_603,
  1140. .machine_check = machine_check_generic,
  1141. .platform = "ppc603",
  1142. },
  1143. { /* All G2_LE (603e core, plus some) have the same pvr */
  1144. .pvr_mask = 0x7fff0000,
  1145. .pvr_value = 0x00820000,
  1146. .cpu_name = "G2_LE",
  1147. .cpu_features = CPU_FTRS_G2_LE,
  1148. .cpu_user_features = COMMON_USER,
  1149. .mmu_features = MMU_FTR_USE_HIGH_BATS,
  1150. .icache_bsize = 32,
  1151. .dcache_bsize = 32,
  1152. .cpu_setup = __setup_cpu_603,
  1153. .machine_check = machine_check_generic,
  1154. .platform = "ppc603",
  1155. },
  1156. { /* e300c1 (a 603e core, plus some) on 83xx */
  1157. .pvr_mask = 0x7fff0000,
  1158. .pvr_value = 0x00830000,
  1159. .cpu_name = "e300c1",
  1160. .cpu_features = CPU_FTRS_E300,
  1161. .cpu_user_features = COMMON_USER,
  1162. .mmu_features = MMU_FTR_USE_HIGH_BATS,
  1163. .icache_bsize = 32,
  1164. .dcache_bsize = 32,
  1165. .cpu_setup = __setup_cpu_603,
  1166. .machine_check = machine_check_generic,
  1167. .platform = "ppc603",
  1168. },
  1169. { /* e300c2 (an e300c1 core, plus some, minus FPU) on 83xx */
  1170. .pvr_mask = 0x7fff0000,
  1171. .pvr_value = 0x00840000,
  1172. .cpu_name = "e300c2",
  1173. .cpu_features = CPU_FTRS_E300C2,
  1174. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  1175. .mmu_features = MMU_FTR_USE_HIGH_BATS |
  1176. MMU_FTR_NEED_DTLB_SW_LRU,
  1177. .icache_bsize = 32,
  1178. .dcache_bsize = 32,
  1179. .cpu_setup = __setup_cpu_603,
  1180. .machine_check = machine_check_generic,
  1181. .platform = "ppc603",
  1182. },
  1183. { /* e300c3 (e300c1, plus one IU, half cache size) on 83xx */
  1184. .pvr_mask = 0x7fff0000,
  1185. .pvr_value = 0x00850000,
  1186. .cpu_name = "e300c3",
  1187. .cpu_features = CPU_FTRS_E300,
  1188. .cpu_user_features = COMMON_USER,
  1189. .mmu_features = MMU_FTR_USE_HIGH_BATS |
  1190. MMU_FTR_NEED_DTLB_SW_LRU,
  1191. .icache_bsize = 32,
  1192. .dcache_bsize = 32,
  1193. .cpu_setup = __setup_cpu_603,
  1194. .machine_check = machine_check_generic,
  1195. .num_pmcs = 4,
  1196. .oprofile_cpu_type = "ppc/e300",
  1197. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  1198. .platform = "ppc603",
  1199. },
  1200. { /* e300c4 (e300c1, plus one IU) */
  1201. .pvr_mask = 0x7fff0000,
  1202. .pvr_value = 0x00860000,
  1203. .cpu_name = "e300c4",
  1204. .cpu_features = CPU_FTRS_E300,
  1205. .cpu_user_features = COMMON_USER,
  1206. .mmu_features = MMU_FTR_USE_HIGH_BATS |
  1207. MMU_FTR_NEED_DTLB_SW_LRU,
  1208. .icache_bsize = 32,
  1209. .dcache_bsize = 32,
  1210. .cpu_setup = __setup_cpu_603,
  1211. .machine_check = machine_check_generic,
  1212. .num_pmcs = 4,
  1213. .oprofile_cpu_type = "ppc/e300",
  1214. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  1215. .platform = "ppc603",
  1216. },
  1217. { /* default match, we assume split I/D cache & TB (non-601)... */
  1218. .pvr_mask = 0x00000000,
  1219. .pvr_value = 0x00000000,
  1220. .cpu_name = "(generic PPC)",
  1221. .cpu_features = CPU_FTRS_CLASSIC32,
  1222. .cpu_user_features = COMMON_USER,
  1223. .mmu_features = MMU_FTR_HPTE_TABLE,
  1224. .icache_bsize = 32,
  1225. .dcache_bsize = 32,
  1226. .machine_check = machine_check_generic,
  1227. .platform = "ppc603",
  1228. },
  1229. #endif /* CONFIG_PPC_BOOK3S_32 */
  1230. #ifdef CONFIG_8xx
  1231. { /* 8xx */
  1232. .pvr_mask = 0xffff0000,
  1233. .pvr_value = 0x00500000,
  1234. .cpu_name = "8xx",
  1235. /* CPU_FTR_MAYBE_CAN_DOZE is possible,
  1236. * if the 8xx code is there.... */
  1237. .cpu_features = CPU_FTRS_8XX,
  1238. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  1239. .mmu_features = MMU_FTR_TYPE_8xx,
  1240. .icache_bsize = 16,
  1241. .dcache_bsize = 16,
  1242. .machine_check = machine_check_8xx,
  1243. .platform = "ppc823",
  1244. },
  1245. #endif /* CONFIG_8xx */
  1246. #ifdef CONFIG_40x
  1247. { /* 403GC */
  1248. .pvr_mask = 0xffffff00,
  1249. .pvr_value = 0x00200200,
  1250. .cpu_name = "403GC",
  1251. .cpu_features = CPU_FTRS_40X,
  1252. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  1253. .mmu_features = MMU_FTR_TYPE_40x,
  1254. .icache_bsize = 16,
  1255. .dcache_bsize = 16,
  1256. .machine_check = machine_check_4xx,
  1257. .platform = "ppc403",
  1258. },
  1259. { /* 403GCX */
  1260. .pvr_mask = 0xffffff00,
  1261. .pvr_value = 0x00201400,
  1262. .cpu_name = "403GCX",
  1263. .cpu_features = CPU_FTRS_40X,
  1264. .cpu_user_features = PPC_FEATURE_32 |
  1265. PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
  1266. .mmu_features = MMU_FTR_TYPE_40x,
  1267. .icache_bsize = 16,
  1268. .dcache_bsize = 16,
  1269. .machine_check = machine_check_4xx,
  1270. .platform = "ppc403",
  1271. },
  1272. { /* 403G ?? */
  1273. .pvr_mask = 0xffff0000,
  1274. .pvr_value = 0x00200000,
  1275. .cpu_name = "403G ??",
  1276. .cpu_features = CPU_FTRS_40X,
  1277. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  1278. .mmu_features = MMU_FTR_TYPE_40x,
  1279. .icache_bsize = 16,
  1280. .dcache_bsize = 16,
  1281. .machine_check = machine_check_4xx,
  1282. .platform = "ppc403",
  1283. },
  1284. { /* 405GP */
  1285. .pvr_mask = 0xffff0000,
  1286. .pvr_value = 0x40110000,
  1287. .cpu_name = "405GP",
  1288. .cpu_features = CPU_FTRS_40X,
  1289. .cpu_user_features = PPC_FEATURE_32 |
  1290. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1291. .mmu_features = MMU_FTR_TYPE_40x,
  1292. .icache_bsize = 32,
  1293. .dcache_bsize = 32,
  1294. .machine_check = machine_check_4xx,
  1295. .platform = "ppc405",
  1296. },
  1297. { /* STB 03xxx */
  1298. .pvr_mask = 0xffff0000,
  1299. .pvr_value = 0x40130000,
  1300. .cpu_name = "STB03xxx",
  1301. .cpu_features = CPU_FTRS_40X,
  1302. .cpu_user_features = PPC_FEATURE_32 |
  1303. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1304. .mmu_features = MMU_FTR_TYPE_40x,
  1305. .icache_bsize = 32,
  1306. .dcache_bsize = 32,
  1307. .machine_check = machine_check_4xx,
  1308. .platform = "ppc405",
  1309. },
  1310. { /* STB 04xxx */
  1311. .pvr_mask = 0xffff0000,
  1312. .pvr_value = 0x41810000,
  1313. .cpu_name = "STB04xxx",
  1314. .cpu_features = CPU_FTRS_40X,
  1315. .cpu_user_features = PPC_FEATURE_32 |
  1316. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1317. .mmu_features = MMU_FTR_TYPE_40x,
  1318. .icache_bsize = 32,
  1319. .dcache_bsize = 32,
  1320. .machine_check = machine_check_4xx,
  1321. .platform = "ppc405",
  1322. },
  1323. { /* NP405L */
  1324. .pvr_mask = 0xffff0000,
  1325. .pvr_value = 0x41610000,
  1326. .cpu_name = "NP405L",
  1327. .cpu_features = CPU_FTRS_40X,
  1328. .cpu_user_features = PPC_FEATURE_32 |
  1329. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1330. .mmu_features = MMU_FTR_TYPE_40x,
  1331. .icache_bsize = 32,
  1332. .dcache_bsize = 32,
  1333. .machine_check = machine_check_4xx,
  1334. .platform = "ppc405",
  1335. },
  1336. { /* NP4GS3 */
  1337. .pvr_mask = 0xffff0000,
  1338. .pvr_value = 0x40B10000,
  1339. .cpu_name = "NP4GS3",
  1340. .cpu_features = CPU_FTRS_40X,
  1341. .cpu_user_features = PPC_FEATURE_32 |
  1342. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1343. .mmu_features = MMU_FTR_TYPE_40x,
  1344. .icache_bsize = 32,
  1345. .dcache_bsize = 32,
  1346. .machine_check = machine_check_4xx,
  1347. .platform = "ppc405",
  1348. },
  1349. { /* NP405H */
  1350. .pvr_mask = 0xffff0000,
  1351. .pvr_value = 0x41410000,
  1352. .cpu_name = "NP405H",
  1353. .cpu_features = CPU_FTRS_40X,
  1354. .cpu_user_features = PPC_FEATURE_32 |
  1355. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1356. .mmu_features = MMU_FTR_TYPE_40x,
  1357. .icache_bsize = 32,
  1358. .dcache_bsize = 32,
  1359. .machine_check = machine_check_4xx,
  1360. .platform = "ppc405",
  1361. },
  1362. { /* 405GPr */
  1363. .pvr_mask = 0xffff0000,
  1364. .pvr_value = 0x50910000,
  1365. .cpu_name = "405GPr",
  1366. .cpu_features = CPU_FTRS_40X,
  1367. .cpu_user_features = PPC_FEATURE_32 |
  1368. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1369. .mmu_features = MMU_FTR_TYPE_40x,
  1370. .icache_bsize = 32,
  1371. .dcache_bsize = 32,
  1372. .machine_check = machine_check_4xx,
  1373. .platform = "ppc405",
  1374. },
  1375. { /* STBx25xx */
  1376. .pvr_mask = 0xffff0000,
  1377. .pvr_value = 0x51510000,
  1378. .cpu_name = "STBx25xx",
  1379. .cpu_features = CPU_FTRS_40X,
  1380. .cpu_user_features = PPC_FEATURE_32 |
  1381. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1382. .mmu_features = MMU_FTR_TYPE_40x,
  1383. .icache_bsize = 32,
  1384. .dcache_bsize = 32,
  1385. .machine_check = machine_check_4xx,
  1386. .platform = "ppc405",
  1387. },
  1388. { /* 405LP */
  1389. .pvr_mask = 0xffff0000,
  1390. .pvr_value = 0x41F10000,
  1391. .cpu_name = "405LP",
  1392. .cpu_features = CPU_FTRS_40X,
  1393. .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
  1394. .mmu_features = MMU_FTR_TYPE_40x,
  1395. .icache_bsize = 32,
  1396. .dcache_bsize = 32,
  1397. .machine_check = machine_check_4xx,
  1398. .platform = "ppc405",
  1399. },
  1400. { /* Xilinx Virtex-II Pro */
  1401. .pvr_mask = 0xfffff000,
  1402. .pvr_value = 0x20010000,
  1403. .cpu_name = "Virtex-II Pro",
  1404. .cpu_features = CPU_FTRS_40X,
  1405. .cpu_user_features = PPC_FEATURE_32 |
  1406. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1407. .mmu_features = MMU_FTR_TYPE_40x,
  1408. .icache_bsize = 32,
  1409. .dcache_bsize = 32,
  1410. .machine_check = machine_check_4xx,
  1411. .platform = "ppc405",
  1412. },
  1413. { /* Xilinx Virtex-4 FX */
  1414. .pvr_mask = 0xfffff000,
  1415. .pvr_value = 0x20011000,
  1416. .cpu_name = "Virtex-4 FX",
  1417. .cpu_features = CPU_FTRS_40X,
  1418. .cpu_user_features = PPC_FEATURE_32 |
  1419. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1420. .mmu_features = MMU_FTR_TYPE_40x,
  1421. .icache_bsize = 32,
  1422. .dcache_bsize = 32,
  1423. .machine_check = machine_check_4xx,
  1424. .platform = "ppc405",
  1425. },
  1426. { /* 405EP */
  1427. .pvr_mask = 0xffff0000,
  1428. .pvr_value = 0x51210000,
  1429. .cpu_name = "405EP",
  1430. .cpu_features = CPU_FTRS_40X,
  1431. .cpu_user_features = PPC_FEATURE_32 |
  1432. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1433. .mmu_features = MMU_FTR_TYPE_40x,
  1434. .icache_bsize = 32,
  1435. .dcache_bsize = 32,
  1436. .machine_check = machine_check_4xx,
  1437. .platform = "ppc405",
  1438. },
  1439. { /* 405EX Rev. A/B with Security */
  1440. .pvr_mask = 0xffff000f,
  1441. .pvr_value = 0x12910007,
  1442. .cpu_name = "405EX Rev. A/B",
  1443. .cpu_features = CPU_FTRS_40X,
  1444. .cpu_user_features = PPC_FEATURE_32 |
  1445. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1446. .mmu_features = MMU_FTR_TYPE_40x,
  1447. .icache_bsize = 32,
  1448. .dcache_bsize = 32,
  1449. .machine_check = machine_check_4xx,
  1450. .platform = "ppc405",
  1451. },
  1452. { /* 405EX Rev. C without Security */
  1453. .pvr_mask = 0xffff000f,
  1454. .pvr_value = 0x1291000d,
  1455. .cpu_name = "405EX Rev. C",
  1456. .cpu_features = CPU_FTRS_40X,
  1457. .cpu_user_features = PPC_FEATURE_32 |
  1458. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1459. .mmu_features = MMU_FTR_TYPE_40x,
  1460. .icache_bsize = 32,
  1461. .dcache_bsize = 32,
  1462. .machine_check = machine_check_4xx,
  1463. .platform = "ppc405",
  1464. },
  1465. { /* 405EX Rev. C with Security */
  1466. .pvr_mask = 0xffff000f,
  1467. .pvr_value = 0x1291000f,
  1468. .cpu_name = "405EX Rev. C",
  1469. .cpu_features = CPU_FTRS_40X,
  1470. .cpu_user_features = PPC_FEATURE_32 |
  1471. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1472. .mmu_features = MMU_FTR_TYPE_40x,
  1473. .icache_bsize = 32,
  1474. .dcache_bsize = 32,
  1475. .machine_check = machine_check_4xx,
  1476. .platform = "ppc405",
  1477. },
  1478. { /* 405EX Rev. D without Security */
  1479. .pvr_mask = 0xffff000f,
  1480. .pvr_value = 0x12910003,
  1481. .cpu_name = "405EX Rev. D",
  1482. .cpu_features = CPU_FTRS_40X,
  1483. .cpu_user_features = PPC_FEATURE_32 |
  1484. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1485. .mmu_features = MMU_FTR_TYPE_40x,
  1486. .icache_bsize = 32,
  1487. .dcache_bsize = 32,
  1488. .machine_check = machine_check_4xx,
  1489. .platform = "ppc405",
  1490. },
  1491. { /* 405EX Rev. D with Security */
  1492. .pvr_mask = 0xffff000f,
  1493. .pvr_value = 0x12910005,
  1494. .cpu_name = "405EX Rev. D",
  1495. .cpu_features = CPU_FTRS_40X,
  1496. .cpu_user_features = PPC_FEATURE_32 |
  1497. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1498. .mmu_features = MMU_FTR_TYPE_40x,
  1499. .icache_bsize = 32,
  1500. .dcache_bsize = 32,
  1501. .machine_check = machine_check_4xx,
  1502. .platform = "ppc405",
  1503. },
  1504. { /* 405EXr Rev. A/B without Security */
  1505. .pvr_mask = 0xffff000f,
  1506. .pvr_value = 0x12910001,
  1507. .cpu_name = "405EXr Rev. A/B",
  1508. .cpu_features = CPU_FTRS_40X,
  1509. .cpu_user_features = PPC_FEATURE_32 |
  1510. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1511. .mmu_features = MMU_FTR_TYPE_40x,
  1512. .icache_bsize = 32,
  1513. .dcache_bsize = 32,
  1514. .machine_check = machine_check_4xx,
  1515. .platform = "ppc405",
  1516. },
  1517. { /* 405EXr Rev. C without Security */
  1518. .pvr_mask = 0xffff000f,
  1519. .pvr_value = 0x12910009,
  1520. .cpu_name = "405EXr Rev. C",
  1521. .cpu_features = CPU_FTRS_40X,
  1522. .cpu_user_features = PPC_FEATURE_32 |
  1523. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1524. .mmu_features = MMU_FTR_TYPE_40x,
  1525. .icache_bsize = 32,
  1526. .dcache_bsize = 32,
  1527. .machine_check = machine_check_4xx,
  1528. .platform = "ppc405",
  1529. },
  1530. { /* 405EXr Rev. C with Security */
  1531. .pvr_mask = 0xffff000f,
  1532. .pvr_value = 0x1291000b,
  1533. .cpu_name = "405EXr Rev. C",
  1534. .cpu_features = CPU_FTRS_40X,
  1535. .cpu_user_features = PPC_FEATURE_32 |
  1536. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1537. .mmu_features = MMU_FTR_TYPE_40x,
  1538. .icache_bsize = 32,
  1539. .dcache_bsize = 32,
  1540. .machine_check = machine_check_4xx,
  1541. .platform = "ppc405",
  1542. },
  1543. { /* 405EXr Rev. D without Security */
  1544. .pvr_mask = 0xffff000f,
  1545. .pvr_value = 0x12910000,
  1546. .cpu_name = "405EXr Rev. D",
  1547. .cpu_features = CPU_FTRS_40X,
  1548. .cpu_user_features = PPC_FEATURE_32 |
  1549. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1550. .mmu_features = MMU_FTR_TYPE_40x,
  1551. .icache_bsize = 32,
  1552. .dcache_bsize = 32,
  1553. .machine_check = machine_check_4xx,
  1554. .platform = "ppc405",
  1555. },
  1556. { /* 405EXr Rev. D with Security */
  1557. .pvr_mask = 0xffff000f,
  1558. .pvr_value = 0x12910002,
  1559. .cpu_name = "405EXr Rev. D",
  1560. .cpu_features = CPU_FTRS_40X,
  1561. .cpu_user_features = PPC_FEATURE_32 |
  1562. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1563. .mmu_features = MMU_FTR_TYPE_40x,
  1564. .icache_bsize = 32,
  1565. .dcache_bsize = 32,
  1566. .machine_check = machine_check_4xx,
  1567. .platform = "ppc405",
  1568. },
  1569. {
  1570. /* 405EZ */
  1571. .pvr_mask = 0xffff0000,
  1572. .pvr_value = 0x41510000,
  1573. .cpu_name = "405EZ",
  1574. .cpu_features = CPU_FTRS_40X,
  1575. .cpu_user_features = PPC_FEATURE_32 |
  1576. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1577. .mmu_features = MMU_FTR_TYPE_40x,
  1578. .icache_bsize = 32,
  1579. .dcache_bsize = 32,
  1580. .machine_check = machine_check_4xx,
  1581. .platform = "ppc405",
  1582. },
  1583. { /* APM8018X */
  1584. .pvr_mask = 0xffff0000,
  1585. .pvr_value = 0x7ff11432,
  1586. .cpu_name = "APM8018X",
  1587. .cpu_features = CPU_FTRS_40X,
  1588. .cpu_user_features = PPC_FEATURE_32 |
  1589. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1590. .mmu_features = MMU_FTR_TYPE_40x,
  1591. .icache_bsize = 32,
  1592. .dcache_bsize = 32,
  1593. .machine_check = machine_check_4xx,
  1594. .platform = "ppc405",
  1595. },
  1596. { /* default match */
  1597. .pvr_mask = 0x00000000,
  1598. .pvr_value = 0x00000000,
  1599. .cpu_name = "(generic 40x PPC)",
  1600. .cpu_features = CPU_FTRS_40X,
  1601. .cpu_user_features = PPC_FEATURE_32 |
  1602. PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC,
  1603. .mmu_features = MMU_FTR_TYPE_40x,
  1604. .icache_bsize = 32,
  1605. .dcache_bsize = 32,
  1606. .machine_check = machine_check_4xx,
  1607. .platform = "ppc405",
  1608. }
  1609. #endif /* CONFIG_40x */
  1610. #ifdef CONFIG_44x
  1611. {
  1612. .pvr_mask = 0xf0000fff,
  1613. .pvr_value = 0x40000850,
  1614. .cpu_name = "440GR Rev. A",
  1615. .cpu_features = CPU_FTRS_44X,
  1616. .cpu_user_features = COMMON_USER_BOOKE,
  1617. .mmu_features = MMU_FTR_TYPE_44x,
  1618. .icache_bsize = 32,
  1619. .dcache_bsize = 32,
  1620. .machine_check = machine_check_4xx,
  1621. .platform = "ppc440",
  1622. },
  1623. { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
  1624. .pvr_mask = 0xf0000fff,
  1625. .pvr_value = 0x40000858,
  1626. .cpu_name = "440EP Rev. A",
  1627. .cpu_features = CPU_FTRS_44X,
  1628. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1629. .mmu_features = MMU_FTR_TYPE_44x,
  1630. .icache_bsize = 32,
  1631. .dcache_bsize = 32,
  1632. .cpu_setup = __setup_cpu_440ep,
  1633. .machine_check = machine_check_4xx,
  1634. .platform = "ppc440",
  1635. },
  1636. {
  1637. .pvr_mask = 0xf0000fff,
  1638. .pvr_value = 0x400008d3,
  1639. .cpu_name = "440GR Rev. B",
  1640. .cpu_features = CPU_FTRS_44X,
  1641. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1642. .mmu_features = MMU_FTR_TYPE_44x,
  1643. .icache_bsize = 32,
  1644. .dcache_bsize = 32,
  1645. .machine_check = machine_check_4xx,
  1646. .platform = "ppc440",
  1647. },
  1648. { /* Matches both physical and logical PVR for 440EP (logical pvr = pvr | 0x8) */
  1649. .pvr_mask = 0xf0000ff7,
  1650. .pvr_value = 0x400008d4,
  1651. .cpu_name = "440EP Rev. C",
  1652. .cpu_features = CPU_FTRS_44X,
  1653. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1654. .mmu_features = MMU_FTR_TYPE_44x,
  1655. .icache_bsize = 32,
  1656. .dcache_bsize = 32,
  1657. .cpu_setup = __setup_cpu_440ep,
  1658. .machine_check = machine_check_4xx,
  1659. .platform = "ppc440",
  1660. },
  1661. { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
  1662. .pvr_mask = 0xf0000fff,
  1663. .pvr_value = 0x400008db,
  1664. .cpu_name = "440EP Rev. B",
  1665. .cpu_features = CPU_FTRS_44X,
  1666. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1667. .mmu_features = MMU_FTR_TYPE_44x,
  1668. .icache_bsize = 32,
  1669. .dcache_bsize = 32,
  1670. .cpu_setup = __setup_cpu_440ep,
  1671. .machine_check = machine_check_4xx,
  1672. .platform = "ppc440",
  1673. },
  1674. { /* 440GRX */
  1675. .pvr_mask = 0xf0000ffb,
  1676. .pvr_value = 0x200008D0,
  1677. .cpu_name = "440GRX",
  1678. .cpu_features = CPU_FTRS_44X,
  1679. .cpu_user_features = COMMON_USER_BOOKE,
  1680. .mmu_features = MMU_FTR_TYPE_44x,
  1681. .icache_bsize = 32,
  1682. .dcache_bsize = 32,
  1683. .cpu_setup = __setup_cpu_440grx,
  1684. .machine_check = machine_check_440A,
  1685. .platform = "ppc440",
  1686. },
  1687. { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
  1688. .pvr_mask = 0xf0000ffb,
  1689. .pvr_value = 0x200008D8,
  1690. .cpu_name = "440EPX",
  1691. .cpu_features = CPU_FTRS_44X,
  1692. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1693. .mmu_features = MMU_FTR_TYPE_44x,
  1694. .icache_bsize = 32,
  1695. .dcache_bsize = 32,
  1696. .cpu_setup = __setup_cpu_440epx,
  1697. .machine_check = machine_check_440A,
  1698. .platform = "ppc440",
  1699. },
  1700. { /* 440GP Rev. B */
  1701. .pvr_mask = 0xf0000fff,
  1702. .pvr_value = 0x40000440,
  1703. .cpu_name = "440GP Rev. B",
  1704. .cpu_features = CPU_FTRS_44X,
  1705. .cpu_user_features = COMMON_USER_BOOKE,
  1706. .mmu_features = MMU_FTR_TYPE_44x,
  1707. .icache_bsize = 32,
  1708. .dcache_bsize = 32,
  1709. .machine_check = machine_check_4xx,
  1710. .platform = "ppc440gp",
  1711. },
  1712. { /* 440GP Rev. C */
  1713. .pvr_mask = 0xf0000fff,
  1714. .pvr_value = 0x40000481,
  1715. .cpu_name = "440GP Rev. C",
  1716. .cpu_features = CPU_FTRS_44X,
  1717. .cpu_user_features = COMMON_USER_BOOKE,
  1718. .mmu_features = MMU_FTR_TYPE_44x,
  1719. .icache_bsize = 32,
  1720. .dcache_bsize = 32,
  1721. .machine_check = machine_check_4xx,
  1722. .platform = "ppc440gp",
  1723. },
  1724. { /* 440GX Rev. A */
  1725. .pvr_mask = 0xf0000fff,
  1726. .pvr_value = 0x50000850,
  1727. .cpu_name = "440GX Rev. A",
  1728. .cpu_features = CPU_FTRS_44X,
  1729. .cpu_user_features = COMMON_USER_BOOKE,
  1730. .mmu_features = MMU_FTR_TYPE_44x,
  1731. .icache_bsize = 32,
  1732. .dcache_bsize = 32,
  1733. .cpu_setup = __setup_cpu_440gx,
  1734. .machine_check = machine_check_440A,
  1735. .platform = "ppc440",
  1736. },
  1737. { /* 440GX Rev. B */
  1738. .pvr_mask = 0xf0000fff,
  1739. .pvr_value = 0x50000851,
  1740. .cpu_name = "440GX Rev. B",
  1741. .cpu_features = CPU_FTRS_44X,
  1742. .cpu_user_features = COMMON_USER_BOOKE,
  1743. .mmu_features = MMU_FTR_TYPE_44x,
  1744. .icache_bsize = 32,
  1745. .dcache_bsize = 32,
  1746. .cpu_setup = __setup_cpu_440gx,
  1747. .machine_check = machine_check_440A,
  1748. .platform = "ppc440",
  1749. },
  1750. { /* 440GX Rev. C */
  1751. .pvr_mask = 0xf0000fff,
  1752. .pvr_value = 0x50000892,
  1753. .cpu_name = "440GX Rev. C",
  1754. .cpu_features = CPU_FTRS_44X,
  1755. .cpu_user_features = COMMON_USER_BOOKE,
  1756. .mmu_features = MMU_FTR_TYPE_44x,
  1757. .icache_bsize = 32,
  1758. .dcache_bsize = 32,
  1759. .cpu_setup = __setup_cpu_440gx,
  1760. .machine_check = machine_check_440A,
  1761. .platform = "ppc440",
  1762. },
  1763. { /* 440GX Rev. F */
  1764. .pvr_mask = 0xf0000fff,
  1765. .pvr_value = 0x50000894,
  1766. .cpu_name = "440GX Rev. F",
  1767. .cpu_features = CPU_FTRS_44X,
  1768. .cpu_user_features = COMMON_USER_BOOKE,
  1769. .mmu_features = MMU_FTR_TYPE_44x,
  1770. .icache_bsize = 32,
  1771. .dcache_bsize = 32,
  1772. .cpu_setup = __setup_cpu_440gx,
  1773. .machine_check = machine_check_440A,
  1774. .platform = "ppc440",
  1775. },
  1776. { /* 440SP Rev. A */
  1777. .pvr_mask = 0xfff00fff,
  1778. .pvr_value = 0x53200891,
  1779. .cpu_name = "440SP Rev. A",
  1780. .cpu_features = CPU_FTRS_44X,
  1781. .cpu_user_features = COMMON_USER_BOOKE,
  1782. .mmu_features = MMU_FTR_TYPE_44x,
  1783. .icache_bsize = 32,
  1784. .dcache_bsize = 32,
  1785. .machine_check = machine_check_4xx,
  1786. .platform = "ppc440",
  1787. },
  1788. { /* 440SPe Rev. A */
  1789. .pvr_mask = 0xfff00fff,
  1790. .pvr_value = 0x53400890,
  1791. .cpu_name = "440SPe Rev. A",
  1792. .cpu_features = CPU_FTRS_44X,
  1793. .cpu_user_features = COMMON_USER_BOOKE,
  1794. .mmu_features = MMU_FTR_TYPE_44x,
  1795. .icache_bsize = 32,
  1796. .dcache_bsize = 32,
  1797. .cpu_setup = __setup_cpu_440spe,
  1798. .machine_check = machine_check_440A,
  1799. .platform = "ppc440",
  1800. },
  1801. { /* 440SPe Rev. B */
  1802. .pvr_mask = 0xfff00fff,
  1803. .pvr_value = 0x53400891,
  1804. .cpu_name = "440SPe Rev. B",
  1805. .cpu_features = CPU_FTRS_44X,
  1806. .cpu_user_features = COMMON_USER_BOOKE,
  1807. .mmu_features = MMU_FTR_TYPE_44x,
  1808. .icache_bsize = 32,
  1809. .dcache_bsize = 32,
  1810. .cpu_setup = __setup_cpu_440spe,
  1811. .machine_check = machine_check_440A,
  1812. .platform = "ppc440",
  1813. },
  1814. { /* 440 in Xilinx Virtex-5 FXT */
  1815. .pvr_mask = 0xfffffff0,
  1816. .pvr_value = 0x7ff21910,
  1817. .cpu_name = "440 in Virtex-5 FXT",
  1818. .cpu_features = CPU_FTRS_44X,
  1819. .cpu_user_features = COMMON_USER_BOOKE,
  1820. .mmu_features = MMU_FTR_TYPE_44x,
  1821. .icache_bsize = 32,
  1822. .dcache_bsize = 32,
  1823. .cpu_setup = __setup_cpu_440x5,
  1824. .machine_check = machine_check_440A,
  1825. .platform = "ppc440",
  1826. },
  1827. { /* 460EX */
  1828. .pvr_mask = 0xffff0006,
  1829. .pvr_value = 0x13020002,
  1830. .cpu_name = "460EX",
  1831. .cpu_features = CPU_FTRS_440x6,
  1832. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1833. .mmu_features = MMU_FTR_TYPE_44x,
  1834. .icache_bsize = 32,
  1835. .dcache_bsize = 32,
  1836. .cpu_setup = __setup_cpu_460ex,
  1837. .machine_check = machine_check_440A,
  1838. .platform = "ppc440",
  1839. },
  1840. { /* 460EX Rev B */
  1841. .pvr_mask = 0xffff0007,
  1842. .pvr_value = 0x13020004,
  1843. .cpu_name = "460EX Rev. B",
  1844. .cpu_features = CPU_FTRS_440x6,
  1845. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1846. .mmu_features = MMU_FTR_TYPE_44x,
  1847. .icache_bsize = 32,
  1848. .dcache_bsize = 32,
  1849. .cpu_setup = __setup_cpu_460ex,
  1850. .machine_check = machine_check_440A,
  1851. .platform = "ppc440",
  1852. },
  1853. { /* 460GT */
  1854. .pvr_mask = 0xffff0006,
  1855. .pvr_value = 0x13020000,
  1856. .cpu_name = "460GT",
  1857. .cpu_features = CPU_FTRS_440x6,
  1858. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1859. .mmu_features = MMU_FTR_TYPE_44x,
  1860. .icache_bsize = 32,
  1861. .dcache_bsize = 32,
  1862. .cpu_setup = __setup_cpu_460gt,
  1863. .machine_check = machine_check_440A,
  1864. .platform = "ppc440",
  1865. },
  1866. { /* 460GT Rev B */
  1867. .pvr_mask = 0xffff0007,
  1868. .pvr_value = 0x13020005,
  1869. .cpu_name = "460GT Rev. B",
  1870. .cpu_features = CPU_FTRS_440x6,
  1871. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  1872. .mmu_features = MMU_FTR_TYPE_44x,
  1873. .icache_bsize = 32,
  1874. .dcache_bsize = 32,
  1875. .cpu_setup = __setup_cpu_460gt,
  1876. .machine_check = machine_check_440A,
  1877. .platform = "ppc440",
  1878. },
  1879. { /* 460SX */
  1880. .pvr_mask = 0xffffff00,
  1881. .pvr_value = 0x13541800,
  1882. .cpu_name = "460SX",
  1883. .cpu_features = CPU_FTRS_44X,
  1884. .cpu_user_features = COMMON_USER_BOOKE,
  1885. .mmu_features = MMU_FTR_TYPE_44x,
  1886. .icache_bsize = 32,
  1887. .dcache_bsize = 32,
  1888. .cpu_setup = __setup_cpu_460sx,
  1889. .machine_check = machine_check_440A,
  1890. .platform = "ppc440",
  1891. },
  1892. { /* 464 in APM821xx */
  1893. .pvr_mask = 0xfffffff0,
  1894. .pvr_value = 0x12C41C80,
  1895. .cpu_name = "APM821XX",
  1896. .cpu_features = CPU_FTRS_44X,
  1897. .cpu_user_features = COMMON_USER_BOOKE |
  1898. PPC_FEATURE_HAS_FPU,
  1899. .mmu_features = MMU_FTR_TYPE_44x,
  1900. .icache_bsize = 32,
  1901. .dcache_bsize = 32,
  1902. .cpu_setup = __setup_cpu_apm821xx,
  1903. .machine_check = machine_check_440A,
  1904. .platform = "ppc440",
  1905. },
  1906. { /* 476 DD2 core */
  1907. .pvr_mask = 0xffffffff,
  1908. .pvr_value = 0x11a52080,
  1909. .cpu_name = "476",
  1910. .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
  1911. .cpu_user_features = COMMON_USER_BOOKE |
  1912. PPC_FEATURE_HAS_FPU,
  1913. .mmu_features = MMU_FTR_TYPE_47x |
  1914. MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
  1915. .icache_bsize = 32,
  1916. .dcache_bsize = 128,
  1917. .machine_check = machine_check_47x,
  1918. .platform = "ppc470",
  1919. },
  1920. { /* 476fpe */
  1921. .pvr_mask = 0xffff0000,
  1922. .pvr_value = 0x7ff50000,
  1923. .cpu_name = "476fpe",
  1924. .cpu_features = CPU_FTRS_47X | CPU_FTR_476_DD2,
  1925. .cpu_user_features = COMMON_USER_BOOKE |
  1926. PPC_FEATURE_HAS_FPU,
  1927. .mmu_features = MMU_FTR_TYPE_47x |
  1928. MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
  1929. .icache_bsize = 32,
  1930. .dcache_bsize = 128,
  1931. .machine_check = machine_check_47x,
  1932. .platform = "ppc470",
  1933. },
  1934. { /* 476 iss */
  1935. .pvr_mask = 0xffff0000,
  1936. .pvr_value = 0x00050000,
  1937. .cpu_name = "476",
  1938. .cpu_features = CPU_FTRS_47X,
  1939. .cpu_user_features = COMMON_USER_BOOKE |
  1940. PPC_FEATURE_HAS_FPU,
  1941. .mmu_features = MMU_FTR_TYPE_47x |
  1942. MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
  1943. .icache_bsize = 32,
  1944. .dcache_bsize = 128,
  1945. .machine_check = machine_check_47x,
  1946. .platform = "ppc470",
  1947. },
  1948. { /* 476 others */
  1949. .pvr_mask = 0xffff0000,
  1950. .pvr_value = 0x11a50000,
  1951. .cpu_name = "476",
  1952. .cpu_features = CPU_FTRS_47X,
  1953. .cpu_user_features = COMMON_USER_BOOKE |
  1954. PPC_FEATURE_HAS_FPU,
  1955. .mmu_features = MMU_FTR_TYPE_47x |
  1956. MMU_FTR_USE_TLBIVAX_BCAST | MMU_FTR_LOCK_BCAST_INVAL,
  1957. .icache_bsize = 32,
  1958. .dcache_bsize = 128,
  1959. .machine_check = machine_check_47x,
  1960. .platform = "ppc470",
  1961. },
  1962. { /* default match */
  1963. .pvr_mask = 0x00000000,
  1964. .pvr_value = 0x00000000,
  1965. .cpu_name = "(generic 44x PPC)",
  1966. .cpu_features = CPU_FTRS_44X,
  1967. .cpu_user_features = COMMON_USER_BOOKE,
  1968. .mmu_features = MMU_FTR_TYPE_44x,
  1969. .icache_bsize = 32,
  1970. .dcache_bsize = 32,
  1971. .machine_check = machine_check_4xx,
  1972. .platform = "ppc440",
  1973. }
  1974. #endif /* CONFIG_44x */
  1975. #ifdef CONFIG_E200
  1976. { /* e200z5 */
  1977. .pvr_mask = 0xfff00000,
  1978. .pvr_value = 0x81000000,
  1979. .cpu_name = "e200z5",
  1980. /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
  1981. .cpu_features = CPU_FTRS_E200,
  1982. .cpu_user_features = COMMON_USER_BOOKE |
  1983. PPC_FEATURE_HAS_EFP_SINGLE |
  1984. PPC_FEATURE_UNIFIED_CACHE,
  1985. .mmu_features = MMU_FTR_TYPE_FSL_E,
  1986. .dcache_bsize = 32,
  1987. .machine_check = machine_check_e200,
  1988. .platform = "ppc5554",
  1989. },
  1990. { /* e200z6 */
  1991. .pvr_mask = 0xfff00000,
  1992. .pvr_value = 0x81100000,
  1993. .cpu_name = "e200z6",
  1994. /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */
  1995. .cpu_features = CPU_FTRS_E200,
  1996. .cpu_user_features = COMMON_USER_BOOKE |
  1997. PPC_FEATURE_HAS_SPE_COMP |
  1998. PPC_FEATURE_HAS_EFP_SINGLE_COMP |
  1999. PPC_FEATURE_UNIFIED_CACHE,
  2000. .mmu_features = MMU_FTR_TYPE_FSL_E,
  2001. .dcache_bsize = 32,
  2002. .machine_check = machine_check_e200,
  2003. .platform = "ppc5554",
  2004. },
  2005. { /* default match */
  2006. .pvr_mask = 0x00000000,
  2007. .pvr_value = 0x00000000,
  2008. .cpu_name = "(generic E200 PPC)",
  2009. .cpu_features = CPU_FTRS_E200,
  2010. .cpu_user_features = COMMON_USER_BOOKE |
  2011. PPC_FEATURE_HAS_EFP_SINGLE |
  2012. PPC_FEATURE_UNIFIED_CACHE,
  2013. .mmu_features = MMU_FTR_TYPE_FSL_E,
  2014. .dcache_bsize = 32,
  2015. .cpu_setup = __setup_cpu_e200,
  2016. .machine_check = machine_check_e200,
  2017. .platform = "ppc5554",
  2018. }
  2019. #endif /* CONFIG_E200 */
  2020. #endif /* CONFIG_PPC32 */
  2021. #ifdef CONFIG_E500
  2022. #ifdef CONFIG_PPC32
  2023. #ifndef CONFIG_PPC_E500MC
  2024. { /* e500 */
  2025. .pvr_mask = 0xffff0000,
  2026. .pvr_value = 0x80200000,
  2027. .cpu_name = "e500",
  2028. .cpu_features = CPU_FTRS_E500,
  2029. .cpu_user_features = COMMON_USER_BOOKE |
  2030. PPC_FEATURE_HAS_SPE_COMP |
  2031. PPC_FEATURE_HAS_EFP_SINGLE_COMP,
  2032. .cpu_user_features2 = PPC_FEATURE2_ISEL,
  2033. .mmu_features = MMU_FTR_TYPE_FSL_E,
  2034. .icache_bsize = 32,
  2035. .dcache_bsize = 32,
  2036. .num_pmcs = 4,
  2037. .oprofile_cpu_type = "ppc/e500",
  2038. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  2039. .cpu_setup = __setup_cpu_e500v1,
  2040. .machine_check = machine_check_e500,
  2041. .platform = "ppc8540",
  2042. },
  2043. { /* e500v2 */
  2044. .pvr_mask = 0xffff0000,
  2045. .pvr_value = 0x80210000,
  2046. .cpu_name = "e500v2",
  2047. .cpu_features = CPU_FTRS_E500_2,
  2048. .cpu_user_features = COMMON_USER_BOOKE |
  2049. PPC_FEATURE_HAS_SPE_COMP |
  2050. PPC_FEATURE_HAS_EFP_SINGLE_COMP |
  2051. PPC_FEATURE_HAS_EFP_DOUBLE_COMP,
  2052. .cpu_user_features2 = PPC_FEATURE2_ISEL,
  2053. .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS,
  2054. .icache_bsize = 32,
  2055. .dcache_bsize = 32,
  2056. .num_pmcs = 4,
  2057. .oprofile_cpu_type = "ppc/e500",
  2058. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  2059. .cpu_setup = __setup_cpu_e500v2,
  2060. .machine_check = machine_check_e500,
  2061. .platform = "ppc8548",
  2062. .cpu_down_flush = cpu_down_flush_e500v2,
  2063. },
  2064. #else
  2065. { /* e500mc */
  2066. .pvr_mask = 0xffff0000,
  2067. .pvr_value = 0x80230000,
  2068. .cpu_name = "e500mc",
  2069. .cpu_features = CPU_FTRS_E500MC,
  2070. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  2071. .cpu_user_features2 = PPC_FEATURE2_ISEL,
  2072. .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
  2073. MMU_FTR_USE_TLBILX,
  2074. .icache_bsize = 64,
  2075. .dcache_bsize = 64,
  2076. .num_pmcs = 4,
  2077. .oprofile_cpu_type = "ppc/e500mc",
  2078. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  2079. .cpu_setup = __setup_cpu_e500mc,
  2080. .machine_check = machine_check_e500mc,
  2081. .platform = "ppce500mc",
  2082. .cpu_down_flush = cpu_down_flush_e500mc,
  2083. },
  2084. #endif /* CONFIG_PPC_E500MC */
  2085. #endif /* CONFIG_PPC32 */
  2086. #ifdef CONFIG_PPC_E500MC
  2087. { /* e5500 */
  2088. .pvr_mask = 0xffff0000,
  2089. .pvr_value = 0x80240000,
  2090. .cpu_name = "e5500",
  2091. .cpu_features = CPU_FTRS_E5500,
  2092. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
  2093. .cpu_user_features2 = PPC_FEATURE2_ISEL,
  2094. .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
  2095. MMU_FTR_USE_TLBILX,
  2096. .icache_bsize = 64,
  2097. .dcache_bsize = 64,
  2098. .num_pmcs = 4,
  2099. .oprofile_cpu_type = "ppc/e500mc",
  2100. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  2101. .cpu_setup = __setup_cpu_e5500,
  2102. #ifndef CONFIG_PPC32
  2103. .cpu_restore = __restore_cpu_e5500,
  2104. #endif
  2105. .machine_check = machine_check_e500mc,
  2106. .platform = "ppce5500",
  2107. .cpu_down_flush = cpu_down_flush_e5500,
  2108. },
  2109. { /* e6500 */
  2110. .pvr_mask = 0xffff0000,
  2111. .pvr_value = 0x80400000,
  2112. .cpu_name = "e6500",
  2113. .cpu_features = CPU_FTRS_E6500,
  2114. .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU |
  2115. PPC_FEATURE_HAS_ALTIVEC_COMP,
  2116. .cpu_user_features2 = PPC_FEATURE2_ISEL,
  2117. .mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
  2118. MMU_FTR_USE_TLBILX,
  2119. .icache_bsize = 64,
  2120. .dcache_bsize = 64,
  2121. .num_pmcs = 6,
  2122. .oprofile_cpu_type = "ppc/e6500",
  2123. .oprofile_type = PPC_OPROFILE_FSL_EMB,
  2124. .cpu_setup = __setup_cpu_e6500,
  2125. #ifndef CONFIG_PPC32
  2126. .cpu_restore = __restore_cpu_e6500,
  2127. #endif
  2128. .machine_check = machine_check_e500mc,
  2129. .platform = "ppce6500",
  2130. .cpu_down_flush = cpu_down_flush_e6500,
  2131. },
  2132. #endif /* CONFIG_PPC_E500MC */
  2133. #ifdef CONFIG_PPC32
  2134. { /* default match */
  2135. .pvr_mask = 0x00000000,
  2136. .pvr_value = 0x00000000,
  2137. .cpu_name = "(generic E500 PPC)",
  2138. .cpu_features = CPU_FTRS_E500,
  2139. .cpu_user_features = COMMON_USER_BOOKE |
  2140. PPC_FEATURE_HAS_SPE_COMP |
  2141. PPC_FEATURE_HAS_EFP_SINGLE_COMP,
  2142. .mmu_features = MMU_FTR_TYPE_FSL_E,
  2143. .icache_bsize = 32,
  2144. .dcache_bsize = 32,
  2145. .machine_check = machine_check_e500,
  2146. .platform = "powerpc",
  2147. }
  2148. #endif /* CONFIG_PPC32 */
  2149. #endif /* CONFIG_E500 */
  2150. };
  2151. static struct cpu_spec the_cpu_spec;
  2152. static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
  2153. struct cpu_spec *s)
  2154. {
  2155. struct cpu_spec *t = &the_cpu_spec;
  2156. struct cpu_spec old;
  2157. t = PTRRELOC(t);
  2158. old = *t;
  2159. /* Copy everything, then do fixups */
  2160. *t = *s;
  2161. /*
  2162. * If we are overriding a previous value derived from the real
  2163. * PVR with a new value obtained using a logical PVR value,
  2164. * don't modify the performance monitor fields.
  2165. */
  2166. if (old.num_pmcs && !s->num_pmcs) {
  2167. t->num_pmcs = old.num_pmcs;
  2168. t->pmc_type = old.pmc_type;
  2169. t->oprofile_type = old.oprofile_type;
  2170. t->oprofile_mmcra_sihv = old.oprofile_mmcra_sihv;
  2171. t->oprofile_mmcra_sipr = old.oprofile_mmcra_sipr;
  2172. t->oprofile_mmcra_clear = old.oprofile_mmcra_clear;
  2173. /*
  2174. * If we have passed through this logic once before and
  2175. * have pulled the default case because the real PVR was
  2176. * not found inside cpu_specs[], then we are possibly
  2177. * running in compatibility mode. In that case, let the
  2178. * oprofiler know which set of compatibility counters to
  2179. * pull from by making sure the oprofile_cpu_type string
  2180. * is set to that of compatibility mode. If the
  2181. * oprofile_cpu_type already has a value, then we are
  2182. * possibly overriding a real PVR with a logical one,
  2183. * and, in that case, keep the current value for
  2184. * oprofile_cpu_type.
  2185. */
  2186. if (old.oprofile_cpu_type != NULL) {
  2187. t->oprofile_cpu_type = old.oprofile_cpu_type;
  2188. t->oprofile_type = old.oprofile_type;
  2189. }
  2190. }
  2191. *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec;
  2192. /*
  2193. * Set the base platform string once; assumes
  2194. * we're called with real pvr first.
  2195. */
  2196. if (*PTRRELOC(&powerpc_base_platform) == NULL)
  2197. *PTRRELOC(&powerpc_base_platform) = t->platform;
  2198. #if defined(CONFIG_PPC64) || defined(CONFIG_BOOKE)
  2199. /* ppc64 and booke expect identify_cpu to also call setup_cpu for
  2200. * that processor. I will consolidate that at a later time, for now,
  2201. * just use #ifdef. We also don't need to PTRRELOC the function
  2202. * pointer on ppc64 and booke as we are running at 0 in real mode
  2203. * on ppc64 and reloc_offset is always 0 on booke.
  2204. */
  2205. if (t->cpu_setup) {
  2206. t->cpu_setup(offset, t);
  2207. }
  2208. #endif /* CONFIG_PPC64 || CONFIG_BOOKE */
  2209. return t;
  2210. }
  2211. struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr)
  2212. {
  2213. struct cpu_spec *s = cpu_specs;
  2214. int i;
  2215. s = PTRRELOC(s);
  2216. for (i = 0; i < ARRAY_SIZE(cpu_specs); i++,s++) {
  2217. if ((pvr & s->pvr_mask) == s->pvr_value)
  2218. return setup_cpu_spec(offset, s);
  2219. }
  2220. BUG();
  2221. return NULL;
  2222. }
  2223. #ifdef CONFIG_JUMP_LABEL_FEATURE_CHECKS
  2224. struct static_key_true cpu_feature_keys[NUM_CPU_FTR_KEYS] = {
  2225. [0 ... NUM_CPU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
  2226. };
  2227. EXPORT_SYMBOL_GPL(cpu_feature_keys);
  2228. void __init cpu_feature_keys_init(void)
  2229. {
  2230. int i;
  2231. for (i = 0; i < NUM_CPU_FTR_KEYS; i++) {
  2232. unsigned long f = 1ul << i;
  2233. if (!(cur_cpu_spec->cpu_features & f))
  2234. static_branch_disable(&cpu_feature_keys[i]);
  2235. }
  2236. }
  2237. struct static_key_true mmu_feature_keys[NUM_MMU_FTR_KEYS] = {
  2238. [0 ... NUM_MMU_FTR_KEYS - 1] = STATIC_KEY_TRUE_INIT
  2239. };
  2240. EXPORT_SYMBOL_GPL(mmu_feature_keys);
  2241. void __init mmu_feature_keys_init(void)
  2242. {
  2243. int i;
  2244. for (i = 0; i < NUM_MMU_FTR_KEYS; i++) {
  2245. unsigned long f = 1ul << i;
  2246. if (!(cur_cpu_spec->mmu_features & f))
  2247. static_branch_disable(&mmu_feature_keys[i]);
  2248. }
  2249. }
  2250. #endif