--- Gnu-Mach/i386/intel/pmap.c 2020/09/02 04:49:25 1.1.1.4 +++ Gnu-Mach/i386/intel/pmap.c 2020/09/02 04:51:34 1.1.1.5 @@ -166,7 +166,7 @@ vm_offset_t kernel_virtual_end; #define unlock_pvh_pai(pai) (bit_unlock(pai, pv_lock_table)) /* - * Array of physical page attribites for managed pages. + * Array of physical page attributes for managed pages. * One byte per physical page. */ char *pmap_phys_attributes; @@ -1585,8 +1585,8 @@ void pmap_page_protect( /* * Consistency checks. */ - /* assert(*pte & INTEL_PTE_VALID); XXX */ - /* assert(pte_to_phys(*pte) == phys); */ + assert(*pte & INTEL_PTE_VALID); + assert(pte_to_pa(*pte) == phys); /* * Remove the mapping if new protection is NONE @@ -1597,7 +1597,7 @@ void pmap_page_protect( * Remove the mapping, collecting any modify bits. */ if (*pte & INTEL_PTE_WIRED) - panic("pmap_remove_all removing a wired page"); + panic("pmap_page_protect removing a wired page"); { int i = ptes_per_vm_page; @@ -2463,13 +2463,11 @@ phys_attribute_clear( va = pv_e->va; pte = pmap_pte(pmap, va); -#if 0 /* * Consistency checks. */ assert(*pte & INTEL_PTE_VALID); - /* assert(pte_to_phys(*pte) == phys); */ -#endif + assert(pte_to_pa(*pte) == phys); /* * Clear modify or reference bits. @@ -2556,13 +2554,11 @@ phys_attribute_test( va = pv_e->va; pte = pmap_pte(pmap, va); -#if 0 /* * Consistency checks. */ assert(*pte & INTEL_PTE_VALID); - /* assert(pte_to_phys(*pte) == phys); */ -#endif + assert(pte_to_pa(*pte) == phys); } /*