tte.h (83053) | tte.h (84182) |
---|---|
1/*- 2 * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * from: BSDI: pmap.v9.h,v 1.10.2.6 1999/08/23 22:18:44 cp Exp | 1/*- 2 * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. --- 12 unchanged lines hidden (view full) --- 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * 28 * from: BSDI: pmap.v9.h,v 1.10.2.6 1999/08/23 22:18:44 cp Exp |
29 * $FreeBSD: head/sys/sparc64/include/tte.h 83053 2001-09-05 05:18:35Z obrien $ | 29 * $FreeBSD: head/sys/sparc64/include/tte.h 84182 2001-09-30 18:55:05Z jake $ |
30 */ 31 32#ifndef _MACHINE_TTE_H_ 33#define _MACHINE_TTE_H_ 34 35#include <machine/atomic.h> 36 37#define TTE_SHIFT 4 --- 58 unchanged lines hidden (view full) --- 96#define TD_L (1L << 6) 97#define TD_CP (1L << 5) 98#define TD_CV (1L << 4) 99#define TD_E (1L << 3) 100#define TD_P (1L << 2) 101#define TD_W (1L << 1) 102#define TD_G (1L << 0) 103 | 30 */ 31 32#ifndef _MACHINE_TTE_H_ 33#define _MACHINE_TTE_H_ 34 35#include <machine/atomic.h> 36 37#define TTE_SHIFT 4 --- 58 unchanged lines hidden (view full) --- 96#define TD_L (1L << 6) 97#define TD_CP (1L << 5) 98#define TD_CV (1L << 4) 99#define TD_E (1L << 3) 100#define TD_P (1L << 2) 101#define TD_W (1L << 1) 102#define TD_G (1L << 0) 103 |
104#define TT_GET_CTX(tag) (((tag) >> TT_CTX_SHIFT) & TT_CTX_MASK) 105 |
|
104struct tte { 105 u_long tte_tag; 106 u_long tte_data; 107}; 108 109struct stte { 110 struct tte st_tte; 111 vm_offset_t st_next; 112 vm_offset_t st_prev; 113}; 114 | 106struct tte { 107 u_long tte_tag; 108 u_long tte_data; 109}; 110 111struct stte { 112 struct tte st_tte; 113 vm_offset_t st_next; 114 vm_offset_t st_prev; 115}; 116 |
115static __inline u_int 116tte_get_ctx(struct tte tte) 117{ 118 return ((tte.tte_tag >> TT_CTX_SHIFT) & TT_CTX_MASK); 119} 120 | |
121static __inline vm_offset_t 122tte_get_vpn(struct tte tte) 123{ 124 return (((tte.tte_tag & TT_VA_MASK) << TT_VPN_SHIFT) | 125 ((tte.tte_data & TD_VA_LOW_MASK) >> TD_VA_LOW_SHIFT)); 126} 127 128static __inline vm_offset_t --- 20 unchanged lines hidden --- | 117static __inline vm_offset_t 118tte_get_vpn(struct tte tte) 119{ 120 return (((tte.tte_tag & TT_VA_MASK) << TT_VPN_SHIFT) | 121 ((tte.tte_data & TD_VA_LOW_MASK) >> TD_VA_LOW_SHIFT)); 122} 123 124static __inline vm_offset_t --- 20 unchanged lines hidden --- |