Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/macppc Flush cache before rebooting to prese...
details: https://anonhg.NetBSD.org/src/rev/943eae66f096
branches: trunk
changeset: 481874:943eae66f096
user: tsubai <tsubai%NetBSD.org@localhost>
date: Tue Feb 08 12:57:11 2000 +0000
description:
Flush cache before rebooting to preserve msgbuf.
diffstat:
sys/arch/macppc/macppc/machdep.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r 154e86d9dc99 -r 943eae66f096 sys/arch/macppc/macppc/machdep.c
--- a/sys/arch/macppc/macppc/machdep.c Tue Feb 08 12:56:28 2000 +0000
+++ b/sys/arch/macppc/macppc/machdep.c Tue Feb 08 12:57:11 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.66 2000/01/21 18:49:52 tsubai Exp $ */
+/* $NetBSD: machdep.c,v 1.67 2000/02/08 12:57:11 tsubai Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -785,7 +785,7 @@
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
#if NADB > 0
- DELAY(1000000);
+ delay(1000000);
adb_poweroff();
printf("WARNING: powerdown failed!\n");
#endif
@@ -793,6 +793,10 @@
if (howto & RB_HALT) {
printf("halted\n\n");
+
+ /* flush cache for msgbuf */
+ __syncicache((void *)msgbuf_paddr, round_page(MSGBUFSIZE));
+
ppc_exit();
}
@@ -814,6 +818,10 @@
*ap++ = 0;
if (ap[-2] == '-')
*ap1 = 0;
+
+ /* flush cache for msgbuf */
+ __syncicache((void *)msgbuf_paddr, round_page(MSGBUFSIZE));
+
#if NADB > 0
adb_restart(); /* not return */
#endif
Home |
Main Index |
Thread Index |
Old Index