Beispiel #1
0
void
system_check(void)
{
	char buf[PROM_VERS_MAX_LEN];
	pnode_t	n;
	char	arch[128];
	size_t	len;
	bootplat_defaults_t *plat_defaults;

	/*
	 * This is a sun4v machine iff the device_type property
	 * exists on the root node and has the value "sun4v".
	 * Some older sunfire proms do not have such a property.
	 */
	is_sun4v = 0;
	n = prom_rootnode();
	len = prom_getproplen(n, "device_type");
	if (len > 0 && len < sizeof (arch)) {
		(void) prom_getprop(n, "device_type", arch);
		arch[len] = '\0';
		dprintf("device_type=%s\n", arch);
		if (strcmp(arch, "sun4v") == 0) {
			is_sun4v = 1;
		}
	} else {
		dprintf("device_type: no such property, len=%d\n", (int)len);
	}

	if (!is_sun4v && cpu_is_ultrasparc_1()) {
		printf("UltraSPARC I processors are not supported by this "
		    "release of Solaris.\n");
		prom_exit_to_mon();
	}

	/*
	 * Set up defaults per platform
	 */
	plat_defaults = (is_sun4v) ?
	    &sun4v_plat_defaults : &sun4u_plat_defaults;

	default_name = plat_defaults->plat_defaults_name;
	default_path = plat_defaults->plat_defaults_path;
	vac = plat_defaults->plat_defaults_vac;

	dprintf("default_name: %s\n", default_name);
	dprintf("default_path: %s\n", default_path);
	dprintf("vac: %d\n", vac);

	if (prom_version_check(buf, PROM_VERS_MAX_LEN, NULL) != PROM_VER64_OK) {
		printf("The firmware on this system does not support the 64-bit"
		    " OS.\n\tPlease upgrade to at least the following version:"
		    "\n\n\t%s\n", buf);
		prom_exit_to_mon();
	}
}
Beispiel #2
0
void
prom_panic(char *string)
{
	if (string)
		prom_printf("Panic: %s %s\n", promif_clntname, string);
	prom_exit_to_mon();
}
Beispiel #3
0
/*ARGSUSED*/
static int
clexit(cli_ent_t *cliptr, char *valstr, boolean_t out)
{
	prom_exit_to_mon();
	/*NOTREACHED*/
	return (CLI_EXIT);
}
Beispiel #4
0
/*
 * Halt the machine and return to the monitor
 */
void
halt(char *s)
{
	stop_other_cpus();	/* send stop signal to other CPUs */
	if (s)
		prom_printf("(%s) \n", s);
	prom_exit_to_mon();
	/*NOTREACHED*/
}
Beispiel #5
0
void
prom_panic(char *s)
{
	if (!s)
		s = "unknown panic";
	prom_printf("panic - %s: %s\n", promif_clntname, s);
	prom_exit_to_mon();
	/*NOTREACHED*/
}
Beispiel #6
0
/*ARGSUSED*/
static int
cltest(cli_ent_t *cliptr, char *valstr, boolean_t out)
{
	(void) ipv4_setpromiscuous(B_FALSE);
	printf("\n");
	for (;;) {
		printf(TEST_PROMPT);
		if (editline(cmdbuf, sizeof (cmdbuf)) > 0) {
			printf("\n");
			(void) st_interpret(cmdbuf);
		} else {
			prom_exit_to_mon();
			/* NOTREACHED */
		}
	}

	/* NOTREACHED */
	return (CLI_CONT);
}
void
kmdb_prom_exit_to_mon(void)
{
	prom_exit_to_mon();
}
Beispiel #8
0
/*
 * similar to above before exiting to the prom
 */
void
cb_exit_to_mon(void)
{
	cb_set_idev(kbd_input);
	prom_exit_to_mon();
}