diff options
| author | Christopher Kiick <Chris.Kiick@Sun.COM> | 2010-03-11 18:19:56 -0500 |
|---|---|---|
| committer | Christopher Kiick <Chris.Kiick@Sun.COM> | 2010-03-11 18:19:56 -0500 |
| commit | e557d412e15c7f384b2ea3bf316a739a0f81cd55 (patch) | |
| tree | f29c6b63d3976f5103dbca9dd7cdbbe374b1b55a /usr/src/uts/sun4u | |
| parent | de6d0fcd730431ea0d586564c1551016efe19f56 (diff) | |
| download | illumos-joyent-e557d412e15c7f384b2ea3bf316a739a0f81cd55.tar.gz | |
6830088 Fast reboot support for SPARC platforms
--HG--
rename : usr/src/cmd/halt/smf/Makefile => usr/src/cmd/halt/smf.i386/Makefile
rename : usr/src/cmd/halt/smf/boot-config.xml => usr/src/cmd/halt/smf.i386/boot-config.xml
rename : usr/src/cmd/halt/smf/svc-boot-config => usr/src/cmd/halt/smf.i386/svc-boot-config
rename : usr/src/cmd/halt/smf/Makefile => usr/src/cmd/halt/smf.sparc/Makefile
rename : usr/src/cmd/halt/smf/boot-config.xml => usr/src/cmd/halt/smf.sparc/boot-config.xml
rename : usr/src/cmd/halt/smf/svc-boot-config => usr/src/cmd/halt/smf.sparc/svc-boot-config
Diffstat (limited to 'usr/src/uts/sun4u')
| -rw-r--r-- | usr/src/uts/sun4u/os/mach_cpu_states.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/usr/src/uts/sun4u/os/mach_cpu_states.c b/usr/src/uts/sun4u/os/mach_cpu_states.c index f154bea238..684e8d607e 100644 --- a/usr/src/uts/sun4u/os/mach_cpu_states.c +++ b/usr/src/uts/sun4u/os/mach_cpu_states.c @@ -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 @@ mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb) if (bootstr == NULL) { switch (fcn) { + case AD_FASTREBOOT: case AD_BOOT: bootstr = ""; break; @@ -150,6 +151,31 @@ mdboot(int cmd, int fcn, char *bootstr, boolean_t invoke_cb) 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 */ |
