mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NDK][XDK] Add some missing macros for run-time checks of X86 system architecture (NEC support).
This commit is contained in:
parent
c295fb95e9
commit
9feab8e95a
3 changed files with 45 additions and 0 deletions
|
@ -221,6 +221,29 @@ typedef CCHAR KPROCESSOR_MODE;
|
||||||
//
|
//
|
||||||
#define SharedUserData ((KUSER_SHARED_DATA *)USER_SHARED_DATA)
|
#define SharedUserData ((KUSER_SHARED_DATA *)USER_SHARED_DATA)
|
||||||
|
|
||||||
|
/* Macros for user-mode run-time checks of X86 system architecture */
|
||||||
|
#ifdef _X86_
|
||||||
|
|
||||||
|
#ifndef IsNEC_98
|
||||||
|
#define IsNEC_98 (SharedUserData->AlternativeArchitecture == NEC98x86)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef IsNotNEC_98
|
||||||
|
#define IsNotNEC_98 (SharedUserData->AlternativeArchitecture != NEC98x86)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* User-mode cannot override the architecture */
|
||||||
|
#ifndef SetNEC_98
|
||||||
|
#define SetNEC_98
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* User-mode cannot override the architecture */
|
||||||
|
#ifndef SetNotNEC_98
|
||||||
|
#define SetNotNEC_98
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Maximum WOW64 Entries in KUSER_SHARED_DATA
|
// Maximum WOW64 Entries in KUSER_SHARED_DATA
|
||||||
//
|
//
|
||||||
|
|
|
@ -892,6 +892,7 @@ typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE {
|
||||||
EndAlternatives
|
EndAlternatives
|
||||||
} ALTERNATIVE_ARCHITECTURE_TYPE;
|
} ALTERNATIVE_ARCHITECTURE_TYPE;
|
||||||
|
|
||||||
|
/* Correctly define these run-time definitions for non X86 machines */
|
||||||
#ifndef _X86_
|
#ifndef _X86_
|
||||||
|
|
||||||
#ifndef IsNEC_98
|
#ifndef IsNEC_98
|
||||||
|
|
|
@ -335,4 +335,25 @@ KeGetCurrentProcessorNumber(VOID)
|
||||||
return (ULONG)__readfsbyte(FIELD_OFFSET(KPCR, Number));
|
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_)
|
$endif (_NTDDK_)
|
||||||
|
|
Loading…
Reference in a new issue