Annotation of sys/arch/hppa64/include/pte.h, Revision 1.1.1.1
1.1 nbrk 1: /* $OpenBSD: pte.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
2:
3: /*
4: * Copyright (c) 2005 Michael Shalayeff
5: * All rights reserved.
6: *
7: * Permission to use, copy, modify, and distribute this software for any
8: * purpose with or without fee is hereby granted, provided that the above
9: * copyright notice and this permission notice appear in all copies.
10: *
11: * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12: * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13: * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14: * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15: * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
16: * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
17: * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18: */
19:
20: #ifndef _MACHINE_PTE_H_
21: #define _MACHINE_PTE_H_
22:
23: #define SID_MASK (0x1ff)
24: #define SID_SHIFT (9)
25: #define PIE_MASK (0x1ff80000000UL)
26: #define PIE_SHIFT (PDE_SHIFT+10)
27: #define PDE_MASK (0x0007fe00000UL)
28: #define PDE_SHIFT (PTE_SHIFT+9)
29: #define PTE_MASK (0x000001ff000UL)
30: #define PTE_SHIFT PAGE_SHIFT
31: #define PTE_PAGE(pte) (((pte) & ~PTE_PGMASK) << 7)
32: #define TLB_PAGE(pg) (((pg) >> 7) & PTE_PGMASK)
33:
34: #define PTE_IFLUSH 0x8000000000000000UL /* software */
35: #define PTE_DFLUSH 0x4000000000000000UL /* software */
36: #define PTE_REFTRAP 0x2000000000000000UL /* used as a ref bit */
37: #define PTE_DIRTY 0x1000000000000000UL
38: #define PTE_BREAK 0x0800000000000000UL
39: #define PTE_GATEWAY 0x04c0000000000000UL
40: #define PTE_EXEC 0x0200000000000000UL
41: #define PTE_WRITE 0x0100000000000000UL
42: #define PTE_READ 0x0000000000000000UL
43: #define PTE_USER 0x00f0000000000000UL
44: #define PTE_ACC_NONE 0x0730000000000000UL
45: #define PTE_ACC_MASK 0x07f0000000000000UL
46: #define PTE_UNCACHABLE 0x0008000000000000UL
47: #define PTE_ORDER 0x0004000000000000UL
48: #define PTE_PREDICT 0x0002000000000000UL
49: #define PTE_WIRED 0x0001000000000000UL /* software */
50: #define PTE_PGMASK 0x0000001fffffffe0UL
51: #define PTE_PG4K 0x0000000000000000UL
52: #define PTE_PG16K 0x0000000000000001UL
53: #define PTE_PG64K 0x0000000000000002UL
54: #define PTE_PG256K 0x0000000000000003UL
55: #define PTE_PG1M 0x0000000000000004UL
56: #define PTE_PG4M 0x0000000000000005UL
57: #define PTE_PG16M 0x0000000000000006UL
58: #define PTE_PG64M 0x0000000000000007UL
59:
60: #define PTE_GETBITS(pte) ((pte) >> 48)
61: #define PTE_BITS \
62: "\020\01H\02P\03O\04UC\05U\010W\11X\12G\014B\015D\016REF\017FD\020FI"
63:
64: #ifndef _LOCORE
65: typedef u_int64_t pt_entry_t;
66: #endif
67:
68: #endif /* _MACHINE_PTE_H_ */
CVSweb