changeset 11897:106287105e0f

6830088 Fast reboot support for SPARC platforms
author Christopher Kiick <Chris.Kiick@Sun.COM>
date Thu, 11 Mar 2010 18:19:56 -0500
parents 8eeb909c4fac
children 8d567e946263
files usr/src/cmd/Makefile.check usr/src/cmd/halt/Makefile usr/src/cmd/halt/halt.c usr/src/cmd/halt/smf.i386/Makefile usr/src/cmd/halt/smf.i386/boot-config.xml usr/src/cmd/halt/smf.i386/svc-boot-config usr/src/cmd/halt/smf.sparc/Makefile usr/src/cmd/halt/smf.sparc/boot-config.xml usr/src/cmd/halt/smf.sparc/svc-boot-config usr/src/cmd/halt/smf/Makefile usr/src/cmd/halt/smf/boot-config.xml usr/src/cmd/halt/smf/svc-boot-config usr/src/lib/libscf/common/highlevel.c usr/src/uts/common/krtld/kobj_bootflags.c usr/src/uts/sun4u/os/mach_cpu_states.c usr/src/uts/sun4v/os/mach_cpu_states.c
diffstat 16 files changed, 590 insertions(+), 288 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/Makefile.check	Thu Mar 11 15:13:36 2010 -0800
+++ b/usr/src/cmd/Makefile.check	Thu Mar 11 18:19:56 2010 -0500
@@ -113,7 +113,7 @@
 	gss/gssd			\
 	hal/addons/network-devices	\
 	hal/hald/solaris		\
-	halt/smf			\
+	halt/smf.$(MACH)		\
 	hostid/smf			\
 	idmap/idmapd			\
 	ipf/svc				\
--- a/usr/src/cmd/halt/Makefile	Thu Mar 11 15:13:36 2010 -0800
+++ b/usr/src/cmd/halt/Makefile	Thu Mar 11 18:19:56 2010 -0500
@@ -19,7 +19,7 @@
 # CDDL HEADER END
 #
 #
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
@@ -32,8 +32,8 @@
 # A new propery config/uadmin_boot_archive_sync is added to
 # boot-config service. Which needs a support on sparc also.
 #
-sparc_SUBDIRS = smf
-i386_SUBDIRS = smf
+sparc_SUBDIRS = smf.sparc
+i386_SUBDIRS = smf.i386
 SUBDIRS = $($(MACH)_SUBDIRS)
 
 ROOTLINKS = $(ROOTUSRSBIN)/poweroff $(ROOTUSRSBIN)/reboot
--- a/usr/src/cmd/halt/halt.c	Thu Mar 11 15:13:36 2010 -0800
+++ b/usr/src/cmd/halt/halt.c	Thu Mar 11 18:19:56 2010 -0500
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -132,6 +132,7 @@
  * Fast Reboot related variables
  */
 static char	fastboot_mounted[MAXPATHLEN];
+
 #if defined(__i386)
 static grub_boot_args_t	fbarg;
 static grub_boot_args_t	*fbarg_used;
@@ -1287,8 +1288,8 @@
 		optstring = "dlnqpfe:";
 		usage = gettext("usage: %s [ -dlnq(p|fe:) ] [ boot args ]\n");
 #else
-		optstring = "dlnq";
-		usage = gettext("usage: %s [ -dlnq ] [ boot args ]\n");
+		optstring = "dlnqfp";
+		usage = gettext("usage: %s [ -dlnq(p|f) ] [ boot args ]\n");
 #endif
 		cmd = A_SHUTDOWN;
 		fcn = AD_BOOT;
@@ -1322,13 +1323,13 @@
 		case 'y':
 			ttyn = NULL;
 			break;
-#if defined(__i386)
+		case 'f':
+			fast_reboot = 1;
+			break;
 		case 'p':
 			prom_reboot = 1;
 			break;
-		case 'f':
-			fast_reboot = 1;
-			break;
+#if defined(__i386)
 		case 'e':
 			bename = optarg;
 			break;
@@ -1382,24 +1383,31 @@
 		    cmdname);
 		return (EINVAL);
 	}
