mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 17:14:32 +00:00
[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:
parent
bf9cac8a67
commit
cec7adb97f
1 changed files with 5 additions and 6 deletions
|
@ -334,14 +334,13 @@ typedef struct _KPCR
|
||||||
} KPCR, *PKPCR;
|
} KPCR, *PKPCR;
|
||||||
|
|
||||||
#define CP15_PCR_RESERVED_MASK 0xFFF
|
#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
|
FORCEINLINE
|
||||||
PKPCR
|
PKPCR
|
||||||
KeGetPcr(
|
KeGetPcr(VOID)
|
||||||
VOID)
|
|
||||||
{
|
{
|
||||||
return (PKPCR)(_MoveFromCoprocessor(CP15_TPIDRPRW) & ~CP15_PCR_RESERVED_MASK);
|
return (PKPCR)KIPCR();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS)
|
#if (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS)
|
||||||
|
@ -349,8 +348,8 @@ FORCEINLINE
|
||||||
ULONG
|
ULONG
|
||||||
KeGetCurrentProcessorNumber(VOID)
|
KeGetCurrentProcessorNumber(VOID)
|
||||||
{
|
{
|
||||||
return *((PUCHAR)KeGetPcr() + 0x580);
|
return (ULONG)*((PUCHAR)KIPCR() + 0x580);
|
||||||
}
|
}
|
||||||
#endif /* (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS) */
|
#endif /* (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS) */
|
||||||
|
|
||||||
$endif
|
$endif (_NTDDK_)
|
||||||
|
|
Loading…
Reference in a new issue