Ejemplo n.º 1
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;
}
Ejemplo n.º 2
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);
}
Ejemplo n.º 3
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;
}