ever ran on, and it's unlikely to ever be implemented, so remove it.
ok jsg@
-.\" $OpenBSD: pmap.9,v 1.19 2019/12/16 10:34:04 mpi Exp $
+.\" $OpenBSD: pmap.9,v 1.20 2023/04/13 15:23:21 miod Exp $
.\"
.\" Copyright (c) 2001, 2002, 2003 CubeSoft Communications, Inc.
.\" <http://www.csoft.org>
.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: December 16 2019 $
+.Dd $Mdocdate: April 13 2023 $
.Dt PMAP_INIT 9
.Os
.Sh NAME
.Nm pmap_growkernel ,
.Nm pmap_update ,
.Nm pmap_collect ,
-.Nm pmap_virtual_space ,
-.Nm pmap_copy
+.Nm pmap_virtual_space
.Nd machine dependent interface to the MMU
.Sh SYNOPSIS
.In machine/pmap.h
.Fn pmap_collect "pmap_t pmap"
.Ft void
.Fn pmap_virtual_space "vaddr_t *vstartp" "vaddr_t *vendp"
-.Ft void
-.Fn pmap_copy "pmap_t dst_pmap" "pmap_t src_pmap" "vaddr_t dst_addr" \
- "vsize_t len" "vaddr_t src_addr"
.nr nS 0
.Pp
Wired memory allocation before the virtual memory system is bootstrapped
module a chance to prioritize.
The initial bounds of the kernel virtual address space are returned by
.Fn pmap_virtual_space .
-.Pp
-The
-.Fn pmap_copy
-function copies the range specified by
-.Fa src_addr
-and
-.Fa src_len
-from
-.Fa src_pmap
-to the range described by
-.Fa dst_addr
-and
-.Fa dst_len
-in
-.Fa dst_map .
-.Fn pmap_copy
-is called during a
-.Xr fork 2
-operation to give the child process an initial set of low-level
-mappings.
.Sh SEE ALSO
.Xr fork 2 ,
.Xr uvm_init 9
-/* $OpenBSD: pmap.c,v 1.90 2023/04/11 00:45:07 jsg Exp $ */
+/* $OpenBSD: pmap.c,v 1.91 2023/04/13 15:23:21 miod Exp $ */
/* $NetBSD: pmap.c,v 1.154 2000/12/07 22:18:55 thorpej Exp $ */
/*-
return (rv);
}
-/*
- * pmap_copy: [ INTERFACE ]
- *
- * Copy the mapping range specified by src_addr/len
- * from the source map to the range dst_addr/len
- * in the destination map.
- *
- * This routine is only advisory and need not do anything.
- */
-/* call deleted in <machine/pmap.h> */
-
/*
* pmap_collect: [ INTERFACE ]
*
-/* $OpenBSD: pmap.h,v 1.44 2023/02/06 11:16:22 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.45 2023/04/13 15:23:21 miod Exp $ */
/* $NetBSD: pmap.h,v 1.37 2000/11/19 03:16:35 thorpej Exp $ */
/*-
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
-#define pmap_copy(dp, sp, da, l, sa) /* nothing */
#define pmap_update(pmap) /* nothing (yet) */
#define pmap_proc_iflush(p, va, len) /* nothing */
-/* $OpenBSD: pmap.c,v 1.163 2023/04/11 00:45:07 jsg Exp $ */
+/* $OpenBSD: pmap.c,v 1.164 2023/04/13 15:23:21 miod Exp $ */
/* $NetBSD: pmap.c,v 1.3 2003/05/08 18:13:13 thorpej Exp $ */
/*
}
#endif
-/*
- * pmap_copy: copy mappings from one pmap to another
- *
- * => optional function
- * void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
- */
-
-/*
- * defined as macro in pmap.h
- */
-
void
pmap_enter_special(vaddr_t va, paddr_t pa, vm_prot_t prot)
{
-/* $OpenBSD: pmap.h,v 1.85 2023/01/31 15:18:54 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.86 2023/04/13 15:23:21 miod Exp $ */
/* $NetBSD: pmap.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */
/*
#define pmap_clear_modify(pg) pmap_clear_attrs(pg, PG_M)
#define pmap_clear_reference(pg) pmap_clear_attrs(pg, PG_U)
-#define pmap_copy(DP,SP,D,L,S)
#define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M)
#define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U)
#define pmap_move(DP,SP,D,L,S)
-/* $OpenBSD: pmap.h,v 1.53 2023/01/31 15:18:54 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.54 2023/04/13 15:23:22 miod Exp $ */
/* $NetBSD: pmap.h,v 1.76 2003/09/06 09:10:46 rearnsha Exp $ */
/*
(((pg)->mdpage.pvh_attrs & PVF_REF) != 0)
#define pmap_deactivate(p) do { /* nothing */ } while (0)
-#define pmap_copy(dp, sp, da, l, sa) do { /* nothing */ } while (0)
#define pmap_unuse_final(p) do { /* nothing */ } while (0)
#define pmap_remove_holes(vm) do { /* nothing */ } while (0)
-/* $OpenBSD: pmap.c,v 1.94 2023/04/09 19:48:37 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.95 2023/04/13 15:23:22 miod Exp $ */
/*
* Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com>
*
return 0;
}
-void
-pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr,
- vsize_t len, vaddr_t src_addr)
-{
- /* NOOP */
-}
-
void
pmap_unwire(pmap_t pm, vaddr_t va)
{
-/* $OpenBSD: pmap.h,v 1.54 2023/01/24 16:51:06 kettenis Exp $ */
+/* $OpenBSD: pmap.h,v 1.55 2023/04/13 15:23:22 miod Exp $ */
/*
* Copyright (c) 2002-2004 Michael Shalayeff
#define pmap_kernel() (&kernel_pmap_store)
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
#define pmap_update(pm) (void)(pm)
-#define pmap_copy(dpmap,spmap,da,len,sa)
#define PG_PMAP_MOD PG_PMAP0 /* modified */
#define PG_PMAP_REF PG_PMAP1 /* referenced */
-/* $OpenBSD: pmap.c,v 1.221 2023/04/11 00:45:07 jsg Exp $ */
+/* $OpenBSD: pmap.c,v 1.222 2023/04/13 15:23:22 miod Exp $ */
/* $NetBSD: pmap.c,v 1.91 2000/06/02 17:46:37 thorpej Exp $ */
/*
PMAP_REMOVE_SKIPWIRED);
}
-/*
- * pmap_copy: copy mappings from one pmap to another
- *
- * => optional function
- * void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
- */
-
-/*
- * defined as macro in pmap.h
- */
-
/*
* pmap_enter: enter a mapping into a pmap
*
-/* $OpenBSD: pmapae.c,v 1.69 2023/04/11 00:45:07 jsg Exp $ */
+/* $OpenBSD: pmapae.c,v 1.70 2023/04/13 15:23:22 miod Exp $ */
/*
* Copyright (c) 2006-2008 Michael Shalayeff
* => we should not be holding any pv_head locks (in case we are forced
* to call pmap_steal_ptp())
* => we may need to lock pv_head's if we have to steal a PTP
- * => just_try: true if we want a PTP, but not enough to steal one
- * from another pmap (e.g. during optional functions like pmap_copy)
*/
struct vm_page *
#endif
}
-/*
- * pmap_copy: copy mappings from one pmap to another
- *
- * => optional function
- * void pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr)
- */
-
-/*
- * defined as macro in pmap.h
- */
-
/*
* pmap_enter: enter a mapping into a pmap
*
-/* $OpenBSD: pmap.h,v 1.92 2023/01/31 15:18:54 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.93 2023/04/13 15:23:22 miod Exp $ */
/* $NetBSD: pmap.h,v 1.44 2000/04/24 17:18:18 thorpej Exp $ */
/*
#define pmap_clear_modify(pg) pmap_clear_attrs(pg, PG_M)
#define pmap_clear_reference(pg) pmap_clear_attrs(pg, PG_U)
-#define pmap_copy(DP,SP,D,L,S)
#define pmap_is_modified(pg) pmap_test_attrs(pg, PG_M)
#define pmap_is_referenced(pg) pmap_test_attrs(pg, PG_U)
#define pmap_valid_entry(E) ((E) & PG_V) /* is PDE or PTE valid? */
-/* $OpenBSD: pmap.h,v 1.28 2023/02/12 07:02:43 aoyama Exp $ */
+/* $OpenBSD: pmap.h,v 1.29 2023/04/13 15:23:22 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1991 Carnegie Mellon University
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
-#define pmap_copy(dp,sp,d,l,s) do { /* nothing */ } while (0)
#define pmap_update(pmap) do { /* nothing */ } while (0)
#define pmap_clear_modify(pg) pmap_unsetbit(pg, PG_M)
-/* $OpenBSD: pmap.c,v 1.124 2023/01/11 03:19:52 visa Exp $ */
+/* $OpenBSD: pmap.c,v 1.125 2023/04/13 15:23:22 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
return found;
}
-/*
- * Copy the range specified by src_addr/len
- * from the source map to the range dst_addr/len
- * in the destination map.
- *
- * This routine is only advisory and need not do anything.
- */
-void
-pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr, vsize_t len,
- vaddr_t src_addr)
-{
-
- DPRINTF(PDB_FOLLOW,("pmap_copy(%p, %p, %p, 0x%lx, %p)\n",
- dst_pmap, src_pmap, (void *)dst_addr, len, (void *)src_addr));
-}
-
/*
* pmap_zero_page zeros the specified (machine independent) page.
*/
-/* $OpenBSD: pmap.h,v 1.63 2023/01/31 15:18:55 deraadt Exp $ */
+/* $OpenBSD: pmap.h,v 1.64 2023/04/13 15:23:22 miod Exp $ */
/* $NetBSD: pmap.h,v 1.1 1996/09/30 16:34:29 ws Exp $ */
/*-
void pmap_real_memory(vaddr_t *start, vsize_t *size);
int pte_spill_v(struct pmap *pm, u_int32_t va, u_int32_t dsisr, int exec_fault);
-#define pmap_copy(dst_pmap, src_pmap, dst_addr, len, src_addr) ;
int reserve_dumppages(caddr_t p);
#define pmap_unuse_final(p) /* nothing */
-/* $OpenBSD: pmap.c,v 1.59 2023/01/25 09:53:53 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.60 2023/04/13 15:23:22 miod Exp $ */
/*
* Copyright (c) 2015 Martin Pieuchot
pmap_initialized = 1;
}
-void
-pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr,
- vsize_t len, vaddr_t src_addr)
-{
-}
-
int
pmap_enter(pmap_t pm, vaddr_t va, paddr_t pa, vm_prot_t prot, int flags)
{
-/* $OpenBSD: pmap.c,v 1.29 2023/01/11 11:10:25 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.30 2023/04/13 15:23:22 miod Exp $ */
/*
* Copyright (c) 2019-2020 Brian Bamsch <bbamsch@google.com>
return 0;
}
-void
-pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vaddr_t dst_addr,
- vsize_t len, vaddr_t src_addr)
-{
- /* NOOP */
-}
-
void
pmap_unwire(pmap_t pm, vaddr_t va)
{
-/* $OpenBSD: pmap.h,v 1.19 2023/03/08 04:43:07 guenther Exp $ */
+/* $OpenBSD: pmap.h,v 1.20 2023/04/13 15:23:22 miod Exp $ */
/* $NetBSD: pmap.h,v 1.28 2006/04/10 23:12:11 uwe Exp $ */
/*-
#define pmap_kernel() (&__pmap_kernel)
#define pmap_deactivate(pmap) do { /* nothing */ } while (0)
#define pmap_update(pmap) do { /* nothing */ } while (0)
-#define pmap_copy(dp,sp,d,l,s) do { /* nothing */ } while (0)
#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
-/* $OpenBSD: pmap.c,v 1.110 2023/01/24 07:26:34 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.111 2023/04/13 15:23:22 miod Exp $ */
/* $NetBSD: pmap.c,v 1.107 2001/08/31 16:47:41 eeh Exp $ */
/*
*
ctx_free(pm);
}
-/*
- * Copy the range specified by src_addr/len
- * from the source map to the range dst_addr/len
- * in the destination map.
- *
- * This routine is only advisory and need not do anything.
- */
-void
-pmap_copy(struct pmap *dst_pmap, struct pmap *src_pmap, vaddr_t dst_addr,
- vsize_t len, vaddr_t src_addr)
-{
-}
-
/*
* Garbage collects the physical map system for
* pages which are no longer used.
-/* $OpenBSD: uvm_map.c,v 1.314 2023/04/10 04:21:20 jsg Exp $ */
+/* $OpenBSD: uvm_map.c,v 1.315 2023/04/13 15:23:23 miod Exp $ */
/* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */
/*
old_entry->end - old_entry->start, 0, old_entry->protection,
old_entry->max_protection, old_map, old_entry, dead);
- /*
- * pmap_copy the mappings: this routine is optional
- * but if it is there it will reduce the number of
- * page faults in the new proc.
- */
- if (!UVM_ET_ISHOLE(new_entry))
- pmap_copy(new_map->pmap, old_map->pmap, new_entry->start,
- (new_entry->end - new_entry->start), new_entry->start);
-
return (new_entry);
}
* resolve all copy-on-write faults now
* (note that there is nothing to do if
* the old mapping does not have an amap).
- * XXX: is it worthwhile to bother with
- * pmap_copy in this case?
*/
if (old_entry->aref.ar_amap)
amap_cow_now(new_map, new_entry);
* fork operation.
*
* if we do not write-protect the parent, then
- * we must be sure to write-protect the child
- * after the pmap_copy() operation.
- *
- * XXX: pmap_copy should have some way of telling
- * us that it didn't do anything so we can avoid
- * calling pmap_protect needlessly.
+ * we must be sure to write-protect the child.
*/
if (!UVM_ET_ISNEEDSCOPY(old_entry)) {
if (old_entry->max_protection & PROT_WRITE) {
else
protect_child = FALSE;
}
- /*
- * copy the mappings
- * XXX: need a way to tell if this does anything
- */
- if (!UVM_ET_ISHOLE(new_entry))
- pmap_copy(new_map->pmap, old_map->pmap,
- new_entry->start,
- (old_entry->end - old_entry->start),
- old_entry->start);
/* protect the child's mappings if necessary */
if (protect_child) {
newentry->protection != PROT_NONE)
newentry->protection = newentry->max_protection;
newentry->protection &= ~PROT_EXEC;
-
- /*
- * Step 2: perform pmap copy.
- * (Doing this in the loop saves one RB traversal.)
- */
- pmap_copy(kernel_map->pmap, srcmap->pmap,
- cp_start - start + dstaddr, cp_len, cp_start);
}
pmap_update(kernel_map->pmap);
-/* $OpenBSD: uvm_pmap.h,v 1.32 2023/01/01 19:49:18 miod Exp $ */
+/* $OpenBSD: uvm_pmap.h,v 1.33 2023/04/13 15:23:23 miod Exp $ */
/* $NetBSD: uvm_pmap.h,v 1.1 2000/06/27 09:00:14 mrg Exp $ */
/*
#if !defined(pmap_collect) && defined(__HAVE_PMAP_COLLECT)
void pmap_collect(pmap_t);
#endif
-#if !defined(pmap_copy)
-void pmap_copy(pmap_t, pmap_t, vaddr_t, vsize_t, vaddr_t);
-#endif
#if !defined(pmap_copy_page)
void pmap_copy_page(struct vm_page *, struct vm_page *);
#endif