diff --git a/reactos/ntoskrnl/mm/ARM3/iosup.c b/reactos/ntoskrnl/mm/ARM3/iosup.c index 1a174509382..5d8cb2e12da 100644 --- a/reactos/ntoskrnl/mm/ARM3/iosup.c +++ b/reactos/ntoskrnl/mm/ARM3/iosup.c @@ -90,8 +90,8 @@ MmMapIoSpace(IN PHYSICAL_ADDRESS PhysicalAddress, // Also translate the cache attribute // Pfn = (PFN_NUMBER)(PhysicalAddress.QuadPart >> PAGE_SHIFT); - IsIoMapping = (Pfn > MmHighestPhysicalPage) ? TRUE : FALSE; - if (!IsIoMapping) Pfn1 = MiGetPfnEntry(Pfn); + Pfn1 = MiGetPfnEntry(Pfn); + IsIoMapping = (Pfn1 == NULL) ? TRUE : FALSE; CacheAttribute = MiPlatformCacheAttributes[IsIoMapping][CacheType]; // @@ -219,7 +219,7 @@ MmUnmapIoSpace(IN PVOID BaseAddress, // // Is this an I/O mapping? // - if (Pfn > MmHighestPhysicalPage) + if (!MiGetPfnEntry(Pfn)) { // // Destroy the PTE diff --git a/reactos/ntoskrnl/mm/ARM3/mdlsup.c b/reactos/ntoskrnl/mm/ARM3/mdlsup.c index 1b95448fc43..078de3de1c8 100644 --- a/reactos/ntoskrnl/mm/ARM3/mdlsup.c +++ b/reactos/ntoskrnl/mm/ARM3/mdlsup.c @@ -129,7 +129,7 @@ MmBuildMdlForNonPagedPool(IN PMDL Mdl) // // Check if this is an I/O mapping // - if (Pfn > MmHighestPhysicalPage) Mdl->MdlFlags |= MDL_IO_SPACE; + if (!MiGetPfnEntry(Pfn)) Mdl->MdlFlags |= MDL_IO_SPACE; } /* diff --git a/reactos/ntoskrnl/mm/mmdbg.c b/reactos/ntoskrnl/mm/mmdbg.c index fd11099e1fd..313516b1bf3 100644 --- a/reactos/ntoskrnl/mm/mmdbg.c +++ b/reactos/ntoskrnl/mm/mmdbg.c @@ -85,10 +85,8 @@ MiDbgTranslatePhysicalAddress(IN ULONG64 PhysicalAddress, // Pfn = (PFN_NUMBER)(PhysicalAddress >> PAGE_SHIFT); - // - // Check if this could be an I/O mapping - // - if (Pfn > MmHighestPhysicalPage) + /* Check if this could be an I/O mapping */ + if (!MiGetPfnEntry(Pfn)) { // // FIXME: We don't support this yet