amd.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. #include <linux/init.h>
  2. #include <linux/bitops.h>
  3. #include <linux/mm.h>
  4. #include <linux/io.h>
  5. #include <asm/processor.h>
  6. #include <asm/apic.h>
  7. #include <asm/cpu.h>
  8. #include <asm/pci-direct.h>
  9. #ifdef CONFIG_X86_64
  10. # include <asm/numa_64.h>
  11. # include <asm/mmconfig.h>
  12. # include <asm/cacheflush.h>
  13. #endif
  14. #include "cpu.h"
  15. #ifdef CONFIG_X86_32
  16. /*
  17. * B step AMD K6 before B 9730xxxx have hardware bugs that can cause
  18. * misexecution of code under Linux. Owners of such processors should
  19. * contact AMD for precise details and a CPU swap.
  20. *
  21. * See http://www.multimania.com/poulot/k6bug.html
  22. * http://www.amd.com/K6/k6docs/revgd.html
  23. *
  24. * The following test is erm.. interesting. AMD neglected to up
  25. * the chip setting when fixing the bug but they also tweaked some
  26. * performance at the same time..
  27. */
  28. extern void vide(void);
  29. __asm__(".align 4\nvide: ret");
  30. static void __cpuinit init_amd_k5(struct cpuinfo_x86 *c)
  31. {
  32. /*
  33. * General Systems BIOSen alias the cpu frequency registers
  34. * of the Elan at 0x000df000. Unfortuantly, one of the Linux
  35. * drivers subsequently pokes it, and changes the CPU speed.
  36. * Workaround : Remove the unneeded alias.
  37. */
  38. #define CBAR (0xfffc) /* Configuration Base Address (32-bit) */
  39. #define CBAR_ENB (0x80000000)
  40. #define CBAR_KEY (0X000000CB)
  41. if (c->x86_model == 9 || c->x86_model == 10) {
  42. if (inl(CBAR) & CBAR_ENB)
  43. outl(0 | CBAR_KEY, CBAR);
  44. }
  45. }
  46. static void __cpuinit init_amd_k6(struct cpuinfo_x86 *c)
  47. {
  48. u32 l, h;
  49. int mbytes = num_physpages >> (20-PAGE_SHIFT);
  50. if (c->x86_model < 6) {
  51. /* Based on AMD doc 20734R - June 2000 */
  52. if (c->x86_model == 0) {
  53. clear_cpu_cap(c, X86_FEATURE_APIC);
  54. set_cpu_cap(c, X86_FEATURE_PGE);
  55. }
  56. return;
  57. }
  58. if (c->x86_model == 6 && c->x86_mask == 1) {
  59. const int K6_BUG_LOOP = 1000000;
  60. int n;
  61. void (*f_vide)(void);
  62. unsigned long d, d2;
  63. printk(KERN_INFO "AMD K6 stepping B detected - ");
  64. /*
  65. * It looks like AMD fixed the 2.6.2 bug and improved indirect
  66. * calls at the same time.
  67. */
  68. n = K6_BUG_LOOP;
  69. f_vide = vide;
  70. rdtscl(d);
  71. while (n--)
  72. f_vide();
  73. rdtscl(d2);
  74. d = d2-d;
  75. if (d > 20*K6_BUG_LOOP)
  76. printk(KERN_CONT
  77. "system stability may be impaired when more than 32 MB are used.\n");
  78. else
  79. printk(KERN_CONT "probably OK (after B9730xxxx).\n");
  80. printk(KERN_INFO "Please see http://membres.lycos.fr/poulot/k6bug.html\n");
  81. }
  82. /* K6 with old style WHCR */
  83. if (c->x86_model < 8 ||
  84. (c->x86_model == 8 && c->x86_mask < 8)) {
  85. /* We can only write allocate on the low 508Mb */
  86. if (mbytes > 508)
  87. mbytes = 508;
  88. rdmsr(MSR_K6_WHCR, l, h);
  89. if ((l&0x0000FFFF) == 0) {
  90. unsigned long flags;
  91. l = (1<<0)|((mbytes/4)<<1);
  92. local_irq_save(flags);
  93. wbinvd();
  94. wrmsr(MSR_K6_WHCR, l, h);
  95. local_irq_restore(flags);
  96. printk(KERN_INFO "Enabling old style K6 write allocation for %d Mb\n",
  97. mbytes);
  98. }
  99. return;
  100. }
  101. if ((c->x86_model == 8 && c->x86_mask > 7) ||
  102. c->x86_model == 9 || c->x86_model == 13) {
  103. /* The more serious chips .. */
  104. if (mbytes > 4092)
  105. mbytes = 4092;
  106. rdmsr(MSR_K6_WHCR, l, h);
  107. if ((l&0xFFFF0000) == 0) {
  108. unsigned long flags;
  109. l = ((mbytes>>2)<<22)|(1<<16);
  110. local_irq_save(flags);
  111. wbinvd();
  112. wrmsr(MSR_K6_WHCR, l, h);
  113. local_irq_restore(flags);
  114. printk(KERN_INFO "Enabling new style K6 write allocation for %d Mb\n",
  115. mbytes);
  116. }
  117. return;
  118. }
  119. if (c->x86_model == 10) {
  120. /* AMD Geode LX is model 10 */
  121. /* placeholder for any needed mods */
  122. return;
  123. }
  124. }
  125. static void __cpuinit amd_k7_smp_check(struct cpuinfo_x86 *c)
  126. {
  127. #ifdef CONFIG_SMP
  128. /* calling is from identify_secondary_cpu() ? */
  129. if (c->cpu_index == boot_cpu_id)
  130. return;
  131. /*
  132. * Certain Athlons might work (for various values of 'work') in SMP
  133. * but they are not certified as MP capable.
  134. */
  135. /* Athlon 660/661 is valid. */
  136. if ((c->x86_model == 6) && ((c->x86_mask == 0) ||
  137. (c->x86_mask == 1)))
  138. goto valid_k7;
  139. /* Duron 670 is valid */
  140. if ((c->x86_model == 7) && (c->x86_mask == 0))
  141. goto valid_k7;
  142. /*
  143. * Athlon 662, Duron 671, and Athlon >model 7 have capability
  144. * bit. It's worth noting that the A5 stepping (662) of some
  145. * Athlon XP's have the MP bit set.
  146. * See http://www.heise.de/newsticker/data/jow-18.10.01-000 for
  147. * more.
  148. */
  149. if (((c->x86_model == 6) && (c->x86_mask >= 2)) ||
  150. ((c->x86_model == 7) && (c->x86_mask >= 1)) ||
  151. (c->x86_model > 7))
  152. if (cpu_has_mp)
  153. goto valid_k7;
  154. /* If we get here, not a certified SMP capable AMD system. */
  155. /*
  156. * Don't taint if we are running SMP kernel on a single non-MP
  157. * approved Athlon
  158. */
  159. WARN_ONCE(1, "WARNING: This combination of AMD"
  160. " processors is not suitable for SMP.\n");
  161. if (!test_taint(TAINT_UNSAFE_SMP))
  162. add_taint(TAINT_UNSAFE_SMP);
  163. valid_k7:
  164. ;
  165. #endif
  166. }
  167. static void __cpuinit init_amd_k7(struct cpuinfo_x86 *c)
  168. {
  169. u32 l, h;
  170. /*
  171. * Bit 15 of Athlon specific MSR 15, needs to be 0
  172. * to enable SSE on Palomino/Morgan/Barton CPU's.
  173. * If the BIOS didn't enable it already, enable it here.
  174. */
  175. if (c->x86_model >= 6 && c->x86_model <= 10) {
  176. if (!cpu_has(c, X86_FEATURE_XMM)) {
  177. printk(KERN_INFO "Enabling disabled K7/SSE Support.\n");
  178. rdmsr(MSR_K7_HWCR, l, h);
  179. l &= ~0x00008000;
  180. wrmsr(MSR_K7_HWCR, l, h);
  181. set_cpu_cap(c, X86_FEATURE_XMM);
  182. }
  183. }
  184. /*
  185. * It's been determined by AMD that Athlons since model 8 stepping 1
  186. * are more robust with CLK_CTL set to 200xxxxx instead of 600xxxxx
  187. * As per AMD technical note 27212 0.2
  188. */
  189. if ((c->x86_model == 8 && c->x86_mask >= 1) || (c->x86_model > 8)) {
  190. rdmsr(MSR_K7_CLK_CTL, l, h);
  191. if ((l & 0xfff00000) != 0x20000000) {
  192. printk(KERN_INFO
  193. "CPU: CLK_CTL MSR was %x. Reprogramming to %x\n",
  194. l, ((l & 0x000fffff)|0x20000000));
  195. wrmsr(MSR_K7_CLK_CTL, (l & 0x000fffff)|0x20000000, h);
  196. }
  197. }
  198. set_cpu_cap(c, X86_FEATURE_K7);
  199. amd_k7_smp_check(c);
  200. }
  201. #endif
  202. #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
  203. static int __cpuinit nearby_node(int apicid)
  204. {
  205. int i, node;
  206. for (i = apicid - 1; i >= 0; i--) {
  207. node = apicid_to_node[i];
  208. if (node != NUMA_NO_NODE && node_online(node))
  209. return node;
  210. }
  211. for (i = apicid + 1; i < MAX_LOCAL_APIC; i++) {
  212. node = apicid_to_node[i];
  213. if (node != NUMA_NO_NODE && node_online(node))
  214. return node;
  215. }
  216. return first_node(node_online_map); /* Shouldn't happen */
  217. }
  218. #endif
  219. /*
  220. * Fixup core topology information for AMD multi-node processors.
  221. * Assumption 1: Number of cores in each internal node is the same.
  222. * Assumption 2: Mixed systems with both single-node and dual-node
  223. * processors are not supported.
  224. */
  225. #ifdef CONFIG_X86_HT
  226. static void __cpuinit amd_fixup_dcm(struct cpuinfo_x86 *c)
  227. {
  228. #ifdef CONFIG_PCI
  229. u32 t, cpn;
  230. u8 n, n_id;
  231. int cpu = smp_processor_id();
  232. /* fixup topology information only once for a core */
  233. if (cpu_has(c, X86_FEATURE_AMD_DCM))
  234. return;
  235. /* check for multi-node processor on boot cpu */
  236. t = read_pci_config(0, 24, 3, 0xe8);
  237. if (!(t & (1 << 29)))
  238. return;
  239. set_cpu_cap(c, X86_FEATURE_AMD_DCM);
  240. /* cores per node: each internal node has half the number of cores */
  241. cpn = c->x86_max_cores >> 1;
  242. /* even-numbered NB_id of this dual-node processor */
  243. n = c->phys_proc_id << 1;
  244. /*
  245. * determine internal node id and assign cores fifty-fifty to
  246. * each node of the dual-node processor
  247. */
  248. t = read_pci_config(0, 24 + n, 3, 0xe8);
  249. n = (t>>30) & 0x3;
  250. if (n == 0) {
  251. if (c->cpu_core_id < cpn)
  252. n_id = 0;
  253. else
  254. n_id = 1;
  255. } else {
  256. if (c->cpu_core_id < cpn)
  257. n_id = 1;
  258. else
  259. n_id = 0;
  260. }
  261. /* compute entire NodeID, use llc_shared_map to store sibling info */
  262. per_cpu(cpu_llc_id, cpu) = (c->phys_proc_id << 1) + n_id;
  263. /* fixup core id to be in range from 0 to cpn */
  264. c->cpu_core_id = c->cpu_core_id % cpn;
  265. #endif
  266. }
  267. #endif
  268. /*
  269. * On a AMD dual core setup the lower bits of the APIC id distingush the cores.
  270. * Assumes number of cores is a power of two.
  271. */
  272. static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c)
  273. {
  274. #ifdef CONFIG_X86_HT
  275. unsigned bits;
  276. int cpu = smp_processor_id();
  277. bits = c->x86_coreid_bits;
  278. /* Low order bits define the core id (index of core in socket) */
  279. c->cpu_core_id = c->initial_apicid & ((1 << bits)-1);
  280. /* Convert the initial APIC ID into the socket ID */
  281. c->phys_proc_id = c->initial_apicid >> bits;
  282. /* use socket ID also for last level cache */
  283. per_cpu(cpu_llc_id, cpu) = c->phys_proc_id;
  284. /* fixup topology information on multi-node processors */
  285. if ((c->x86 == 0x10) && (c->x86_model == 9))
  286. amd_fixup_dcm(c);
  287. #endif
  288. }
  289. int amd_get_nb_id(int cpu)
  290. {
  291. int id = 0;
  292. #ifdef CONFIG_SMP
  293. id = per_cpu(cpu_llc_id, cpu);
  294. #endif
  295. return id;
  296. }
  297. EXPORT_SYMBOL_GPL(amd_get_nb_id);
  298. static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
  299. {
  300. #if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
  301. int cpu = smp_processor_id();
  302. int node;
  303. unsigned apicid = c->apicid;
  304. node = per_cpu(cpu_llc_id, cpu);
  305. if (apicid_to_node[apicid] != NUMA_NO_NODE)
  306. node = apicid_to_node[apicid];
  307. if (!node_online(node)) {
  308. /* Two possibilities here:
  309. - The CPU is missing memory and no node was created.
  310. In that case try picking one from a nearby CPU
  311. - The APIC IDs differ from the HyperTransport node IDs
  312. which the K8 northbridge parsing fills in.
  313. Assume they are all increased by a constant offset,
  314. but in the same order as the HT nodeids.
  315. If that doesn't result in a usable node fall back to the
  316. path for the previous case. */
  317. int ht_nodeid = c->initial_apicid;
  318. if (ht_nodeid >= 0 &&
  319. apicid_to_node[ht_nodeid] != NUMA_NO_NODE)
  320. node = apicid_to_node[ht_nodeid];
  321. /* Pick a nearby node */
  322. if (!node_online(node))
  323. node = nearby_node(apicid);
  324. }
  325. numa_set_node(cpu, node);
  326. printk(KERN_INFO "CPU %d/0x%x -> Node %d\n", cpu, apicid, node);
  327. #endif
  328. }
  329. static void __cpuinit early_init_amd_mc(struct cpuinfo_x86 *c)
  330. {
  331. #ifdef CONFIG_X86_HT
  332. unsigned bits, ecx;
  333. /* Multi core CPU? */
  334. if (c->extended_cpuid_level < 0x80000008)
  335. return;
  336. ecx = cpuid_ecx(0x80000008);
  337. c->x86_max_cores = (ecx & 0xff) + 1;
  338. /* CPU telling us the core id bits shift? */
  339. bits = (ecx >> 12) & 0xF;
  340. /* Otherwise recompute */
  341. if (bits == 0) {
  342. while ((1 << bits) < c->x86_max_cores)
  343. bits++;
  344. }
  345. c->x86_coreid_bits = bits;
  346. #endif
  347. }
  348. static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
  349. {
  350. early_init_amd_mc(c);
  351. /*
  352. * c->x86_power is 8000_0007 edx. Bit 8 is TSC runs at constant rate
  353. * with P/T states and does not stop in deep C-states
  354. */
  355. if (c->x86_power & (1 << 8)) {
  356. set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
  357. set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC);
  358. }
  359. #ifdef CONFIG_X86_64
  360. set_cpu_cap(c, X86_FEATURE_SYSCALL32);
  361. #else
  362. /* Set MTRR capability flag if appropriate */
  363. if (c->x86 == 5)
  364. if (c->x86_model == 13 || c->x86_model == 9 ||
  365. (c->x86_model == 8 && c->x86_mask >= 8))
  366. set_cpu_cap(c, X86_FEATURE_K6_MTRR);
  367. #endif
  368. #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI)
  369. /* check CPU config space for extended APIC ID */
  370. if (cpu_has_apic && c->x86 >= 0xf) {
  371. unsigned int val;
  372. val = read_pci_config(0, 24, 0, 0x68);
  373. if ((val & ((1 << 17) | (1 << 18))) == ((1 << 17) | (1 << 18)))
  374. set_cpu_cap(c, X86_FEATURE_EXTD_APICID);
  375. }
  376. #endif
  377. }
  378. static void __cpuinit init_amd(struct cpuinfo_x86 *c)
  379. {
  380. #ifdef CONFIG_SMP
  381. unsigned long long value;
  382. /*
  383. * Disable TLB flush filter by setting HWCR.FFDIS on K8
  384. * bit 6 of msr C001_0015
  385. *
  386. * Errata 63 for SH-B3 steppings
  387. * Errata 122 for all steppings (F+ have it disabled by default)
  388. */
  389. if (c->x86 == 0xf) {
  390. rdmsrl(MSR_K7_HWCR, value);
  391. value |= 1 << 6;
  392. wrmsrl(MSR_K7_HWCR, value);
  393. }
  394. #endif
  395. early_init_amd(c);
  396. /*
  397. * Bit 31 in normal CPUID used for nonstandard 3DNow ID;
  398. * 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway
  399. */
  400. clear_cpu_cap(c, 0*32+31);
  401. #ifdef CONFIG_X86_64
  402. /* On C+ stepping K8 rep microcode works well for copy/memset */
  403. if (c->x86 == 0xf) {
  404. u32 level;
  405. level = cpuid_eax(1);
  406. if ((level >= 0x0f48 && level < 0x0f50) || level >= 0x0f58)
  407. set_cpu_cap(c, X86_FEATURE_REP_GOOD);
  408. /*
  409. * Some BIOSes incorrectly force this feature, but only K8
  410. * revision D (model = 0x14) and later actually support it.
  411. * (AMD Erratum #110, docId: 25759).
  412. */
  413. if (c->x86_model < 0x14 && cpu_has(c, X86_FEATURE_LAHF_LM)) {
  414. u64 val;
  415. clear_cpu_cap(c, X86_FEATURE_LAHF_LM);
  416. if (!rdmsrl_amd_safe(0xc001100d, &val)) {
  417. val &= ~(1ULL << 32);
  418. wrmsrl_amd_safe(0xc001100d, val);
  419. }
  420. }
  421. }
  422. if (c->x86 == 0x10 || c->x86 == 0x11)
  423. set_cpu_cap(c, X86_FEATURE_REP_GOOD);
  424. /* get apicid instead of initial apic id from cpuid */
  425. c->apicid = hard_smp_processor_id();
  426. #else
  427. /*
  428. * FIXME: We should handle the K5 here. Set up the write
  429. * range and also turn on MSR 83 bits 4 and 31 (write alloc,
  430. * no bus pipeline)
  431. */
  432. switch (c->x86) {
  433. case 4:
  434. init_amd_k5(c);
  435. break;
  436. case 5:
  437. init_amd_k6(c);
  438. break;
  439. case 6: /* An Athlon/Duron */
  440. init_amd_k7(c);
  441. break;
  442. }
  443. /* K6s reports MCEs but don't actually have all the MSRs */
  444. if (c->x86 < 6)
  445. clear_cpu_cap(c, X86_FEATURE_MCE);
  446. #endif
  447. /* Enable workaround for FXSAVE leak */
  448. if (c->x86 >= 6)
  449. set_cpu_cap(c, X86_FEATURE_FXSAVE_LEAK);
  450. if (!c->x86_model_id[0]) {
  451. switch (c->x86) {
  452. case 0xf:
  453. /* Should distinguish Models here, but this is only
  454. a fallback anyways. */
  455. strcpy(c->x86_model_id, "Hammer");
  456. break;
  457. }
  458. }
  459. display_cacheinfo(c);
  460. /* Multi core CPU? */
  461. if (c->extended_cpuid_level >= 0x80000008) {
  462. amd_detect_cmp(c);
  463. srat_detect_node(c);
  464. }
  465. #ifdef CONFIG_X86_32
  466. detect_ht(c);
  467. #endif
  468. if (c->extended_cpuid_level >= 0x80000006) {
  469. if ((c->x86 >= 0x0f) && (cpuid_edx(0x80000006) & 0xf000))
  470. num_cache_leaves = 4;
  471. else
  472. num_cache_leaves = 3;
  473. }
  474. if (c->x86 >= 0xf && c->x86 <= 0x11)
  475. set_cpu_cap(c, X86_FEATURE_K8);
  476. if (cpu_has_xmm2) {
  477. /* MFENCE stops RDTSC speculation */
  478. set_cpu_cap(c, X86_FEATURE_MFENCE_RDTSC);
  479. }
  480. #ifdef CONFIG_X86_64
  481. if (c->x86 == 0x10) {
  482. /* do this for boot cpu */
  483. if (c == &boot_cpu_data)
  484. check_enable_amd_mmconf_dmi();
  485. fam10h_check_enable_mmcfg();
  486. }
  487. if (c == &boot_cpu_data && c->x86 >= 0xf && c->x86 <= 0x11) {
  488. unsigned long long tseg;
  489. /*
  490. * Split up direct mapping around the TSEG SMM area.
  491. * Don't do it for gbpages because there seems very little
  492. * benefit in doing so.
  493. */
  494. if (!rdmsrl_safe(MSR_K8_TSEG_ADDR, &tseg)) {
  495. printk(KERN_DEBUG "tseg: %010llx\n", tseg);
  496. if ((tseg>>PMD_SHIFT) <
  497. (max_low_pfn_mapped>>(PMD_SHIFT-PAGE_SHIFT)) ||
  498. ((tseg>>PMD_SHIFT) <
  499. (max_pfn_mapped>>(PMD_SHIFT-PAGE_SHIFT)) &&
  500. (tseg>>PMD_SHIFT) >= (1ULL<<(32 - PMD_SHIFT))))
  501. set_memory_4k((unsigned long)__va(tseg), 1);
  502. }
  503. }
  504. #endif
  505. }
  506. #ifdef CONFIG_X86_32
  507. static unsigned int __cpuinit amd_size_cache(struct cpuinfo_x86 *c,
  508. unsigned int size)
  509. {
  510. /* AMD errata T13 (order #21922) */
  511. if ((c->x86 == 6)) {
  512. /* Duron Rev A0 */
  513. if (c->x86_model == 3 && c->x86_mask == 0)
  514. size = 64;
  515. /* Tbird rev A1/A2 */
  516. if (c->x86_model == 4 &&
  517. (c->x86_mask == 0 || c->x86_mask == 1))
  518. size = 256;
  519. }
  520. return size;
  521. }
  522. #endif
  523. static const struct cpu_dev __cpuinitconst amd_cpu_dev = {
  524. .c_vendor = "AMD",
  525. .c_ident = { "AuthenticAMD" },
  526. #ifdef CONFIG_X86_32
  527. .c_models = {
  528. { .vendor = X86_VENDOR_AMD, .family = 4, .model_names =
  529. {
  530. [3] = "486 DX/2",
  531. [7] = "486 DX/2-WB",
  532. [8] = "486 DX/4",
  533. [9] = "486 DX/4-WB",
  534. [14] = "Am5x86-WT",
  535. [15] = "Am5x86-WB"
  536. }
  537. },
  538. },
  539. .c_size_cache = amd_size_cache,
  540. #endif
  541. .c_early_init = early_init_amd,
  542. .c_init = init_amd,
  543. .c_x86_vendor = X86_VENDOR_AMD,
  544. };
  545. cpu_dev_register(amd_cpu_dev);