mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 05:22:57 +00:00
[HAL] Add NT6-compatible version of HalpMapPhysicalMemory64 and HalpUnmapVirtualAddress
This commit is contained in:
parent
4e32ad3623
commit
4ea570975c
4 changed files with 51 additions and 4 deletions
|
@ -26,8 +26,13 @@ HalpRegisterKdSupportFunctions(VOID)
|
||||||
|
|
||||||
/* Register memory functions */
|
/* Register memory functions */
|
||||||
#ifndef _MINIHAL_
|
#ifndef _MINIHAL_
|
||||||
|
#if (NTDDI_VERSION >= NTDDI_VISTA)
|
||||||
|
KdMapPhysicalMemory64 = HalpMapPhysicalMemory64Vista;
|
||||||
|
KdUnmapVirtualAddress = HalpUnmapVirtualAddressVista;
|
||||||
|
#else
|
||||||
KdMapPhysicalMemory64 = HalpMapPhysicalMemory64;
|
KdMapPhysicalMemory64 = HalpMapPhysicalMemory64;
|
||||||
KdUnmapVirtualAddress = HalpUnmapVirtualAddress;
|
KdUnmapVirtualAddress = HalpUnmapVirtualAddress;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register ACPI stub */
|
/* Register ACPI stub */
|
||||||
|
|
|
@ -139,6 +139,23 @@ PVOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
|
HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
IN PFN_COUNT PageCount)
|
IN PFN_COUNT PageCount)
|
||||||
|
{
|
||||||
|
return HalpMapPhysicalMemory64Vista(PhysicalAddress, PageCount, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalpUnmapVirtualAddress(IN PVOID VirtualAddress,
|
||||||
|
IN PFN_COUNT PageCount)
|
||||||
|
{
|
||||||
|
HalpUnmapVirtualAddressVista(VirtualAddress, PageCount, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
HalpMapPhysicalMemory64Vista(IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
|
IN PFN_COUNT PageCount,
|
||||||
|
IN BOOLEAN FlushCurrentTLB)
|
||||||
{
|
{
|
||||||
PHARDWARE_PTE PointerPte;
|
PHARDWARE_PTE PointerPte;
|
||||||
PFN_NUMBER UsedPages = 0;
|
PFN_NUMBER UsedPages = 0;
|
||||||
|
@ -199,14 +216,17 @@ HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Flush the TLB and return the address */
|
/* Flush the TLB and return the address */
|
||||||
|
if (FlushCurrentTLB)
|
||||||
HalpFlushTLB();
|
HalpFlushTLB();
|
||||||
|
|
||||||
return VirtualAddress;
|
return VirtualAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpUnmapVirtualAddress(IN PVOID VirtualAddress,
|
HalpUnmapVirtualAddressVista(IN PVOID VirtualAddress,
|
||||||
IN PFN_COUNT PageCount)
|
IN PFN_COUNT PageCount,
|
||||||
|
IN BOOLEAN FlushCurrentTLB)
|
||||||
{
|
{
|
||||||
PHARDWARE_PTE PointerPte;
|
PHARDWARE_PTE PointerPte;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
@ -226,6 +246,7 @@ HalpUnmapVirtualAddress(IN PVOID VirtualAddress,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Flush the TLB */
|
/* Flush the TLB */
|
||||||
|
if (FlushCurrentTLB)
|
||||||
HalpFlushTLB();
|
HalpFlushTLB();
|
||||||
|
|
||||||
/* Put the heap back */
|
/* Put the heap back */
|
||||||
|
|
|
@ -646,6 +646,22 @@ HalpAllocPhysicalMemory(
|
||||||
IN BOOLEAN Aligned
|
IN BOOLEAN Aligned
|
||||||
);
|
);
|
||||||
|
|
||||||
|
PVOID
|
||||||
|
NTAPI
|
||||||
|
HalpMapPhysicalMemory64Vista(
|
||||||
|
IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
|
IN PFN_COUNT PageCount,
|
||||||
|
IN BOOLEAN FlushCurrentTLB
|
||||||
|
);
|
||||||
|
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
HalpUnmapVirtualAddressVista(
|
||||||
|
IN PVOID VirtualAddress,
|
||||||
|
IN PFN_COUNT NumberPages,
|
||||||
|
IN BOOLEAN FlushCurrentTLB
|
||||||
|
);
|
||||||
|
|
||||||
PVOID
|
PVOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpMapPhysicalMemory64(
|
HalpMapPhysicalMemory64(
|
||||||
|
|
|
@ -1228,8 +1228,13 @@ HalpRegisterKdSupportFunctions(VOID)
|
||||||
|
|
||||||
/* Register memory functions */
|
/* Register memory functions */
|
||||||
#ifndef _MINIHAL_
|
#ifndef _MINIHAL_
|
||||||
|
#if (NTDDI_VERSION >= NTDDI_VISTA)
|
||||||
|
KdMapPhysicalMemory64 = HalpMapPhysicalMemory64Vista;
|
||||||
|
KdUnmapVirtualAddress = HalpUnmapVirtualAddressVista;
|
||||||
|
#else
|
||||||
KdMapPhysicalMemory64 = HalpMapPhysicalMemory64;
|
KdMapPhysicalMemory64 = HalpMapPhysicalMemory64;
|
||||||
KdUnmapVirtualAddress = HalpUnmapVirtualAddress;
|
KdUnmapVirtualAddress = HalpUnmapVirtualAddress;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register ACPI stub */
|
/* Register ACPI stub */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue