[BACK]Return to pmap.h CVS log [TXT][DIR] Up to [local] / sys / arch / m88k / include

Annotation of sys/arch/m88k/include/pmap.h, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: pmap.h,v 1.9 2005/12/11 21:45:28 miod Exp $   */
        !             2: /*
        !             3:  * Mach Operating System
        !             4:  * Copyright (c) 1991 Carnegie Mellon University
        !             5:  * Copyright (c) 1991 OMRON Corporation
        !             6:  * All Rights Reserved.
        !             7:  *
        !             8:  * Permission to use, copy, modify and distribute this software and its
        !             9:  * documentation is hereby granted, provided that both the copyright
        !            10:  * notice and this permission notice appear in all copies of the
        !            11:  * software, derivative works or modified versions, and any portions
        !            12:  * thereof, and that both notices appear in supporting documentation.
        !            13:  *
        !            14:  */
        !            15: #ifndef _M88K_PMAP_H_
        !            16: #define _M88K_PMAP_H_
        !            17:
        !            18: #include <machine/mmu.h>
        !            19:
        !            20: /*
        !            21:  * PMAP structure
        !            22:  */
        !            23:
        !            24: struct pmap {
        !            25:        sdt_entry_t             *pm_stab;       /* virtual pointer to sdt */
        !            26:        apr_t                    pm_apr;
        !            27:        int                      pm_count;      /* reference count */
        !            28:        /* cpus using of this pmap; NCPU must be <= 32 */
        !            29:        u_int32_t                pm_cpus;
        !            30: #ifdef MULTIPROCESSOR
        !            31:        __cpu_simple_lock_t      pm_lock;
        !            32: #endif
        !            33:        struct pmap_statistics  pm_stats;       /* pmap statistics */
        !            34: };
        !            35:
        !            36: /*     The PV (Physical to virtual) List.
        !            37:  *
        !            38:  * For each vm_page_t, pmap keeps a list of all currently valid virtual
        !            39:  * mappings of that page. An entry is a pv_entry_t; the list is the
        !            40:  * pv_head_table. This is used by things like pmap_remove, when we must
        !            41:  * find and remove all mappings for a particular physical page.
        !            42:  */
        !            43: /* XXX - struct pv_entry moved to vmparam.h because of include ordering issues */
        !            44:
        !            45: typedef struct pmap *pmap_t;
        !            46: typedef struct pv_entry *pv_entry_t;
        !            47:
        !            48: #ifdef _KERNEL
        !            49:
        !            50: extern pmap_t          kernel_pmap;
        !            51: extern struct pmap     kernel_pmap_store;
        !            52: extern caddr_t         vmmap;
        !            53:
        !            54: #define        pmap_kernel()                   (&kernel_pmap_store)
        !            55: #define pmap_resident_count(pmap)      ((pmap)->pm_stats.resident_count)
        !            56: #define        pmap_wired_count(pmap)          ((pmap)->pm_stats.wired_count)
        !            57: #define pmap_phys_address(frame)        ((paddr_t)(ptoa(frame)))
        !            58:
        !            59: #define pmap_copy(dp,sp,d,l,s)         do { /* nothing */ } while (0)
        !            60: #define pmap_update(pmap)              do { /* nothing (yet) */ } while (0)
        !            61:
        !            62: #define        pmap_clear_modify(pg)           pmap_unsetbit(pg, PG_M)
        !            63: #define        pmap_clear_reference(pg)        pmap_unsetbit(pg, PG_U)
        !            64:
        !            65: void   pmap_bootstrap(vaddr_t);
        !            66: void   pmap_bootstrap_cpu(cpuid_t);
        !            67: void   pmap_cache_ctrl(pmap_t, vaddr_t, vaddr_t, u_int);
        !            68: void   pmap_proc_iflush(struct proc *, vaddr_t, vsize_t);
        !            69: #define pmap_unuse_final(p)            /* nothing */
        !            70: boolean_t pmap_unsetbit(struct vm_page *, int);
        !            71:
        !            72: #endif /* _KERNEL */
        !            73:
        !            74: #endif /* _M88K_PMAP_H_ */

CVSweb