Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Remove old MD pmap.c files for amiga and atari.
details: https://anonhg.NetBSD.org/src/rev/8a069de95129
branches: trunk
changeset: 749699:8a069de95129
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Sun Dec 06 06:46:25 2009 +0000
description:
Remove old MD pmap.c files for amiga and atari.
They no longer work due to reorganization of common pmap_motorola.c.
diffstat:
sys/arch/amiga/amiga/pmap.c | 2552 ---------------------------------------
sys/arch/amiga/conf/files.amiga | 3 +-
sys/arch/atari/atari/pmap.c | 2548 --------------------------------------
sys/arch/atari/conf/files.atari | 3 +-
4 files changed, 2 insertions(+), 5104 deletions(-)
diffs (truncated from 5143 to 300 lines):
diff -r 4c045290e1ae -r 8a069de95129 sys/arch/amiga/amiga/pmap.c
--- a/sys/arch/amiga/amiga/pmap.c Sun Dec 06 06:41:28 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2552 +0,0 @@
-/* $NetBSD: pmap.c,v 1.157 2009/11/23 00:11:42 rmind Exp $ */
-
-/*-
- * Copyright (c) 1999 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 1991 Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * @(#)pmap.c 7.5 (Berkeley) 5/10/91
- */
-
-/*
- * AMIGA physical map management code.
- * For 68020/68030 machines with 68851, or 68030 MMUs
- * Don't even pay lip service to multiprocessor support.
- *
- * right now because of the assumed one-to-one relationship of PT
- * pages to STEs.
- */
-
-/*
- * Manages physical address maps.
- *
- * In addition to hardware address maps, this
- * module is called upon to provide software-use-only
- * maps which may or may not be stored in the same
- * form as hardware maps. These pseudo-maps are
- * used to store intermediate results from copy
- * operations to and from address spaces.
- *
- * Since the information managed by this module is
- * also stored by the logical address mapping module,
- * this module may throw away valid virtual-to-physical
- * mappings at almost any time. However, invalidations
- * of virtual-to-physical mappings must be done as
- * requested.
- *
- * In order to cope with hardware architectures which
- * make virtual-to-physical map invalidates expensive,
- * this module may delay invalidate or reduced protection
- * operations until such time as they are actually
- * necessary. This module is given full information as
- * to which processors are currently using which maps,
- * and to when physical maps must be made correct.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.157 2009/11/23 00:11:42 rmind Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/malloc.h>
-
-#include <uvm/uvm.h>
-
-#include <machine/pte.h>
-#include <machine/cpu.h>
-#include <machine/vmparam.h>
-
-#include <m68k/cacheops.h>
-
-#include <amiga/amiga/memlist.h>
-/*
- * Allocate various and sundry SYSMAPs used in the days of old VM
- * and not yet converted. XXX.
- */
-
-#ifdef DEBUG
-struct kpt_stats {
- int collectscans;
- int collectpages;
- int kpttotal;
- int kptinuse;
- int kptmaxuse;
-};
-struct enter_stats {
- int kernel; /* entering kernel mapping */
- int user; /* entering user mapping */
- int ptpneeded; /* needed to allocate a PT page */
- int pwchange; /* no mapping change, just wiring or protection */
- int wchange; /* no mapping change, just wiring */
- int mchange; /* was mapped but mapping to different page */
- int managed; /* a managed page */
- int firstpv; /* first mapping for this PA */
- int secondpv; /* second mapping for this PA */
- int ci; /* cache inhibited */
- int unmanaged; /* not a managed page */
- int flushes; /* cache flushes */
-};
-struct remove_stats {
- int calls;
- int removes;
- int pvfirst;
- int pvsearch;
- int ptinvalid;
- int uflushes;
- int sflushes;
-};
-
-struct remove_stats remove_stats;
-struct enter_stats enter_stats;
-struct kpt_stats kpt_stats;
-
-#define PDB_FOLLOW 0x0001
-#define PDB_INIT 0x0002
-#define PDB_ENTER 0x0004
-#define PDB_REMOVE 0x0008
-#define PDB_CREATE 0x0010
-#define PDB_PTPAGE 0x0020
-#define PDB_CACHE 0x0040
-#define PDB_BITS 0x0080
-#define PDB_COLLECT 0x0100
-#define PDB_PROTECT 0x0200
-#define PDB_SEGTAB 0x0400
-#define PDB_PARANOIA 0x2000
-#define PDB_WIRING 0x4000
-#define PDB_PVDUMP 0x8000
-int debugmap = 0;
-int pmapdebug = PDB_PARANOIA;
-
-#define PMAP_DPRINTF(l, x) if (pmapdebug & (l)) printf x
-
-static void pmap_check_wiring(const char *, vaddr_t);
-static void pmap_pvdump(paddr_t);
-#else
-#define PMAP_DPRINTF(l, x)
-#endif
-
-/*
- * Get STEs and PTEs for user/kernel address space
- */
-#if defined(M68040) || defined(M68060)
-#if defined(M68020) || defined(M68030)
-#define pmap_ste(m, v) (&((m)->pm_stab[(vaddr_t)(v) \
- >> (mmutype == MMU_68040 ? SG4_SHIFT1 : SG_ISHIFT)]))
-#else
-#define pmap_ste(m, v) (&((m)->pm_stab[(vaddr_t)(v) >> SG4_SHIFT1]))
-#endif
-#define pmap_ste1(m, v) (&((m)->pm_stab[(vaddr_t)(v) >> SG4_SHIFT1]))
-/* XXX assumes physically contiguous ST pages (if more than one) */
-#define pmap_ste2(m, v) \
- (&((m)->pm_stab[(st_entry_t *)(*(u_int *)pmap_ste1(m,v) & SG4_ADDR1) \
- - (m)->pm_stpa + (((v) & SG4_MASK2) >> SG4_SHIFT2)]))
-#define pmap_ste_v(m, v) \
- (mmutype == MMU_68040 \
- ? ((*pmap_ste1(m, v) & SG_V) && \
- (*pmap_ste2(m, v) & SG_V)) \
- : (*pmap_ste(m, v) & SG_V))
-#else /* defined(M68040) || defined(M68060) */
-#define pmap_ste(m, v) (&((m)->pm_stab[(vaddr_t)(v) >> SG_ISHIFT]))
-#define pmap_ste_v(m, v) (*pmap_ste(m, v) & SG_V)
-#endif /* defined(M68040) || defined(M68060) */
-
-#define pmap_pte(m, v) (&((m)->pm_ptab[(vaddr_t)(v) >> PG_SHIFT]))
-
-#define pmap_pte_pa(pte) (*(u_int *)(pte) & PG_FRAME)
-
-#define pmap_pte_w(pte) (*(u_int *)(pte) & PG_W)
-#define pmap_pte_ci(pte) (*(u_int *)(pte) & PG_CI)
-#define pmap_pte_m(pte) (*(u_int *)(pte) & PG_M)
-#define pmap_pte_u(pte) (*(u_int *)(pte) & PG_U)
-#define pmap_pte_prot(pte) (*(u_int *)(pte) & PG_PROT)
-#define pmap_pte_v(pte) (*(u_int *)(pte) & PG_V)
-
-#define pmap_pte_set_w(pte, v) \
- do { if (v) *(u_int *)(pte) |= PG_W; else *(u_int *)(pte) &= ~PG_W; \
- } while (0)
-#define pmap_pte_set_prot(pte, v) \
- do { if (v) *(u_int *)(pte) |= PG_PROT; else *(u_int *)(pte) &= ~PG_PROT; \
- } while (0)
-#define pmap_pte_w_chg(pte, nw) ((nw) ^ pmap_pte_w(pte))
-#define pmap_pte_prot_chg(pte, np) ((np) ^ pmap_pte_prot(pte))
-
-#define active_pmap(pm) \
- ((pm) == pmap_kernel() || (pm) == curproc->p_vmspace->vm_map.pmap)
-
-/*
- * Given a map and a machine independent protection code,
- * convert to a vax protection code.
- */
-#define pte_prot(m, p) (protection_codes[p])
-u_int protection_codes[8];
-
-/*
- * Kernel page table page management.
- *
- * One additional page of KPT allows for 16 MB of virtual buffer cache.
- * A GENERIC kernel allocates this for 2 MB of real buffer cache,
- * which in turn is allocated for 38 MB of RAM.
- * We add one per 16 MB of RAM to allow for tuning the machine-independent
- * options.
- */
-#ifndef NKPTADDSHIFT
-#define NKPTADDSHIFT 24
-#endif
-
-struct kpt_page {
- struct kpt_page *kpt_next; /* link on either used or free list */
- vaddr_t kpt_va; /* always valid kernel VA */
- paddr_t kpt_pa; /* PA of this page (for speed) */
-};
-struct kpt_page *kpt_free_list, *kpt_used_list;
-struct kpt_page *kpt_pages;
-
-/*
- * Kernel segment/page table and page table map.
- * The page table map gives us a level of indirection we need to dynamically
- * expand the page table. It is essentially a copy of the segment table
- * with PTEs instead of STEs. All are initialized in locore at boot time.
- * Sysmap will initially contain VM_KERNEL_PT_PAGES pages of PTEs.
- * Segtabzero is an empty segment table which all processes share til they
- * reference something.
- */
-st_entry_t *Sysseg;
-pt_entry_t *Sysmap, *Sysptmap;
-st_entry_t *Segtabzero, *Segtabzeropa;
-vsize_t Sysptsize = VM_KERNEL_PT_PAGES;
-
-struct pv_header {
- struct pv_entry pvh_first; /* first PV entry */
- uint16_t pvh_attrs; /* attributes:
- bits 0-7: PTE bits
- bits 8-15: flags */
- uint16_t pvh_cimappings; /* # caller-specified CI
- mappings */
-};
-
-#define PVH_CI 0x10 /* all entries are cache-inhibited */
-#define PVH_PTPAGE 0x20 /* entry maps a page table page */
-
-struct pv_header *pv_table; /* array of entries, one per page */
-
-static struct pmap kernel_pmap_store;
-struct pmap *const kernel_pmap_ptr = &kernel_pmap_store;
-struct vm_map *pt_map;
-struct vm_map_kernel pt_map_store;
-
-paddr_t avail_start; /* PA of first available physical page */
-paddr_t avail_end; /* PA of last available physical page */
-vsize_t mem_size; /* memory size in bytes */
Home |
Main Index |
Thread Index |
Old Index