---
name: "pmap_quick_enter_page"
section: "9"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/pmap_quick_enter_page"
---

# pmap\_quick\_enter\_page(9)

manage fast, single-page kernel address space mappings

## NAME

**pmap\_quick\_enter\_page**, **pmap\_quick\_remove\_page** – manage fast, single-page kernel address space mappings

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<vm/vm.h\>**

**#include \<vm/pmap.h\>**

*vm\_offset\_t*\

**pmap\_quick\_enter\_page**(*vm\_page\_t m*);

*void*\

**pmap\_quick\_remove\_page**(*vm\_offset\_t kva*);

## DESCRIPTION

The **pmap\_quick\_enter\_page**() function accepts a single page *m*, and enters this page into a preallocated address in kernel virtual address (KVA) space. This function is intended for temporary mappings that will only be used for a very short period, for example a copy operation on the page contents.

The **pmap\_quick\_remove\_page**() function removes a mapping previously created by **pmap\_quick\_enter\_page**() at *kva*, making the KVA frame used by **pmap\_quick\_enter\_page**() available for reuse.

On many architectures, **pmap\_quick\_enter\_page**() uses a per-CPU pageframe. In those cases, it must disable preemption on the local CPU. The corresponding call to **pmap\_quick\_remove\_page**() then re-enables preemption. It is therefore not safe for machine-independent code to sleep or perform locking operations while holding these mappings. Current implementations only guarantee the availability of a single page for the calling thread, so calls to **pmap\_quick\_enter\_page**() must not be nested.

**pmap\_quick\_enter\_page**() and **pmap\_quick\_remove\_page**() do not sleep, and **pmap\_quick\_enter\_page**() always returns a valid address. It is safe to use these functions under all types of locks except spin mutexes. It is also safe to use them in all thread contexts except primary interrupt context.

The page *must* not be swapped or otherwise reused while the mapping is active. It must be either wired or held, or it must belong to an unmanaged region such as I/O device memory.

## RETURN VALUES

The **pmap\_quick\_enter\_page**() function returns the kernel virtual address that is mapped to the page *m*.

## SEE ALSO

[pmap(9)](/pmap/9.md)

## AUTHORS

This manual page was written by Jason A Harmening ⟨*jah@FreeBSD.org*⟩.
