summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/include
diff options
context:
space:
mode:
authorSteve Murphree <smurph@cvs.openbsd.org>2001-12-22 10:22:14 +0000
committerSteve Murphree <smurph@cvs.openbsd.org>2001-12-22 10:22:14 +0000
commitcd752df9f62be150bd225e53d27897851769c4f9 (patch)
tree90798ea90f3fa60c5345b7f56855c506e45f2190 /sys/arch/mvme88k/include
parent758c4f16981e6987a5e1f1425f91edfaf1093714 (diff)
correct pmap_map. mc88110 modifications.
Diffstat (limited to 'sys/arch/mvme88k/include')
-rw-r--r--sys/arch/mvme88k/include/pmap.h124
1 files changed, 41 insertions, 83 deletions
diff --git a/sys/arch/mvme88k/include/pmap.h b/sys/arch/mvme88k/include/pmap.h
index 0e19df740e9..ab00e0491bb 100644
--- a/sys/arch/mvme88k/include/pmap.h
+++ b/sys/arch/mvme88k/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.22 2001/12/16 23:49:46 miod Exp $ */
+/* $OpenBSD: pmap.h,v 1.23 2001/12/22 10:22:13 smurph Exp $ */
/*
* Mach Operating System
* Copyright (c) 1991 Carnegie Mellon University
@@ -28,24 +28,24 @@ typedef struct sdt_entry *sdt_ptr_t;
typedef struct pmap *pmap_t;
struct pmap {
- sdt_ptr_t sdt_paddr; /* physical pointer to sdt */
- sdt_ptr_t sdt_vaddr; /* virtual pointer to sdt */
- int ref_count; /* reference count */
- struct simplelock lock;
- struct pmap_statistics stats; /* pmap statistics */
-
- /* cpus using of this pmap; NCPU must be <= 32 */
- unsigned long cpus_using;
+ sdt_ptr_t sdt_paddr; /* physical pointer to sdt */
+ sdt_ptr_t sdt_vaddr; /* virtual pointer to sdt */
+ int ref_count; /* reference count */
+ struct simplelock lock;
+ struct pmap_statistics stats; /* pmap statistics */
+
+ /* cpus using of this pmap; NCPU must be <= 32 */
+ unsigned long cpus_using;
#ifdef DEBUG
- pmap_t next;
- pmap_t prev;
+ pmap_t next;
+ pmap_t prev;
#endif
- /* for OMRON_PMAP */
- batc_template_t i_batc[BATC_MAX]; /* instruction BATCs */
- batc_template_t d_batc[BATC_MAX]; /* data BATCs */
- /* end OMRON_PMAP */
+ /* for OMRON_PMAP */
+ batc_template_t i_batc[BATC_MAX]; /* instruction BATCs */
+ batc_template_t d_batc[BATC_MAX]; /* data BATCs */
+ /* end OMRON_PMAP */
};
@@ -59,9 +59,9 @@ struct pmap {
* find and remove all mappings for a particular physical page.
*/
typedef struct pv_entry {
- struct pv_entry *next; /* next pv_entry */
- pmap_t pmap; /* pmap where mapping lies */
- vm_offset_t va; /* virtual address for mapping */
+ struct pv_entry *next; /* next pv_entry */
+ pmap_t pmap; /* pmap where mapping lies */
+ vm_offset_t va; /* virtual address for mapping */
} *pv_entry_t;
#ifdef _KERNEL
@@ -80,8 +80,9 @@ extern caddr_t vmmap;
#define PMAP_ACTIVATE(proc) pmap_activate(proc)
#define PMAP_DEACTIVATE(proc) pmap_deactivate(proc)
#define PMAP_CONTEXT(pmap, thread)
+
/*
- * Modes used when calling pmap_cache_fulsh().
+ * Modes used when calling pmap_cache_flush().
*/
#define FLUSH_CACHE 0
#define FLUSH_CODE_CACHE 1
@@ -94,69 +95,26 @@ extern caddr_t vmmap;
/*** Prototypes for public functions defined in pmap.c ********************/
/**************************************************************************/
-vm_offset_t pmap_map(
- vm_offset_t virt,
- vm_offset_t start,
- vm_offset_t end,
- vm_prot_t prot);
-
-vm_offset_t pmap_map_batc(
- vm_offset_t virt,
- vm_offset_t start,
- vm_offset_t end,
- vm_prot_t prot,
- unsigned cmode);
-
-void pmap_bootstrap(
- vm_offset_t load_start, /* IN */
- vm_offset_t *phys_start, /* IN/OUT */
- vm_offset_t *phys_end, /* IN */
- vm_offset_t *virt_start, /* OUT */
- vm_offset_t *virt_end); /* OUT */
-
-pt_entry_t *pmap_pte(pmap_t map, vm_offset_t virt);
-void pmap_cache_ctrl(pmap_t pmap, vm_offset_t s, vm_offset_t e, unsigned mode);
-void pmap_zero_page(vm_offset_t phys);
-void pmap_remove_all(vm_offset_t phys);
-vm_offset_t pmap_extract_unlocked(pmap_t pmap, vm_offset_t va);
-void copy_to_phys(vm_offset_t srcva, vm_offset_t dstpa, int bytecount);
-void copy_from_phys(vm_offset_t srcpa, vm_offset_t dstva, int bytecount);
-void pmap_redzone(pmap_t pmap, vm_offset_t va);
-void icache_flush(vm_offset_t pa);
-void pmap_dcache_flush(pmap_t pmap, vm_offset_t va);
-void pmap_cache_flush(pmap_t pmap, vm_offset_t virt, int bytes, int mode);
-void pmap_print (pmap_t pmap);
-void pmap_print_trace (pmap_t pmap, vm_offset_t va, boolean_t long_format);
-
-#if 0
-#ifdef OMRON_PMAP
- void pmap_set_batc(
- pmap_t pmap,
- boolean_t data,
- int i,
- vm_offset_t va,
- vm_offset_t pa,
- boolean_t super,
- boolean_t wt,
- boolean_t global,
- boolean_t ci,
- boolean_t wp,
- boolean_t valid);
-
- void use_batc(
- task_t task,
- boolean_t data, /* for data-cmmu ? */
- int i, /* batc number */
- vm_offset_t va, /* virtual address */
- vm_offset_t pa, /* physical address */
- boolean_t s, /* for super-mode ? */
- boolean_t wt, /* is writethrough */
- boolean_t g, /* is global ? */
- boolean_t ci, /* is cache inhibited ? */
- boolean_t wp, /* is write-protected ? */
- boolean_t v); /* is valid ? */
-#endif
-#endif /* 0 */
+void pmap_bootstrap __P((vm_offset_t, vm_offset_t *, vm_offset_t *,
+ vm_offset_t *, vm_offset_t *));
+void pmap_cache_ctrl __P((pmap_t, vm_offset_t, vm_offset_t, unsigned));
+pt_entry_t *pmap_pte __P((pmap_t, vm_offset_t));
+void pmap_cache_ctrl __P((pmap_t, vm_offset_t, vm_offset_t, unsigned));
+void pmap_zero_page __P((vm_offset_t));
+void pmap_remove_all __P((vm_offset_t));
+vm_offset_t pmap_extract_unlocked __P((pmap_t, vm_offset_t));
+void copy_to_phys __P((vm_offset_t, vm_offset_t, int));
+void copy_from_phys __P((vm_offset_t, vm_offset_t, int));
+void pmap_redzone __P((pmap_t, vm_offset_t));
+void icache_flush __P((vm_offset_t));
+void pmap_dcache_flush __P((pmap_t, vm_offset_t));
+void pmap_cache_flush __P((pmap_t, vm_offset_t, int, int));
+void pmap_print __P((pmap_t));
+void pmap_print_trace __P((pmap_t, vm_offset_t, boolean_t));
+vm_offset_t pmap_map __P((vm_offset_t, vm_offset_t, vm_offset_t,
+ vm_prot_t, unsigned int));
+vm_offset_t pmap_map_batc __P((vm_offset_t, vm_offset_t, vm_offset_t,
+ vm_prot_t, unsigned int));
#endif /* _KERNEL */
-#endif /* endif _MACHINE_PMAP_H_ */
+#endif /* _MACHINE_PMAP_H_ */