Commit | Line | Data |
---|---|---|
da7c5cc6 | 1 | /* |
0880b18e | 2 | * Copyright (c) 1982, 1986 Regents of the University of California. |
da7c5cc6 KM |
3 | * All rights reserved. The Berkeley software License Agreement |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
471b3c85 | 6 | * @(#)pte.h 7.3 (Berkeley) %G% |
da7c5cc6 | 7 | */ |
cb3a5783 BJ |
8 | |
9 | /* | |
10 | * VAX page table entry | |
11 | * | |
12 | * There are two major kinds of pte's: those which have ever existed (and are | |
13 | * thus either now in core or on the swap device), and those which have | |
14 | * never existed, but which will be filled on demand at first reference. | |
15 | * There is a structure describing each. There is also an ancillary | |
16 | * structure used in page clustering. | |
17 | */ | |
18 | ||
5d1a7b0a | 19 | #ifndef LOCORE |
cb3a5783 BJ |
20 | struct pte |
21 | { | |
22 | unsigned int pg_pfnum:21, /* core page frame number or 0 */ | |
23 | :2, | |
24 | pg_vreadm:1, /* modified since vread (or with _m) */ | |
0752fdf0 | 25 | :1, |
cb3a5783 BJ |
26 | pg_fod:1, /* is fill on demand (=0) */ |
27 | pg_m:1, /* hardware maintained modified bit */ | |
28 | pg_prot:4, /* access control */ | |
29 | pg_v:1; /* valid bit */ | |
30 | }; | |
31 | struct hpte | |
32 | { | |
33 | unsigned int pg_pfnum:21, | |
34 | :2, | |
35 | pg_high:9; /* special for clustering */ | |
36 | }; | |
37 | struct fpte | |
38 | { | |
b834dc16 KM |
39 | unsigned int pg_blkno:24, /* file system block number */ |
40 | pg_fileno:1, /* file mapped from or TEXT or ZERO */ | |
cb3a5783 BJ |
41 | pg_fod:1, /* is fill on demand (=1) */ |
42 | :1, | |
43 | pg_prot:4, | |
44 | pg_v:1; | |
45 | }; | |
5d1a7b0a | 46 | #endif |
cb3a5783 BJ |
47 | |
48 | #define PG_V 0x80000000 | |
49 | #define PG_PROT 0x78000000 | |
50 | #define PG_M 0x04000000 | |
3e2f54af | 51 | #define PG_FOD 0x02000000 |
cb3a5783 BJ |
52 | #define PG_VREADM 0x00800000 |
53 | #define PG_PFNUM 0x001fffff | |
54 | ||
3765e049 MK |
55 | #define PG_FZERO 0 |
56 | #define PG_FTEXT 1 | |
cb3a5783 BJ |
57 | #define PG_FMAX (PG_FTEXT) |
58 | ||
59 | #define PG_NOACC 0 | |
60 | #define PG_KW 0x10000000 | |
61 | #define PG_KR 0x18000000 | |
62 | #define PG_UW 0x20000000 | |
63 | #define PG_URKW 0x70000000 | |
64 | #define PG_URKR 0x78000000 | |
65 | ||
66 | /* | |
67 | * Pte related macros | |
68 | */ | |
0752fdf0 | 69 | #define dirty(pte) ((pte)->pg_m) |
cb3a5783 | 70 | |
5d1a7b0a | 71 | #ifndef LOCORE |
cb3a5783 | 72 | #ifdef KERNEL |
cb3a5783 BJ |
73 | |
74 | /* utilities defined in locore.s */ | |
75 | extern struct pte Sysmap[]; | |
76 | extern struct pte Usrptmap[]; | |
77 | extern struct pte usrpt[]; | |
78 | extern struct pte Swapmap[]; | |
79 | extern struct pte Forkmap[]; | |
80 | extern struct pte Xswapmap[]; | |
81 | extern struct pte Xswap2map[]; | |
82 | extern struct pte Pushmap[]; | |
83 | extern struct pte Vfmap[]; | |
84 | extern struct pte mmap[]; | |
a5e17cf9 | 85 | extern struct pte msgbufmap[]; |
603582f2 | 86 | extern struct pte kmempt[], ekmempt[]; |
4d752f43 | 87 | extern struct pte Nexmap[][16]; |
6692a5c8 | 88 | extern struct pte Ioamap[][1]; |
90dc7048 BK |
89 | #ifdef VAX630 |
90 | extern struct pte Clockmap[]; | |
91 | extern struct pte Ka630map[]; | |
92 | #endif | |
cb3a5783 | 93 | #endif |
5d1a7b0a | 94 | #endif |