Ejemplo n.º 1
0
int
main(void)
{
	char	c;

	init_devices();

	comcninit();

	opt_subcmd_read(NULL);

	print_banner();

	c = awaitkey();
	if (c != '\r' && c != '\n' && c != '\0') {
		printf("type \"?\" or \"h\" for help.\n");
		bootmenu(); /* does not return */
	}

	command_boot(NULL);
	/*
	 * command_boot() returns only if it failed to boot.
	 * we enter to boot menu in this case.
	 */
	bootmenu();
	
	return 0;
}
Ejemplo n.º 2
0
void
consinit(void)
{
#if ((NVIDCVIDEO>0) && (NRPCKBD>0))
	static struct rpckbd_softc *ksc = &console_kbd;
#endif

	static int consinit_called = 0;

	if (consinit_called != 0)
		return;
	consinit_called = 1;

#ifdef COMCONSOLE
	comcninit(NULL);
	return;
#endif


#if ((NVIDCVIDEO>0) && (NRPCKBD>0))
	/* set up bus variables for attachment */
	ksc->sc_iot	 = &iomd_bs_tag;
	ksc->t_isconsole = 1;
	ksc->data_port	 = IOMD_KBDDAT;
	ksc->cmd_port	 = IOMD_KBDCR;
	ksc->sc_enabled	 = 1;
	bus_space_map(ksc->sc_iot, IOMD_KBDDAT, 8, 0, &(ksc->sc_ioh));

	rpckbd_cnattach((struct device *) ksc);
	vidcvideo_cnattach(videomemory.vidm_vbase);
	return;
#else
	/* XXX For old VIDC console. */
	cninit();
	return;
#endif
	panic("No console");	/* Will we ever see this?  */
}