[NDK][XDK] Add some missing macros for run-time checks of X86 system architecture (NEC support).

This commit is contained in:
Hermès Bélusca-Maïto 2020-11-26 00:17:50 +01:00
parent c295fb95e9
commit 9feab8e95a
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 45 additions and 0 deletions

View file

@ -335,4 +335,25 @@ KeGetCurrentProcessorNumber(VOID)
return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number));
}
/* Macros for kernel-mode run-time checks of X86 system architecture */
#ifdef IsNEC_98
#undef IsNEC_98
#endif
#define IsNEC_98 (SharedUserData->AlternativeArchitecture == NEC98x86)
#ifdef IsNotNEC_98
#undef IsNotNEC_98
#endif
#define IsNotNEC_98 (SharedUserData->AlternativeArchitecture != NEC98x86)
#ifdef SetNEC_98
#undef SetNEC_98
#endif
#define SetNEC_98 (SharedUserData->AlternativeArchitecture = NEC98x86)
#ifdef SetNotNEC_98
#undef SetNotNEC_98
#endif
#define SetNotNEC_98 (SharedUserData->AlternativeArchitecture = StandardDesign)
$endif (_NTDDK_)