setup_64.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. /*
  2. * linux/arch/sparc64/kernel/setup.c
  3. *
  4. * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu)
  5. * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
  6. */
  7. #include <linux/errno.h>
  8. #include <linux/sched.h>
  9. #include <linux/kernel.h>
  10. #include <linux/mm.h>
  11. #include <linux/stddef.h>
  12. #include <linux/unistd.h>
  13. #include <linux/ptrace.h>
  14. #include <asm/smp.h>
  15. #include <linux/user.h>
  16. #include <linux/screen_info.h>
  17. #include <linux/delay.h>
  18. #include <linux/fs.h>
  19. #include <linux/seq_file.h>
  20. #include <linux/syscalls.h>
  21. #include <linux/kdev_t.h>
  22. #include <linux/major.h>
  23. #include <linux/string.h>
  24. #include <linux/init.h>
  25. #include <linux/inet.h>
  26. #include <linux/console.h>
  27. #include <linux/root_dev.h>
  28. #include <linux/interrupt.h>
  29. #include <linux/cpu.h>
  30. #include <linux/initrd.h>
  31. #include <linux/module.h>
  32. #include <linux/start_kernel.h>
  33. #include <asm/io.h>
  34. #include <asm/processor.h>
  35. #include <asm/oplib.h>
  36. #include <asm/page.h>
  37. #include <asm/pgtable.h>
  38. #include <asm/idprom.h>
  39. #include <asm/head.h>
  40. #include <asm/starfire.h>
  41. #include <asm/mmu_context.h>
  42. #include <asm/timer.h>
  43. #include <asm/sections.h>
  44. #include <asm/setup.h>
  45. #include <asm/mmu.h>
  46. #include <asm/ns87303.h>
  47. #include <asm/btext.h>
  48. #include <asm/elf.h>
  49. #include <asm/mdesc.h>
  50. #include <asm/cacheflush.h>
  51. #ifdef CONFIG_IP_PNP
  52. #include <net/ipconfig.h>
  53. #endif
  54. #include "entry.h"
  55. #include "kernel.h"
  56. /* Used to synchronize accesses to NatSemi SUPER I/O chip configure
  57. * operations in asm/ns87303.h
  58. */
  59. DEFINE_SPINLOCK(ns87303_lock);
  60. EXPORT_SYMBOL(ns87303_lock);
  61. struct screen_info screen_info = {
  62. 0, 0, /* orig-x, orig-y */
  63. 0, /* unused */
  64. 0, /* orig-video-page */
  65. 0, /* orig-video-mode */
  66. 128, /* orig-video-cols */
  67. 0, 0, 0, /* unused, ega_bx, unused */
  68. 54, /* orig-video-lines */
  69. 0, /* orig-video-isVGA */
  70. 16 /* orig-video-points */
  71. };
  72. static void
  73. prom_console_write(struct console *con, const char *s, unsigned n)
  74. {
  75. prom_write(s, n);
  76. }
  77. /* Exported for mm/init.c:paging_init. */
  78. unsigned long cmdline_memory_size = 0;
  79. static struct console prom_early_console = {
  80. .name = "earlyprom",
  81. .write = prom_console_write,
  82. .flags = CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
  83. .index = -1,
  84. };
  85. /*
  86. * Process kernel command line switches that are specific to the
  87. * SPARC or that require special low-level processing.
  88. */
  89. static void __init process_switch(char c)
  90. {
  91. switch (c) {
  92. case 'd':
  93. case 's':
  94. break;
  95. case 'h':
  96. prom_printf("boot_flags_init: Halt!\n");
  97. prom_halt();
  98. break;
  99. case 'p':
  100. prom_early_console.flags &= ~CON_BOOT;
  101. break;
  102. case 'P':
  103. /* Force UltraSPARC-III P-Cache on. */
  104. if (tlb_type != cheetah) {
  105. printk("BOOT: Ignoring P-Cache force option.\n");
  106. break;
  107. }
  108. cheetah_pcache_forced_on = 1;
  109. add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
  110. cheetah_enable_pcache();
  111. break;
  112. default:
  113. printk("Unknown boot switch (-%c)\n", c);
  114. break;
  115. }
  116. }
  117. static void __init boot_flags_init(char *commands)
  118. {
  119. while (*commands) {
  120. /* Move to the start of the next "argument". */
  121. while (*commands && *commands == ' ')
  122. commands++;
  123. /* Process any command switches, otherwise skip it. */
  124. if (*commands == '\0')
  125. break;
  126. if (*commands == '-') {
  127. commands++;
  128. while (*commands && *commands != ' ')
  129. process_switch(*commands++);
  130. continue;
  131. }
  132. if (!strncmp(commands, "mem=", 4))
  133. cmdline_memory_size = memparse(commands + 4, &commands);
  134. while (*commands && *commands != ' ')
  135. commands++;
  136. }
  137. }
  138. extern unsigned short root_flags;
  139. extern unsigned short root_dev;
  140. extern unsigned short ram_flags;
  141. #define RAMDISK_IMAGE_START_MASK 0x07FF
  142. #define RAMDISK_PROMPT_FLAG 0x8000
  143. #define RAMDISK_LOAD_FLAG 0x4000
  144. extern int root_mountflags;
  145. char reboot_command[COMMAND_LINE_SIZE];
  146. static struct pt_regs fake_swapper_regs = { { 0, }, 0, 0, 0, 0 };
  147. static void __init per_cpu_patch(void)
  148. {
  149. struct cpuid_patch_entry *p;
  150. unsigned long ver;
  151. int is_jbus;
  152. if (tlb_type == spitfire && !this_is_starfire)
  153. return;
  154. is_jbus = 0;
  155. if (tlb_type != hypervisor) {
  156. __asm__ ("rdpr %%ver, %0" : "=r" (ver));
  157. is_jbus = ((ver >> 32UL) == __JALAPENO_ID ||
  158. (ver >> 32UL) == __SERRANO_ID);
  159. }
  160. p = &__cpuid_patch;
  161. while (p < &__cpuid_patch_end) {
  162. unsigned long addr = p->addr;
  163. unsigned int *insns;
  164. switch (tlb_type) {
  165. case spitfire:
  166. insns = &p->starfire[0];
  167. break;
  168. case cheetah:
  169. case cheetah_plus:
  170. if (is_jbus)
  171. insns = &p->cheetah_jbus[0];
  172. else
  173. insns = &p->cheetah_safari[0];
  174. break;
  175. case hypervisor:
  176. insns = &p->sun4v[0];
  177. break;
  178. default:
  179. prom_printf("Unknown cpu type, halting.\n");
  180. prom_halt();
  181. }
  182. *(unsigned int *) (addr + 0) = insns[0];
  183. wmb();
  184. __asm__ __volatile__("flush %0" : : "r" (addr + 0));
  185. *(unsigned int *) (addr + 4) = insns[1];
  186. wmb();
  187. __asm__ __volatile__("flush %0" : : "r" (addr + 4));
  188. *(unsigned int *) (addr + 8) = insns[2];
  189. wmb();
  190. __asm__ __volatile__("flush %0" : : "r" (addr + 8));
  191. *(unsigned int *) (addr + 12) = insns[3];
  192. wmb();
  193. __asm__ __volatile__("flush %0" : : "r" (addr + 12));
  194. p++;
  195. }
  196. }
  197. void sun4v_patch_1insn_range(struct sun4v_1insn_patch_entry *start,
  198. struct sun4v_1insn_patch_entry *end)
  199. {
  200. while (start < end) {
  201. unsigned long addr = start->addr;
  202. *(unsigned int *) (addr + 0) = start->insn;
  203. wmb();
  204. __asm__ __volatile__("flush %0" : : "r" (addr + 0));
  205. start++;
  206. }
  207. }
  208. void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *start,
  209. struct sun4v_2insn_patch_entry *end)
  210. {
  211. while (start < end) {
  212. unsigned long addr = start->addr;
  213. *(unsigned int *) (addr + 0) = start->insns[0];
  214. wmb();
  215. __asm__ __volatile__("flush %0" : : "r" (addr + 0));
  216. *(unsigned int *) (addr + 4) = start->insns[1];
  217. wmb();
  218. __asm__ __volatile__("flush %0" : : "r" (addr + 4));
  219. start++;
  220. }
  221. }
  222. void sun_m7_patch_2insn_range(struct sun4v_2insn_patch_entry *start,
  223. struct sun4v_2insn_patch_entry *end)
  224. {
  225. while (start < end) {
  226. unsigned long addr = start->addr;
  227. *(unsigned int *) (addr + 0) = start->insns[0];
  228. wmb();
  229. __asm__ __volatile__("flush %0" : : "r" (addr + 0));
  230. *(unsigned int *) (addr + 4) = start->insns[1];
  231. wmb();
  232. __asm__ __volatile__("flush %0" : : "r" (addr + 4));
  233. start++;
  234. }
  235. }
  236. static void __init sun4v_patch(void)
  237. {
  238. extern void sun4v_hvapi_init(void);
  239. if (tlb_type != hypervisor)
  240. return;
  241. sun4v_patch_1insn_range(&__sun4v_1insn_patch,
  242. &__sun4v_1insn_patch_end);
  243. sun4v_patch_2insn_range(&__sun4v_2insn_patch,
  244. &__sun4v_2insn_patch_end);
  245. if (sun4v_chip_type == SUN4V_CHIP_SPARC_M7)
  246. sun_m7_patch_2insn_range(&__sun_m7_2insn_patch,
  247. &__sun_m7_2insn_patch_end);
  248. sun4v_hvapi_init();
  249. }
  250. static void __init popc_patch(void)
  251. {
  252. struct popc_3insn_patch_entry *p3;
  253. struct popc_6insn_patch_entry *p6;
  254. p3 = &__popc_3insn_patch;
  255. while (p3 < &__popc_3insn_patch_end) {
  256. unsigned long i, addr = p3->addr;
  257. for (i = 0; i < 3; i++) {
  258. *(unsigned int *) (addr + (i * 4)) = p3->insns[i];
  259. wmb();
  260. __asm__ __volatile__("flush %0"
  261. : : "r" (addr + (i * 4)));
  262. }
  263. p3++;
  264. }
  265. p6 = &__popc_6insn_patch;
  266. while (p6 < &__popc_6insn_patch_end) {
  267. unsigned long i, addr = p6->addr;
  268. for (i = 0; i < 6; i++) {
  269. *(unsigned int *) (addr + (i * 4)) = p6->insns[i];
  270. wmb();
  271. __asm__ __volatile__("flush %0"
  272. : : "r" (addr + (i * 4)));
  273. }
  274. p6++;
  275. }
  276. }
  277. static void __init pause_patch(void)
  278. {
  279. struct pause_patch_entry *p;
  280. p = &__pause_3insn_patch;
  281. while (p < &__pause_3insn_patch_end) {
  282. unsigned long i, addr = p->addr;
  283. for (i = 0; i < 3; i++) {
  284. *(unsigned int *) (addr + (i * 4)) = p->insns[i];
  285. wmb();
  286. __asm__ __volatile__("flush %0"
  287. : : "r" (addr + (i * 4)));
  288. }
  289. p++;
  290. }
  291. }
  292. void __init start_early_boot(void)
  293. {
  294. int cpu;
  295. check_if_starfire();
  296. per_cpu_patch();
  297. sun4v_patch();
  298. cpu = hard_smp_processor_id();
  299. if (cpu >= NR_CPUS) {
  300. prom_printf("Serious problem, boot cpu id (%d) >= NR_CPUS (%d)\n",
  301. cpu, NR_CPUS);
  302. prom_halt();
  303. }
  304. current_thread_info()->cpu = cpu;
  305. prom_init_report();
  306. start_kernel();
  307. }
  308. /* On Ultra, we support all of the v8 capabilities. */
  309. unsigned long sparc64_elf_hwcap = (HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR |
  310. HWCAP_SPARC_SWAP | HWCAP_SPARC_MULDIV |
  311. HWCAP_SPARC_V9);
  312. EXPORT_SYMBOL(sparc64_elf_hwcap);
  313. static const char *hwcaps[] = {
  314. "flush", "stbar", "swap", "muldiv", "v9",
  315. "ultra3", "blkinit", "n2",
  316. /* These strings are as they appear in the machine description
  317. * 'hwcap-list' property for cpu nodes.
  318. */
  319. "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2",
  320. "ASIBlkInit", "fmaf", "vis3", "hpc", "random", "trans", "fjfmau",
  321. "ima", "cspare", "pause", "cbcond",
  322. };
  323. static const char *crypto_hwcaps[] = {
  324. "aes", "des", "kasumi", "camellia", "md5", "sha1", "sha256",
  325. "sha512", "mpmul", "montmul", "montsqr", "crc32c",
  326. };
  327. void cpucap_info(struct seq_file *m)
  328. {
  329. unsigned long caps = sparc64_elf_hwcap;
  330. int i, printed = 0;
  331. seq_puts(m, "cpucaps\t\t: ");
  332. for (i = 0; i < ARRAY_SIZE(hwcaps); i++) {
  333. unsigned long bit = 1UL << i;
  334. if (caps & bit) {
  335. seq_printf(m, "%s%s",
  336. printed ? "," : "", hwcaps[i]);
  337. printed++;
  338. }
  339. }
  340. if (caps & HWCAP_SPARC_CRYPTO) {
  341. unsigned long cfr;
  342. __asm__ __volatile__("rd %%asr26, %0" : "=r" (cfr));
  343. for (i = 0; i < ARRAY_SIZE(crypto_hwcaps); i++) {
  344. unsigned long bit = 1UL << i;
  345. if (cfr & bit) {
  346. seq_printf(m, "%s%s",
  347. printed ? "," : "", crypto_hwcaps[i]);
  348. printed++;
  349. }
  350. }
  351. }
  352. seq_putc(m, '\n');
  353. }
  354. static void __init report_one_hwcap(int *printed, const char *name)
  355. {
  356. if ((*printed) == 0)
  357. printk(KERN_INFO "CPU CAPS: [");
  358. printk(KERN_CONT "%s%s",
  359. (*printed) ? "," : "", name);
  360. if (++(*printed) == 8) {
  361. printk(KERN_CONT "]\n");
  362. *printed = 0;
  363. }
  364. }
  365. static void __init report_crypto_hwcaps(int *printed)
  366. {
  367. unsigned long cfr;
  368. int i;
  369. __asm__ __volatile__("rd %%asr26, %0" : "=r" (cfr));
  370. for (i = 0; i < ARRAY_SIZE(crypto_hwcaps); i++) {
  371. unsigned long bit = 1UL << i;
  372. if (cfr & bit)
  373. report_one_hwcap(printed, crypto_hwcaps[i]);
  374. }
  375. }
  376. static void __init report_hwcaps(unsigned long caps)
  377. {
  378. int i, printed = 0;
  379. for (i = 0; i < ARRAY_SIZE(hwcaps); i++) {
  380. unsigned long bit = 1UL << i;
  381. if (caps & bit)
  382. report_one_hwcap(&printed, hwcaps[i]);
  383. }
  384. if (caps & HWCAP_SPARC_CRYPTO)
  385. report_crypto_hwcaps(&printed);
  386. if (printed != 0)
  387. printk(KERN_CONT "]\n");
  388. }
  389. static unsigned long __init mdesc_cpu_hwcap_list(void)
  390. {
  391. struct mdesc_handle *hp;
  392. unsigned long caps = 0;
  393. const char *prop;
  394. int len;
  395. u64 pn;
  396. hp = mdesc_grab();
  397. if (!hp)
  398. return 0;
  399. pn = mdesc_node_by_name(hp, MDESC_NODE_NULL, "cpu");
  400. if (pn == MDESC_NODE_NULL)
  401. goto out;
  402. prop = mdesc_get_property(hp, pn, "hwcap-list", &len);
  403. if (!prop)
  404. goto out;
  405. while (len) {
  406. int i, plen;
  407. for (i = 0; i < ARRAY_SIZE(hwcaps); i++) {
  408. unsigned long bit = 1UL << i;
  409. if (!strcmp(prop, hwcaps[i])) {
  410. caps |= bit;
  411. break;
  412. }
  413. }
  414. for (i = 0; i < ARRAY_SIZE(crypto_hwcaps); i++) {
  415. if (!strcmp(prop, crypto_hwcaps[i]))
  416. caps |= HWCAP_SPARC_CRYPTO;
  417. }
  418. plen = strlen(prop) + 1;
  419. prop += plen;
  420. len -= plen;
  421. }
  422. out:
  423. mdesc_release(hp);
  424. return caps;
  425. }
  426. /* This yields a mask that user programs can use to figure out what
  427. * instruction set this cpu supports.
  428. */
  429. static void __init init_sparc64_elf_hwcap(void)
  430. {
  431. unsigned long cap = sparc64_elf_hwcap;
  432. unsigned long mdesc_caps;
  433. if (tlb_type == cheetah || tlb_type == cheetah_plus)
  434. cap |= HWCAP_SPARC_ULTRA3;
  435. else if (tlb_type == hypervisor) {
  436. if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1 ||
  437. sun4v_chip_type == SUN4V_CHIP_NIAGARA2 ||
  438. sun4v_chip_type == SUN4V_CHIP_NIAGARA3 ||
  439. sun4v_chip_type == SUN4V_CHIP_NIAGARA4 ||
  440. sun4v_chip_type == SUN4V_CHIP_NIAGARA5 ||
  441. sun4v_chip_type == SUN4V_CHIP_SPARC_M6 ||
  442. sun4v_chip_type == SUN4V_CHIP_SPARC_M7 ||
  443. sun4v_chip_type == SUN4V_CHIP_SPARC64X)
  444. cap |= HWCAP_SPARC_BLKINIT;
  445. if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2 ||
  446. sun4v_chip_type == SUN4V_CHIP_NIAGARA3 ||
  447. sun4v_chip_type == SUN4V_CHIP_NIAGARA4 ||
  448. sun4v_chip_type == SUN4V_CHIP_NIAGARA5 ||
  449. sun4v_chip_type == SUN4V_CHIP_SPARC_M6 ||
  450. sun4v_chip_type == SUN4V_CHIP_SPARC_M7 ||
  451. sun4v_chip_type == SUN4V_CHIP_SPARC64X)
  452. cap |= HWCAP_SPARC_N2;
  453. }
  454. cap |= (AV_SPARC_MUL32 | AV_SPARC_DIV32 | AV_SPARC_V8PLUS);
  455. mdesc_caps = mdesc_cpu_hwcap_list();
  456. if (!mdesc_caps) {
  457. if (tlb_type == spitfire)
  458. cap |= AV_SPARC_VIS;
  459. if (tlb_type == cheetah || tlb_type == cheetah_plus)
  460. cap |= AV_SPARC_VIS | AV_SPARC_VIS2;
  461. if (tlb_type == cheetah_plus) {
  462. unsigned long impl, ver;
  463. __asm__ __volatile__("rdpr %%ver, %0" : "=r" (ver));
  464. impl = ((ver >> 32) & 0xffff);
  465. if (impl == PANTHER_IMPL)
  466. cap |= AV_SPARC_POPC;
  467. }
  468. if (tlb_type == hypervisor) {
  469. if (sun4v_chip_type == SUN4V_CHIP_NIAGARA1)
  470. cap |= AV_SPARC_ASI_BLK_INIT;
  471. if (sun4v_chip_type == SUN4V_CHIP_NIAGARA2 ||
  472. sun4v_chip_type == SUN4V_CHIP_NIAGARA3 ||
  473. sun4v_chip_type == SUN4V_CHIP_NIAGARA4 ||
  474. sun4v_chip_type == SUN4V_CHIP_NIAGARA5 ||
  475. sun4v_chip_type == SUN4V_CHIP_SPARC_M6 ||
  476. sun4v_chip_type == SUN4V_CHIP_SPARC_M7 ||
  477. sun4v_chip_type == SUN4V_CHIP_SPARC64X)
  478. cap |= (AV_SPARC_VIS | AV_SPARC_VIS2 |
  479. AV_SPARC_ASI_BLK_INIT |
  480. AV_SPARC_POPC);
  481. if (sun4v_chip_type == SUN4V_CHIP_NIAGARA3 ||
  482. sun4v_chip_type == SUN4V_CHIP_NIAGARA4 ||
  483. sun4v_chip_type == SUN4V_CHIP_NIAGARA5 ||
  484. sun4v_chip_type == SUN4V_CHIP_SPARC_M6 ||
  485. sun4v_chip_type == SUN4V_CHIP_SPARC_M7 ||
  486. sun4v_chip_type == SUN4V_CHIP_SPARC64X)
  487. cap |= (AV_SPARC_VIS3 | AV_SPARC_HPC |
  488. AV_SPARC_FMAF);
  489. }
  490. }
  491. sparc64_elf_hwcap = cap | mdesc_caps;
  492. report_hwcaps(sparc64_elf_hwcap);
  493. if (sparc64_elf_hwcap & AV_SPARC_POPC)
  494. popc_patch();
  495. if (sparc64_elf_hwcap & AV_SPARC_PAUSE)
  496. pause_patch();
  497. }
  498. void __init setup_arch(char **cmdline_p)
  499. {
  500. /* Initialize PROM console and command line. */
  501. *cmdline_p = prom_getbootargs();
  502. strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE);
  503. parse_early_param();
  504. boot_flags_init(*cmdline_p);
  505. #ifdef CONFIG_EARLYFB
  506. if (btext_find_display())
  507. #endif
  508. register_console(&prom_early_console);
  509. if (tlb_type == hypervisor)
  510. printk("ARCH: SUN4V\n");
  511. else
  512. printk("ARCH: SUN4U\n");
  513. #ifdef CONFIG_DUMMY_CONSOLE
  514. conswitchp = &dummy_con;
  515. #endif
  516. idprom_init();
  517. if (!root_flags)
  518. root_mountflags &= ~MS_RDONLY;
  519. ROOT_DEV = old_decode_dev(root_dev);
  520. #ifdef CONFIG_BLK_DEV_RAM
  521. rd_image_start = ram_flags & RAMDISK_IMAGE_START_MASK;
  522. rd_prompt = ((ram_flags & RAMDISK_PROMPT_FLAG) != 0);
  523. rd_doload = ((ram_flags & RAMDISK_LOAD_FLAG) != 0);
  524. #endif
  525. task_thread_info(&init_task)->kregs = &fake_swapper_regs;
  526. #ifdef CONFIG_IP_PNP
  527. if (!ic_set_manually) {
  528. phandle chosen = prom_finddevice("/chosen");
  529. u32 cl, sv, gw;
  530. cl = prom_getintdefault (chosen, "client-ip", 0);
  531. sv = prom_getintdefault (chosen, "server-ip", 0);
  532. gw = prom_getintdefault (chosen, "gateway-ip", 0);
  533. if (cl && sv) {
  534. ic_myaddr = cl;
  535. ic_servaddr = sv;
  536. if (gw)
  537. ic_gateway = gw;
  538. #if defined(CONFIG_IP_PNP_BOOTP) || defined(CONFIG_IP_PNP_RARP)
  539. ic_proto_enabled = 0;
  540. #endif
  541. }
  542. }
  543. #endif
  544. /* Get boot processor trap_block[] setup. */
  545. init_cur_cpu_trap(current_thread_info());
  546. paging_init();
  547. init_sparc64_elf_hwcap();
  548. }
  549. extern int stop_a_enabled;
  550. void sun_do_break(void)
  551. {
  552. if (!stop_a_enabled)
  553. return;
  554. prom_printf("\n");
  555. flush_user_windows();
  556. prom_cmdline();
  557. }
  558. EXPORT_SYMBOL(sun_do_break);
  559. int stop_a_enabled = 1;
  560. EXPORT_SYMBOL(stop_a_enabled);