[NTOS:KE] Move RtlpUse16ByteSLists initialization into KiInitializeKernel

This commit is contained in:
Ivan Labutin 2017-11-10 01:23:55 +03:00 committed by Timo Kreuzer
parent b9f592c054
commit 1aa70ef6d1
2 changed files with 5 additions and 4 deletions

View file

@ -19,8 +19,6 @@
/* GLOBALS *******************************************************************/ /* GLOBALS *******************************************************************/
extern BOOLEAN RtlpUse16ByteSLists;
/* Function pointer for early debug prints */ /* Function pointer for early debug prints */
ULONG (*FrLdrDbgPrint)(const char *Format, ...); ULONG (*FrLdrDbgPrint)(const char *Format, ...);
@ -84,8 +82,6 @@ KiInitMachineDependent(VOID)
// KeBugCheckEx(NO_PAGES_AVAILABLE, 2, PAGE_SIZE * 2, 0, 0); // KeBugCheckEx(NO_PAGES_AVAILABLE, 2, PAGE_SIZE * 2, 0, 0);
// } // }
/* Initialize 8/16 bit SList support */
RtlpUse16ByteSLists = (KeFeatureBits & KF_CMPXCHG16B) ? TRUE: FALSE;
} }
VOID VOID

View file

@ -16,6 +16,8 @@
extern ULONG_PTR MainSSDT[]; extern ULONG_PTR MainSSDT[];
extern UCHAR MainSSPT[]; extern UCHAR MainSSPT[];
extern BOOLEAN RtlpUse16ByteSLists;
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
VOID VOID
@ -153,6 +155,9 @@ KiInitializeKernel(IN PKPROCESS InitProcess,
/* Set boot-level flags */ /* Set boot-level flags */
KeFeatureBits = Prcb->FeatureBits; KeFeatureBits = Prcb->FeatureBits;
/* Initialize 8/16 bit SList support */
RtlpUse16ByteSLists = (KeFeatureBits & KF_CMPXCHG16B) ? TRUE : FALSE;
/* Set the current MP Master KPRCB to the Boot PRCB */ /* Set the current MP Master KPRCB to the Boot PRCB */
Prcb->MultiThreadSetMaster = Prcb; Prcb->MultiThreadSetMaster = Prcb;