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#pragma ident "%Z%%M% %I% %E% SMI"
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern "C" {
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Kernel boot-time interfaces for handling MMU mappings before the HAT proper
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * is running (i.e. before khat_running is set).
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Interface to remap the page table window, also used by HAT during init.
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern void *kbm_remap_window(paddr_t physaddr, int writeable);
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Find the next mapping at or above VA, if found returns non-zero and sets:
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * - va : virtual address
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * - pfn : pfn of real address
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * - size : pagesize of the mapping
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * - prot : protections
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern int kbm_probe(uintptr_t *va, size_t *len, pfn_t *pfn, uint_t *prot);
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Add a new mapping
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern void kbm_map(uintptr_t va, paddr_t pa, uint_t level, uint_t is_kernel);
843e19887f64dde75055cf8842fc4db2171eff45johnlevextern void kbm_map_ma(maddr_t ma, uintptr_t va, uint_t level);
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * unmap a single 4K page at VA
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Remap a single 4K page at VA (always PROT_READ|PROT_WRITE).
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Returns the pfn of the old mapping.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Make a page mapping read only
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * interface for kmdb to map a physical page, stack is only 1 deep
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern void kbm_pop(void);
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * These are needed by mmu_init()
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * The size of memory mapped for the initial kernel nucleus text
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * and data regions setup by the boot loader. needed for startup
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#endif /* _KBOOT_MMU_H */