From cf2eb5d84928952dbef9f9388139599d54217dab Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Wed, 19 Aug 2015 16:22:25 +0200 Subject: i386: enable assertions * i386/intel/pmap.c (pmap_page_protect): Enable assertions. (phys_attribute_clear, phys_attribute_test): Likewise. --- i386/intel/pmap.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/i386/intel/pmap.c b/i386/intel/pmap.c index 5cfffb5a..cf7a736e 100644 --- a/i386/intel/pmap.c +++ b/i386/intel/pmap.c @@ -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 @@ -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); } /* -- cgit v1.2.3