Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/arch/hpcmips/vr Pull up revision 1.40 (requested by...
details: https://anonhg.NetBSD.org/src/rev/06537b2291d7
branches: netbsd-1-6
changeset: 529775:06537b2291d7
user: he <he%NetBSD.org@localhost>
date: Thu Dec 12 22:53:52 2002 +0000
description:
Pull up revision 1.40 (requested by shin in ticket #1013):
Wipe out all physical memory before hibernate/reset.
Otherwise, WinCE will not boot on some machines (e.g. IBM
z50).
diffstat:
sys/arch/hpcmips/vr/vr.c | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diffs (55 lines):
diff -r 8aeba7a84e6c -r 06537b2291d7 sys/arch/hpcmips/vr/vr.c
--- a/sys/arch/hpcmips/vr/vr.c Thu Dec 12 22:47:28 2002 +0000
+++ b/sys/arch/hpcmips/vr/vr.c Thu Dec 12 22:53:52 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vr.c,v 1.39 2002/02/11 11:44:36 takemura Exp $ */
+/* $NetBSD: vr.c,v 1.39.10.1 2002/12/12 22:53:52 he Exp $ */
/*-
* Copyright (c) 1999-2002
@@ -59,6 +59,8 @@
#include <hpcmips/vr/vripreg.h>
#include <hpcmips/vr/rtcreg.h>
+#include <mips/cache.h>
+
#include "vrip_common.h"
#if NVRIP_COMMON > 0
#include <hpcmips/vr/vripvar.h>
@@ -474,6 +476,9 @@
#endif /* NVRKIU > 0 */
}
+extern char vr_hibernate[];
+extern char evr_hibernate[];
+
void
vr_reboot(int howto, char *bootstr)
{
@@ -482,13 +487,19 @@
*/
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
printf("fake powerdown\n");
- __asm(__CONCAT(".word ",___STRING(VR_OPCODE_HIBERNATE)));
- __asm("nop");
- __asm("nop");
- __asm("nop");
- __asm("nop");
- __asm("nop");
- __asm(".set reorder");
+ /*
+ * copy vr_hibernate() to top of physical memory.
+ */
+ memcpy((void *)MIPS_KSEG0_START, vr_hibernate,
+ evr_hibernate - (char *)vr_hibernate);
+ /* sync I&D cache */
+ mips_dcache_wbinv_all();
+ mips_icache_sync_all();
+ /*
+ * call vr_hibernate() at MIPS_KSEG0_START.
+ */
+ ((void (*)(void *,int))MIPS_KSEG0_START)(
+ (void *)MIPS_KSEG0_START, ptoa(physmem));
/* not reach */
vr_reboot(howto&~RB_HALT, bootstr);
}
Home |
Main Index |
Thread Index |
Old Index