Use PAGE_SIZE rather than NBPG.
This commit is contained in:
parent
cc2c493bc4
commit
ffc984aa7c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dvma.h,v 1.3 2001/06/14 13:17:04 fredette Exp $ */
|
||||
/* $NetBSD: dvma.h,v 1.4 2003/04/02 07:53:56 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -60,7 +60,7 @@
|
|||
#define DVMA_MAP_SIZE_120 0x00040000
|
||||
#define DVMA_MAP_SIZE_50 0x000F8000
|
||||
#define DVMA_MAP_SIZE (cpu_machine_id == SUN2_MACH_120 ? DVMA_MAP_SIZE_120 : DVMA_MAP_SIZE_50)
|
||||
#define DVMA_MAP_AVAIL (DVMA_MAP_SIZE-NBPG)
|
||||
#define DVMA_MAP_AVAIL (DVMA_MAP_SIZE-PAGE_SIZE)
|
||||
|
||||
/*
|
||||
* To convert an address in DVMA space to a slave address,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vmparam.h,v 1.9 2003/04/01 15:33:48 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.10 2003/04/02 07:53:57 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -114,7 +114,7 @@
|
|||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)KERN_END)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
|
||||
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
|
||||
#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dvma3.h,v 1.9 1998/02/05 04:56:50 gwr Exp $ */
|
||||
/* $NetBSD: dvma3.h,v 1.10 2003/04/02 07:53:58 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -47,7 +47,7 @@
|
|||
*/
|
||||
#define DVMA_MAP_BASE 0x0FF00000
|
||||
#define DVMA_MAP_SIZE 0x00100000
|
||||
#define DVMA_MAP_AVAIL (DVMA_MAP_SIZE-NBPG)
|
||||
#define DVMA_MAP_AVAIL (DVMA_MAP_SIZE-PAGE_SIZE)
|
||||
|
||||
/*
|
||||
* To convert an address in DVMA space to a slave address,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dvma3x.h,v 1.5 1998/02/05 04:56:51 gwr Exp $ */
|
||||
/* $NetBSD: dvma3x.h,v 1.6 2003/04/02 07:53:58 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -50,7 +50,7 @@
|
|||
*/
|
||||
#define DVMA_MAP_BASE 0xFFF00000
|
||||
#define DVMA_MAP_SIZE 0x00100000
|
||||
#define DVMA_MAP_AVAIL (DVMA_MAP_SIZE-NBPG)
|
||||
#define DVMA_MAP_AVAIL (DVMA_MAP_SIZE-PAGE_SIZE)
|
||||
|
||||
/*
|
||||
* To convert an address in DVMA space to a slave address,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vmparam.h,v 1.31 2001/11/15 18:06:18 soren Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.32 2003/04/02 07:53:58 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -74,7 +74,7 @@ extern char KERNBASE[];
|
|||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)KERN_END)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
|
||||
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BSEARCH
|
||||
#define VM_PHYSSEG_NOADD /* can't add RAM after vm_mem_init */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vmparam.h,v 1.24 2002/12/10 05:14:36 thorpej Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.25 2003/04/02 07:53:59 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -116,7 +116,7 @@
|
|||
#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xFFFFF000)
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
|
||||
|
||||
/* # of kernel PT pages (initial only, can grow dynamically) */
|
||||
#define VM_KERNEL_PT_PAGES ((vsize_t)2) /* XXX: SYSPTSIZE */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mpbiosvar.h,v 1.1 2003/02/26 21:26:11 fvdl Exp $ */
|
||||
/* $NetBSD: mpbiosvar.h,v 1.2 2003/04/02 07:53:57 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -42,7 +42,7 @@
|
|||
#ifndef _X86_MPBIOSVAR_H_
|
||||
#define _X86_MPBIOSVAR_H_
|
||||
|
||||
#define MP_TRAMPOLINE (2 * NBPG)
|
||||
#define MP_TRAMPOLINE (2 * PAGE_SIZE)
|
||||
|
||||
#if !defined(_LOCORE)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pmap.h,v 1.10 2003/03/05 23:56:02 fvdl Exp $ */
|
||||
/* $NetBSD: pmap.h,v 1.11 2003/04/02 07:53:59 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
|
@ -211,11 +211,11 @@
|
|||
#define NKL2_START_ENTRIES 0
|
||||
#define NKL1_START_ENTRIES 0 /* XXX */
|
||||
|
||||
#define NTOPLEVEL_PDES (NBPG / (sizeof (pd_entry_t)))
|
||||
#define NTOPLEVEL_PDES (PAGE_SIZE / (sizeof (pd_entry_t)))
|
||||
|
||||
#define KERNSPACE (NKL4_ENTRIES * NBPD_L4)
|
||||
|
||||
#define NPDPG (NBPG / sizeof (pd_entry_t))
|
||||
#define NPDPG (PAGE_SIZE / sizeof (pd_entry_t))
|
||||
|
||||
#define ptei(VA) (((VA_SIGN_POS(VA)) & L1_MASK) >> L1_SHIFT)
|
||||
|
||||
|
@ -254,11 +254,11 @@
|
|||
* a PTP's offset is the byte-offset in the PTE space that this PTP is at
|
||||
* a PTP's VA is the first VA mapped by that PTP
|
||||
*
|
||||
* note that NBPG == number of bytes in a PTP (4096 bytes == 1024 entries)
|
||||
* note that PAGE_SIZE == number of bytes in a PTP (4096 bytes == 1024 entries)
|
||||
* NBPD == number of bytes a PTP can map (4MB)
|
||||
*/
|
||||
|
||||
#define ptp_va2o(va, lvl) (pl_i(va, (lvl)+1) * NBPG)
|
||||
#define ptp_va2o(va, lvl) (pl_i(va, (lvl)+1) * PAGE_SIZE)
|
||||
|
||||
#define PTP_LEVELS 4
|
||||
|
||||
|
@ -366,7 +366,7 @@ struct pv_page_info {
|
|||
* (note: won't work on systems where NPBG isn't a constant)
|
||||
*/
|
||||
|
||||
#define PVE_PER_PVPAGE ((NBPG - sizeof(struct pv_page_info)) / \
|
||||
#define PVE_PER_PVPAGE ((PAGE_SIZE - sizeof(struct pv_page_info)) / \
|
||||
sizeof(struct pv_entry))
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vmparam.h,v 1.6 2003/03/20 22:30:28 fvdl Exp $ */
|
||||
/* $NetBSD: vmparam.h,v 1.7 2003/04/02 07:54:00 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -115,7 +115,7 @@
|
|||
#endif
|
||||
|
||||
/* virtual sizes (bytes) for various kernel submaps */
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*NBPG)
|
||||
#define VM_PHYS_SIZE (USRIOSIZE*PAGE_SIZE)
|
||||
|
||||
#define VM_PHYSSEG_MAX 5 /* 1 "hole" + 4 free lists */
|
||||
#define VM_PHYSSEG_STRAT VM_PSTRAT_BIGFIRST
|
||||
|
|
Loading…
Reference in New Issue