/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_PTE_H
#define _SYS_PTE_H
#ifndef _ASM
#endif /* _ASM */
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _ASM
/*
* The tte struct is a 64 bit data type. Since we currently plan to
* use a V8 compiler all manipulations in C will be done using the bit fields
* or as 2 integers. In assembly code we will deal with it as a double (using
* ldx and stx). The structure is defined to force a double alignment.
*/
typedef union {
struct tte {
unsigned int v:1; /* <63> valid */
/* ------------------- */
unsigned int e:1; /* <11> side effect */
unsigned int p:1; /* <8> privilege required */
unsigned int x:1; /* <7> execute perm */
unsigned int w:1; /* <6> write perm */
} tte_bit;
struct {
} tte_int;
} tte_t;
#endif /* !_ASM */
/* Defines for sz field in tte */
#define TTE_SZ_SHFT 0
#ifndef _ASM
/* PFN is defined as bits [40-13] of the physical address */
/*
* This define adds the vaddr page offset to obtain a correct pfn
*/
}
#endif /* !_ASM */
/*
* The tte defines are separated into integers because the compiler doesn't
* support 64bit defines.
*/
/* Defines for tte using inthi */
/* Defines for tte using intlo */
#ifndef ASM
/* Defines to help build ttes using inthi */
/* PFN is defined as bits [40-13] of the physical address */
/* Defines to help build ttes using intlo */
#define TTEINTLO_ATTR \
{ \
}
/*
*/
/*
* This define provides a generic method to set and clear multiple tte flags.
* A bitmask of all flags to be affected is passed in "flags" and a bitmask
* of the new values is passed in "newflags".
*/
#endif /* !_ASM */
#ifdef __cplusplus
}
#endif
#endif /* !_SYS_PTE_H */