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 actually, pte is normally in user address...



details:   https://anonhg.NetBSD.org/src/rev/2afdde0cc84f
branches:  trunk
changeset: 500094:2afdde0cc84f
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Dec 05 10:26:12 2000 +0000

description:
actually, pte is normally in user address space, but can also be in kernel
address space for LARGEPAGES kernel; to handle both, do the same dance
as for loc

diffstat:

 sys/arch/i386/i386/db_disasm.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 856bc4a07405 -r 2afdde0cc84f sys/arch/i386/i386/db_disasm.c
--- a/sys/arch/i386/i386/db_disasm.c    Tue Dec 05 09:59:31 2000 +0000
+++ b/sys/arch/i386/i386/db_disasm.c    Tue Dec 05 10:26:12 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_disasm.c,v 1.23 2000/12/02 19:34:54 jdolecek Exp $  */
+/*     $NetBSD: db_disasm.c,v 1.24 2000/12/05 10:26:12 jdolecek Exp $  */
 
 /* 
  * Mach Operating System
@@ -1101,7 +1101,16 @@
                pte = kvtopte((vaddr_t)loc);
        else
                pte = vtopte((vaddr_t)loc);
-       pde = kvtopte((vaddr_t)pte);
+
+       /*
+        * pte is normally in user address space, but may also be in kernel
+        * address space for LARGEPAGES kernel.
+        */
+       if ((vaddr_t)pte >= VM_MIN_KERNEL_ADDRESS)
+               pde = kvtopte((vaddr_t)pte);
+       else
+               pde = vtopte((vaddr_t)pte);
+
        if ((*pde & PG_V) == 0 || (*pte & PG_V) == 0) {
                db_printf("invalid address\n");
                return (loc);



Home | Main Index | Thread Index | Old Index