// 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];
//
//
// Is this an I/O mapping?
//
- if (Pfn > MmHighestPhysicalPage)
+ if (!MiGetPfnEntry(Pfn))
{
//
// Destroy the PTE
//
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