param.h (586) | param.h (607) |
---|---|
1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)param.h 5.8 (Berkeley) 6/28/91 | 1/*- 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * William Jolitz. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * from: @(#)param.h 5.8 (Berkeley) 6/28/91 |
37 * $Id: param.h,v 1.5 1993/10/12 07:13:12 rgrimes Exp $ | 37 * $Id: param.h,v 1.6 1993/10/12 12:08:16 rgrimes Exp $ |
38 */ 39 40/* 41 * Machine dependent constants for Intel 386. 42 */ 43 44#define MACHINE "i386" 45#define MID_MACHINE MID_I386 46 47/* 48 * Round p (pointer or byte index) up to a correctly-aligned value 49 * for all data types (int, long, ...). The result is u_int and 50 * must be cast to any desired pointer type. 51 */ 52#define ALIGNBYTES (sizeof(int) - 1) 53#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) 54 | 38 */ 39 40/* 41 * Machine dependent constants for Intel 386. 42 */ 43 44#define MACHINE "i386" 45#define MID_MACHINE MID_I386 46 47/* 48 * Round p (pointer or byte index) up to a correctly-aligned value 49 * for all data types (int, long, ...). The result is u_int and 50 * must be cast to any desired pointer type. 51 */ 52#define ALIGNBYTES (sizeof(int) - 1) 53#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) 54 |
55/* XXX PGSHIFT and PG_SHIFT are two names for the same thing */ |
|
55#define PGSHIFT 12 /* LOG2(NBPG) */ 56#define NBPG (1 << PGSHIFT) /* bytes/page */ 57#define PGOFSET (NBPG-1) /* byte offset into page */ 58#define NPTEPG (NBPG/(sizeof (struct pte))) 59 | 56#define PGSHIFT 12 /* LOG2(NBPG) */ 57#define NBPG (1 << PGSHIFT) /* bytes/page */ 58#define PGOFSET (NBPG-1) /* byte offset into page */ 59#define NPTEPG (NBPG/(sizeof (struct pte))) 60 |
61/* XXX PDRSHIFT and PD_SHIFT are two names for the same thing */ |
|
60#define PDRSHIFT 22 /* LOG2(NBPDR) */ 61#define NBPDR (1 << PDRSHIFT) /* bytes/page dir */ 62#define PDROFSET (NBPDR-1) /* byte offset into page dir */ 63 | 62#define PDRSHIFT 22 /* LOG2(NBPDR) */ 63#define NBPDR (1 << PDRSHIFT) /* bytes/page dir */ 64#define PDROFSET (NBPDR-1) /* byte offset into page dir */ 65 |
66/* 67 * XXX This should really be KPTDPTDI << PDRSHIFT, but since KPTDPTDI is 68 * defined in pmap.h which is included after this we can't do that 69 * (YET!) 70 */ |
|
64#define KERNBASE 0xFE000000 /* start of kernel virtual */ 65#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT) 66 67#define KERNSIZE 0x00C00000 /* size of kernel virtual */ 68 69#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ 70#define DEV_BSIZE (1 << DEV_BSHIFT) 71 --- 30 unchanged lines hidden (view full) --- 102#ifdef GATEWAY 103#define NMBCLUSTERS 512 /* map size, max cluster allocation */ 104#else 105#define NMBCLUSTERS 256 /* map size, max cluster allocation */ 106#endif /* GATEWAY */ 107#endif /* NMBCLUSTERS */ 108 109/* | 71#define KERNBASE 0xFE000000 /* start of kernel virtual */ 72#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT) 73 74#define KERNSIZE 0x00C00000 /* size of kernel virtual */ 75 76#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ 77#define DEV_BSIZE (1 << DEV_BSHIFT) 78 --- 30 unchanged lines hidden (view full) --- 109#ifdef GATEWAY 110#define NMBCLUSTERS 512 /* map size, max cluster allocation */ 111#else 112#define NMBCLUSTERS 256 /* map size, max cluster allocation */ 113#endif /* GATEWAY */ 114#endif /* NMBCLUSTERS */ 115 116/* |
110 * Size of kernel malloc arena in CLBYTES-sized logical pages 111 */ 112#ifndef NKMEMCLUSTERS 113#define NKMEMCLUSTERS (3072*1024/CLBYTES) 114#endif 115/* | |
116 * Some macros for units conversion 117 */ 118/* Core clicks (4096 bytes) to segments and vice versa */ 119#define ctos(x) (x) 120#define stoc(x) (x) 121 122/* Core clicks (4096 bytes) to disk blocks */ 123#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT)) --- 38 unchanged lines hidden --- | 117 * Some macros for units conversion 118 */ 119/* Core clicks (4096 bytes) to segments and vice versa */ 120#define ctos(x) (x) 121#define stoc(x) (x) 122 123/* Core clicks (4096 bytes) to disk blocks */ 124#define ctod(x) ((x)<<(PGSHIFT-DEV_BSHIFT)) --- 38 unchanged lines hidden --- |