xref: /illumos-gate/usr/src/uts/intel/promif/prom_enter.c (revision f0089e391b2bc4be2755f1a1b51fb4cd9b8f3988)
1*f0089e39SRichard Lowe /*
2*f0089e39SRichard Lowe  * CDDL HEADER START
3*f0089e39SRichard Lowe  *
4*f0089e39SRichard Lowe  * The contents of this file are subject to the terms of the
5*f0089e39SRichard Lowe  * Common Development and Distribution License (the "License").
6*f0089e39SRichard Lowe  * You may not use this file except in compliance with the License.
7*f0089e39SRichard Lowe  *
8*f0089e39SRichard Lowe  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*f0089e39SRichard Lowe  * or http://www.opensolaris.org/os/licensing.
10*f0089e39SRichard Lowe  * See the License for the specific language governing permissions
11*f0089e39SRichard Lowe  * and limitations under the License.
12*f0089e39SRichard Lowe  *
13*f0089e39SRichard Lowe  * When distributing Covered Code, include this CDDL HEADER in each
14*f0089e39SRichard Lowe  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*f0089e39SRichard Lowe  * If applicable, add the following below this CDDL HEADER, with the
16*f0089e39SRichard Lowe  * fields enclosed by brackets "[]" replaced with your own identifying
17*f0089e39SRichard Lowe  * information: Portions Copyright [yyyy] [name of copyright owner]
18*f0089e39SRichard Lowe  *
19*f0089e39SRichard Lowe  * CDDL HEADER END
20*f0089e39SRichard Lowe  */
21*f0089e39SRichard Lowe /*
22*f0089e39SRichard Lowe  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23*f0089e39SRichard Lowe  * Use is subject to license terms.
24*f0089e39SRichard Lowe  */
25*f0089e39SRichard Lowe 
26*f0089e39SRichard Lowe #include <sys/promif.h>
27*f0089e39SRichard Lowe #include <sys/promimpl.h>
28*f0089e39SRichard Lowe #include <sys/archsystm.h>
29*f0089e39SRichard Lowe #include <sys/reboot.h>
30*f0089e39SRichard Lowe #include <sys/kdi.h>
31*f0089e39SRichard Lowe 
32*f0089e39SRichard Lowe /*
33*f0089e39SRichard Lowe  * The Intel cpu does not have an underlying monitor.
34*f0089e39SRichard Lowe  * So, we emulate the best we can.....
35*f0089e39SRichard Lowe  */
36*f0089e39SRichard Lowe 
37*f0089e39SRichard Lowe void
prom_enter_mon(void)38*f0089e39SRichard Lowe prom_enter_mon(void)
39*f0089e39SRichard Lowe {
40*f0089e39SRichard Lowe #if defined(_KMDB)
41*f0089e39SRichard Lowe 	prom_exit_to_mon();
42*f0089e39SRichard Lowe #endif
43*f0089e39SRichard Lowe 
44*f0089e39SRichard Lowe 	if (boothowto & RB_DEBUG)
45*f0089e39SRichard Lowe 		kmdb_enter();
46*f0089e39SRichard Lowe 	else {
47*f0089e39SRichard Lowe 		prom_printf("Press any key to continue.");
48*f0089e39SRichard Lowe 		(void) prom_getchar();
49*f0089e39SRichard Lowe 	}
50*f0089e39SRichard Lowe }
51