Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386/i386 db_write_text: make this work on xen.
details: https://anonhg.NetBSD.org/src/rev/ac2724acb867
branches: trunk
changeset: 579938:ac2724acb867
user: yamt <yamt%NetBSD.org@localhost>
date: Fri Apr 01 13:00:57 2005 +0000
description:
db_write_text: make this work on xen.
diffstat:
sys/arch/i386/i386/db_memrw.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diffs (64 lines):
diff -r d2830a8ff9aa -r ac2724acb867 sys/arch/i386/i386/db_memrw.c
--- a/sys/arch/i386/i386/db_memrw.c Fri Apr 01 12:51:07 2005 +0000
+++ b/sys/arch/i386/i386/db_memrw.c Fri Apr 01 13:00:57 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_memrw.c,v 1.16 2004/02/13 11:36:13 wiz Exp $ */
+/* $NetBSD: db_memrw.c,v 1.17 2005/04/01 13:00:57 yamt Exp $ */
/*-
* Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.16 2004/02/13 11:36:13 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_memrw.c,v 1.17 2005/04/01 13:00:57 yamt Exp $");
#include "opt_largepages.h"
@@ -67,6 +67,9 @@
#include <uvm/uvm_extern.h>
#include <machine/db_machdep.h>
+#if defined(XEN)
+#include <machine/xenpmap.h>
+#endif
#include <ddb/db_access.h>
@@ -116,7 +119,11 @@
* Get the PTE for the page.
*/
pte = kvtopte(addr);
+#if defined(XEN)
+ oldpte = PTE_GET_MA(pte);
+#else
oldpte = *pte;
+#endif
if ((oldpte & PG_V) == 0) {
printf(" address %p not a valid page\n", dst);
@@ -149,7 +156,11 @@
size -= limit;
tmppte = (oldpte & ~PG_KR) | PG_KW;
+#if defined(XEN)
+ PTE_SET_MA(pte, (pt_entry_t *)vtomach((vaddr_t)pte), tmppte);
+#else
*pte = tmppte;
+#endif
pmap_update_pg(pgva);
/*
* MULTIPROCESSOR: no shootdown required as the PTE continues to
@@ -166,7 +177,11 @@
/*
* Restore the old PTE.
*/
+#if defined(XEN)
+ PTE_SET_MA(pte, (pt_entry_t *)vtomach((vaddr_t)pte), oldpte);
+#else
*pte = oldpte;
+#endif
#if 0
/*
Home |
Main Index |
Thread Index |
Old Index