pmap.h (bd50262f705c4fed70ea94d16a0f19b5f5497cf2) pmap.h (c8f9c1f3d96b60b1e298b5a0f3838c033bf72e05)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 2003 Peter Wemm.
5 * Copyright (c) 1991 Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

--- 211 unchanged lines hidden (view full) ---

220 * XXX doesn't really belong here I guess...
221 */
222#define ISA_HOLE_START 0xa0000
223#define ISA_HOLE_LENGTH (0x100000-ISA_HOLE_START)
224
225#define PMAP_PCID_NONE 0xffffffff
226#define PMAP_PCID_KERN 0
227#define PMAP_PCID_OVERMAX 0x1000
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 2003 Peter Wemm.
5 * Copyright (c) 1991 Regents of the University of California.
6 * All rights reserved.
7 *
8 * This code is derived from software contributed to Berkeley by

--- 211 unchanged lines hidden (view full) ---

220 * XXX doesn't really belong here I guess...
221 */
222#define ISA_HOLE_START 0xa0000
223#define ISA_HOLE_LENGTH (0x100000-ISA_HOLE_START)
224
225#define PMAP_PCID_NONE 0xffffffff
226#define PMAP_PCID_KERN 0
227#define PMAP_PCID_OVERMAX 0x1000
228#define PMAP_PCID_OVERMAX_KERN 0x800
229#define PMAP_PCID_USER_PT 0x800
228
230
231#define PMAP_NO_CR3 (~0UL)
232
229#ifndef LOCORE
230
231#include <sys/queue.h>
232#include <sys/_cpuset.h>
233#include <sys/_lock.h>
234#include <sys/_mutex.h>
235
236#include <vm/_vm_radix.h>

--- 191 unchanged lines hidden (view full) ---

428void pmap_invalidate_cache_pages(vm_page_t *pages, int count);
429void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva,
430 boolean_t force);
431void pmap_get_mapping(pmap_t pmap, vm_offset_t va, uint64_t *ptr, int *num);
432boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t);
433void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t);
434void pmap_pti_add_kva(vm_offset_t sva, vm_offset_t eva, bool exec);
435void pmap_pti_remove_kva(vm_offset_t sva, vm_offset_t eva);
233#ifndef LOCORE
234
235#include <sys/queue.h>
236#include <sys/_cpuset.h>
237#include <sys/_lock.h>
238#include <sys/_mutex.h>
239
240#include <vm/_vm_radix.h>

--- 191 unchanged lines hidden (view full) ---

432void pmap_invalidate_cache_pages(vm_page_t *pages, int count);
433void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva,
434 boolean_t force);
435void pmap_get_mapping(pmap_t pmap, vm_offset_t va, uint64_t *ptr, int *num);
436boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t);
437void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t);
438void pmap_pti_add_kva(vm_offset_t sva, vm_offset_t eva, bool exec);
439void pmap_pti_remove_kva(vm_offset_t sva, vm_offset_t eva);
440void pmap_pti_pcid_invalidate(uint64_t ucr3, uint64_t kcr3);
441void pmap_pti_pcid_invlpg(uint64_t ucr3, uint64_t kcr3, vm_offset_t va);
442void pmap_pti_pcid_invlrng(uint64_t ucr3, uint64_t kcr3, vm_offset_t sva,
443 vm_offset_t eva);
436#endif /* _KERNEL */
437
438/* Return various clipped indexes for a given VA */
439static __inline vm_pindex_t
440pmap_pte_index(vm_offset_t va)
441{
442
443 return ((va >> PAGE_SHIFT) & ((1ul << NPTEPGSHIFT) - 1));

--- 26 unchanged lines hidden ---
444#endif /* _KERNEL */
445
446/* Return various clipped indexes for a given VA */
447static __inline vm_pindex_t
448pmap_pte_index(vm_offset_t va)
449{
450
451 return ((va >> PAGE_SHIFT) & ((1ul << NPTEPGSHIFT) - 1));

--- 26 unchanged lines hidden ---