init.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * PROM library initialisation code.
  7. *
  8. * Copyright (C) 1996 David S. Miller ([email protected])
  9. */
  10. #include <linux/init.h>
  11. #include <linux/kernel.h>
  12. #include <asm/bootinfo.h>
  13. #include <asm/sgialib.h>
  14. #include <asm/smp-ops.h>
  15. #undef DEBUG_PROM_INIT
  16. /* Master romvec interface. */
  17. struct linux_romvec *romvec;
  18. #if defined(CONFIG_64BIT) && defined(CONFIG_FW_ARC32)
  19. /* stack for calling 32bit ARC prom */
  20. u64 o32_stk[4096];
  21. #endif
  22. void __init prom_init(void)
  23. {
  24. PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK;
  25. romvec = ROMVECTOR;
  26. if (pb->magic != 0x53435241) {
  27. printk(KERN_CRIT "Aieee, bad prom vector magic %08lx\n",
  28. (unsigned long) pb->magic);
  29. while(1)
  30. ;
  31. }
  32. prom_init_cmdline(fw_arg0, (LONG *)fw_arg1);
  33. prom_identify_arch();
  34. printk(KERN_INFO "PROMLIB: ARC firmware Version %d Revision %d\n",
  35. pb->ver, pb->rev);
  36. prom_meminit();
  37. #ifdef DEBUG_PROM_INIT
  38. pr_info("Press a key to reboot\n");
  39. ArcRead(0, &c, 1, &cnt);
  40. ArcEnterInteractiveMode();
  41. #endif
  42. }