X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Finclude%2Ftpl_mm_phys_bitmap.h;h=106efd75b2d9f0fc9ae7bfbd73bbd133a0be0a73;hb=bb3e698f1c68cc638eb070d848293ec6a30cb813;hp=005a2f8caa62232cf9cbd337dd97f8ce372c89cf;hpb=fb3abbad5dfd71ea2b190d0b33d9c57e879fb15a;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/include/tpl_mm_phys_bitmap.h b/KernelLand/Kernel/include/tpl_mm_phys_bitmap.h index 005a2f8c..106efd75 100644 --- a/KernelLand/Kernel/include/tpl_mm_phys_bitmap.h +++ b/KernelLand/Kernel/include/tpl_mm_phys_bitmap.h @@ -354,7 +354,13 @@ int MM_GetRefCount(tPAddr PAddr) return gaiPageReferences[PAddr]; } - if( gaPageBitmaps[ PAddr / 32 ] & (1LL << (PAddr&31)) ) { + Uint32 *bm = &gaPageBitmaps[ PAddr / 32 ]; + if( !MM_GetPhysAddr(bm) ) { + Log_Error("MMPhys", "MM_GetRefCount: bitmap for ppage 0x%x not mapped %p", + PAddr, bm); + return 0; + } + if( (*bm) & (1LL << (PAddr&31)) ) { return 1; }