https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5311c57b5fdb1a57d6017…
commit 5311c57b5fdb1a57d6017d9e89f8822a573fc6d1
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Dec 17 17:37:43 2017 +0100
[HAL] Use 64 bits for physical addresses.
---
hal/halx86/generic/memory.c | 9 ++++-----
hal/halx86/include/halp.h | 4 ++--
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/hal/halx86/generic/memory.c b/hal/halx86/generic/memory.c
index e16eef3dbf..587503fca1 100644
--- a/hal/halx86/generic/memory.c
+++ b/hal/halx86/generic/memory.c
@@ -24,15 +24,15 @@ PVOID HalpHeapStart = MM_HAL_HEAP_START;
/* PRIVATE FUNCTIONS *********************************************************/
-ULONG_PTR
+ULONG64
NTAPI
HalpAllocPhysicalMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
- IN ULONG_PTR MaxAddress,
+ IN ULONG64 MaxAddress,
IN PFN_NUMBER PageCount,
IN BOOLEAN Aligned)
{
ULONG UsedDescriptors;
- ULONG_PTR PhysicalAddress;
+ ULONG64 PhysicalAddress;
PFN_NUMBER MaxPage, BasePage, Alignment;
PLIST_ENTRY NextEntry;
PMEMORY_ALLOCATION_DESCRIPTOR MdBlock, NewBlock, FreeBlock;
@@ -71,9 +71,8 @@ HalpAllocPhysicalMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
(MdBlock->PageCount >= PageCount + Alignment) &&
(BasePage + PageCount + Alignment < MaxPage))
{
-
/* We found an address */
- PhysicalAddress = (BasePage + Alignment) << PAGE_SHIFT;
+ PhysicalAddress = ((ULONG64)BasePage + Alignment) << PAGE_SHIFT;
break;
}
}
diff --git a/hal/halx86/include/halp.h b/hal/halx86/include/halp.h
index 8e79f3444e..315282f809 100644
--- a/hal/halx86/include/halp.h
+++ b/hal/halx86/include/halp.h
@@ -633,11 +633,11 @@ HalpReleasePciDeviceForDebugging(
//
// Memory routines
//
-ULONG_PTR
+ULONG64
NTAPI
HalpAllocPhysicalMemory(
IN PLOADER_PARAMETER_BLOCK LoaderBlock,
- IN ULONG_PTR MaxAddress,
+ IN ULONG64 MaxAddress,
IN PFN_NUMBER PageCount,
IN BOOLEAN Aligned
);