[SDK:NDK/XDK] Adjust the KeGetPcr() ARM definition (#6542)

Re-enable the KIPCR() macro and use it for KeGetPcr()
and KeGetCurrentProcessorNumber() definitions.
This commit is contained in:
Hermès Bélusca-Maïto 2024-02-23 22:53:36 +01:00
parent bf9cac8a67
commit cec7adb97f
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -334,14 +334,13 @@ typedef struct _KPCR
} KPCR, *PKPCR;
#define CP15_PCR_RESERVED_MASK 0xFFF
//#define KIPCR() ((ULONG_PTR)(_MoveFromCoprocessor(CP15_TPIDRPRW)) & ~CP15_PCR_RESERVED_MASK)
#define KIPCR() (((ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRPRW)) & ~CP15_PCR_RESERVED_MASK)
FORCEINLINE
PKPCR
KeGetPcr(
VOID)
KeGetPcr(VOID)
{
return (PKPCR)(_MoveFromCoprocessor(CP15_TPIDRPRW) & ~CP15_PCR_RESERVED_MASK);
return (PKPCR)KIPCR();
}
#if (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS)
@ -349,8 +348,8 @@ FORCEINLINE
ULONG
KeGetCurrentProcessorNumber(VOID)
{
return *((PUCHAR)KeGetPcr() + 0x580);
return (ULONG)*((PUCHAR)KIPCR() + 0x580);
}
#endif /* (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS) */
$endif
$endif (_NTDDK_)