Esempio n. 1
0
void __init prom_init(void)
{
	PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK;
	romvec = ROMVECTOR;
	prom_argc = fw_arg0;
	_prom_argv = (LONG *) fw_arg1;
	_prom_envp = (LONG *) fw_arg2;

	if (pb->magic != 0x53435241) {
		prom_printf("Aieee, bad prom vector magic %08lx\n", pb->magic);
		while(1)
			;
	}

	prom_init_cmdline();
	prom_identify_arch();
	printk(KERN_INFO "PROMLIB: ARC firmware Version %d Revision %d\n",
	       pb->ver, pb->rev);
	prom_meminit();

#ifdef DEBUG_PROM_INIT
	prom_printf("Press a key to reboot\n");
	prom_getchar();
	ArcEnterInteractiveMode();
#endif
}
Esempio n. 2
0
int __init prom_init(int argc, char **argv,
	       unsigned long magic, int *prom_vec)
{
	extern void dec_machine_halt(void);

	/* Determine which PROM's we have (and therefore which machine we're on!) */
	which_prom(magic, prom_vec);

	if (magic == REX_PROM_MAGIC)
		rex_clear_cache();

	/* Were we compiled with the right CPU option? */
#if defined(CONFIG_CPU_R3000)
	if ((mips_cputype == CPU_R4000SC) || (mips_cputype == CPU_R4400SC)) {
		prom_printf("Sorry, this kernel is compiled for the wrong CPU type!\n");
		prom_printf("Please recompile with \"CONFIG_CPU_R4x00 = y\"\n");
		dec_machine_halt();
	}
#endif

#if defined(CONFIG_CPU_R4x00)
	if ((mips_cputype == CPU_R3000) || (mips_cputype == CPU_R3000A)) {
		prom_printf("Sorry, this kernel is compiled for the wrong CPU type!\n");
		prom_printf("Please recompile with \"CONFIG_CPU_R3000 = y\"\n");
		dec_machine_halt();
	}
#endif

	prom_meminit(magic);
	prom_identify_arch(magic);
	prom_init_cmdline(argc, argv, magic);

	return 0;
}
Esempio n. 3
0
void __init prom_init(void)
{
	extern void ATTRIB_NORET dec_machine_halt(void);
	static char cpu_msg[] __initdata =
		"Sorry, this kernel is compiled for a wrong CPU type!\n";
	s32 argc = fw_arg0;
	s32 *argv = (void *)fw_arg1;
	u32 magic = fw_arg2;
	s32 *prom_vec = (void *)fw_arg3;

	/*
	 * Determine which PROM we have
	 * (and therefore which machine we're on!)
	 */
	which_prom(magic, prom_vec);

	if (prom_is_rex(magic))
		rex_clear_cache();

	/* Register the early console.  */
	register_prom_console();

	/* Were we compiled with the right CPU option? */
#if defined(CONFIG_CPU_R3000)
	if ((current_cpu_data.cputype == CPU_R4000SC) ||
	    (current_cpu_data.cputype == CPU_R4400SC)) {
		static char r4k_msg[] __initdata =
			"Please recompile with \"CONFIG_CPU_R4x00 = y\".\n";
		printk(cpu_msg);
		printk(r4k_msg);
		dec_machine_halt();
	}
#endif

#if defined(CONFIG_CPU_R4X00)
	if ((current_cpu_data.cputype == CPU_R3000) ||
	    (current_cpu_data.cputype == CPU_R3000A)) {
		static char r3k_msg[] __initdata =
			"Please recompile with \"CONFIG_CPU_R3000 = y\".\n";
		printk(cpu_msg);
		printk(r3k_msg);
		dec_machine_halt();
	}
#endif

	prom_meminit(magic);
	prom_identify_arch(magic);
	prom_init_cmdline(argc, argv, magic);
}
Esempio n. 4
0
void __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
{
	struct linux_promblock *pb;

	romvec = ROMVECTOR;
	pb = sgi_pblock = PROMBLOCK;
	prom_argc = argc;
	prom_argv = argv;
	prom_envp = envp;

#if 0
	/* arc_printf should not use prom_printf as soon as we free
	 * the prom buffers - This horribly breaks on Indys with framebuffer
	 * as it simply stops after initialising swap - On the Indigo2 serial
	 * console you will get A LOT illegal instructions - Only enable
	 * this for early init crashes - This also brings up artefacts of
	 * printing everything twice on serial console and on GFX Console
	 * this has the effect of having the prom printing everything
	 * in the small rectangle and the kernel printing around.
	 */

	arc_setup_console();
#endif
	if (pb->magic != 0x53435241) {
		prom_printf("Aieee, bad prom vector magic %08lx\n", pb->magic);
		while(1)
			;
	}

	prom_init_cmdline();

	prom_vers = pb->ver;
	prom_rev = pb->rev;
	prom_identify_arch();
	printk("PROMLIB: ARC firmware Version %d Revision %d\n",
		    prom_vers, prom_rev);
	prom_meminit();

#ifdef DEBUG_PROM_INIT
	{
		prom_printf("Press a key to reboot\n");
		(void) prom_getchar();
		romvec->imode();
	}
#endif
}
Esempio n. 5
0
int __init prom_init(s32 argc, s32 *argv, u32 magic, s32 *prom_vec)
{
	extern void dec_machine_halt(void);

	/*
	 * Determine which PROM's we have
	 * (and therefore which machine we're on!)
	 */
	which_prom(magic, prom_vec);

	if (prom_is_rex(magic))
		rex_clear_cache();

	/* Were we compiled with the right CPU option? */
#if defined(CONFIG_CPU_R3000)
	if ((current_cpu_data.cputype == CPU_R4000SC) ||
	    (current_cpu_data.cputype == CPU_R4400SC)) {
		prom_printf("Sorry, this kernel is compiled for the wrong CPU type!\n");
		prom_printf("Please recompile with \"CONFIG_CPU_R4x00 = y\"\n");
		dec_machine_halt();
	}
#endif

#if defined(CONFIG_CPU_R4X00)
	if ((current_cpu_data.cputype == CPU_R3000) ||
	    (current_cpu_data.cputype == CPU_R3000A)) {
		prom_printf("Sorry, this kernel is compiled for the wrong CPU type!\n");
		prom_printf("Please recompile with \"CONFIG_CPU_R3000 = y\"\n");
		dec_machine_halt();
	}
#endif

	prom_meminit(magic);
	prom_identify_arch(magic);
	prom_init_cmdline(argc, argv, magic);

	return 0;
}
Esempio n. 6
0
void __init prom_init(void)
{
	PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK;

	romvec = ROMVECTOR;

	prom_argc = fw_arg0;
	_prom_argv = (LONG *) fw_arg1;
	_prom_envp = (LONG *) fw_arg2;

	if (pb->magic != 0x53435241) {
		printk(KERN_CRIT "Aieee, bad prom vector magic %08lx\n",
		       (unsigned long) pb->magic);
		while(1)
			;
	}

	prom_init_cmdline();
	prom_identify_arch();
	printk(KERN_INFO "PROMLIB: ARC firmware Version %d Revision %d\n",
	       pb->ver, pb->rev);
	prom_meminit();

#ifdef DEBUG_PROM_INIT
	pr_info("Press a key to reboot\n");
	ArcRead(0, &c, 1, &cnt);
	ArcEnterInteractiveMode();
#endif
#ifdef CONFIG_SGI_IP27
	{
		extern struct plat_smp_ops ip27_smp_ops;

		register_smp_ops(&ip27_smp_ops);
	}
#endif
}