/*
* 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.
* Note that USIIi uses bits [47:41] for diag, and [49:48] are reserved.
* Note that pa[46:32] includes USIIi diag bits [46:41] and USIII reserved
* bits [46:43].
*/
typedef union {
struct tte {
} tte_bit;
struct {
} tte_int;
} tte_t;
#endif /* !_ASM */
/*
* Defines for valid, sz, sz2 fields in tte.
* The TTE_CSZ macro combines the sz and sz2 fields.
*/
/*
* the tte lock cnt now lives in the hme blk and is 16 bits long. See
* comments in hme_blk declaration.
*/
#ifndef _ASM
/*
* Spitfire PFN is defined as bits [40:13] of the physical address.
* Cheetah PFN is defined as bits [42:13] of the physical address.
* Olympus-C PFN is defined as bits [46: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 */
#define TTE_SUSPEND_SHIFT 0
/*
* Define to clear the high-order 6 bits of the 47-bit PA in a tte. The
* Spitfire tte has PFN in [40:13] and uses [46:41] as part of Diag bits.
*/
#ifndef ASM
/* Defines to help build ttes using inthi */
/* XXX PFN is defined as bits [40-13] of the physical address */
/* Defines to help build ttes using intlo */
#define TTEINTLO_ATTR \
{ \
}
/*
*/
~(TTE_HWWR_INT | TTE_REF_INT))
/*
* 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 */