ae115bc77f6fcde83175c75b4206dc2e50747966mrj * CDDL HEADER START
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * The contents of this file are subject to the terms of the
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Common Development and Distribution License (the "License").
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * You may not use this file except in compliance with the License.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * See the License for the specific language governing permissions
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * and limitations under the License.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * When distributing Covered Code, include this CDDL HEADER in each
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * If applicable, add the following below this CDDL HEADER, with the
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * fields enclosed by brackets "[]" replaced with your own identifying
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * information: Portions Copyright [yyyy] [name of copyright owner]
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * CDDL HEADER END
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Use is subject to license terms.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * WARNING: This file is used by both dboot and the kernel.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#pragma ident "%Z%%M% %I% %E% SMI"
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Return the index corresponding to a virt address at a given page table level.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj return ((va >> shift_amt[level]) & (ptes_per_table - 1));
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Return a pointer to the page table entry that maps a virtual address.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * If there is no page table and probe_only is not set, one is created.
ae115bc77f6fcde83175c75b4206dc2e50747966mrjfind_pte(uint64_t va, paddr_t *pa, uint_t level, uint_t probe_only)
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Walk down the page tables creating any needed intermediate tables.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Life is easy if we find the pagetable. We just use it.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Return a pointer into the current pagetable.