Skip to content

Instantly share code, notes, and snippets.

@jamesmintram
Last active October 24, 2020 13:45
Show Gist options
  • Save jamesmintram/c6b8fec2c8a8f1072c3daed5ac120d10 to your computer and use it in GitHub Desktop.
Save jamesmintram/c6b8fec2c8a8f1072c3daed5ac120d10 to your computer and use it in GitHub Desktop.
if ((m->oflags & VPO_UNMANAGED) == 0) {
new_l3 |= ATTR_SW_MANAGED;
if ((prot & VM_PROT_WRITE) != 0) {
new_l3 |= ATTR_SW_DBM;
if ((flags & VM_PROT_WRITE) == 0) {
if (pmap->pm_stage == PM_STAGE1)
new_l3 |= ATTR_S1_AP(ATTR_S1_AP_RO);
else
new_l3 &=
~ATTR_S2_S2AP(ATTR_S2_S2AP_WRITE);
}
}
}
// else {
// new_l3 = (pd_entry_t)(pa | ATTR_ST2_DEFAULT | L3_PAGE);
// }
if ((flags & PMAP_ENTER_WIRED) != 0)
new_l3 |= ATTR_SW_WIRED;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment