Author: dreimer
Date: Wed Jan 27 19:52:35 2010
New Revision: 45286
URL: http://svn.reactos.org/svn/reactos?rev=45286&view=rev
Log:
- Add piperead to the setup.
- Update ChangeLog.txt
- Sync clean.ps1 to Colin's changes.
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1
trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt
trunk/tools/RosBE/RosBE-Windows/RosBE.nsi
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 [iso-8859-1] Wed Jan 27 19:52:35 2010
@@ -22,45 +22,32 @@
function rembin {
# Check if we have any binaries to clean, if so, clean them.
- # Apply modified obj and out paths for deletion.
+ # Check if the user set any custom filenames or pathes, otherwise locally set the appropriate variables.
- if ("$_ROSBE_OBJPATH" -eq "") {
- $OBJCLEANPATH = "obj-$ENV:ROS_ARCH"
- } else {
- $OBJCLEANPATH = "$_ROSBE_OBJPATH"
+ if ("$ENV:ROS_AUTOMAKE" -eq "") {
+ $ENV:ROS_AUTOMAKE = "makefile-$ENV:ROS_ARCH.auto"
+ }
+ if ("$ENV:ROS_INTERMEDIATE" -eq "") {
+ $ENV:ROS_INTERMEDIATE = "obj-$ENV:ROS_ARCH"
+ }
+ if ("$ENV:ROS_OUTPUT" -eq "") {
+ $ENV:ROS_OUTPUT = "output-$ENV:ROS_ARCH"
+ }
+ if ("$ENV:ROS_CDOUTPUT" -eq "") {
+ $ENV:ROS_CDOUTPUT = "reactos"
}
- if ("$_ROSBE_OUTPATH" -eq "") {
- $OUTCLEANPATH = "output-$ENV:ROS_ARCH"
- } else {
- $OUTCLEANPATH = "$_ROSBE_OUTPATH"
- }
+ if ((Test-Path "$ENV:ROS_INTERMEDIATE\.") -and (Test-Path "$ENV:ROS_OUTPUT\.")) {
+ "Cleaning ReactOS $ENV:ROS_ARCH source directory..."
- if ("$ENV:ROS_ARCH" -eq "i386") {
- $MAKEFILE = "makefile.auto"
- } else {
- $MAKEFILE = "makefile-$ENV:ROS_ARCH.auto"
- }
+ $null = (Remove-Item "$ENV:ROS_AUTOMAKE" -force)
+ $null = (Remove-Item "$ENV:ROS_INTERMEDIATE" -recurse -force)
+ $null = (Remove-Item "$ENV:ROS_OUTPUT" -recurse -force)
+ $null = (Remove-Item "$ENV:ROS_CDOUTPUT" -recurse -force)
- if (Test-Path "$MAKEFILE") {
- $null = (Remove-Item "$MAKEFILE" -force)
- }
-
- if (Test-Path "$OBJCLEANPATH") {
- "Cleaning ReactOS $ENV:ROS_ARCH source directory..."
- if (Test-Path "$OBJCLEANPATH") {
- $null = (Remove-Item "$OBJCLEANPATH" -recurse -force)
- }
- if (Test-Path "$OUTCLEANPATH") {
- $null = (Remove-Item "$OUTCLEANPATH" -recurse -force)
- }
"Done cleaning ReactOS $ENV:ROS_ARCH source directory."
} else {
"ERROR: There is no $ENV:ROS_ARCH compiler output to clean."
- }
-
- if (Test-Path "reactos") {
- $null = (Remove-Item "reactos" -recurse -force)
}
}
Modified: trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Cha…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/ChangeLog.txt [iso-8859-1] Wed Jan 27 19:52:35 2010
@@ -1,12 +1,16 @@
*** Jan XXth, 2010 - RosBE 1.5 Released
-- Updated Binutils to 2.20.51-20091222 (snapshot)
-- Updated GCC to 4.4.2 (including backported GCC r153606)
+- Updated Binutils to 2.20.51-20091222 (snapshot) (Colin Finck)
+- Updated GCC to 4.4.3 (including backported GCC r153606) (Colin Finck)
+ * gmp 4.4.3
+ * mpfr 2.4.2
- Updated MinGW Runtime to 3.17 (Daniel Reimer)
- Updated w32api to 3.14 (Daniel Reimer)
- Updated NSIS to 2.46 (Daniel Reimer)
-- Added Remake command (Daniel Reimer)
-- Replaced raddr2line with log2lines v1.9 (Daniel Reimer)
+- Added Remake Command (Daniel Reimer)
+- Added kdbg Command (Jan Roeloffzen, Daniel Reimer)
+- Replaced raddr2line with log2lines v1.11 (Jan Roeloffzen, Daniel Reimer)
+- Added piperead Tool for log2lines fully working in Powershell (Jan Roeloffzen, Daniel Reimer)
- Added a chinese translation to the options tool (Elton Chung)
- Added ARM Arch support to RosBE (Daniel Reimer)
- Added ARM Settings to options.exe, too (Daniel Reimer)
@@ -17,6 +21,16 @@
- Merge the 32 bit and 64 bit options tool in one file (Daniel Reimer)
- PS1 options script now waits for options.exe closing and then immediately sets all options active (Daniel Reimer)
- Tidy up existant and add more Target Compiler Paths (Daniel Reimer)
+- Reworked clean command to be more restrictive and secure
+ and being able to clean other repos except the main one (Colin Finck, Daniel Reimer)
+- Clean up from some app calls where the app's path is in the PATH Var (Daniel Reimer)
+- Cleaned up Host-GCC Path being added twice to the PATH Var (Daniel Reimer)
+- Work on the Update Script: (Daniel Reimer)
+ * Theres no need for a loading routine for 7z.exe anymore. Its included in RosBE now
+ * Added some Status Messages telling if stuff succeeded or not
+- Removed the address translation from the raddr2line script. Its done in the tools now (Daniel Reimer)
+- Fixed the Core detection in makex for PS. Added a global setting to the variable
+ containing the number of cores. (Daniel Reimer)
*** Oct 26th, 2009 - RosBE 1.4.5 Released
Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE.ns…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/RosBE.nsi [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/RosBE.nsi [iso-8859-1] Wed Jan 27 19:52:35 2010
@@ -270,6 +270,7 @@
SetOverwrite try
File /r Components\Tools\echoh.exe
File /r Components\Tools\log2lines.exe
+ File /r Components\Tools\piperead.exe
File /r Components\Tools\chkslash.exe
SectionEnd
Author: dreimer
Date: Wed Jan 27 16:36:07 2010
New Revision: 45285
URL: http://svn.reactos.org/svn/reactos?rev=45285&view=rev
Log:
- Added a global setting to the variable containing the number of cores. It never reached the place it was needed. No, this does not fix makex on the new gcc...
- Hopefully fixed kdbg on PS.
TBD:
- Port Colin's changes to clean.ps1.
- Find out, why makex fails on both PS and CMD...
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/kdbg.ps1
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Clean.ps1 [iso-8859-1] Wed Jan 27 16:36:07 2010
@@ -3,7 +3,7 @@
# LICENSE: GNU General Public License v2. (see LICENSE.txt)
# FILE: Root/Clean.ps1
# PURPOSE: Clean the ReactOS source directory.
-# COPYRIGHT: Copyright 2009 Daniel Reimer <reimer.daniel(a)freenet.de>
+# COPYRIGHT: Copyright 2010 Daniel Reimer <reimer.daniel(a)freenet.de>
#
$host.ui.RawUI.WindowTitle = "Cleaning..."
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 [iso-8859-1] Wed Jan 27 16:36:07 2010
@@ -3,8 +3,8 @@
# LICENSE: GNU General Public License v2. (see LICENSE.txt)
# FILE: Root/RosBE.ps1
# PURPOSE: This script provides/sets up various build environments for
-# ReactOS. Currently it provides a GCC 4.1.3 build environment.
-# COPYRIGHT: Copyright 2009 Daniel Reimer <reimer.daniel(a)freenet.de>
+# ReactOS. Currently it provides a GCC 4.4.3 build environment.
+# COPYRIGHT: Copyright 2010 Daniel Reimer <reimer.daniel(a)freenet.de>
#
$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
@@ -52,7 +52,7 @@
# Get the number of CPUs in the system so we know how many jobs to execute.
# To modify the number used, see the cpucount usage for getting to know about the possible options
-$_ROSBE_MAKEX_JOBS = (gwmi win32_processor).numberofcores + 1
+$global:_ROSBE_MAKEX_JOBS = (gwmi win32_processor).numberofcores + 1
$ENV:CCACHE_DIR = "$ENV:APPDATA\RosBE\.ccache"
$ENV:C_INCLUDE_PATH = $null
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/kdbg.ps1
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/kdbg.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/kdbg.ps1 [iso-8859-1] Wed Jan 27 16:36:07 2010
@@ -24,6 +24,6 @@
"Now Start your VM with COM1 set to \\.\pipe\kdbg"
read-host 'Press any key to continue . . .'
-log2lines -c $LOGFILE < \\.\pipe\kdbg
+log2lines -c $LOGFILE -P "piperead -c \\.\pipe\kdbg"
$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
Author: cgutman
Date: Wed Jan 27 08:44:42 2010
New Revision: 45283
URL: http://svn.reactos.org/svn/reactos?rev=45283&view=rev
Log:
- Handle the case where a socket sends an event notification without being accepted first
Modified:
branches/aicom-network-branch/lib/drivers/ip/transport/tcp/event.c
Modified: branches/aicom-network-branch/lib/drivers/ip/transport/tcp/event.c
URL: http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/lib/driver…
==============================================================================
--- branches/aicom-network-branch/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] (original)
+++ branches/aicom-network-branch/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Wed Jan 27 08:44:42 2010
@@ -24,7 +24,14 @@
NewState & SEL_ACCEPT ? 'A' : 'a',
NewState & SEL_WRITE ? 'W' : 'w'));
- ASSERT(Connection);
+ /* If this socket is missing its socket context, that means that it
+ * has been created as a new connection in sonewconn but not accepted
+ * yet. We can safely ignore event notifications on these sockets.
+ * Once they are accepted, they will get a socket context and we will
+ * be able to process them.
+ */
+ if (!Connection)
+ return 0;
TI_DbgPrint(DEBUG_TCP,("Called: NewState %x (Conn %x) (Change %x)\n",
NewState, Connection,
Author: sir_richard
Date: Wed Jan 27 04:05:10 2010
New Revision: 45280
URL: http://svn.reactos.org/svn/reactos?rev=45280&view=rev
Log:
[NTOS]: Rework the trap macros again. This time we needed some added complexity because of the need for runtime patching at boot. We got away with it nicely and basically implement a simple "if" in ASM, which gives us a deterministic set of instructions (vs the compiler). We then patch if if needed (see next bullet).
[NTOS]: Support systems without SYSENTER. Nothing was actually disabling the SYSEXIT mechanism recently enabled. Now IRET is always used unless a SYSENTER machine is discovered, in which case the jmp to the IRET code is patched with a jmp to SYSEXIT code.
[PERF]: Set WP0 bit in CR0 later, thus allowing the existing runtime patches (and this new one) to function without requiring MmSetPageProtect. Saves TLB flushes and page table walking/mapping on boot.
Left in some debug prints to see what buildbot reports...will remove if it survives.
Modified:
trunk/reactos/ntoskrnl/include/internal/i386/ke.h
trunk/reactos/ntoskrnl/include/internal/trap_x.h
trunk/reactos/ntoskrnl/ke/i386/cpu.c
trunk/reactos/ntoskrnl/ke/i386/kiinit.c
Modified: trunk/reactos/ntoskrnl/include/internal/i386/ke.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/i386/ke.h [iso-8859-1] Wed Jan 27 04:05:10 2010
@@ -456,6 +456,9 @@
extern VOID __cdecl CopyParams(VOID);
extern VOID __cdecl ReadBatch(VOID);
extern VOID __cdecl FrRestore(VOID);
+extern CHAR KiSystemCallExitBranch[];
+extern CHAR KiSystemCallExit[];
+extern CHAR KiSystemCallExit2[];
//
// Trap Macros
Modified: trunk/reactos/ntoskrnl/include/internal/trap_x.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/trap_x.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/trap_x.h [iso-8859-1] Wed Jan 27 04:05:10 2010
@@ -190,7 +190,7 @@
//
VOID
FORCEINLINE
-DECLSPEC_NORETURN
+/* Do not mark this as DECLSPEC_NORETURN because possibly executing code follows it! */
KiSystemCallReturn(IN PKTRAP_FRAME TrapFrame)
{
/* Restore nonvolatiles, EAX, and do a "jump" back to the kernel caller */
@@ -205,6 +205,7 @@
"movl %c[e](%%esp), %%edx\n"
"addl $%c[v],%%esp\n" /* A WHOLE *KERNEL* frame since we're not IRET'ing */
"jmp *%%edx\n"
+ ".globl _KiSystemCallExit2\n_KiSystemCallExit2:\n"
:
: "r"(TrapFrame),
[b] "i"(KTRAP_FRAME_EBX),
@@ -216,7 +217,6 @@
[v] "i"(KTRAP_FRAME_ESP)
: "%esp"
);
- UNREACHABLE;
}
VOID
@@ -227,6 +227,7 @@
/* Regular interrupt exit, but we only restore EAX as a volatile */
__asm__ __volatile__
(
+ ".globl _KiSystemCallExit\n_KiSystemCallExit:\n"
"movl %0, %%esp\n"
"movl %c[b](%%esp), %%ebx\n"
"movl %c[s](%%esp), %%esi\n"
@@ -405,6 +406,29 @@
asm volatile(".byte 0xC4\n.byte 0xC4\n");
}
+VOID
+FORCEINLINE
+KiUserSystemCall(IN PKTRAP_FRAME TrapFrame)
+{
+ /*
+ * Kernel call or user call?
+ *
+ * This decision is made in inlined assembly because we need to patch
+ * the relative offset of the user-mode jump to point to the SYSEXIT
+ * routine if the CPU supports it. The only way to guarantee that a
+ * relative jnz/jz instruction is generated is to force it with the
+ * inline assembler.
+ */
+ asm volatile
+ (
+ "test $1, %0\n" /* MODE_MASK */
+ ".globl _KiSystemCallExitBranch\n_KiSystemCallExitBranch:\n"
+ "jnz _KiSystemCallExit\n"
+ :
+ : "r"(TrapFrame->SegCs)
+ );
+}
+
//
// Generic Exit Routine
//
@@ -502,43 +526,35 @@
/* Check for system call -- a system call skips volatiles! */
if (__builtin_expect(SkipBits.SkipVolatiles, 0)) /* More INTs than SYSCALLs */
{
- /* Kernel call or user call? */
- if (__builtin_expect(KiUserTrap(TrapFrame), 1)) /* More Ring 3 than 0 */
+ /* User or kernel call? */
+ KiUserSystemCall(TrapFrame);
+
+ /* Restore EFLags */
+ __writeeflags(TrapFrame->EFlags);
+
+ /* Call is kernel, so do a jump back since this wasn't a real INT */
+ KiSystemCallReturn(TrapFrame);
+
+ /* If we got here, this is SYSEXIT: are we stepping code? */
+ if (!(TrapFrame->EFlags & EFLAGS_TF))
{
- /* Is SYSENTER supported and/or enabled, or are we stepping code? */
- if (__builtin_expect((KiFastSystemCallDisable) ||
- (TrapFrame->EFlags & EFLAGS_TF), 0))
- {
- /* Exit normally */
- KiSystemCallTrapReturn(TrapFrame);
- }
- else
- {
- /* Restore user FS */
- Ke386SetFs(KGDT_R3_TEB | RPL_MASK);
-
- /* Remove interrupt flag */
- TrapFrame->EFlags &= ~EFLAGS_INTERRUPT_MASK;
- __writeeflags(TrapFrame->EFlags);
-
- /* Exit through SYSEXIT */
- KiSystemCallSysExitReturn(TrapFrame);
- }
+ /* Restore user FS */
+ Ke386SetFs(KGDT_R3_TEB | RPL_MASK);
+
+ /* Remove interrupt flag */
+ TrapFrame->EFlags &= ~EFLAGS_INTERRUPT_MASK;
+ __writeeflags(TrapFrame->EFlags);
+
+ /* Exit through SYSEXIT */
+ KiSystemCallSysExitReturn(TrapFrame);
}
- else
- {
- /* Restore EFLags */
- __writeeflags(TrapFrame->EFlags);
-
- /* Call is kernel, so do a jump back since this wasn't a real INT */
- KiSystemCallReturn(TrapFrame);
- }
- }
- else
- {
- /* Return from interrupt */
- KiTrapReturn(TrapFrame);
- }
+
+ /* Exit through IRETD, either due to debugging or due to lack of SYSEXIT */
+ KiSystemCallTrapReturn(TrapFrame);
+ }
+
+ /* Return from interrupt */
+ KiTrapReturn(TrapFrame);
}
//
Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/cpu.c [iso-8859-1] Wed Jan 27 04:05:10 2010
@@ -45,6 +45,15 @@
BOOLEAN KiI386PentiumLockErrataPresent;
BOOLEAN KiSMTProcessorsPresent;
+/* The distance between SYSEXIT and IRETD return modes */
+UCHAR KiSystemCallExitAdjust;
+
+/* The offset that was applied -- either 0 or the value above */
+UCHAR KiSystemCallExitAdjusted;
+
+/* Whether the adjustment was already done once */
+BOOLEAN KiFastCallCopyDoneOnce;
+
/* Flush data */
volatile LONG KiTbFlushTimeStamp;
@@ -801,16 +810,92 @@
VOID
NTAPI
+KiDisableFastSyscallReturn(VOID)
+{
+ /* Was it applied? */
+ if (KiSystemCallExitAdjusted)
+ {
+ /* Restore the original value */
+ KiSystemCallExitBranch[1] = KiSystemCallExitBranch[1] - KiSystemCallExitAdjusted;
+
+ /* It's not adjusted anymore */
+ KiSystemCallExitAdjusted = FALSE;
+ }
+}
+
+VOID
+NTAPI
+KiEnableFastSyscallReturn(VOID)
+{
+ /* Check if the patch has already been done */
+ if ((KiSystemCallExitAdjusted == KiSystemCallExitAdjust) &&
+ (KiFastCallCopyDoneOnce))
+ {
+ DPRINT1("SYSEXIT Code Patch was already done!\n");
+ return;
+ }
+
+ /* Make sure the offset is within the distance of a Jxx SHORT */
+ if ((KiSystemCallExitBranch[1] - KiSystemCallExitAdjust) < 0x80)
+ {
+ /* Remove any existing code patch */
+ DPRINT1("Correct SHORT size found\n");
+ KiDisableFastSyscallReturn();
+
+ /* We should have a JNZ there */
+ ASSERT(KiSystemCallExitBranch[0] == 0x75);
+
+ /* Do the patch */
+ DPRINT1("Current jump offset: %lx\n", KiSystemCallExitBranch[1]);
+ KiSystemCallExitAdjusted = KiSystemCallExitAdjust;
+ KiSystemCallExitBranch[1] -= KiSystemCallExitAdjusted;
+ DPRINT1("New jump offset: %lx\n", KiSystemCallExitBranch[1]);
+
+ /* Remember that we've done it */
+ KiFastCallCopyDoneOnce = TRUE;
+ }
+ else
+ {
+ /* This shouldn't happen unless we've messed the macros up */
+ DPRINT1("Your compiled kernel is broken!\n");
+ DbgBreakPoint();
+ }
+}
+
+VOID
+NTAPI
KiRestoreFastSyscallReturnState(VOID)
{
- /* FIXME: NT has support for SYSCALL, IA64-SYSENTER, etc. */
-
/* Check if the CPU Supports fast system call */
if (KeFeatureBits & KF_FAST_SYSCALL)
{
+ /* Check if it has been disabled */
+ if (!KiFastSystemCallDisable)
+ {
+ /* KiSystemCallExit2 should come BEFORE KiSystemCallExit */
+ DPRINT1("Exit2: %p Exit1: %p\n", KiSystemCallExit2, KiSystemCallExit);
+ ASSERT(KiSystemCallExit2 < KiSystemCallExit);
+
+ /* It's enabled, so we'll have to do a code patch */
+ KiSystemCallExitAdjust = KiSystemCallExit - KiSystemCallExit2;
+ DPRINT1("SYSENTER Capable Machine. Jump Offset Delta: %lx\n", KiSystemCallExitAdjust);
+ }
+ else
+ {
+ /* Disable fast system call */
+ KeFeatureBits &= ~KF_FAST_SYSCALL;
+ }
+ }
+
+ /* Now check if all CPUs support fast system call, and the registry allows it */
+ if (KeFeatureBits & KF_FAST_SYSCALL)
+ {
/* Do an IPI to enable it */
KeIpiGenericCall(KiLoadFastSyscallMachineSpecificRegisters, 0);
}
+
+ /* Perform the code patch that is required */
+ KiEnableFastSyscallReturn();
}
ULONG_PTR
Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] Wed Jan 27 04:05:10 2010
@@ -31,7 +31,6 @@
NTAPI
KiInitMachineDependent(VOID)
{
- ULONG Protect;
ULONG CpuCount;
BOOLEAN FbCaching = FALSE;
NTSTATUS Status;
@@ -153,12 +152,7 @@
/* FIXME: Implement and enable XMM Page Zeroing for Mm */
/* Patch the RtlPrefetchMemoryNonTemporal routine to enable it */
- Protect = MmGetPageProtect(NULL, RtlPrefetchMemoryNonTemporal);
- MmSetPageProtect(NULL,
- RtlPrefetchMemoryNonTemporal,
- Protect | PAGE_IS_WRITABLE);
*(PCHAR)RtlPrefetchMemoryNonTemporal = 0x90;
- MmSetPageProtect(NULL, RtlPrefetchMemoryNonTemporal, Protect);
}
}
@@ -320,6 +314,9 @@
/* FIXME: TODO */
DPRINT1("ISR Time Limit not yet supported\n");
}
+
+ /* Set CR0 features based on detected CPU */
+ KiSetCR0Bits();
}
VOID
@@ -400,9 +397,6 @@
/* Detect and set the CPU Type */
KiSetProcessorType();
-
- /* Set CR0 features based on detected CPU */
- KiSetCR0Bits();
/* Check if an FPU is present */
NpxPresent = KiIsNpxPresent();