summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/amd64/amd64/pmap.c56
-rw-r--r--sys/arch/i386/i386/pmap.c54
-rw-r--r--sys/arch/i386/i386/pmapae.c53
3 files changed, 3 insertions, 160 deletions
diff --git a/sys/arch/amd64/amd64/pmap.c b/sys/arch/amd64/amd64/pmap.c
index 9abcbcd2f0a..ec1c99b7e60 100644
--- a/sys/arch/amd64/amd64/pmap.c
+++ b/sys/arch/amd64/amd64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.101 2016/09/16 02:35:41 dlg Exp $ */
+/* $OpenBSD: pmap.c,v 1.102 2016/09/17 07:37:57 mlarkin Exp $ */
/* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */
/*
@@ -2394,60 +2394,6 @@ pmap_steal_memory(vsize_t size, vaddr_t *start, vaddr_t *end)
return (va);
}
-#ifdef DEBUG
-void pmap_dump(struct pmap *, vaddr_t, vaddr_t);
-
-/*
- * pmap_dump: dump all the mappings from a pmap
- *
- * => caller should not be holding any pmap locks
- */
-
-void
-pmap_dump(struct pmap *pmap, vaddr_t sva, vaddr_t eva)
-{
- pt_entry_t *ptes, *pte;
- pd_entry_t **pdes;
- vaddr_t blkendva;
- paddr_t scr3;
-
- /*
- * if end is out of range truncate.
- * if (end == start) update to max.
- */
-
- if (eva > VM_MAXUSER_ADDRESS || eva <= sva)
- eva = VM_MAXUSER_ADDRESS;
-
- pmap_map_ptes(pmap, &ptes, &pdes, &scr3);
-
- /*
- * dumping a range of pages: we dump in PTP sized blocks (4MB)
- */
-
- for (/* null */ ; sva < eva ; sva = blkendva) {
-
- /* determine range of block */
- blkendva = x86_round_pdr(sva+1);
- if (blkendva > eva)
- blkendva = eva;
-
- /* valid block? */
- if (!pmap_pdes_valid(sva, pdes, NULL))
- continue;
-
- pte = &ptes[pl1_i(sva)];
- for (/* null */; sva < blkendva ; sva += PAGE_SIZE, pte++) {
- if (!pmap_valid_entry(*pte))
- continue;
- printf("va %#lx -> pa %#llx (pte=%#llx)\n",
- sva, *pte, *pte & PG_FRAME);
- }
- }
- pmap_unmap_ptes(pmap, scr3);
-}
-#endif
-
void
pmap_virtual_space(vaddr_t *vstartp, vaddr_t *vendp)
{
diff --git a/sys/arch/i386/i386/pmap.c b/sys/arch/i386/i386/pmap.c
index c9a5ee73018..81337e8f24b 100644
--- a/sys/arch/i386/i386/pmap.c
+++ b/sys/arch/i386/i386/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.193 2016/09/16 02:35:41 dlg Exp $ */
+/* $OpenBSD: pmap.c,v 1.194 2016/09/17 07:37:57 mlarkin Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
@@ -2449,58 +2449,6 @@ out:
return (VM_MIN_KERNEL_ADDRESS + (nkpde * NBPD));
}
-#ifdef DEBUG
-void pmap_dump_86(struct pmap *, vaddr_t, vaddr_t);
-
-/*
- * pmap_dump: dump all the mappings from a pmap
- *
- * => caller should not be holding any pmap locks
- */
-
-void
-pmap_dump_86(struct pmap *pmap, vaddr_t sva, vaddr_t eva)
-{
- pt_entry_t *ptes, *pte;
- vaddr_t blkendva;
-
- /*
- * if end is out of range truncate.
- * if (end == start) update to max.
- */
-
- if (eva > VM_MAXUSER_ADDRESS || eva <= sva)
- eva = VM_MAXUSER_ADDRESS;
-
- ptes = pmap_map_ptes_86(pmap); /* locks pmap */
-
- /*
- * dumping a range of pages: we dump in PTP sized blocks (4MB)
- */
-
- for (/* null */ ; sva < eva ; sva = blkendva) {
-
- /* determine range of block */
- blkendva = i386_round_pdr(sva+1);
- if (blkendva > eva)
- blkendva = eva;
-
- /* valid block? */
- if (!pmap_valid_entry(PDE(pmap, pdei(sva))))
- continue;
-
- pte = &ptes[atop(sva)];
- for (/* null */; sva < blkendva ; sva += NBPG, pte++) {
- if (!pmap_valid_entry(*pte))
- continue;
- printf("va %#lx -> pa %#x (pte=%#x)\n",
- sva, *pte, *pte & PG_FRAME);
- }
- }
- pmap_unmap_ptes_86(pmap);
-}
-#endif
-
#ifdef MULTIPROCESSOR
/*
* Locking for tlb shootdown.
diff --git a/sys/arch/i386/i386/pmapae.c b/sys/arch/i386/i386/pmapae.c
index fac5194afe2..46b366b0360 100644
--- a/sys/arch/i386/i386/pmapae.c
+++ b/sys/arch/i386/i386/pmapae.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmapae.c,v 1.50 2016/09/16 02:35:41 dlg Exp $ */
+/* $OpenBSD: pmapae.c,v 1.51 2016/09/17 07:37:57 mlarkin Exp $ */
/*
* Copyright (c) 2006-2008 Michael Shalayeff
@@ -1915,54 +1915,3 @@ pmap_flush_page_pae(paddr_t pa)
*pte = 0;
pmap_update_pg(va);
}
-
-#ifdef DEBUG
-void pmap_dump_pae(struct pmap *, vaddr_t, vaddr_t);
-/*
- * pmap_dump: dump all the mappings from a pmap
- *
- * => caller should not be holding any pmap locks
- */
-
-void
-pmap_dump_pae(struct pmap *pmap, vaddr_t sva, vaddr_t eva)
-{
- pt_entry_t *ptes, *pte;
- vaddr_t blkendva;
-
- /*
- * if end is out of range truncate.
- * if (end == start) update to max.
- */
-
- if (eva > VM_MAXUSER_ADDRESS || eva <= sva)
- eva = VM_MAXUSER_ADDRESS;
-
- ptes = pmap_map_ptes_pae(pmap); /* locks pmap */
-
- /*
- * dumping a range of pages: we dump in PTP sized blocks (4MB)
- */
-
- for (/* null */ ; sva < eva ; sva = blkendva) {
-
- /* determine range of block */
- blkendva = i386_round_pdr(sva+1);
- if (blkendva > eva)
- blkendva = eva;
-
- /* valid block? */
- if (!pmap_valid_entry(PDE(pmap, pdei(sva))))
- continue;
-
- pte = &ptes[atop(sva)];
- for (/* null */; sva < blkendva ; sva += NBPG, pte++) {
- if (!pmap_valid_entry(*pte))
- continue;
- printf("va %#lx -> pa %#llx (pte=%#llx)\n",
- sva, *pte, *pte & PG_FRAME);
- }
- }
- pmap_unmap_ptes_pae(pmap);
-}
-#endif