MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pmap_page_set_memattr

Function pmap_page_set_memattr

freebsd/arm64/arm64/pmap.c:6047–6062  ·  view source on GitHub ↗

* Sets the memory attribute for the specified page. */

Source from the content-addressed store, hash-verified

6045 * Sets the memory attribute for the specified page.
6046 */
6047void
6048pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma)
6049{
6050
6051 m->md.pv_memattr = ma;
6052
6053 /*
6054 * If "m" is a normal page, update its direct mapping. This update
6055 * can be relied upon to perform any cache operations that are
6056 * required for data coherence.
6057 */
6058 if ((m->flags & PG_FICTITIOUS) == 0 &&
6059 pmap_change_attr(PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)), PAGE_SIZE,
6060 m->md.pv_memattr) != 0)
6061 panic("memory attribute change on the direct map failed");
6062}
6063
6064/*
6065 * Changes the specified virtual address range's memory type to that given by

Callers

nothing calls this directly

Calls 2

pmap_change_attrFunction · 0.70
panicFunction · 0.50

Tested by

no test coverage detected