- Undo disabling of systemcalls, which was disabled in r53646 for testing purpose.
- Sillence "Support for SYSENTER detected." debug print, since its the normal case, only keep the disabled and not present cases.
- Silence "xxx support detected but not yet taken advantage of" debug prints. CPU features are already reported and there is no point in printing every single feature we do not support.
- Invert if/else in KiRestoreFastSyscallReturnState
svn path=/trunk/; revision=53846
/* CPU Features and Flags */
ULONG KeI386CpuType;
ULONG KeI386CpuStep;
-ULONG KiFastSystemCallDisable = 1;
+ULONG KiFastSystemCallDisable = 0;
ULONG KeI386NpxPresent = 0;
ULONG KiMXCsrMask = 0;
ULONG MxcsrFeatureMask = 0;
if (KeFeatureBits & KF_FAST_SYSCALL)
{
/* Check if it has been disabled */
- if (!KiFastSystemCallDisable)
+ if (KiFastSystemCallDisable)
+ {
+ /* Disable fast system call */
+ KeFeatureBits &= ~KF_FAST_SYSCALL;
+ KiFastCallExitHandler = KiSystemCallTrapReturn;
+ DPRINT1("Support for SYSENTER disabled.\n");
+ }
+ else
{
/* Do an IPI to enable it */
KeIpiGenericCall(KiLoadFastSyscallMachineSpecificRegisters, 0);
/* It's enabled, so use the proper exit stub */
KiFastCallExitHandler = KiSystemCallSysExitReturn;
- DPRINT1("Support for SYSENTER detected.\n");
- }
- else
- {
- /* Disable fast system call */
- KeFeatureBits &= ~KF_FAST_SYSCALL;
- KiFastCallExitHandler = KiSystemCallTrapReturn;
- DPRINT1("Support for SYSENTER disabled.\n");
+ DPRINT("Support for SYSENTER detected.\n");
}
}
else
if (KeFeatureBits & KF_LARGE_PAGE)
{
/* FIXME: Support this */
- DPRINT1("Large Page support detected but not yet taken advantage of\n");
+ DPRINT("Large Page support detected but not yet taken advantage of\n");
}
/* Check for global page support */
/* FIXME: TODO */
DPRINT1("ISR Time Limit not yet supported\n");
}
-
+
/* Set CR0 features based on detected CPU */
KiSetCR0Bits();
}
KiSystemStartupBootStack(VOID)
{
PKTHREAD Thread;
-
+
/* Initialize the kernel for the current CPU */
KiInitializeKernel(&KiInitialProcess.Pcb,
(PKTHREAD)KeLoaderBlock->Thread,
(PKPRCB)__readfsdword(KPCR_PRCB),
KeNumberProcessors - 1,
KeLoaderBlock);
-
+
/* Set the priority of this thread to 0 */
Thread = KeGetCurrentThread();
Thread->Priority = 0;
-
+
/* Force interrupts enabled and lower IRQL back to DISPATCH_LEVEL */
_enable();
KfLowerIrql(DISPATCH_LEVEL);
-
+
/* Set the right wait IRQL */
Thread->WaitIrql = DISPATCH_LEVEL;
KIDTENTRY NmiEntry, DoubleFaultEntry;
PKTSS Tss;
PKIPCR Pcr;
-
+
/* Boot cycles timestamp */
BootCycles = __rdtsc();
__writecr3(Cr3);
/* Now enable PGE */
- DPRINT1("Global page support detected but not yet taken advantage of\n");
+ DPRINT("Global page support detected but not yet taken advantage of\n");
//__writecr4(Cr4 | CR4_PGE);
/* Restore interrupts */
KiInitializePAT(VOID)
{
/* FIXME: Support this */
- DPRINT1("PAT support detected but not yet taken advantage of\n");
+ DPRINT("PAT support detected but not yet taken advantage of\n");
}