mach_sfmmu.h revision 9d0d62ad2e60e8f742a2e723d06e88352ee6a1f3
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * CDDL HEADER START
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * The contents of this file are subject to the terms of the
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * Common Development and Distribution License (the "License").
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * You may not use this file except in compliance with the License.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * or http://www.opensolaris.org/os/licensing.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * See the License for the specific language governing permissions
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * and limitations under the License.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * When distributing Covered Code, include this CDDL HEADER in each
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * If applicable, add the following below this CDDL HEADER, with the
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * fields enclosed by brackets "[]" replaced with your own identifying
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * information: Portions Copyright [yyyy] [name of copyright owner]
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * CDDL HEADER END
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * Use is subject to license terms.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * VM - Hardware Address Translation management.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * This file describes the contents of the sun reference mmu (sfmmu)
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * specific hat data structures and the sfmmu specific hat procedures.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * The machine independent interface is described in <vm/hat.h>.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * Define UTSB_PHYS if user TSB is always accessed via physical address.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * On sun4v platform, user TSB is accessed via physical address.
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * Hypervisor TSB info
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy uint64_t hv_tsb_info_pa; /* hypervisor TSB info PA */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy uint64_t hv_tsb_info_cnt; /* hypervisor TSB info count */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy hv_tsb_info_t hv_tsb_info[NHV_TSB_INFO]; /* hypervisor TSB info */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy#endif /* _ASM */
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * This macro is used to set private/shared secondary context register in
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * sfmmu_alloc_ctx().
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * is_shctx = sfmmu private/shared flag (0: private, 1: shared)
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * tmp2 is only used in the sun4u version of this macro
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy#define SET_SECCTX(cnum, is_shctx, tmp1, tmp2, label) \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy stxa cnum, [tmp1]ASI_MMU_CTX; /* set 2nd ctx reg. */ \
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * This macro is used in the MMU code to check if TL should be lowered from
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * 2 to 1 to pop trapstat's state. See the block comment in trapstat.c
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy * for details.
nop; \
* Synthesize/get data tag access register value from the MMU fault area
* Synthesize/get data tag target register value from the MMU fault area
* Synthesize/get data/instruction psuedo tag access register values
* dtagacc = MMU data tag access register value w/psuedo-context
* itagacc = MMU instruction tag access register value w/pseudo-context
* Synthesize/get MMU data fault address from the MMU fault area
nop; \
exitlabel) \
nop; \
nop ;\
nop ;\
nop ;\
nop ;\
nop ;\
nop ;\
nop ;\
nop ;\
nop ;\
#ifdef __cplusplus