setup_64.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  1. /*
  2. *
  3. * Common boot and setup code.
  4. *
  5. * Copyright (C) 2001 PPC64 Team, IBM Corp
  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. #undef DEBUG
  13. #include <linux/config.h>
  14. #include <linux/module.h>
  15. #include <linux/string.h>
  16. #include <linux/sched.h>
  17. #include <linux/init.h>
  18. #include <linux/kernel.h>
  19. #include <linux/reboot.h>
  20. #include <linux/delay.h>
  21. #include <linux/initrd.h>
  22. #include <linux/ide.h>
  23. #include <linux/seq_file.h>
  24. #include <linux/ioport.h>
  25. #include <linux/console.h>
  26. #include <linux/utsname.h>
  27. #include <linux/tty.h>
  28. #include <linux/root_dev.h>
  29. #include <linux/notifier.h>
  30. #include <linux/cpu.h>
  31. #include <linux/unistd.h>
  32. #include <linux/serial.h>
  33. #include <linux/serial_8250.h>
  34. #include <linux/bootmem.h>
  35. #include <asm/io.h>
  36. #include <asm/kdump.h>
  37. #include <asm/prom.h>
  38. #include <asm/processor.h>
  39. #include <asm/pgtable.h>
  40. #include <asm/smp.h>
  41. #include <asm/elf.h>
  42. #include <asm/machdep.h>
  43. #include <asm/paca.h>
  44. #include <asm/time.h>
  45. #include <asm/cputable.h>
  46. #include <asm/sections.h>
  47. #include <asm/btext.h>
  48. #include <asm/nvram.h>
  49. #include <asm/setup.h>
  50. #include <asm/system.h>
  51. #include <asm/rtas.h>
  52. #include <asm/iommu.h>
  53. #include <asm/serial.h>
  54. #include <asm/cache.h>
  55. #include <asm/page.h>
  56. #include <asm/mmu.h>
  57. #include <asm/lmb.h>
  58. #include <asm/iseries/it_lp_naca.h>
  59. #include <asm/firmware.h>
  60. #include <asm/xmon.h>
  61. #include <asm/udbg.h>
  62. #include <asm/kexec.h>
  63. #include "setup.h"
  64. #ifdef DEBUG
  65. #define DBG(fmt...) udbg_printf(fmt)
  66. #else
  67. #define DBG(fmt...)
  68. #endif
  69. int have_of = 1;
  70. int boot_cpuid = 0;
  71. int boot_cpuid_phys = 0;
  72. dev_t boot_dev;
  73. u64 ppc64_pft_size;
  74. /* Pick defaults since we might want to patch instructions
  75. * before we've read this from the device tree.
  76. */
  77. struct ppc64_caches ppc64_caches = {
  78. .dline_size = 0x80,
  79. .log_dline_size = 7,
  80. .iline_size = 0x80,
  81. .log_iline_size = 7
  82. };
  83. EXPORT_SYMBOL_GPL(ppc64_caches);
  84. /*
  85. * These are used in binfmt_elf.c to put aux entries on the stack
  86. * for each elf executable being started.
  87. */
  88. int dcache_bsize;
  89. int icache_bsize;
  90. int ucache_bsize;
  91. /* The main machine-dep calls structure
  92. */
  93. struct machdep_calls ppc_md;
  94. EXPORT_SYMBOL(ppc_md);
  95. #ifdef CONFIG_MAGIC_SYSRQ
  96. unsigned long SYSRQ_KEY;
  97. #endif /* CONFIG_MAGIC_SYSRQ */
  98. static int ppc64_panic_event(struct notifier_block *, unsigned long, void *);
  99. static struct notifier_block ppc64_panic_block = {
  100. .notifier_call = ppc64_panic_event,
  101. .priority = INT_MIN /* may not return; must be done last */
  102. };
  103. #ifdef CONFIG_SMP
  104. static int smt_enabled_cmdline;
  105. /* Look for ibm,smt-enabled OF option */
  106. static void check_smt_enabled(void)
  107. {
  108. struct device_node *dn;
  109. char *smt_option;
  110. /* Allow the command line to overrule the OF option */
  111. if (smt_enabled_cmdline)
  112. return;
  113. dn = of_find_node_by_path("/options");
  114. if (dn) {
  115. smt_option = (char *)get_property(dn, "ibm,smt-enabled", NULL);
  116. if (smt_option) {
  117. if (!strcmp(smt_option, "on"))
  118. smt_enabled_at_boot = 1;
  119. else if (!strcmp(smt_option, "off"))
  120. smt_enabled_at_boot = 0;
  121. }
  122. }
  123. }
  124. /* Look for smt-enabled= cmdline option */
  125. static int __init early_smt_enabled(char *p)
  126. {
  127. smt_enabled_cmdline = 1;
  128. if (!p)
  129. return 0;
  130. if (!strcmp(p, "on") || !strcmp(p, "1"))
  131. smt_enabled_at_boot = 1;
  132. else if (!strcmp(p, "off") || !strcmp(p, "0"))
  133. smt_enabled_at_boot = 0;
  134. return 0;
  135. }
  136. early_param("smt-enabled", early_smt_enabled);
  137. #else
  138. #define check_smt_enabled()
  139. #endif /* CONFIG_SMP */
  140. extern struct machdep_calls pSeries_md;
  141. extern struct machdep_calls pmac_md;
  142. extern struct machdep_calls maple_md;
  143. extern struct machdep_calls cell_md;
  144. extern struct machdep_calls iseries_md;
  145. /* Ultimately, stuff them in an elf section like initcalls... */
  146. static struct machdep_calls __initdata *machines[] = {
  147. #ifdef CONFIG_PPC_PSERIES
  148. &pSeries_md,
  149. #endif /* CONFIG_PPC_PSERIES */
  150. #ifdef CONFIG_PPC_PMAC
  151. &pmac_md,
  152. #endif /* CONFIG_PPC_PMAC */
  153. #ifdef CONFIG_PPC_MAPLE
  154. &maple_md,
  155. #endif /* CONFIG_PPC_MAPLE */
  156. #ifdef CONFIG_PPC_CELL
  157. &cell_md,
  158. #endif
  159. #ifdef CONFIG_PPC_ISERIES
  160. &iseries_md,
  161. #endif
  162. NULL
  163. };
  164. /*
  165. * Early initialization entry point. This is called by head.S
  166. * with MMU translation disabled. We rely on the "feature" of
  167. * the CPU that ignores the top 2 bits of the address in real
  168. * mode so we can access kernel globals normally provided we
  169. * only toy with things in the RMO region. From here, we do
  170. * some early parsing of the device-tree to setup out LMB
  171. * data structures, and allocate & initialize the hash table
  172. * and segment tables so we can start running with translation
  173. * enabled.
  174. *
  175. * It is this function which will call the probe() callback of
  176. * the various platform types and copy the matching one to the
  177. * global ppc_md structure. Your platform can eventually do
  178. * some very early initializations from the probe() routine, but
  179. * this is not recommended, be very careful as, for example, the
  180. * device-tree is not accessible via normal means at this point.
  181. */
  182. void __init early_setup(unsigned long dt_ptr)
  183. {
  184. struct paca_struct *lpaca = get_paca();
  185. static struct machdep_calls **mach;
  186. /* Enable early debugging if any specified (see udbg.h) */
  187. udbg_early_init();
  188. DBG(" -> early_setup()\n");
  189. /*
  190. * Do early initializations using the flattened device
  191. * tree, like retreiving the physical memory map or
  192. * calculating/retreiving the hash table size
  193. */
  194. early_init_devtree(__va(dt_ptr));
  195. /*
  196. * Iterate all ppc_md structures until we find the proper
  197. * one for the current machine type
  198. */
  199. DBG("Probing machine type for platform %x...\n", _machine);
  200. for (mach = machines; *mach; mach++) {
  201. if ((*mach)->probe(_machine))
  202. break;
  203. }
  204. /* What can we do if we didn't find ? */
  205. if (*mach == NULL) {
  206. DBG("No suitable machine found !\n");
  207. for (;;);
  208. }
  209. ppc_md = **mach;
  210. #ifdef CONFIG_CRASH_DUMP
  211. kdump_setup();
  212. #endif
  213. DBG("Found, Initializing memory management...\n");
  214. /*
  215. * Initialize the MMU Hash table and create the linear mapping
  216. * of memory. Has to be done before stab/slb initialization as
  217. * this is currently where the page size encoding is obtained
  218. */
  219. htab_initialize();
  220. /*
  221. * Initialize stab / SLB management except on iSeries
  222. */
  223. if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
  224. if (cpu_has_feature(CPU_FTR_SLB))
  225. slb_initialize();
  226. else
  227. stab_initialize(lpaca->stab_real);
  228. }
  229. DBG(" <- early_setup()\n");
  230. }
  231. #ifdef CONFIG_SMP
  232. void early_setup_secondary(void)
  233. {
  234. struct paca_struct *lpaca = get_paca();
  235. /* Mark enabled in PACA */
  236. lpaca->proc_enabled = 0;
  237. /* Initialize hash table for that CPU */
  238. htab_initialize_secondary();
  239. /* Initialize STAB/SLB. We use a virtual address as it works
  240. * in real mode on pSeries and we want a virutal address on
  241. * iSeries anyway
  242. */
  243. if (cpu_has_feature(CPU_FTR_SLB))
  244. slb_initialize();
  245. else
  246. stab_initialize(lpaca->stab_addr);
  247. }
  248. #endif /* CONFIG_SMP */
  249. #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
  250. void smp_release_cpus(void)
  251. {
  252. extern unsigned long __secondary_hold_spinloop;
  253. unsigned long *ptr;
  254. DBG(" -> smp_release_cpus()\n");
  255. /* All secondary cpus are spinning on a common spinloop, release them
  256. * all now so they can start to spin on their individual paca
  257. * spinloops. For non SMP kernels, the secondary cpus never get out
  258. * of the common spinloop.
  259. * This is useless but harmless on iSeries, secondaries are already
  260. * waiting on their paca spinloops. */
  261. ptr = (unsigned long *)((unsigned long)&__secondary_hold_spinloop
  262. - PHYSICAL_START);
  263. *ptr = 1;
  264. mb();
  265. DBG(" <- smp_release_cpus()\n");
  266. }
  267. #endif /* CONFIG_SMP || CONFIG_KEXEC */
  268. /*
  269. * Initialize some remaining members of the ppc64_caches and systemcfg
  270. * structures
  271. * (at least until we get rid of them completely). This is mostly some
  272. * cache informations about the CPU that will be used by cache flush
  273. * routines and/or provided to userland
  274. */
  275. static void __init initialize_cache_info(void)
  276. {
  277. struct device_node *np;
  278. unsigned long num_cpus = 0;
  279. DBG(" -> initialize_cache_info()\n");
  280. for (np = NULL; (np = of_find_node_by_type(np, "cpu"));) {
  281. num_cpus += 1;
  282. /* We're assuming *all* of the CPUs have the same
  283. * d-cache and i-cache sizes... -Peter
  284. */
  285. if ( num_cpus == 1 ) {
  286. u32 *sizep, *lsizep;
  287. u32 size, lsize;
  288. const char *dc, *ic;
  289. /* Then read cache informations */
  290. if (_machine == PLATFORM_POWERMAC) {
  291. dc = "d-cache-block-size";
  292. ic = "i-cache-block-size";
  293. } else {
  294. dc = "d-cache-line-size";
  295. ic = "i-cache-line-size";
  296. }
  297. size = 0;
  298. lsize = cur_cpu_spec->dcache_bsize;
  299. sizep = (u32 *)get_property(np, "d-cache-size", NULL);
  300. if (sizep != NULL)
  301. size = *sizep;
  302. lsizep = (u32 *) get_property(np, dc, NULL);
  303. if (lsizep != NULL)
  304. lsize = *lsizep;
  305. if (sizep == 0 || lsizep == 0)
  306. DBG("Argh, can't find dcache properties ! "
  307. "sizep: %p, lsizep: %p\n", sizep, lsizep);
  308. ppc64_caches.dsize = size;
  309. ppc64_caches.dline_size = lsize;
  310. ppc64_caches.log_dline_size = __ilog2(lsize);
  311. ppc64_caches.dlines_per_page = PAGE_SIZE / lsize;
  312. size = 0;
  313. lsize = cur_cpu_spec->icache_bsize;
  314. sizep = (u32 *)get_property(np, "i-cache-size", NULL);
  315. if (sizep != NULL)
  316. size = *sizep;
  317. lsizep = (u32 *)get_property(np, ic, NULL);
  318. if (lsizep != NULL)
  319. lsize = *lsizep;
  320. if (sizep == 0 || lsizep == 0)
  321. DBG("Argh, can't find icache properties ! "
  322. "sizep: %p, lsizep: %p\n", sizep, lsizep);
  323. ppc64_caches.isize = size;
  324. ppc64_caches.iline_size = lsize;
  325. ppc64_caches.log_iline_size = __ilog2(lsize);
  326. ppc64_caches.ilines_per_page = PAGE_SIZE / lsize;
  327. }
  328. }
  329. DBG(" <- initialize_cache_info()\n");
  330. }
  331. /*
  332. * Do some initial setup of the system. The parameters are those which
  333. * were passed in from the bootloader.
  334. */
  335. void __init setup_system(void)
  336. {
  337. DBG(" -> setup_system()\n");
  338. #ifdef CONFIG_KEXEC
  339. kdump_move_device_tree();
  340. #endif
  341. /*
  342. * Unflatten the device-tree passed by prom_init or kexec
  343. */
  344. unflatten_device_tree();
  345. #ifdef CONFIG_KEXEC
  346. kexec_setup(); /* requires unflattened device tree. */
  347. #endif
  348. /*
  349. * Fill the ppc64_caches & systemcfg structures with informations
  350. * retrieved from the device-tree. Need to be called before
  351. * finish_device_tree() since the later requires some of the
  352. * informations filled up here to properly parse the interrupt
  353. * tree.
  354. * It also sets up the cache line sizes which allows to call
  355. * routines like flush_icache_range (used by the hash init
  356. * later on).
  357. */
  358. initialize_cache_info();
  359. #ifdef CONFIG_PPC_RTAS
  360. /*
  361. * Initialize RTAS if available
  362. */
  363. rtas_initialize();
  364. #endif /* CONFIG_PPC_RTAS */
  365. /*
  366. * Check if we have an initrd provided via the device-tree
  367. */
  368. check_for_initrd();
  369. /*
  370. * Do some platform specific early initializations, that includes
  371. * setting up the hash table pointers. It also sets up some interrupt-mapping
  372. * related options that will be used by finish_device_tree()
  373. */
  374. ppc_md.init_early();
  375. /*
  376. * We can discover serial ports now since the above did setup the
  377. * hash table management for us, thus ioremap works. We do that early
  378. * so that further code can be debugged
  379. */
  380. find_legacy_serial_ports();
  381. /*
  382. * "Finish" the device-tree, that is do the actual parsing of
  383. * some of the properties like the interrupt map
  384. */
  385. finish_device_tree();
  386. /*
  387. * Initialize xmon
  388. */
  389. #ifdef CONFIG_XMON_DEFAULT
  390. xmon_init(1);
  391. #endif
  392. /*
  393. * Register early console
  394. */
  395. register_early_udbg_console();
  396. /* Save unparsed command line copy for /proc/cmdline */
  397. strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
  398. parse_early_param();
  399. check_smt_enabled();
  400. smp_setup_cpu_maps();
  401. #ifdef CONFIG_SMP
  402. /* Release secondary cpus out of their spinloops at 0x60 now that
  403. * we can map physical -> logical CPU ids
  404. */
  405. smp_release_cpus();
  406. #endif
  407. printk("Starting Linux PPC64 %s\n", system_utsname.version);
  408. printk("-----------------------------------------------------\n");
  409. printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size);
  410. printk("ppc64_interrupt_controller = 0x%ld\n",
  411. ppc64_interrupt_controller);
  412. printk("platform = 0x%x\n", _machine);
  413. printk("physicalMemorySize = 0x%lx\n", lmb_phys_mem_size());
  414. printk("ppc64_caches.dcache_line_size = 0x%x\n",
  415. ppc64_caches.dline_size);
  416. printk("ppc64_caches.icache_line_size = 0x%x\n",
  417. ppc64_caches.iline_size);
  418. printk("htab_address = 0x%p\n", htab_address);
  419. printk("htab_hash_mask = 0x%lx\n", htab_hash_mask);
  420. #if PHYSICAL_START > 0
  421. printk("physical_start = 0x%x\n", PHYSICAL_START);
  422. #endif
  423. printk("-----------------------------------------------------\n");
  424. DBG(" <- setup_system()\n");
  425. }
  426. static int ppc64_panic_event(struct notifier_block *this,
  427. unsigned long event, void *ptr)
  428. {
  429. ppc_md.panic((char *)ptr); /* May not return */
  430. return NOTIFY_DONE;
  431. }
  432. #ifdef CONFIG_IRQSTACKS
  433. static void __init irqstack_early_init(void)
  434. {
  435. unsigned int i;
  436. /*
  437. * interrupt stacks must be under 256MB, we cannot afford to take
  438. * SLB misses on them.
  439. */
  440. for_each_cpu(i) {
  441. softirq_ctx[i] = (struct thread_info *)
  442. __va(lmb_alloc_base(THREAD_SIZE,
  443. THREAD_SIZE, 0x10000000));
  444. hardirq_ctx[i] = (struct thread_info *)
  445. __va(lmb_alloc_base(THREAD_SIZE,
  446. THREAD_SIZE, 0x10000000));
  447. }
  448. }
  449. #else
  450. #define irqstack_early_init()
  451. #endif
  452. /*
  453. * Stack space used when we detect a bad kernel stack pointer, and
  454. * early in SMP boots before relocation is enabled.
  455. */
  456. static void __init emergency_stack_init(void)
  457. {
  458. unsigned long limit;
  459. unsigned int i;
  460. /*
  461. * Emergency stacks must be under 256MB, we cannot afford to take
  462. * SLB misses on them. The ABI also requires them to be 128-byte
  463. * aligned.
  464. *
  465. * Since we use these as temporary stacks during secondary CPU
  466. * bringup, we need to get at them in real mode. This means they
  467. * must also be within the RMO region.
  468. */
  469. limit = min(0x10000000UL, lmb.rmo_size);
  470. for_each_cpu(i)
  471. paca[i].emergency_sp =
  472. __va(lmb_alloc_base(HW_PAGE_SIZE, 128, limit)) + HW_PAGE_SIZE;
  473. }
  474. /*
  475. * Called into from start_kernel, after lock_kernel has been called.
  476. * Initializes bootmem, which is unsed to manage page allocation until
  477. * mem_init is called.
  478. */
  479. void __init setup_arch(char **cmdline_p)
  480. {
  481. extern void do_init_bootmem(void);
  482. ppc64_boot_msg(0x12, "Setup Arch");
  483. *cmdline_p = cmd_line;
  484. /*
  485. * Set cache line size based on type of cpu as a default.
  486. * Systems with OF can look in the properties on the cpu node(s)
  487. * for a possibly more accurate value.
  488. */
  489. dcache_bsize = ppc64_caches.dline_size;
  490. icache_bsize = ppc64_caches.iline_size;
  491. /* reboot on panic */
  492. panic_timeout = 180;
  493. if (ppc_md.panic)
  494. notifier_chain_register(&panic_notifier_list, &ppc64_panic_block);
  495. init_mm.start_code = PAGE_OFFSET;
  496. init_mm.end_code = (unsigned long) _etext;
  497. init_mm.end_data = (unsigned long) _edata;
  498. init_mm.brk = klimit;
  499. irqstack_early_init();
  500. emergency_stack_init();
  501. stabs_alloc();
  502. /* set up the bootmem stuff with available memory */
  503. do_init_bootmem();
  504. sparse_init();
  505. #ifdef CONFIG_DUMMY_CONSOLE
  506. conswitchp = &dummy_con;
  507. #endif
  508. ppc_md.setup_arch();
  509. /* Use the default idle loop if the platform hasn't provided one. */
  510. if (NULL == ppc_md.idle_loop) {
  511. ppc_md.idle_loop = default_idle;
  512. printk(KERN_INFO "Using default idle loop\n");
  513. }
  514. paging_init();
  515. ppc64_boot_msg(0x15, "Setup Done");
  516. }
  517. /* ToDo: do something useful if ppc_md is not yet setup. */
  518. #define PPC64_LINUX_FUNCTION 0x0f000000
  519. #define PPC64_IPL_MESSAGE 0xc0000000
  520. #define PPC64_TERM_MESSAGE 0xb0000000
  521. static void ppc64_do_msg(unsigned int src, const char *msg)
  522. {
  523. if (ppc_md.progress) {
  524. char buf[128];
  525. sprintf(buf, "%08X\n", src);
  526. ppc_md.progress(buf, 0);
  527. snprintf(buf, 128, "%s", msg);
  528. ppc_md.progress(buf, 0);
  529. }
  530. }
  531. /* Print a boot progress message. */
  532. void ppc64_boot_msg(unsigned int src, const char *msg)
  533. {
  534. ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_IPL_MESSAGE|src, msg);
  535. printk("[boot]%04x %s\n", src, msg);
  536. }
  537. /* Print a termination message (print only -- does not stop the kernel) */
  538. void ppc64_terminate_msg(unsigned int src, const char *msg)
  539. {
  540. ppc64_do_msg(PPC64_LINUX_FUNCTION|PPC64_TERM_MESSAGE|src, msg);
  541. printk("[terminate]%04x %s\n", src, msg);
  542. }
  543. int check_legacy_ioport(unsigned long base_port)
  544. {
  545. if (ppc_md.check_legacy_ioport == NULL)
  546. return 0;
  547. return ppc_md.check_legacy_ioport(base_port);
  548. }
  549. EXPORT_SYMBOL(check_legacy_ioport);
  550. void cpu_die(void)
  551. {
  552. if (ppc_md.cpu_die)
  553. ppc_md.cpu_die();
  554. }
  555. #ifdef CONFIG_SMP
  556. void __init setup_per_cpu_areas(void)
  557. {
  558. int i;
  559. unsigned long size;
  560. char *ptr;
  561. /* Copy section for each CPU (we discard the original) */
  562. size = ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES);
  563. #ifdef CONFIG_MODULES
  564. if (size < PERCPU_ENOUGH_ROOM)
  565. size = PERCPU_ENOUGH_ROOM;
  566. #endif
  567. for_each_cpu(i) {
  568. ptr = alloc_bootmem_node(NODE_DATA(cpu_to_node(i)), size);
  569. if (!ptr)
  570. panic("Cannot allocate cpu data for CPU %d\n", i);
  571. paca[i].data_offset = ptr - __per_cpu_start;
  572. memcpy(ptr, __per_cpu_start, __per_cpu_end - __per_cpu_start);
  573. }
  574. }
  575. #endif