-
 	/*
 	 * Check whether fast reboot is the default operating mode
 	 */
 	if (fcn == AD_BOOT && !fast_reboot && !prom_reboot &&
-	    zoneid == GLOBAL_ZONEID)
+	    zoneid == GLOBAL_ZONEID) {
 		fast_reboot = scf_is_fastboot_default();
 
+	}
+
 	if (bename && !fast_reboot)	{
 		(void) fprintf(stderr, gettext("%s: -e only valid with -f\n"),
 		    cmdname);
 		return (EINVAL);
 	}
 
+#if defined(__sparc)
+	if (fast_reboot) {
+		fast_reboot = 2;	/* need to distinguish each case */
+	}
+#endif
+
 	/*
 	 * If fast reboot, do some sanity check on the argument
 	 */
-	if (fast_reboot) {
+	if (fast_reboot == 1) {
 		int rc;
 		int is_dryrun = 0;
 
@@ -1543,7 +1551,7 @@
 	 * Try to stop gdm so X has a chance to return the screen and
 	 * keyboard to a sane state.
 	 */
-	if (fast_reboot && stop_gdm() != 0) {
+	if (fast_reboot == 1 && stop_gdm() != 0) {
 		(void) fprintf(stderr,
 		    gettext("%s: Falling back to regular reboot.\n"), cmdname);
 		fast_reboot = 0;
@@ -1650,7 +1658,7 @@
 	else
 		(void) audit_halt_fail();
 
-	if (fast_reboot) {
+	if (fast_reboot == 1) {
 		if (bename) {
 			(void) halt_exec(LUUMOUNT_PROG, "-n", bename, NULL);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/halt/smf.i386/Makefile	Thu Mar 11 18:19:56 2010 -0500
@@ -0,0 +1,40 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+#
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+include ../../Makefile.cmd
+
+MANIFEST=	boot-config.xml
+SVCMETHOD=	svc-boot-config
+
+ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
+
+all clean clobber lint:
+
+install:	all $(ROOTMANIFEST) $(ROOTSVCMETHOD)
+
+check:	 $(CHKMANIFEST)
+
+include ../../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/halt/smf.i386/boot-config.xml	Thu Mar 11 18:19:56 2010 -0500
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+ Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+ Use is subject to license terms.
+
+ CDDL HEADER START
+
+ The contents of this file are subject to the terms of the
+ Common Development and Distribution License (the "License").
+ You may not use this file except in compliance with the License.
+
+ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ or http://www.opensolaris.org/os/licensing.
+ See the License for the specific language governing permissions
+ and limitations under the License.
+
+ When distributing Covered Code, include this CDDL HEADER in each
+ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ If applicable, add the following below this CDDL HEADER, with the
+ fields enclosed by brackets "[]" replaced with your own identifying
+ information: Portions Copyright [yyyy] [name of copyright owner]
+
+ CDDL HEADER END
+
+    NOTE:  This service manifest is not editable; its contents will
+    be overwritten by package or patch operations, including
+    operating system upgrade.  Make customizations in a different
+    file.
+-->
+
+<service_bundle type='manifest' name='SUNWcsr:boot-config'>
+
+<service
+	name='system/boot-config'
+	type='service'
+	version='1'>
+
+	<single_instance />
+
+	<dependency
+		name='manifest_import'
+		grouping='optional_all'
+		restart_on='none'
+		type='service'>
+		<service_fmri value='svc:/system/manifest-import:default' />
+	</dependency>
+
+	<!-- The boot-config service is made to depend on milestone
+	multi-user to minimize the chance for panic reboot loop. -->
+	<dependency
+		name='boot_multi-user'
+		grouping='optional_all'
+		restart_on='none'
+		type='service'>
+		<service_fmri value='svc:/milestone/multi-user' />
+	</dependency>
+
+	<instance name='default' enabled = 'true'>
+
+	<exec_method
+		type='method'
+		name='start'
+		exec='/lib/svc/method/svc-boot-config'
+		timeout_seconds='60' />
+
+	<exec_method
+		type='method'
+		name='stop'
+		exec=':true'
+		timeout_seconds='60' />
+
+	<exec_method
+		type='method'
+		name='refresh'
+		exec='/lib/svc/method/svc-boot-config'
+		timeout_seconds='60' />
+
+	<property_group name='startd' type='framework'>
+		<propval name='duration' type='astring'
+			value='transient' />
+	</property_group>
+
+	<property_group name='general' type='framework'>
+		<propval name='action_authorization' type='astring'
+			value='solaris.system.shutdown' />
+		<propval name='value_authorization' type='astring'
+		    value='solaris.system.shutdown' />
+	</property_group>
+
+	<property_group name='config' type='application'>
+		<stability value='Stable' />
+		<propval name='fastreboot_default' type='boolean'
+		    value='true' />
+		<propval name='fastreboot_onpanic' type='boolean'
+		    value='true' />
+		<propval name='value_authorization' type='astring'
+		    value='solaris.system.shutdown' />
+		<propval name='uadmin_boot_archive_sync' type='boolean'
+		    value='false' />	
+	</property_group>
+
+	<property_group name='fastreboot_blacklist' type='application'>
+		<stability value='Unstable' />
+		<property name='platforms' type='astring'>
+		    <astring_list>
+			<value_node value='VirtualBox' />
+			<value_node value='VMware Virtual Platform' />
+			<value_node value='MCP55' />
+			<value_node value='Precision WorkStation 650    ' />
+			<value_node value='PowerEdge 1600SC           ' />
+		    </astring_list>
+		</property>
+	</property_group>
+	</instance>
+
+	<stability value='Stable' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>
+			Boot Configuration Management
+			</loctext>
+		</common_name>
+		<description>
+			<loctext xml:lang='C'>
+Apply the configuration defined in this service by uploading the configuration to the kernel.
+			</loctext>
+		</description>
+		<documentation>
+			<manpage title='reboot' section='1M'
+			    manpath='/usr/share/man' />
+			<manpage title='init' section='1M'
+			    manpath='/usr/share/man' />
+			<manpage title='uadmin' section='2'
+			    manpath='/usr/share/man' />
+			<manpage title='quiesce' section='9E'
+			    manpath='/usr/share/man' />
+		</documentation>
+		<pg_pattern name='config' type='application'
+		    required='true'>
+		    <common_name>
+			    <loctext xml:lang='C'>
+			    Boot Configuration Parameters
+			    </loctext>
+		    </common_name>
+		    <description>
+			<loctext xml:lang='C'>
+Parameters for controlling the reboot behavior.
+			</loctext>
+		    </description>
+		    <prop_pattern name='fastreboot_default' type='boolean'
+			required='true'>
+			<common_name>
+			    <loctext xml:lang='C'>
+			    Fast Reboot by Default
+			    </loctext>
+			</common_name>
+			<description>
+			    <loctext xml:lang='C'>
+When set to true, reboot(1M) and init(1M) 6 will call uadmin(2) with AD_FASTREOOT, which will bypass firmware.
+			    </loctext>
+			</description>
+		    </prop_pattern>
+		    <prop_pattern name='fastreboot_onpanic' type='boolean'
+			required='true'>
+			<common_name>
+			    <loctext xml:lang='C'>
+			    Fast Reboot on Panic
+			    </loctext>
+			</common_name>
+			<description>
+			    <loctext xml:lang='C'>
+When set to true, the system will fast reboot on panic.
+			    </loctext>
+			</description>
+		    </prop_pattern>
+		</pg_pattern>
+
+	</template>
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/halt/smf.i386/svc-boot-config	Thu Mar 11 18:19:56 2010 -0500
@@ -0,0 +1,40 @@
+#!/sbin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Start and refresh method script for the boot-config service.
+#
+
+. /lib/svc/share/smf_include.sh
+
+#
+# This service is only valid in the global zone.
+#
+smf_is_globalzone || exit $SMF_EXIT_OK
+
+#
+# uadmin A_CONFIG AD_UPDATE_BOOT_CONFIG
+#
+/usr/sbin/uadmin 23 1
+exit $SMF_EXIT_OK
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/halt/smf.sparc/Makefile	Thu Mar 11 18:19:56 2010 -0500
@@ -0,0 +1,40 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+#
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+include ../../Makefile.cmd
+
+MANIFEST=	boot-config.xml
+SVCMETHOD=	svc-boot-config
+
+ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
+
+all clean clobber lint:
+
+install:	all $(ROOTMANIFEST) $(ROOTSVCMETHOD)
+
+check:	 $(CHKMANIFEST)
+
+include ../../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/halt/smf.sparc/boot-config.xml	Thu Mar 11 18:19:56 2010 -0500
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<!--
+ Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+ Use is subject to license terms.
+
+ CDDL HEADER START
+
+ The contents of this file are subject to the terms of the
+ Common Development and Distribution License (the "License").
+ You may not use this file except in compliance with the License.
+
+ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ or http://www.opensolaris.org/os/licensing.
+ See the License for the specific language governing permissions
+ and limitations under the License.
+
+ When distributing Covered Code, include this CDDL HEADER in each
+ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ If applicable, add the following below this CDDL HEADER, with the
+ fields enclosed by brackets "[]" replaced with your own identifying
+ information: Portions Copyright [yyyy] [name of copyright owner]
+
+ CDDL HEADER END
+
+    NOTE:  This service manifest is not editable; its contents will
+    be overwritten by package or patch operations, including
+    operating system upgrade.  Make customizations in a different
+    file.
+-->
+
+<service_bundle type='manifest' name='SUNWcsr:boot-config'>
+
+<service
+	name='system/boot-config'
+	type='service'
+	version='1'>
+
+	<single_instance />
+
+	<dependency
+		name='manifest_import'
+		grouping='optional_all'
+		restart_on='none'
+		type='service'>
+		<service_fmri value='svc:/system/manifest-import:default' />
+	</dependency>
+
+	<!-- The boot-config service is made to depend on milestone
+	multi-user to minimize the chance for panic reboot loop. -->
+	<dependency
+		name='boot_multi-user'
+		grouping='optional_all'
+		restart_on='none'
+		type='service'>
+		<service_fmri value='svc:/milestone/multi-user' />
+	</dependency>
+
+	<instance name='default' enabled = 'true'>
+
+	<exec_method
+		type='method'
+		name='start'
+		exec='/lib/svc/method/svc-boot-config'
+		timeout_seconds='60' />
+
+	<exec_method
+		type='method'
+		name='stop'
+		exec=':true'
+		timeout_seconds='60' />
+
+	<exec_method
+		type='method'
+		name='refresh'
+		exec='/lib/svc/method/svc-boot-config'
+		timeout_seconds='60' />
+
+	<property_group name='startd' type='framework'>
+		<propval name='duration' type='astring'
+			value='transient' />
+	</property_group>
+
+	<property_group name='general' type='framework'>
+		<propval name='action_authorization' type='astring'
+			value='solaris.system.shutdown' />
+		<propval name='value_authorization' type='astring'
+		    value='solaris.system.shutdown' />
+	</property_group>
+
+	<property_group name='config' type='application'>
+		<stability value='Stable' />
+		<propval name='fastreboot_default' type='boolean'
+		    value='false' />
+		<propval name='fastreboot_onpanic' type='boolean'
+		    value='false' />
+		<propval name='value_authorization' type='astring'
+		    value='solaris.system.shutdown' />
+		<propval name='uadmin_boot_archive_sync' type='boolean'
+		    value='false' />	
+	</property_group>
+
+	<property_group name='fastreboot_blacklist' type='application'>
+		<stability value='Unstable' />
+		<property name='platforms' type='astring'>
+		    <astring_list>
+			<value_node value='VirtualBox' />
+			<value_node value='VMware Virtual Platform' />
+			<value_node value='MCP55' />
+			<value_node value='Precision WorkStation 650    ' />
+			<value_node value='PowerEdge 1600SC           ' />
+		    </astring_list>
+		</property>
+	</property_group>
+	</instance>
+
+	<stability value='Stable' />
+
+	<template>
+		<common_name>
+			<loctext xml:lang='C'>
+			Boot Configuration Management
+			</loctext>
+		</common_name>
+		<description>
+			<loctext xml:lang='C'>
+Apply the configuration defined in this service by uploading the configuration to the kernel.
+			</loctext>
+		</description>
+		<documentation>
+			<manpage title='reboot' section='1M'
+			    manpath='/usr/share/man' />
+			<manpage title='init' section='1M'
+			    manpath='/usr/share/man' />
+			<manpage title='uadmin' section='2'
+			    manpath='/usr/share/man' />
+			<manpage title='quiesce' section='9E'
+			    manpath='/usr/share/man' />
+		</documentation>
+		<pg_pattern name='config' type='application'
+		    required='true'>
+		    <common_name>
+			    <loctext xml:lang='C'>
+			    Boot Configuration Parameters
+			    </loctext>
+		    </common_name>
+		    <description>
+			<loctext xml:lang='C'>
+Parameters for controlling the reboot behavior.
+			</loctext>
+		    </description>
+		    <prop_pattern name='fastreboot_default' type='boolean'
+			required='true'>
+			<common_name>
+			    <loctext xml:lang='C'>
+			    Fast Reboot by Default
+			    </loctext>
+			</common_name>
+			<description>
+			    <loctext xml:lang='C'>
+When set to true, reboot(1M) and init(1M) 6 will call uadmin(2) with AD_FASTREOOT, which will bypass firmware.
+			    </loctext>
+			</description>
+		    </prop_pattern>
+		    <prop_pattern name='fastreboot_onpanic' type='boolean'
+			required='true'>
+			<common_name>
+			    <loctext xml:lang='C'>
+			    Fast Reboot on Panic
+			    </loctext>
+			</common_name>
+			<description>
+			    <loctext xml:lang='C'>
+When set to true, the system will fast reboot on panic.
+			    </loctext>
+			</description>
+		    </prop_pattern>
+		</pg_pattern>
+
+	</template>
+</service>
+
+</service_bundle>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/halt/smf.sparc/svc-boot-config	Thu Mar 11 18:19:56 2010 -0500
@@ -0,0 +1,40 @@
+#!/sbin/sh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+# Start and refresh method script for the boot-config service.
+#
+
+. /lib/svc/share/smf_include.sh
+
+#
+# This service is only valid in the global zone.
+#
+smf_is_globalzone || exit $SMF_EXIT_OK
+
+#
+# uadmin A_CONFIG AD_UPDATE_BOOT_CONFIG
+#
+/usr/sbin/uadmin 23 1
+exit $SMF_EXIT_OK
--- a/usr/src/cmd/halt/smf/Makefile	Thu Mar 11 15:13:36 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-include ../../Makefile.cmd
-
-MANIFEST=	boot-config.xml
-SVCMETHOD=	svc-boot-config
-
-ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
-
-all clean clobber lint:
-
-install:	all $(ROOTMANIFEST) $(ROOTSVCMETHOD)
-
-check:	 $(CHKMANIFEST)
-
-include ../../Makefile.targ
--- a/usr/src/cmd/halt/smf/boot-config.xml	Thu Mar 11 15:13:36 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
-<!--
- Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- Use is subject to license terms.
-
- CDDL HEADER START
-
- The contents of this file are subject to the terms of the
- Common Development and Distribution License (the "License").
- You may not use this file except in compliance with the License.
-
- You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- or http://www.opensolaris.org/os/licensing.
- See the License for the specific language governing permissions
- and limitations under the License.
-
- When distributing Covered Code, include this CDDL HEADER in each
- file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- If applicable, add the following below this CDDL HEADER, with the
- fields enclosed by brackets "[]" replaced with your own identifying
- information: Portions Copyright [yyyy] [name of copyright owner]
-
- CDDL HEADER END
-
-    NOTE:  This service manifest is not editable; its contents will
-    be overwritten by package or patch operations, including
-    operating system upgrade.  Make customizations in a different
-    file.
--->
-
-<service_bundle type='manifest' name='SUNWcsr:boot-config'>
-
-<service
-	name='system/boot-config'
-	type='service'
-	version='1'>
-
-	<single_instance />
-
-	<dependency
-		name='manifest_import'
-		grouping='optional_all'
-		restart_on='none'
-		type='service'>
-		<service_fmri value='svc:/system/manifest-import:default' />
-	</dependency>
-
-	<!-- The boot-config service is made to depend on milestone
-	multi-user to minimize the chance for panic reboot loop. -->
-	<dependency
-		name='boot_multi-user'
-		grouping='optional_all'
-		restart_on='none'
-		type='service'>
-		<service_fmri value='svc:/milestone/multi-user' />
-	</dependency>
-
-	<instance name='default' enabled = 'true'>
-
-	<exec_method
-		type='method'
-		name='start'
-		exec='/lib/svc/method/svc-boot-config'
-		timeout_seconds='60' />
-
-	<exec_method
-		type='method'
-		name='stop'
-		exec=':true'
-		timeout_seconds='60' />
-
-	<exec_method
-		type='method'
-		name='refresh'
-		exec='/lib/svc/method/svc-boot-config'
-		timeout_seconds='60' />
-
-	<property_group name='startd' type='framework'>
-		<propval name='duration' type='astring'
-			value='transient' />
-	</property_group>
-
-	<property_group name='general' type='framework'>
-		<propval name='action_authorization' type='astring'
-			value='solaris.system.shutdown' />
-		<propval name='value_authorization' type='astring'
-		    value='solaris.system.shutdown' />
-	</property_group>
-
-	<property_group name='config' type='application'>
-		<stability value='Stable' />
-		<propval name='fastreboot_default' type='boolean'
-		    value='true' />
-		<propval name='fastreboot_onpanic' type='boolean'
-		    value='true' />
-		<propval name='value_authorization' type='astring'
-		    value='solaris.system.shutdown' />
-		<propval name='uadmin_boot_archive_sync' type='boolean'
-		    value='false' />	
-	</property_group>
-
-	<property_group name='fastreboot_blacklist' type='application'>
-		<stability value='Unstable' />
-		<property name='platforms' type='astring'>
-		    <astring_list>
-			<value_node value='VirtualBox' />
-			<value_node value='VMware Virtual Platform' />
-			<value_node value='MCP55' />
-			<value_node value='Precision WorkStation 650    ' />
-			<value_node value='PowerEdge 1600SC           ' />
-		    </astring_list>
-		</property>
-	</property_group>
-	</instance>
-
-	<stability value='Stable' />
-
-	<template>
-		<common_name>
-			<loctext xml:lang='C'>
-			Boot Configuration Management
-			</loctext>
-		</common_name>
-		<description>
-			<loctext xml:lang='C'>
-Apply the configuration defined in this service by uploading the configuration to the kernel.
-			</loctext>
-		</description>
-		<documentation>
-			<manpage title='reboot' section='1M'
-			    manpath='/usr/share/man' />
-			<manpage title='init' section='1M'
-			    manpath='/usr/share/man' />
-			<manpage title='uadmin' section='2'
-			    manpath='/usr/share/man' />
-			<manpage title='quiesce' section='9E'
-			    manpath='/usr/share/man' />
-		</documentation>
-		<pg_pattern name='config' type='application'
-		    required='true'>
-		    <common_name>
-			    <loctext xml:lang='C'>
-			    Boot Configuration Parameters
-			    </loctext>
-		    </common_name>
-		    <description>
-			<loctext xml:lang='C'>
-Parameters for controlling the reboot behavior.
-			</loctext>
-		    </description>
-		    <prop_pattern name='fastreboot_default' type='boolean'
-			required='true'>
-			<common_name>
-			    <loctext xml:lang='C'>
-			    Fast Reboot by Default
-			    </loctext>
-			</common_name>
-			<description>
-			    <loctext xml:lang='C'>
-When set to true, reboot(1M) and init(1M) 6 will call uadmin(2) with AD_FASTREOOT, which will bypass firmware.
-			    </loctext>
-			</description>
-		    </prop_pattern>
-		    <prop_pattern name='fastreboot_onpanic' type='boolean'
-			required='true'>
-			<common_name>
-			    <loctext xml:lang='C'>
-			    Fast Reboot on Panic
-			    </loctext>
-			</common_name>
-			<description>
-			    <loctext xml:lang='C'>
-When set to true, the system will fast reboot on panic.
-			    </loctext>
-			</description>
-		    </prop_pattern>
-		</pg_pattern>
-
-	</template>
-</service>
-
-</service_bundle>
--- a/usr/src/cmd/halt/smf/svc-boot-config	Thu Mar 11 15:13:36 2010 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#!/sbin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# Start and refresh method script for the boot-config service.
-#
-
-. /lib/svc/share/smf_include.sh
-
-#
-# This service is only valid in the global zone.
-#
-smf_is_globalzone || exit $SMF_EXIT_OK
-
-#
-# uadmin A_CONFIG AD_UPDATE_BOOT_CONFIG
-#
-/usr/sbin/uadmin 23 1
-exit $SMF_EXIT_OK
--- a/usr/src/lib/libscf/common/highlevel.c	Thu Mar 11 15:13:36 2010 -0800
+++ b/usr/src/lib/libscf/common/highlevel.c	Thu Mar 11 18:19:56 2010 -0500
@@ -20,7 +20,7 @@
  */
 
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -162,9 +162,6 @@
 	assert(boot_config);
 	*boot_config = 0;
 
-#ifndef	__x86
-	return;
-#else
 	{
 		/*
 		 * Property vector for BOOT_CONFIG_PG_PARAMS property group.
@@ -183,6 +180,8 @@
 		prop = NULL;
 		if (scf_read_propvec(FMRI_BOOT_CONFIG, BOOT_CONFIG_PG_PARAMS,
 		    B_TRUE, ua_boot_config, &prop) != SCF_FAILED) {
+
+#ifdef	__x86
 			/*
 			 * Unset both flags if the platform has been
 			 * blacklisted.
@@ -190,6 +189,7 @@
 			if (scf_is_fb_blacklisted())
 				*boot_config &= ~(UA_FASTREBOOT_DEFAULT |
 				    UA_FASTREBOOT_ONPANIC);
+#endif	/* __x86 */
 			return;
 		}
 #if defined(FASTREBOOT_DEBUG)
@@ -204,7 +204,6 @@
 		}
 #endif	/* FASTREBOOT_DEBUG */
 	}
-#endif	/* __x86 */
 }
 
 /*
--- a/usr/src/uts/common/krtld/kobj_bootflags.c	Thu Mar 11 15:13:36 2010 -0800
+++ b/usr/src/uts/common/krtld/kobj_bootflags.c	Thu Mar 11 18:19:56 2010 -0500
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -79,7 +79,7 @@
 
 #if defined(_OBP)
 	/* skip bootblk args */
-	params.gos_opts = "abcdDF:gGHhi:km:o:O:rsvVwxZ:";
+	params.gos_opts = "abcdDf:F:gGHhi:km:o:O:rsvVwxZ:";
 #else
 	params.gos_opts = "abcdgGhi:km:O:rsvwx";
 #endif
@@ -104,6 +104,11 @@
 		case 'D':
 		case 'F':
 			break;
+		case 'f':
+			(void)prom_setprop(prom_optionsnode(), "diag-level",
+			    (char *)params.gos_optargp,
+			    params.gos_optarglen + 1);
+			break;
 #endif
 		case 'g':
 			boothowto |= RB_FORTHDEBUG;
--- a/usr/src/uts/sun4u/os/mach_cpu_states.c	Thu Mar 11 15:13:36 2010 -0800
+++ b/usr/src/uts/sun4u/os/mach_cpu_states.c	Thu Mar 11 18:19:56 2010 -0500
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -128,6 +128,7 @@
 		if (bootstr == NULL) {
 			switch (fcn) {
 
+			case AD_FASTREBOOT:
 			case AD_BOOT:
 				bootstr = "";
 				break;
@@ -150,6 +151,31 @@
 				break;
 			}
 		}
+		if (fcn == AD_FASTREBOOT) {
+			pnode_t onode;
+			int dllen;
+			onode = prom_optionsnode();
+			if ((onode == OBP_NONODE) || (onode == OBP_BADNODE)) {
+				cmn_err(CE_WARN, "Unable to set diag level for"
+				    " quick reboot");
+			} else {
+				dllen = prom_getproplen(onode, "diag-level");
+				if (dllen != -1) {
+					int newstrlen;
+					char *newstr = kmem_alloc(strlen(
+					    bootstr) + dllen + 5, KM_SLEEP);
+					(void) strcpy(newstr, bootstr);
+					(void) strcat(newstr, " -f ");
+					newstrlen = strlen(bootstr) + 4;
+					(void) prom_getprop(onode, "diag-level",
+					    (caddr_t)&(newstr[newstrlen]));
+					newstr[newstrlen + dllen] = '\0';
+					bootstr = newstr;
+				}
+				(void) prom_setprop(onode, "diag-level",
+				    "off", 4);
+			}
+		}
 		reboot_machine(bootstr);
 	}
 	/* MAYBE REACHED */
--- a/usr/src/uts/sun4v/os/mach_cpu_states.c	Thu Mar 11 15:13:36 2010 -0800
+++ b/usr/src/uts/sun4v/os/mach_cpu_states.c	Thu Mar 11 18:19:56 2010 -0500
@@ -19,7 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
@@ -223,6 +223,7 @@
 		if (bootstr == NULL) {
 			switch (fcn) {
 
+			case AD_FASTREBOOT:
 			case AD_BOOT:
 				bootstr = "";
 				break;