diff --git a/sdk/include/xdk/arm/ke.h b/sdk/include/xdk/arm/ke.h index dc344b30c11..5a611a0dfde 100644 --- a/sdk/include/xdk/arm/ke.h +++ b/sdk/include/xdk/arm/ke.h @@ -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_)