summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1999-04-20 19:29:14 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1999-04-20 19:29:14 +0000
commit2d26bdf4095ae0482138dd120c74678ceac5b500 (patch)
tree2be8afc9efc5f2d3b53c0ff10a0dcbbb6acd2e50 /sys/arch
parenta1eddd64b706d3634ad99f6b9abd94eaa7f364a6 (diff)
uvm names and definitions
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/hppa/include/cpufunc.h32
-rw-r--r--sys/arch/hppa/include/db_machdep.h12
-rw-r--r--sys/arch/hppa/include/pmap.h12
-rw-r--r--sys/arch/hppa/include/types.h15
-rw-r--r--sys/arch/hppa/include/vmparam.h22
5 files changed, 52 insertions, 41 deletions
diff --git a/sys/arch/hppa/include/cpufunc.h b/sys/arch/hppa/include/cpufunc.h
index b20f4111087..4e6b0b89e6c 100644
--- a/sys/arch/hppa/include/cpufunc.h
+++ b/sys/arch/hppa/include/cpufunc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc.h,v 1.6 1999/02/25 17:23:34 mickey Exp $ */
+/* $OpenBSD: cpufunc.h,v 1.7 1999/04/20 19:29:12 mickey Exp $ */
/*
* Copyright (c) 1998 Michael Shalayeff
@@ -70,7 +70,7 @@
#define hptbtop(b) ((b) >> 17)
/* Get space register for an address */
-static __inline u_int ldsid(vm_offset_t p) {
+static __inline u_int ldsid(vaddr_t p) {
register u_int ret;
__asm __volatile("ldsid (%1),%0" : "=r" (ret) : "r" (p));
return ret;
@@ -116,10 +116,10 @@ void set_psw __P((u_int psw));
__asm __volatile("sync\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop")
static __inline void
-ficache(pa_space_t sp, vm_offset_t va, vm_size_t size)
+ficache(pa_space_t sp, vaddr_t va, vsize_t size)
{
extern int icache_stride;
- register vm_offset_t eva = va + size;
+ register vaddr_t eva = va + size;
mtsp(sp, 1);
while (va < eva)
@@ -128,10 +128,10 @@ ficache(pa_space_t sp, vm_offset_t va, vm_size_t size)
}
static __inline void
-fdcache(pa_space_t sp, vm_offset_t va, vm_size_t size)
+fdcache(pa_space_t sp, vaddr_t va, vsize_t size)
{
extern int dcache_stride;
- register vm_offset_t eva = va + size;
+ register vaddr_t eva = va + size;
mtsp(sp, 1);
while (va < eva)
@@ -140,56 +140,56 @@ fdcache(pa_space_t sp, vm_offset_t va, vm_size_t size)
}
static __inline void
-iitlba(u_int pg, pa_space_t sp, vm_offset_t va)
+iitlba(u_int pg, pa_space_t sp, vaddr_t va)
{
mtsp(sp, 1);
__asm volatile("iitlba %0,(%%sr1, %1)":: "r" (pg), "r" (va));
}
static __inline void
-idtlba(u_int pg, pa_space_t sp, vm_offset_t va)
+idtlba(u_int pg, pa_space_t sp, vaddr_t va)
{
mtsp(sp, 1);
__asm volatile("idtlba %0,(%%sr1, %1)":: "r" (pg), "r" (va));
}
static __inline void
-iitlbp(u_int prot, pa_space_t sp, vm_offset_t va)
+iitlbp(u_int prot, pa_space_t sp, vaddr_t va)
{
mtsp(sp, 1);
__asm volatile("iitlbp %0,(%%sr1, %1)":: "r" (prot), "r" (va));
}
static __inline void
-idtlbp(u_int prot, pa_space_t sp, vm_offset_t va)
+idtlbp(u_int prot, pa_space_t sp, vaddr_t va)
{
mtsp(sp, 1);
__asm volatile("idtlbp %0,(%%sr1, %1)":: "r" (prot), "r" (va));
}
static __inline void
-pitlb(pa_space_t sp, vm_offset_t va)
+pitlb(pa_space_t sp, vaddr_t va)
{
mtsp(sp, 1);
__asm volatile("pitlb %%r0(%%sr1, %0)":: "r" (va));
}
static __inline void
-pdtlb(pa_space_t sp, vm_offset_t va)
+pdtlb(pa_space_t sp, vaddr_t va)
{
mtsp(sp, 1);
__asm volatile("pdtlb %%r0(%%sr1, %0)":: "r" (va));
}
static __inline void
-pitlbe(pa_space_t sp, vm_offset_t va)
+pitlbe(pa_space_t sp, vaddr_t va)
{
mtsp(sp, 1);
__asm volatile("pitlbe %%r0(%%sr1, %0)":: "r" (va));
}
static __inline void
-pdtlbe(pa_space_t sp, vm_offset_t va)
+pdtlbe(pa_space_t sp, vaddr_t va)
{
mtsp(sp, 1);
__asm volatile("pdtlbe %%r0(%%sr1, %0)":: "r" (va));
@@ -198,8 +198,8 @@ pdtlbe(pa_space_t sp, vm_offset_t va)
#ifdef _KERNEL
void fcacheall __P((void));
void ptlball __P((void));
-int btlb_insert __P((pa_space_t space, vm_offset_t va, vm_offset_t pa,
- vm_size_t *lenp, u_int prot));
+int btlb_insert __P((pa_space_t space, vaddr_t va, paddr_t pa,
+ vsize_t *lenp, u_int prot));
hppa_hpa_t cpu_gethpa __P((int n));
void heartbeat __P((int on));
#endif
diff --git a/sys/arch/hppa/include/db_machdep.h b/sys/arch/hppa/include/db_machdep.h
index cb59b3a9c5b..544649b4e50 100644
--- a/sys/arch/hppa/include/db_machdep.h
+++ b/sys/arch/hppa/include/db_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_machdep.h,v 1.1 1998/12/05 17:38:34 mickey Exp $ */
+/* $OpenBSD: db_machdep.h,v 1.2 1999/04/20 19:29:12 mickey Exp $ */
/*
* Copyright (c) 1998 Michael Shalayeff
@@ -34,14 +34,14 @@
#define _MACHINE_DB_MACHDEP_H_
/* types the generic ddb module needs */
-typedef vm_offset_t db_addr_t;
+typedef vaddr_t db_addr_t;
typedef long db_expr_t;
typedef struct trapframe db_regs_t;
extern db_regs_t ddb_regs;
#define DDB_REGS (&ddb_regs)
-#define PC_REGS(regs) ((db_addr_t)(regs)->iioq_head)
+#define PC_REGS(regs) ((db_addr_t)(regs)->tf_iioq_head)
/* Breakpoint related definitions */
#define BKPT_INST 0x00000000 /* break 0,0 */
@@ -51,7 +51,7 @@ extern db_regs_t ddb_regs;
#define IS_BREAKPOINT_TRAP(type, code) 1
#define IS_WATCHPOINT_TRAP(type, code) 0
-#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->tf_regs[FRAME_PC] -= sizeof(int))
+#define FIXUP_PC_AFTER_BREAK(regs) ((regs)->tf_iioq_head -= sizeof(int))
#define DB_VALID_BREAKPOINT(addr) db_valid_breakpoint(addr)
@@ -85,8 +85,8 @@ static __inline int inst_trap_return(u_int ins) {
return (ins & 0xfc001fc0) == 0x00000ca0;
}
-#define db_clear_single_step(r) ((r)->flags |= 0)
-#define db_set_single_step(r) ((r)->flags |= 0)
+#define db_clear_single_step(r) ((r)->tf_flags |= 0)
+#define db_set_single_step(r) ((r)->tf_flags |= 0)
int db_valid_breakpoint __P((db_addr_t));
int kdb_trap __P((int, int, db_regs_t *));
diff --git a/sys/arch/hppa/include/pmap.h b/sys/arch/hppa/include/pmap.h
index ef032f5deec..ab8b2b37176 100644
--- a/sys/arch/hppa/include/pmap.h
+++ b/sys/arch/hppa/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.7 1999/01/20 19:39:53 mickey Exp $ */
+/* $OpenBSD: pmap.h,v 1.8 1999/04/20 19:29:12 mickey Exp $ */
/*
* Copyright (c) 1998 Michael Shalayeff
@@ -161,6 +161,8 @@ struct pmap_physseg {
#define cache_align(x) (((x) + dcache_line_mask) & ~(dcache_line_mask))
extern int dcache_line_mask;
+extern void gateway_page __P((void));
+
#define PMAP_STEAL_MEMORY /* we have some memory to steal */
#define pmap_kernel_va(VA) \
@@ -179,8 +181,8 @@ do { if (pmap) { \
#define pmap_pageable(pmap, start, end, pageable)
#define pmap_copy(dpmap,spmap,da,len,sa)
#define pmap_update()
-#define pmap_activate(pmap, pcb)
-#define pmap_deactivate(pmap, pcb)
+#define pmap_activate(p)
+#define pmap_deactivate(p)
#define pmap_phys_address(x) ((x) << PGSHIFT)
#define pmap_phys_to_frame(x) ((x) >> PGSHIFT)
@@ -192,8 +194,8 @@ pmap_prot(struct pmap *pmap, int prot)
return (pmap == kernel_pmap? kern_prot: user_prot)[prot];
}
-void pmap_bootstrap __P((vm_offset_t *, vm_offset_t *));
-void pmap_changebit __P((vm_offset_t, u_int, u_int));
+void pmap_bootstrap __P((vaddr_t *, vaddr_t *));
+void pmap_changebit __P((vaddr_t, u_int, u_int));
#endif /* _KERNEL */
#endif /* _MACHINE_PMAP_H_ */
diff --git a/sys/arch/hppa/include/types.h b/sys/arch/hppa/include/types.h
index d655db6a48a..0310e944cee 100644
--- a/sys/arch/hppa/include/types.h
+++ b/sys/arch/hppa/include/types.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: types.h,v 1.4 1999/01/08 03:04:07 millert Exp $ */
+/* $OpenBSD: types.h,v 1.5 1999/04/20 19:29:13 mickey Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -51,13 +51,18 @@ typedef struct label_t {
double lbl_sf[10]; /* hp800:fr12-fr15, hp700:fr12-fr21 */
} label_t;
-#endif
-
typedef unsigned long hppa_hpa_t;
typedef unsigned long hppa_spa_t;
typedef unsigned int pa_space_t;
-typedef unsigned long vm_size_t;
-typedef unsigned long vm_offset_t;
+typedef unsigned long vaddr_t;
+typedef unsigned long vsize_t;
+typedef unsigned long paddr_t;
+typedef unsigned long psize_t;
+/* XXX DIE DIE DIE */
+typedef unsigned long vm_offset_t;
+typedef unsigned long vm_size_t;
+
+#endif
/*
* Basic integral types. Omit the typedef if
diff --git a/sys/arch/hppa/include/vmparam.h b/sys/arch/hppa/include/vmparam.h
index 3e481a91a82..149ba7f879d 100644
--- a/sys/arch/hppa/include/vmparam.h
+++ b/sys/arch/hppa/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmparam.h,v 1.5 1998/11/23 03:32:54 mickey Exp $ */
+/* $OpenBSD: vmparam.h,v 1.6 1999/04/20 19:29:13 mickey Exp $ */
/*
* Copyright (c) 1988-1994, The University of Utah and
@@ -39,7 +39,7 @@
#define USRTEXT 0x00002000 /* Start of user .text */
#define USRSTACK 0x68FF3000 /* Start of user stack */
#define BTOPUSRSTACK btop(USRSTACK) /* btop(USRSTACK) */
-#define P1PAGES 0
+#define P1PAGES 2
#define LOWPAGES 0
#define HIGHPAGES UPAGES
#define SYSCALLGATE 0xC0000000 /* syscall gateway page */
@@ -116,24 +116,28 @@
* that we don't consider it worthwhile and swap it out to disk which costs
* $30/mb or about $0.75.
*/
-#define SAFERSS (16384/NBPG) /* nominal ``small'' resident set size
+#define SAFERSS (0x4000/NBPG) /* nominal ``small'' resident set size
protected against replacement */
/* user/kernel map constants */
-#define VM_MIN_ADDRESS ((vm_offset_t)0)
-#define VM_MAXUSER_ADDRESS ((vm_offset_t)0xc0000000)
+#define VM_MIN_ADDRESS ((vaddr_t)0)
+#define VM_MAXUSER_ADDRESS ((vaddr_t)0xc0000000)
#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS
-#define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0)
-#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xF0000000)
+#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0)
+#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xc0000000)
/* virtual sizes (bytes) for various kernel submaps */
#define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES)
#define VM_KMEM_SIZE (NKMEMCLUSTERS*CLBYTES)
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
-#define MACHINE_NEW_NONCONTIG /* VM <=> pmap interface modifier */
-
#define VM_PHYSSEG_MAX 8 /* this many physmem segments */
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
+#define VM_NFREELIST 2
+#define VM_FREELIST_DEFAULT 0
+#define VM_FREELIST_FIRST16 1
+
+#define MACHINE_NEW_NONCONTIG 1 /* defined this until we rely on vm */
+
#endif /* _MACHINE_VMPARAM_H_ */