Author: cfinck
Date: Tue Jan 26 21:17:49 2010
New Revision: 45273
URL: http://svn.reactos.org/svn/reactos?rev=45273&view=rev
Log:
- Removed the unneeded -gstabs+ flag as the debug symbols of all toolchain binaries are stripped off anyway after the build.
- Do some basic checks to verify that we're really in a checkout directory before cleaning it.
- Fix the architecture environment variable in RosBE-Unix.
- Consider the ROS_AUTOMAKE and ROS_CDOUTPUT variables when cleaning.
The default makefile is always "makefile-ARCH.auto" now, also for i386. Will be changed in the tree as well once we all update to 1.5.
- Leave out RosBE-Unix' version number for GCC's --with-pkgversion parameter as this could be misleading for future updates.
- Many code simplifications
Removed:
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/clean.sh
Modified:
trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE-rc
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/charch.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/clean.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/setvars.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/rosbelibrary.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh
trunk/tools/RosBE/RosBE-Windows/Buildtoolchain/rosbe_1.5/buildtoolchain.sh
trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd
trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/R…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -11,7 +11,7 @@
rs_host_cflags="-pipe -O2"
rs_needed_tools="bison flex gcc g++ grep makeinfo" # GNU Make has a special check
rs_target="mingw32"
-rs_target_cflags="-pipe -gstabs+ -O2 -march=pentium -mtune=i686"
+rs_target_cflags="-pipe -O2 -march=pentium -mtune=i686"
# Get the absolute path to the script directory
cd `dirname $0`
@@ -295,7 +295,7 @@
export CFLAGS_FOR_TARGET="$rs_target_cflags"
export CXXFLAGS_FOR_TARGET="$rs_target_cflags"
- rs_do_command ../gcc/configure --prefix="$rs_prefixdir" --target="$rs_target" --with-gmp="$rs_supportprefixdir" --with-mpfr="$rs_supportprefixdir" --with-pkgversion="RosBE-Unix $ROSBE_VERSION" --enable-languages=c,c++ --enable-checking=release --enable-version-specific-runtime-libs --disable-shared --disable-nls --disable-werror
+ rs_do_command ../gcc/configure --prefix="$rs_prefixdir" --target="$rs_target" --with-gmp="$rs_supportprefixdir" --with-mpfr="$rs_supportprefixdir" --with-pkgversion="RosBE-Unix" --enable-languages=c,c++ --enable-checking=release --enable-version-specific-runtime-libs --disable-shared --disable-nls --disable-werror
rs_do_command $rs_makecmd -j $rs_cpucount
rs_do_command $rs_makecmd install
rs_clean_module "gcc"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE-rc
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE-rc [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE-rc [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -1,7 +1,3 @@
-# Set path
-source "$_ROSBE_ROSSCRIPTDIR/rosbelibrary.sh"
-set_path_variable
-
# Set aliases
alias basedir="source $_ROSBE_ROSSCRIPTDIR/basedir.sh"
alias charch="source $_ROSBE_ROSSCRIPTDIR/charch.sh"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE.sh [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -2,7 +2,7 @@
#
# Script for initializing RosBE
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2007-2009 Colin Finck <colin(a)reactos.org>
+# Copyright 2007-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
@@ -20,7 +20,7 @@
export _ROSBE_ROSSCRIPTDIR="$PWD"
# Save the current PATH variable
-export _ROSBE_OLDPATH="$PATH"
+export _ROSBE_OLDPATH="$_ROSBE_ROSSCRIPTDIR/bin:$PATH"
# Make sure that some important variables are clean
export HOST=
@@ -44,15 +44,8 @@
# Set the architecture to build for
source "$_ROSBE_ROSSCRIPTDIR/rosbelibrary.sh"
-if [ "$3" = "" ]; then
- # No architecture specified, fall back to i386 without any message
- export _ROSBE_ARCH="i386"
-else
- # Try to set the architecture to the one specified
- change_architecture $3
-fi
-
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/setvars.sh"
+# Try to set the architecture to the one specified or fallback to "i386"
+change_architecture "$3:-i386"
# Display banner
echo "*******************************************************************************"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/charch.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/charch.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/charch.sh [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -2,7 +2,7 @@
#
# Change the current target build tools to an architecture to build for
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2009-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
@@ -18,8 +18,6 @@
# Change the architecture
source "$_ROSBE_ROSSCRIPTDIR/rosbelibrary.sh"
change_architecture $1
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/setvars.sh"
-set_path_variable
# Display tool versions
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/version.sh"
+source "$_ROSBE_ROSSCRIPTDIR/$ROS_ARCH/version.sh"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/clean.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/clean.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/clean.sh [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -2,10 +2,27 @@
#
# Script for cleaning the ReactOS source directory
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2007-2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2007-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
-pushd "$_ROSBE_ROSSOURCEDIR" >& /dev/null
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/clean.sh"
-popd >& /dev/null
+# Check if the user set any custom filenames or pathes, otherwise locally set the appropriate variables.
+ROS_AUTOMAKE="$ROS_AUTOMAKE:-makefile-$ROS_ARCH.auto"
+ROS_INTERMEDIATE="$ROS_INTERMEDIATE:-obj-$ROS_ARCH"
+ROS_OUTPUT="$ROS_OUTPUT:-output-$ROS_ARCH"
+ROS_CDOUTPUT="$ROS_CDOUTPUT:-reactos."
+
+# Do some basic sanity checks to verify that we are working in a ReactOS source tree.
+# Consider that we also want to clean half-complete builds, so don't depend on too many existing files.
+if [ -d "$ROS_INTERMEDIATE" ] && [ -d "$ROS_OUTPUT" ]; then
+ echo "Cleaning ReactOS $ROS_ARCH source directory..."
+
+ rm -f "$ROS_AUTOMAKE"
+ rm -rf "$ROS_INTERMEDIATE"
+ rm -rf "$ROS_OUTPUT"
+ rm -rf "$ROS_CDOUTPUT"
+
+ echo "Done cleaning ReactOS $ROS_ARCH source directory."
+else
+ echo "ERROR: There is no $ROS_ARCH compiler output to clean."
+fi
Removed: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/clean.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/clean.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/clean.sh (removed)
@@ -1,18 +1,0 @@
-# Clean i386 source directories
-# Part of RosBE for Unix-based Operating Systems
-# Copyright 2009 Colin Finck <mail(a)colinfinck.de>
-#
-# Released under GNU GPL v2 or any later version.
-
-if [ -d "obj-i386" ]; then
- echo "Cleaning ReactOS i386 source directory..."
-
- rm -rf "obj-i386"
- rm -rf "output-i386"
- rm -rf "reactos."
- rm -f "makefile.auto"
-
- echo "Done cleaning ReactOS i386 source directory."
-else
- echo "ERROR: There is no i386 compiler output to clean."
-fi
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/setvars.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/setvars.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/setvars.sh [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -1,8 +1,8 @@
# Set architecture-specific environment variables
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2009-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
-export ROSBE_TARGET_CFLAGS="-I$_ROSBE_ROSSCRIPTDIR/i386/lib/gcc/mingw32/4.1.3/include -I$_ROSBE_ROSSCRIPTDIR/i386/mingw32/include"
-export ROSBE_TARGET_CXXFLAGS="-I$_ROSBE_ROSSCRIPTDIR/i386/include/c++/4.1.3 -I$_ROSBE_ROSSCRIPTDIR/i386/include/c++/4.1.3/mingw32 -I$_ROSBE_ROSSCRIPTDIR/i386/include/c++/4.1.3/backward -I$_ROSBE_ROSSCRIPTDIR/i386/lib/gcc/mingw32/4.1.3/include -I$_ROSBE_ROSSCRIPTDIR/i386/mingw32/include"
+export ROSBE_TARGET_CFLAGS=`mingw32-cpp -x c -v < /dev/null 2>&1 | $_ROSBE_ROSSCRIPTDIR/bin/getincludes`
+export ROSBE_TARGET_CXXFLAGS=`mingw32-cpp -x c++ -v < /dev/null 2>&1 | $_ROSBE_ROSSCRIPTDIR/bin/getincludes`
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/rosbelibrary.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/rosbelibrary.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/rosbelibrary.sh [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -1,10 +1,10 @@
# Shared functions for RosBE-Unix components
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2009-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
-# Check whether the given architecture is supported and if so, change the _ROSBE_ARCH variable appropriately
+# Check whether the given architecture is supported and if so, change the ROS_ARCH variable appropriately
# Parameter 1: The architecture to set
change_architecture()
{
@@ -12,14 +12,17 @@
if [ -f "$_ROSBE_ROSSCRIPTDIR/$new_arch/version.sh" ]; then
# Architecture parameter seems valid
- _ROSBE_ARCH="$new_arch"
+ ROS_ARCH="$new_arch"
else
echo "Unsupported architecture specified, falling back to i386!"
echo
- _ROSBE_ARCH="i386"
+ ROS_ARCH="i386"
fi
- export _ROSBE_ARCH
+ export PATH="$_ROSBE_ROSSCRIPTDIR/$ROS_ARCH/bin:$_ROSBE_OLDPATH"
+ export ROS_ARCH
+
+ source "$_ROSBE_ROSSCRIPTDIR/$ROS_ARCH/setvars.sh"
}
# Check whether we're running as root and warn the user in case we don't
@@ -43,10 +46,3 @@
fi
fi
}
-
-# Set the PATH variable properly for the specified architecture
-set_path_variable()
-{
- # Set the PATH
- PATH="$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/bin:$_ROSBE_ROSSCRIPTDIR/bin:$_ROSBE_OLDPATH"
-}
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -2,7 +2,7 @@
#
# Show the tool versions
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2007-2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2007-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
@@ -15,9 +15,9 @@
# Environment Information
rs_boldmsg "Environment Information"
-echo "Selected Target Architecture: $_ROSBE_ARCH"
+echo "Selected Target Architecture: $ROS_ARCH"
echo
# Display tool versions
rs_boldmsg "Build Tools"
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/version.sh"
+source "$_ROSBE_ROSSCRIPTDIR/$ROS_ARCH/version.sh"
Modified: trunk/tools/RosBE/RosBE-Windows/Buildtoolchain/rosbe_1.5/buildtoolchain.sh
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Buildtoo…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Buildtoolchain/rosbe_1.5/buildtoolchain.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Buildtoolchain/rosbe_1.5/buildtoolchain.sh [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -30,7 +30,7 @@
rs_host_cflags="-pipe -fno-common -O2 -march=pentium3 -mfpmath=sse" # -fno-common needed for native builds due to GCC 4.4 bug according to Dmitry Gorbachev
rs_needed_tools="bison flex gcc g++ grep makeinfo" # GNU Make has a special check
rs_target="mingw32"
-rs_target_cflags="-pipe -gstabs+ -O2 -march=pentium -mtune=i686"
+rs_target_cflags="-pipe -O2 -march=pentium -mtune=i686"
# Get the absolute path to the script directory
cd `dirname $0`
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Cle…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -3,7 +3,7 @@
:: LICENSE: GNU General Public License v2. (see LICENSE.txt)
:: FILE: Root/Clean.cmd
:: 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>
:: Peter Ward <dralnix(a)gmail.com>
:: Colin Finck <colin(a)reactos.org>
::
@@ -51,50 +51,40 @@
:: Check if we have any binaries to clean, if so, clean them.
:BIN
-:: Apply modified obj and out paths for deletion.
-if "%_ROSBE_OBJPATH%" == "" (
- set OBJCLEANPATH=obj-%ROS_ARCH%
-) else (
- set OBJCLEANPATH=%_ROSBE_OBJPATH%
-)
+:: Check if the user set any custom filenames or pathes, otherwise locally set the appropriate variables.
+if "%ROS_AUTOMAKE%" == "" (set ROS_AUTOMAKE=makefile-%ROS_ARCH%.auto)
+if "%ROS_INTERMEDIATE%" == "" (set ROS_INTERMEDIATE=obj-%ROS_ARCH%)
+if "%ROS_OUTPUT%" == "" (set ROS_OUTPUT=output-%ROS_ARCH%)
+if "%ROS_CDOUTPUT%" == "" (set ROS_CDOUTPUT=reactos)
-if "%_ROSBE_OUTPATH%" == "" (
- set OUTCLEANPATH=output-%ROS_ARCH%
-) else (
- set OUTCLEANPATH=%_ROSBE_OUTPATH%
-)
+:: Do some basic sanity checks to verify that we are working in a ReactOS source tree.
+:: Consider that we also want to clean half-complete builds, so don't depend on too many existing files.
+set IS_SOURCE_DIRECTORY=1
+call :BIN_CHECKEXISTENCE "%ROS_INTERMEDIATE%\." "%ROS_OUTPUT%\."
-if /i "%ROS_ARCH%" == "i386" (
- set MAKEFILE=makefile.auto
-) else (
- set MAKEFILE=makefile-%ROS_ARCH%.auto
-)
-
-if exist "%MAKEFILE%" (
- del "%MAKEFILE%" 1> NUL 2> NUL
-)
-
-if exist "%OBJCLEANPATH%\." (
+if "%IS_SOURCE_DIRECTORY%" == "1" (
echo Cleaning ReactOS %ROS_ARCH% source directory...
-
- if exist "%OBJCLEANPATH%\." (
- rd /s /q "%OBJCLEANPATH%" 1> NUL 2> NUL
- )
-
- if exist "%OUTCLEANPATH%\." (
- rd /s /q "%OUTCLEANPATH%" 1> NUL 2> NUL
- )
-
+
+ del "%ROS_AUTOMAKE%" 1>NUL 2>NUL
+ rd /s /q "%ROS_INTERMEDIATE%" 1>NUL 2>NUL
+ rd /s /q "%ROS_OUTPUT%" 1>NUL 2>NUL
+ rd /s /q "%ROS_CDOUTPUT%" 1>NUL 2>NUL
+
echo Done cleaning ReactOS %ROS_ARCH% source directory.
) else (
- echo ERROR: There is no %ROS_ARCH% compiler output to clean.
+ echo ERROR: This does not look like a ReactOS %ROS_ARCH% source directory to clean.
)
+goto :EOF
-if exist "reactos\." (
- rd /s /q "reactos" 1> NUL 2> NUL
+:: Check if all given files exist. If one does not, set IS_SOURCE_DIRECTORY to 0.
+:BIN_CHECKEXISTENCE
+if "%1" == "" (goto :EOF)
+if not exist "%1" (
+ set IS_SOURCE_DIRECTORY=0
+ goto :EOF
)
-
-goto :EOF
+shift /1
+goto :BIN_CHECKEXISTENCE %*
:EOC
title ReactOS Build Environment %_ROSBE_VERSION%
Modified: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Ros…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -3,8 +3,8 @@
:: LICENSE: GNU General Public License v2. (see LICENSE.txt)
:: FILE: Root/RosBE.cmd
:: 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>
:: Peter Ward <dralnix(a)gmail.com>
:: Colin Finck <colin(a)reactos.org>
::
Author: sir_richard
Date: Tue Jan 26 20:39:21 2010
New Revision: 45271
URL: http://svn.reactos.org/svn/reactos?rev=45271&view=rev
Log:
[PERF]: What to do when your SYSEXIT code has a bug? Set KiFastSystemCallDisable to TRUE so it never gets used. Now, for the first time in 3 years and 3 months (not giving a specific revision # to protect the 'innocent'), ReactOS actually fully uses the SYSENTER/SYSEXIT instructions isntead of IRETD, since my code doesn't exhibit the bug and SYSEXIT is safe to use. This should save a good hundred cycles or more per system call.
Modified:
trunk/reactos/ntoskrnl/ke/i386/cpu.c
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] Tue Jan 26 20:39:21 2010
@@ -27,7 +27,7 @@
ULONG KeProcessorLevel;
ULONG KeProcessorRevision;
ULONG KeFeatureBits;
-ULONG KiFastSystemCallDisable = 1;
+ULONG KiFastSystemCallDisable;
ULONG KeI386NpxPresent = 0;
ULONG KiMXCsrMask = 0;
ULONG MxcsrFeatureMask = 0;
Author: sir_richard
Date: Tue Jan 26 20:29:37 2010
New Revision: 45270
URL: http://svn.reactos.org/svn/reactos?rev=45270&view=rev
Log:
[PERF]: After spending the better part of the last two days rewriting the HAL V8086 code (used for BIOS Display Reset) in C, it dawned upon me that it shouldn't even be used during bootup in the first place! The boot loader, running in real-mode, already sets video mode 12 when starting ReactOS. We then repeat the operation, but since we're in protected mode, we have to emulate the whole sheebang with V8086 mode. We now initialize bootvid without requesting a mode switch (which was broken up until a commit ago). This gives us a dirty palette and VGA state. We then call VidResetDisplay to clean up the palette and setup the VGA registers correctly, but we only reset the screen if a custom /BOOTLOGO command is used (which isn't supported yet). We therefore don't need to enter V8086 mode at all up until the switch to graphics mode from the video card driver. Note that Windows doesn't do this (Win7 might due to the new Boot Graphics Library), so we're actually booting faster!
Modified:
trunk/reactos/ntoskrnl/inbv/inbv.c
Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/inbv/inbv.c?rev=4…
==============================================================================
--- trunk/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1] Tue Jan 26 20:29:37 2010
@@ -111,7 +111,6 @@
PCHAR CommandLine;
BOOLEAN CustomLogo = FALSE;
ULONG i;
- extern BOOLEAN ExpInTextModeSetup;
/* Quit if we're already installed */
if (InbvBootDriverInstalled) return TRUE;
@@ -125,13 +124,13 @@
CustomLogo = strstr(CommandLine, "BOOTLOGO") ? TRUE: FALSE;
}
- /* For SetupLDR, don't reset the BIOS Display -- FIXME! */
- if (ExpInTextModeSetup) CustomLogo = TRUE;
-
/* Initialize the video */
- InbvBootDriverInstalled = VidInitialize(!CustomLogo);
+ InbvBootDriverInstalled = VidInitialize(FALSE);
if (InbvBootDriverInstalled)
{
+ /* Now reset the display, but only if there's a custom boot logo */
+ VidResetDisplay(CustomLogo);
+
/* Find bitmap resources in the kernel */
ResourceCount = Count;
for (i = 0; i < Count; i++)
Author: sir_richard
Date: Tue Jan 26 20:21:41 2010
New Revision: 45269
URL: http://svn.reactos.org/svn/reactos?rev=45269&view=rev
Log:
[BOOTVID]: Fix completely broken VidInitialize routine. I have no idea what the original code was trying to accomplish.
Modified:
trunk/reactos/drivers/base/bootvid/i386/bootvid.c
Modified: trunk/reactos/drivers/base/bootvid/i386/bootvid.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/bootvid/i386/…
==============================================================================
--- trunk/reactos/drivers/base/bootvid/i386/bootvid.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/base/bootvid/i386/bootvid.c [iso-8859-1] Tue Jan 26 20:21:41 2010
@@ -357,7 +357,7 @@
{
ULONG Context = 0;
PHYSICAL_ADDRESS TranslatedAddress;
- PHYSICAL_ADDRESS NullAddress = {{0, 0}};
+ PHYSICAL_ADDRESS NullAddress = {{0, 0}}, VgaAddress;
ULONG AddressSpace = 1;
BOOLEAN Result;
ULONG_PTR Base;
@@ -373,12 +373,57 @@
TRUE);
if (!Result) return FALSE;
- /* See if this is I/O Space, which we need to map */
-TryAgain:
+ /* Loop trying to find posssible VGA base addresses */
+ while (TRUE)
+ {
+ /* See if this is I/O Space, which we need to map */
+ if (!AddressSpace)
+ {
+ /* Map it */
+ Base = (ULONG_PTR)MmMapIoSpace(TranslatedAddress, 0x400, MmNonCached);
+ }
+ else
+ {
+ /* The base is the translated address, no need to map I/O space */
+ Base = TranslatedAddress.LowPart;
+ }
+
+ /* Try to see if this is VGA */
+ VgaRegisterBase = Base;
+ if (VgaIsPresent())
+ {
+ /* Translate the VGA Memory Address */
+ VgaAddress.LowPart = 0xA0000;
+ AddressSpace = 0;
+ Result = HalFindBusAddressTranslation(VgaAddress,
+ &AddressSpace,
+ &TranslatedAddress,
+ &Context,
+ FALSE);
+ if (Result) break;
+
+ /* Try to see if there's any other address */
+ Result = HalFindBusAddressTranslation(NullAddress,
+ &AddressSpace,
+ &TranslatedAddress,
+ &Context,
+ TRUE);
+ if (!Result) return FALSE;
+ }
+ else
+ {
+ /* It's not, so unmap the I/O space if we mapped it */
+ if (!AddressSpace) MmUnmapIoSpace((PVOID)VgaRegisterBase, 0x400);
+ }
+ }
+
+ /* Success! See if this is I/O Space, which we need to map */
if (!AddressSpace)
{
/* Map it */
- Base = (ULONG_PTR)MmMapIoSpace(TranslatedAddress, 0x400, MmNonCached);
+ Base = (ULONG_PTR)MmMapIoSpace(TranslatedAddress,
+ 0x20000,
+ MmNonCached);
}
else
{
@@ -386,67 +431,23 @@
Base = TranslatedAddress.LowPart;
}
- /* Set the VGA Register base and now check if we have a VGA device */
- VgaRegisterBase = Base;
- if (VgaIsPresent())
- {
- /* Translate the VGA Memory Address */
- NullAddress.LowPart = 0xA0000;
- AddressSpace = 0;
- Result = HalFindBusAddressTranslation(NullAddress,
- &AddressSpace,
- &TranslatedAddress,
- &Context,
- FALSE);
- if (Result)
- {
- /* Success! See if this is I/O Space, which we need to map */
- if (!AddressSpace)
- {
- /* Map it */
- Base = (ULONG_PTR)MmMapIoSpace(TranslatedAddress,
- 0x20000,
- MmNonCached);
- }
- else
- {
- /* The base is the translated address, no need to map I/O space */
- Base = TranslatedAddress.LowPart;
- }
-
- /* Set the VGA Memory Base */
- VgaBase = Base;
-
- /* Now check if we have to set the mode */
- if (SetMode)
- {
- /* Reset the display */
- HalResetDisplay();
- curr_x = 0;
- curr_y = 0;
-
- /* Initialize it */
- VgaInterpretCmdStream(AT_Initialization);
- return TRUE;
- }
- }
- }
- else
- {
- /* It's not, so unmap the I/O space if we mapped it */
- if (!AddressSpace) MmUnmapIoSpace((PVOID)VgaRegisterBase, 0x400);
- }
-
- /* If we got here, then we failed...let's try again */
- Result = HalFindBusAddressTranslation(NullAddress,
- &AddressSpace,
- &TranslatedAddress,
- &Context,
- TRUE);
- if (Result) goto TryAgain;
-
- /* If we got here, then we failed even past our re-try... */
- return FALSE;
+ /* Set the VGA Memory Base */
+ VgaBase = Base;
+
+ /* Now check if we have to set the mode */
+ if (SetMode)
+ {
+ /* Reset the display */
+ HalResetDisplay();
+ curr_x = 0;
+ curr_y = 0;
+
+ /* Initialize it */
+ VgaInterpretCmdStream(AT_Initialization);
+ }
+
+ /* VGA is ready */
+ return TRUE;
}
/*