Author: tkreuzer
Date: Tue Mar 11 22:56:31 2014
New Revision: 62482
URL:
http://svn.reactos.org/svn/reactos?rev=62482&view=rev
Log:
[NTOSKRNL]
Fix a bug in MmGetPhysicalAddress, that resulted in unwanted sign extension of physical
addresses > 2GB. Will hopefully fix some uniata related issues.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Tue Mar 11 22:56:31 2014
@@ -5283,7 +5283,7 @@
if (TempPde.u.Hard.LargePage)
{
/* Physical address is base page + large page offset */
- PhysicalAddress.QuadPart = TempPde.u.Hard.PageFrameNumber <<
PAGE_SHIFT;
+ PhysicalAddress.QuadPart = (ULONG64)TempPde.u.Hard.PageFrameNumber <<
PAGE_SHIFT;
PhysicalAddress.QuadPart += ((ULONG_PTR)Address & (PAGE_SIZE *
PTE_PER_PAGE - 1));
return PhysicalAddress;
}
@@ -5293,7 +5293,7 @@
if (TempPte.u.Hard.Valid)
{
/* Physical address is base page + page offset */
- PhysicalAddress.QuadPart = TempPte.u.Hard.PageFrameNumber <<
PAGE_SHIFT;
+ PhysicalAddress.QuadPart = (ULONG64)TempPte.u.Hard.PageFrameNumber <<
PAGE_SHIFT;
PhysicalAddress.QuadPart += ((ULONG_PTR)Address & (PAGE_SIZE - 1));
return PhysicalAddress;
}