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

Function init_pte_prot

freebsd/mips/mips/pmap.c:3472–3488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3470}
3471
3472static pt_entry_t
3473init_pte_prot(vm_page_t m, vm_prot_t access, vm_prot_t prot)
3474{
3475 pt_entry_t rw;
3476
3477 if (!(prot & VM_PROT_WRITE))
3478 rw = PTE_V | PTE_RO;
3479 else if ((m->oflags & VPO_UNMANAGED) == 0) {
3480 if ((access & VM_PROT_WRITE) != 0)
3481 rw = PTE_V | PTE_D;
3482 else
3483 rw = PTE_V;
3484 } else
3485 /* Needn't emulate a modified bit for unmanaged pages. */
3486 rw = PTE_V | PTE_D;
3487 return (rw);
3488}
3489
3490/*
3491 * pmap_emulate_modified : do dirty bit emulation

Callers 1

pmap_enterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected