summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvb70745 <none@none>2007-04-06 09:45:18 -0700
committervb70745 <none@none>2007-04-06 09:45:18 -0700
commitecb24f521e970b08382f2cd33e5624b76d82e04c (patch)
treed83d5876e4641cbee9d1c4b3536af9f4d513c9e7
parent459fbba0bc115fe006d3634487b686fa707e1fbf (diff)
downloadillumos-gate-ecb24f521e970b08382f2cd33e5624b76d82e04c.tar.gz
6543001 avoid NVRAM boot-file change during cpr reusable mode statefile creation
-rw-r--r--usr/src/uts/sparc/os/cpr_sparc.c18
-rw-r--r--usr/src/uts/sun4u/os/cpr_impl.c3
2 files changed, 9 insertions, 12 deletions
diff --git a/usr/src/uts/sparc/os/cpr_sparc.c b/usr/src/uts/sparc/os/cpr_sparc.c
index ebc452b8fe..ebef17c4fa 100644
--- a/usr/src/uts/sparc/os/cpr_sparc.c
+++ b/usr/src/uts/sparc/os/cpr_sparc.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * 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.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -204,13 +203,10 @@ cpr_prop_setup(void)
/*
* create a new boot-file value; flags get appended when
- * reusable is true or when the statefile is a block device
+ * not reusable and when the statefile is a block device
*/
(void) strcpy(bootfile, CPRBOOT);
- if (cpr_reusable_mode) {
- ASSERT(cpr_statefile_is_spec());
- sp = " -R -S ";
- } else if (cpr_statefile_is_spec())
+ if (!cpr_reusable_mode && cpr_statefile_is_spec())
sp = " -S ";
else
sp = NULL;
@@ -236,7 +232,9 @@ cpr_prop_setup(void)
file_idx = CPR_DF_IDX;
}
cpr_prop_update(dev_idx, bootdev);
- cpr_prop_update(file_idx, bootfile);
+
+ if (!cpr_reusable_mode)
+ cpr_prop_update(file_idx, bootfile);
/*
* check/set auto-boot?
diff --git a/usr/src/uts/sun4u/os/cpr_impl.c b/usr/src/uts/sun4u/os/cpr_impl.c
index caefea794b..84dd18e847 100644
--- a/usr/src/uts/sun4u/os/cpr_impl.c
+++ b/usr/src/uts/sun4u/os/cpr_impl.c
@@ -294,8 +294,7 @@ i_cpr_mp_setup(void)
*/
i_cpr_cif_setup(CIF_UNLINK);
- if (!cpr_reusable_mode)
- (void) i_cpr_prom_pages(CPR_PROM_RESTORE);
+ (void) i_cpr_prom_pages(CPR_PROM_RESTORE);
/* allow setting page size codes in MMU primary context register */
kcontextreg = kctx;