Example #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
}
Example #2
0
int
goany(void)
{
	prom_printf("Type any key to continue ");
	(void) prom_getchar();
	prom_printf("\n");
	return (1);
}
Example #3
0
/*
 * PROM console input putchar.
 */
int
prom_cngetc(dev_t dev)
{
	int s, c;

	s = splhigh();
	c = prom_getchar();
	splx(s);
	return (c);
}
Example #4
0
void indy_8254timer_irq(void)
{
        int cpu = smp_processor_id();
        int irq = 4;

        irq_enter(cpu);
        kstat.irqs[0][irq]++;
        printk("indy_8254timer_irq: Whoops, should not have gotten this IRQ\n");
        prom_getchar();
        prom_imode();
        irq_exit(cpu);
}
Example #5
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
}
Example #6
0
static char *buffer_edit(char *buf, void (*func) (const char *p))
{
	int len, c;
	len = strlen(buf);
	if (func)
		prom_printf(buf);
	else {
		for (c = 0; c < len; c++)
			prom_printf("*");
	}

	for (;;) {
		c = prom_getchar();
		if (c == -1)
			break;
		if (char_is_newline(c))
			break;
		if (char_is_tab(c) && func)
			len = tabfunc(buf, len, func);
		else if (char_is_backspace(c)) {
			if (len > 0) {
				--len;
				buf[len] = 0;
				prom_printf("\b \b");
			}
		} else {
			c = char_to_ascii(c);
			if (c && len < CMD_LENG - 2) {
				buf[len] = c;
				buf[len + 1] = 0;
				if (func)
					prom_printf(buf + len);
				else
					prom_printf("*");
				len++;
			}
		}
	}

	buf[len] = 0;
	return buf;
}
Example #7
0
static int prom_console_wait_key(struct console *co)
{
    return prom_getchar();
}