4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 #ifndef _IA32_SYS_PTE_H
27 #define _IA32_SYS_PTE_H
29 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <sys/types.h>
41 #ifdef PTE36 /* PTE36 ---------------------------- */
43 typedef uint64_t pteval_t
;
44 typedef pteval_t
*pteptr_t
;
48 typedef struct pte32
{
50 uint32_t AccessPermissions
:2;
52 uint32_t NonCacheable
:1;
53 uint32_t Referenced
:1;
55 uint32_t MustBeZero
:1;
56 uint32_t GlobalEnable
:1;
57 uint32_t OSReserved
:3;
58 uint32_t PhysicalPageNumber
:20;
64 uint32_t AccessPermissions
:2;
66 uint32_t NonCacheable
:1;
67 uint32_t Referenced
:1;
69 uint32_t MustBeZero
:1;
70 uint32_t GlobalEnable
:1;
71 uint32_t OSReserved
:3;
72 uint32_t PhysicalPageNumberL
:20;
73 uint32_t PhysicalPageNumberH
;
75 * An easy way to ensure that
76 * reserved bits are zero.
86 #define NPTEPERPT 512 /* entries in page table */
87 #define PTSIZE (NPTEPERPT * MMU_PAGESIZE) /* bytes mapped */
91 /* PTE32 ---------------------------- */
94 typedef uint32_t pteval_t
;
95 typedef pteval_t
*pteptr_t
;
101 uint_t AccessPermissions
:2;
103 uint_t NonCacheable
:1;
107 uint_t GlobalEnable
:1;
109 uint_t PhysicalPageNumber
:20;
112 #define pte32_t pte_t
115 #define NPTEPERPT 1024 /* entries in page table */
116 #define PTSIZE (NPTEPERPT * MMU_PAGESIZE) /* bytes mapped */
120 #define PTE_VALID 0x01
121 #define PTE_LARGEPAGE 0x80
122 #define PTE_SRWX 0x02
131 #endif /* !_IA32_SYS_PTE_H */