ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
October 2006
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
357 discussions
Start a n
N
ew thread
[hpoussin] 24603: Remove multiple definition warning Add a few missing error codes (taken from http://www.derkeiler.com/Newsgroups/microsoft.public.platformsdk.security/2004-02/0201.html)
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun Oct 22 21:19:49 2006 New Revision: 24603 URL:
http://svn.reactos.org/svn/reactos?rev=24603&view=rev
Log: Remove multiple definition warning Add a few missing error codes (taken from
http://www.derkeiler.com/Newsgroups/microsoft.public.platformsdk.security/2…
) Modified: trunk/reactos/include/psdk/winerror.h Modified: trunk/reactos/include/psdk/winerror.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winerror.h?re…
============================================================================== --- trunk/reactos/include/psdk/winerror.h (original) +++ trunk/reactos/include/psdk/winerror.h Sun Oct 22 21:19:49 2006 @@ -416,31 +416,6 @@ #define ERROR_PKINIT_FAILURE 1263L #define ERROR_SMARTCARD_SUBSYSTEM_FAILURE 1264L #define ERROR_DOWNGRADE_DETECTED 1265L - -#define SEC_E_OK 0 -#define SEC_E_CERT_EXPIRED (-2146893016) -#define SEC_E_INCOMPLETE_MESSAGE (-2146893032) -#define SEC_E_INSUFFICIENT_MEMORY (-2146893056) -#define SEC_E_INTERNAL_ERROR (-2146893052) -#define SEC_E_INVALID_HANDLE (-2146893055) -#define SEC_E_INVALID_TOKEN (-2146893048) -#define SEC_E_LOGON_DENIED (-2146893044) -#define SEC_E_NO_AUTHENTICATING_AUTHORITY (-2146893039) -#define SEC_E_NO_CREDENTIALS (-2146893042) -#define SEC_E_TARGET_UNKNOWN (-2146893053) -#define SEC_E_UNSUPPORTED_FUNCTION (-2146893054) -#define SEC_E_UNTRUSTED_ROOT (-2146893019) -#define SEC_E_WRONG_PRINCIPAL (-2146893022) -#define SEC_E_SECPKG_NOT_FOUND (-2146893051) -#define SEC_E_QOP_NOT_SUPPORTED (-2146893046) -#define SEC_E_UNKNOWN_CREDENTIALS (-2146893043) -#define SEC_E_NOT_OWNER (-2146893050) -#define SEC_I_RENEGOTIATE 590625 -#define SEC_I_COMPLETE_AND_CONTINUE 590612 -#define SEC_I_COMPLETE_NEEDED 590611 -#define SEC_I_CONTINUE_NEEDED 590610 -#define SEC_I_INCOMPLETE_CREDENTIALS 590624 - #define ERROR_MACHINE_LOCKED 1271L #define ERROR_CALLBACK_SUPPLIED_INVALID_DATA 1273L #define ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED 1274L @@ -2304,13 +2279,18 @@ #define SEC_E_NO_AUTHENTICATING_AUTHORITY _HRESULT_TYPEDEF_(0x80090311L) #define SEC_I_CONTINUE_NEEDED _HRESULT_TYPEDEF_(0x00090312L) #define SEC_I_COMPLETE_NEEDED _HRESULT_TYPEDEF_(0x00090313L) -#define SEC_I_COMPLETE_AND_CONTINUE _HRESULT_TYPEDEF_(0x00090314L) +#define SEC_I_COMPLETE_AND_CONTINUE _HRESULT_TYPEDEF_(0x00090314L) +#define SEC_I_LOCAL_LOGON _HRESULT_TYPEDEF_(0x00090315L) #define SEC_E_BAD_PKGID _HRESULT_TYPEDEF_(0x80090316L) #define SEC_E_CONTEXT_EXPIRED _HRESULT_TYPEDEF_(0x80090317L) +#define SEC_I_CONTEXT_EXPIRED _HRESULT_TYPEDEF_(0x00090317L) #define SEC_E_INCOMPLETE_MESSAGE _HRESULT_TYPEDEF_(0x80090318L) #define SEC_E_INCOMPLETE_CREDENTIALS _HRESULT_TYPEDEF_(0x80090320L) +#define SEC_I_INCOMPLETE_CREDENTIALS _HRESULT_TYPEDEF_(0x00090320L) #define SEC_E_BUFFER_TOO_SMALL _HRESULT_TYPEDEF_(0x80090321L) +#define SEC_I_RENEGOTIATE _HRESULT_TYPEDEF_(0x00090321L) #define SEC_E_WRONG_PRINCIPAL _HRESULT_TYPEDEF_(0x80090322L) +#define SEC_I_NO_LSA_CONTEXT _HRESULT_TYPEDEF_(0x00090323L) #define SEC_E_TIME_SKEW _HRESULT_TYPEDEF_(0x80090324L) #define SEC_E_UNTRUSTED_ROOT _HRESULT_TYPEDEF_(0x80090325L) #define SEC_E_ILLEGAL_MESSAGE _HRESULT_TYPEDEF_(0x80090326L)
18 years, 2 months
1
0
0
0
[janderwald] 24602: - implemented ROSBOOT_CHECKPOINT - implemented ROSBOOT_DELAY_READ - dump reached checkpoint in case of bsod / um-exceptions - add error handling - remove hardcoded constants
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Oct 22 15:27:45 2006 New Revision: 24602 URL:
http://svn.reactos.org/svn/reactos?rev=24602&view=rev
Log: - implemented ROSBOOT_CHECKPOINT - implemented ROSBOOT_DELAY_READ - dump reached checkpoint in case of bsod / um-exceptions - add error handling - remove hardcoded constants Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp trunk/reactos/tools/sysreg/rosboot_test.h trunk/reactos/tools/sysreg/sample.cfg Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.cpp (original) +++ trunk/reactos/tools/sysreg/rosboot_test.cpp Sun Oct 22 15:27:45 2006 @@ -53,9 +53,12 @@ string RosBootTest::DEBUG_FILE = _T("ROSBOOT_DEBUG_FILE"); string RosBootTest::TIME_OUT = _T("ROSBOOT_TIME_OUT"); string RosBootTest::PID_FILE= _T("ROSBOOT_PID_FILE"); - -//--------------------------------------------------------------------------------------- - RosBootTest::RosBootTest() : RegressionTest(RosBootTest::CLASS_NAME), m_Timeout(60.0) + string RosBootTest::DELAY_READ = _T("ROSBOOT_DELAY_READ"); + string RosBootTest::CHECK_POINT = _T("ROSBOOT_CHECK_POINT"); + string RosBootTest::SYSREG_CHECKPOINT = _T("SYSREG_CHECKPOINT:"); + +//--------------------------------------------------------------------------------------- + RosBootTest::RosBootTest() : RegressionTest(RosBootTest::CLASS_NAME), m_Timeout(60.0), m_Delayread(0) { } @@ -72,7 +75,12 @@ string boot_cmd; string debug_port; string timeout; + string delayread; bool ret; + + /// + /// read required configuration arguments + /// if (!conf_parser.getStringValue (RosBootTest::DEBUG_PORT, debug_port)) { @@ -96,6 +104,24 @@ } } + if (conf_parser.getStringValue(RosBootTest::DELAY_READ, delayread)) + { + TCHAR * stop; + m_Delayread = _tcstoul(delayread.c_str (), &stop, 10); + if (m_Delayread > 60 || m_Delayread < 0) + { + cerr << "Warning: disabling delay read" << endl; + m_Delayread = 0; + } + } + + + + /// + /// read optional arguments + /// + + conf_parser.getStringValue (RosBootTest::CHECK_POINT, m_Checkpoint); conf_parser.getStringValue (RosBootTest::PID_FILE, m_PidFile); @@ -124,12 +150,27 @@ return ret; } //--------------------------------------------------------------------------------------- - bool RosBootTest::checkDebugData(vector<string> & debug_data) + void RosBootTest::dumpCheckpoints() + { + if (m_Checkpoints.size ()) + { + cerr << "Dumping list of checkpoints: "<< endl; + while(!m_Checkpoints.empty ()) + { + cerr << m_Checkpoints[0] << endl; + m_Checkpoints.erase (m_Checkpoints.begin ()); + + } + } + } +//--------------------------------------------------------------------------------------- + RosBootTest::DebugState RosBootTest::checkDebugData(vector<string> & debug_data) { /// TBD the information needs to be written into an provided log object /// which writes the info into HTML/log / sends etc .... bool clear = true; + DebugState state = DebugStateContinue; for(size_t i = 0; i < debug_data.size();i++) { @@ -137,25 +178,28 @@ cerr << line << endl; - if (line.find (_T("SYSREG_CHECKPOINT")) != string::npos) - { - line.erase (0, line.find (_T("SYSREG_CHECKPOINT")) + 19); - if (!_tcsncmp(line.c_str (), _T("USETUP_COMPLETE"), 15)) - { - /// - /// we need to stop the emulator to avoid - /// looping again into USETUP (at least with bootcdregtest) - - return false; - } - + if (line.find (RosBootTest::SYSREG_CHECKPOINT) != string::npos) + { + line.erase (0, line.find (RosBootTest::SYSREG_CHECKPOINT) + RosBootTest::SYSREG_CHECKPOINT.length ()); + if (!_tcsncmp(line.c_str (), m_Checkpoint.c_str (), m_Checkpoint.length ())) + { + state = DebugStateCPReached; + break; + } + if (line.find (_T("|")) != string::npos) + { + string fline = debug_data[i]; + m_Checkpoints.push_back (fline); + } } if (line.find (_T("*** Fatal System Error")) != string::npos) { cerr << "BSOD detected" <<endl; - return false; + dumpCheckpoints(); + state = DebugStateBSODDetected; + break; } else if (line.find (_T("Unhandled exception")) != string::npos) { @@ -169,6 +213,7 @@ } cerr << "UM detected" <<endl; + state = DebugStateUMEDetected; /// /// extract address from next line @@ -176,15 +221,38 @@ string address = debug_data[i+2]; string::size_type pos = address.find_last_of (_T(" ")); + if (pos == string::npos) + { + cerr << "Error: trace is not available (corrupted debug info" << endl; + dumpCheckpoints(); + break; + } + + address = address.substr (pos, address.length () - 1 - pos); /// /// extract module name /// string modulename = debug_data[i+3]; + pos = modulename.find_last_of (_T("\\")); + if (pos == string::npos) + { + cerr << "Error: trace is not available (corrupted debug info" << endl; + dumpCheckpoints(); + break; + } + modulename = modulename.substr (pos + 1, modulename.length () - pos); pos = modulename.find_last_of (_T(".")); + if (pos == string::npos) + { + cerr << "Error: trace is not available (corrupted debug info" << endl; + dumpCheckpoints(); + break; + } + modulename = modulename.substr (0, pos); /// @@ -201,16 +269,17 @@ /// /// resolve frame addresses - return false; - } - + + + break; + } } if (clear && debug_data.size () > 5) { debug_data.clear (); } - return true; + return state; } //--------------------------------------------------------------------------------------- bool RosBootTest::isTimeout(double max_timeout) @@ -253,6 +322,15 @@ bool ret = true; vector<string> vect; + if (m_Delayread) + { + /// + /// delay reading untill emulator is ready + /// + + _sleep( (clock_t)m_Delayread * CLOCKS_PER_SEC ); + } + while(!pipe_reader.isEof ()) { if (isTimeout(m_Timeout)) @@ -263,10 +341,15 @@ pipe_reader.readPipe (Buffer); vect.push_back (Buffer); - - if (!checkDebugData(vect)) + DebugState state = checkDebugData(vect); + + if (state == DebugStateBSODDetected || state == DebugStateUMEDetected) { ret = false; + break; + } + else if (state == DebugStateCPReached) + { break; } } @@ -285,9 +368,15 @@ cerr << "Error: failed to open pipe with cmd: " << boot_cmd << endl; return false; } - // FIXXME - // give the emulator some time to load freeloadr - _sleep( (clock_t)4 * CLOCKS_PER_SEC ); + + if (m_Delayread) + { + /// + /// delay reading untill emulator is ready + /// + + _sleep( (clock_t)m_Delayread * CLOCKS_PER_SEC ); + } int pid = 0; @@ -343,11 +432,18 @@ vect.push_back (line); } - if (!checkDebugData(vect)) + DebugState state = checkDebugData(vect); + + if (state == DebugStateBSODDetected || state == DebugStateUMEDetected) { ret = false; break; } + else if (state == DebugStateCPReached) + { + break; + } + if (isTimeout(m_Timeout)) { break; Modified: trunk/reactos/tools/sysreg/rosboot_test.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.h (original) +++ trunk/reactos/tools/sysreg/rosboot_test.h Sun Oct 22 15:27:45 2006 @@ -34,6 +34,9 @@ static string DEBUG_FILE; static string TIME_OUT; static string PID_FILE; + static string CHECK_POINT; + static string SYSREG_CHECKPOINT; + static string DELAY_READ; //--------------------------------------------------------------------------------------- /// @@ -95,6 +98,22 @@ //--------------------------------------------------------------------------------------- /// +/// dumpCheckpoints +/// +/// Description: prints a list of all reached checkpoints so far + + void dumpCheckpoints(); + +typedef enum DebugState +{ + DebugStateContinue = 1, /* continue debugging */ + DebugStateBSODDetected, /* bsod detected */ + DebugStateUMEDetected, /* user-mode exception detected */ + DebugStateCPReached /* check-point reached */ +}; + +//--------------------------------------------------------------------------------------- +/// /// checkDebugData /// /// Description: this function parses the given debug data for BSOD, UM exception etc @@ -103,7 +122,7 @@ /// Note: the received debug information should be written to an internal log object /// to facilate post-processing of the results - bool checkDebugData(vector<string> & debug_data); + DebugState checkDebugData(vector<string> & debug_data); //--------------------------------------------------------------------------------------- /// @@ -118,6 +137,9 @@ double m_Timeout; string m_PidFile; + string m_Checkpoint; + vector <string> m_Checkpoints; + unsigned long m_Delayread; }; // end of class RosBootTest Modified: trunk/reactos/tools/sysreg/sample.cfg URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sample.cfg?re…
============================================================================== --- trunk/reactos/tools/sysreg/sample.cfg (original) +++ trunk/reactos/tools/sysreg/sample.cfg Sun Oct 22 15:27:45 2006 @@ -59,6 +59,19 @@ ;ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\bsdebug.log ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\debug.log +; ROSBOOT_DELAY_READ; +; +; When the emulator is started, it spends a little time loading and running through its +; BIOS. This time delays reading from the pipe/file untill the specified value +; +; the value is in seconds +; +; Note: if the value is not provided, then reading debug info is started immediately + +ROSBOOT_DELAY_READ=4 + + + ; ROSBOOT_TIME_OUT ; ; This variable is the maximum runtime of the ROSBOOT_CMD. If the command @@ -68,3 +81,14 @@ ; ROSBOOT_TIME_OUT=180.0 +; ROSBOOT_CHECK_POINT +; +; RosBoot will stop executing when it finds a string in the form +; SYSREG_CHECKPOINT:CP_NAME +; +; CP_NAME is the value of the ROSBOOT_CHECK_POINT variable + +ROSBOOT_CHECKPOINT=USETUP_COMPLETED + + +
18 years, 2 months
1
0
0
0
[greatlrd] 24601: should have read msdn one more time for D3DParseUnknownCommand vaild command return sizeof of the struct * number of struct + 4 bytes, so it point to the end of the buffer.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Oct 22 14:43:36 2006 New Revision: 24601 URL:
http://svn.reactos.org/svn/reactos?rev=24601&view=rev
Log: should have read msdn one more time for D3DParseUnknownCommand vaild command return sizeof of the struct * number of struct + 4 bytes, so it point to the end of the buffer. Modified: trunk/reactos/dll/directx/ddraw/main.c Modified: trunk/reactos/dll/directx/ddraw/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main.c?r…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main.c (original) +++ trunk/reactos/dll/directx/ddraw/main.c Sun Oct 22 14:43:36 2006 @@ -145,36 +145,34 @@ DWORD retCode = D3DERR_COMMAND_UNPARSED; /* prevent it crash if null pointer are being sent */ - if (lpCmd == NULL) || (lpRetCmd == NULL) ) + if ( (lpCmd == NULL) || (lpRetCmd == NULL) ) { return E_FAIL; } *lpRetCmd = lpCmd; + /* check for vaild command, only 3 command is vaild */ if (dp2command->bCommand == D3DDP2OP_VIEWPORTINFO) - { - *(PBYTE)lpRetCmd += ((dp2command->wStateCount * sizeof(D3DHAL_DP2VIEWPORTINFO)) + sizeof(D3DHAL_DP2POINTS)); + { + /* dp2command->wStateCount * sizeof D3DHAL_DP2VIEWPORTINFO + 4 bytes */ + *(PBYTE)lpRetCmd += ((dp2command->wStateCount * sizeof(D3DHAL_DP2VIEWPORTINFO)) + sizeof(ULONG_PTR)); retCode = 0; } else if (dp2command->bCommand == D3DDP2OP_WINFO) - { - *(PBYTE)lpRetCmd += (dp2command->wStateCount * sizeof(D3DHAL_DP2WINFO)) + sizeof(D3DHAL_DP2POINTS); + { + /* dp2command->wStateCount * sizeof D3DHAL_DP2WINFO + 4 bytes */ + *(PBYTE)lpRetCmd += (dp2command->wStateCount * sizeof(D3DHAL_DP2WINFO)) + sizeof(ULONG_PTR); retCode = 0; } else if (dp2command->bCommand == 0x0d) - { - /* math - *lpRetCmd = lpCmd + (wStateCount * sizeof( ? ) + sizeof(D3DHAL_DP2POINTS) - */ - - *(PBYTE)lpRetCmd += ((dp2command->wStateCount * dp2command->bReserved) + sizeof(D3DHAL_DP2POINTS)); + { + /* dp2command->wStateCount * how many wStateCount ? + 4 bytes */ + *(PBYTE)lpRetCmd += ((dp2command->wStateCount * dp2command->bReserved) + sizeof(ULONG_PTR)); retCode = 0; } - - /* error code */ - + /* set error code for command 0 to 3, 8 and 15 to 255 */ else if ( (dp2command->bCommand <= D3DDP2OP_INDEXEDTRIANGLELIST) || // dp2command->bCommand <= with 0 to 3 (dp2command->bCommand == D3DDP2OP_RENDERSTATE) || // dp2command->bCommand == with 8 (dp2command->bCommand >= D3DDP2OP_LINELIST) ) // dp2command->bCommand >= with 15 to 255
18 years, 2 months
1
0
0
0
[greatlrd] 24600: full implement of D3DParseUnknownCommand + 1 undocument command that have been review by D3DParseUnknownCommand_show in rosapps/tests
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Oct 22 14:01:46 2006 New Revision: 24600 URL:
http://svn.reactos.org/svn/reactos?rev=24600&view=rev
Log: full implement of D3DParseUnknownCommand + 1 undocument command that have been review by D3DParseUnknownCommand_show in rosapps/tests Modified: trunk/reactos/dll/directx/ddraw/main.c Modified: trunk/reactos/dll/directx/ddraw/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/main.c?r…
============================================================================== --- trunk/reactos/dll/directx/ddraw/main.c (original) +++ trunk/reactos/dll/directx/ddraw/main.c Sun Oct 22 14:01:46 2006 @@ -137,42 +137,51 @@ HRESULT WINAPI -D3DParseUnknownCommand( LPVOID lpvCommands, - LPVOID *lplpvReturnedCommand) +D3DParseUnknownCommand( LPVOID lpCmd, + LPVOID *lpRetCmd) { - LPD3DHAL_DP2COMMAND cmd = lpvCommands; + LPD3DHAL_DP2COMMAND dp2command = lpCmd; DWORD retCode = D3DERR_COMMAND_UNPARSED; + + /* prevent it crash if null pointer are being sent */ + if (lpCmd == NULL) || (lpRetCmd == NULL) ) + { + return E_FAIL; + } + + *lpRetCmd = lpCmd; + + if (dp2command->bCommand == D3DDP2OP_VIEWPORTINFO) + { + *(PBYTE)lpRetCmd += ((dp2command->wStateCount * sizeof(D3DHAL_DP2VIEWPORTINFO)) + sizeof(D3DHAL_DP2POINTS)); + retCode = 0; + } + else if (dp2command->bCommand == D3DDP2OP_WINFO) + { + *(PBYTE)lpRetCmd += (dp2command->wStateCount * sizeof(D3DHAL_DP2WINFO)) + sizeof(D3DHAL_DP2POINTS); + retCode = 0; + } + else if (dp2command->bCommand == 0x0d) + { + /* math + *lpRetCmd = lpCmd + (wStateCount * sizeof( ? ) + sizeof(D3DHAL_DP2POINTS) + */ - *lplpvReturnedCommand = lpvCommands; - - if (cmd->bCommand > D3DDP2OP_TRIANGLESTRIP) + *(PBYTE)lpRetCmd += ((dp2command->wStateCount * dp2command->bReserved) + sizeof(D3DHAL_DP2POINTS)); + retCode = 0; + } + + + /* error code */ + + else if ( (dp2command->bCommand <= D3DDP2OP_INDEXEDTRIANGLELIST) || // dp2command->bCommand <= with 0 to 3 + (dp2command->bCommand == D3DDP2OP_RENDERSTATE) || // dp2command->bCommand == with 8 + (dp2command->bCommand >= D3DDP2OP_LINELIST) ) // dp2command->bCommand >= with 15 to 255 { - retCode = DD_FALSE; - - if (cmd->bCommand == D3DDP2OP_VIEWPORTINFO) - { - /* FIXME */ - retCode = DD_OK; - } - - if (cmd->bCommand == D3DDP2OP_WINFO) - { - /* FIXME */ - retCode = DD_OK; - } + retCode = E_FAIL; } - else if (cmd->bCommand == D3DDP2OP_TRIANGLESTRIP) - { - /* FIXME */ - retCode = DD_OK; - } - - if ((cmd->bCommand <= D3DDP2OP_INDEXEDTRIANGLELIST) || (cmd->bCommand == D3DDP2OP_RENDERSTATE)) - { - retCode = DD_FALSE; - } - + return retCode; }
18 years, 2 months
1
0
0
0
[weiden] 24599: - Change RtlMoveMemory to RtlCopyMemory where memory regions are never overlapping - Re-Secure a few Nt stubs by adding SEH/Probing where neccessary
by weiden@svn.reactos.org
Author: weiden Date: Sun Oct 22 13:06:58 2006 New Revision: 24599 URL:
http://svn.reactos.org/svn/reactos?rev=24599&view=rev
Log: - Change RtlMoveMemory to RtlCopyMemory where memory regions are never overlapping - Re-Secure a few Nt stubs by adding SEH/Probing where neccessary Modified: trunk/reactos/ntoskrnl/dbgk/debug.c trunk/reactos/ntoskrnl/ex/atom.c trunk/reactos/ntoskrnl/ex/error.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ex/time.c trunk/reactos/ntoskrnl/io/iomgr/arcname.c trunk/reactos/ntoskrnl/io/iomgr/driver.c trunk/reactos/ntoskrnl/io/iomgr/error.c trunk/reactos/ntoskrnl/io/iomgr/file.c trunk/reactos/ntoskrnl/io/iomgr/mdl.c trunk/reactos/ntoskrnl/io/iomgr/rawfs.c trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c trunk/reactos/ntoskrnl/kd/kdio.c trunk/reactos/ntoskrnl/ke/except.c trunk/reactos/ntoskrnl/ke/i386/exp.c trunk/reactos/ntoskrnl/ke/i386/thread.c trunk/reactos/ntoskrnl/ke/i386/usercall.c trunk/reactos/ntoskrnl/ke/i386/v86vdm.c trunk/reactos/ntoskrnl/ob/obdir.c trunk/reactos/ntoskrnl/ob/oblife.c trunk/reactos/ntoskrnl/ob/obname.c trunk/reactos/ntoskrnl/ob/obsecure.c trunk/reactos/ntoskrnl/ob/symlink.c trunk/reactos/ntoskrnl/ps/query.c trunk/reactos/ntoskrnl/se/audit.c trunk/reactos/ntoskrnl/vdm/vdmexec.c Modified: trunk/reactos/ntoskrnl/dbgk/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/dbgk/debug.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/dbgk/debug.c (original) +++ trunk/reactos/ntoskrnl/dbgk/debug.c Sun Oct 22 13:06:58 2006 @@ -131,7 +131,7 @@ KeInitializeEvent(&DebugEvent->ContinueEvent, SynchronizationEvent, FALSE); DebugEvent->Process = Process; DebugEvent->Thread = Thread; - RtlMoveMemory(&DebugEvent->ApiMsg, Message, sizeof(DBGKM_MSG)); + RtlCopyMemory(&DebugEvent->ApiMsg, Message, sizeof(DBGKM_MSG)); DebugEvent->ClientId = Thread->Cid; /* Check if we have a port object */ @@ -190,7 +190,7 @@ NULL); /* Copy API Message back */ - RtlMoveMemory(Message, &DebugEvent->ApiMsg, sizeof(DBGKM_MSG)); + RtlCopyMemory(Message, &DebugEvent->ApiMsg, sizeof(DBGKM_MSG)); /* Set return status */ Status = DebugEvent->Status; @@ -246,7 +246,7 @@ ZwFlushInstructionCache(NtCurrentProcess(), NULL, 0); /* Copy the buffer back */ - if (NT_SUCCESS(Status)) RtlMoveMemory(Message, Buffer, sizeof(DBGKM_MSG)); + if (NT_SUCCESS(Status)) RtlCopyMemory(Message, Buffer, sizeof(DBGKM_MSG)); /* Resume the process if it was suspended */ if (SuspendProcess) DbgkpResumeProcess(); @@ -1499,7 +1499,7 @@ _SEH_TRY { /* Return our wait state change structure */ - RtlMoveMemory(StateChange, + RtlCopyMemory(StateChange, &WaitStateChange, sizeof(DBGUI_WAIT_STATE_CHANGE)); } Modified: trunk/reactos/ntoskrnl/ex/atom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/atom.c?rev=245…
============================================================================== --- trunk/reactos/ntoskrnl/ex/atom.c (original) +++ trunk/reactos/ntoskrnl/ex/atom.c Sun Oct 22 13:06:58 2006 @@ -134,7 +134,7 @@ else { /* Copy the name and null-terminate it */ - RtlMoveMemory(CapturedName, AtomName, AtomNameLength); + RtlCopyMemory(CapturedName, AtomName, AtomNameLength); CapturedName[AtomNameLength / sizeof(WCHAR)] = UNICODE_NULL; } @@ -288,7 +288,7 @@ else { /* Copy the name and null-terminate it */ - RtlMoveMemory(CapturedName, AtomName, AtomNameLength); + RtlCopyMemory(CapturedName, AtomName, AtomNameLength); CapturedName[AtomNameLength / sizeof(WCHAR)] = UNICODE_NULL; } Modified: trunk/reactos/ntoskrnl/ex/error.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/error.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/ex/error.c (original) +++ trunk/reactos/ntoskrnl/ex/error.c Sun Oct 22 13:06:58 2006 @@ -281,7 +281,7 @@ TAG_ERR); /* Copy them */ - RtlMoveMemory(SafeParams, Parameters, ParamSize); + RtlCopyMemory(SafeParams, Parameters, ParamSize); /* Nowo check if there's strings in it */ if (UnicodeStringParameterMask) @@ -298,7 +298,7 @@ sizeof(ULONG_PTR)); /* Capture it */ - RtlMoveMemory(&SafeString, + RtlCopyMemory(&SafeString, (PVOID)SafeParams[i], sizeof(UNICODE_STRING)); Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=245…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c (original) +++ trunk/reactos/ntoskrnl/ex/init.c Sun Oct 22 13:06:58 2006 @@ -206,7 +206,7 @@ if (!ExpNlsTableBase) KeBugCheck(PHASE0_INITIALIZATION_FAILED); /* Copy the codepage data in its new location. */ - RtlMoveMemory(ExpNlsTableBase, + RtlCopyMemory(ExpNlsTableBase, LoaderBlock->NlsData->AnsiCodePageData, ExpNlsTableSize); @@ -264,7 +264,7 @@ } /* Copy the codepage data in its new location. */ - RtlMoveMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize); + RtlCopyMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize); /* Free the previously allocated buffer and set the new location */ ExFreePool(ExpNlsTableBase); @@ -301,7 +301,7 @@ } /* Copy the table into the system process and set this as the base */ - RtlMoveMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize); + RtlCopyMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize); ExpNlsTableBase = SectionBase; } Modified: trunk/reactos/ntoskrnl/ex/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/time.c?rev=245…
============================================================================== --- trunk/reactos/ntoskrnl/ex/time.c (original) +++ trunk/reactos/ntoskrnl/ex/time.c Sun Oct 22 13:06:58 2006 @@ -106,7 +106,7 @@ ExpTimeZoneId = TIME_ZONE_ID_STANDARD; /* Copy the timezone information */ - RtlMoveMemory(&ExpTimeZoneInfo, + RtlCopyMemory(&ExpTimeZoneInfo, TimeZoneInformation, sizeof(TIME_ZONE_INFORMATION)); Modified: trunk/reactos/ntoskrnl/io/iomgr/arcname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/arcname.…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/arcname.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/arcname.c Sun Oct 22 13:06:58 2006 @@ -403,7 +403,7 @@ if (IoLoaderArcBootDeviceName) { /* Copy the name */ - RtlMoveMemory(IoLoaderArcBootDeviceName, + RtlCopyMemory(IoLoaderArcBootDeviceName, LoaderBlock->ArcBootDeviceName, Length); } Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/driver.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/driver.c Sun Oct 22 13:06:58 2006 @@ -1325,7 +1325,7 @@ /* Fill out the key data and copy the buffer */ ServiceKeyName.Length = LocalDriverName.Length; ServiceKeyName.MaximumLength = LocalDriverName.MaximumLength; - RtlMoveMemory(ServiceKeyName.Buffer, + RtlCopyMemory(ServiceKeyName.Buffer, LocalDriverName.Buffer, LocalDriverName.Length); @@ -1334,7 +1334,7 @@ DriverObject->DriverExtension->ServiceKeyName = ServiceKeyName; /* Also store it in the Driver Object. This is a bit of a hack. */ - RtlMoveMemory(&DriverObject->DriverName, + RtlCopyMemory(&DriverObject->DriverName, &ServiceKeyName, sizeof(UNICODE_STRING)); Modified: trunk/reactos/ntoskrnl/io/iomgr/error.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/error.c?…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/error.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/error.c Sun Oct 22 13:06:58 2006 @@ -192,7 +192,7 @@ LogEntry->Size; /* Copy the packet */ - RtlMoveMemory(&ErrorMessage->EntryData, + RtlCopyMemory(&ErrorMessage->EntryData, Packet, LogEntry->Size - sizeof(ERROR_LOG_ENTRY)); @@ -290,7 +290,7 @@ */ DriverNameLength = min(DriverNameLength, RemainingLength - 3 * sizeof(UNICODE_NULL)); - RtlMoveMemory(StringBuffer, p, DriverNameLength); + RtlCopyMemory(StringBuffer, p, DriverNameLength); } /* Null-terminate the driver name */ @@ -358,7 +358,7 @@ */ DeviceNameLength = min(ObjectNameInfo->Name.Length, RemainingLength - 2 * sizeof(UNICODE_NULL)); - RtlMoveMemory(StringBuffer, + RtlCopyMemory(StringBuffer, ObjectNameInfo->Name.Buffer, DeviceNameLength); @@ -391,7 +391,7 @@ } /* Now copy the extra strings */ - RtlMoveMemory(StringBuffer, + RtlCopyMemory(StringBuffer, (PCHAR)Packet + Packet->StringOffset, ExtraStringLength); Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/file.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/file.c Sun Oct 22 13:06:58 2006 @@ -991,7 +991,7 @@ LocalFileInfo->FileNameLength; /* Write the Name and null-terminate it */ - RtlMoveMemory(p, LocalFileInfo->FileName, FileLength); + RtlCopyMemory(p, LocalFileInfo->FileName, FileLength); p += (FileLength / sizeof(WCHAR)); *p = UNICODE_NULL; LocalReturnLength += sizeof(UNICODE_NULL); @@ -1185,7 +1185,7 @@ _SEH_TRY { /* Copy the buffer back */ - RtlMoveMemory(FileInformation, + RtlCopyMemory(FileInformation, &NetworkOpenInfo, FileInformationSize); } Modified: trunk/reactos/ntoskrnl/io/iomgr/mdl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/mdl.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/mdl.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/mdl.c Sun Oct 22 13:06:58 2006 @@ -131,7 +131,7 @@ Offset = ((ULONG_PTR)TargetMdl->StartVa - (ULONG_PTR)SourceMdl->StartVa) >> PAGE_SHIFT; SourcePages += Offset; - RtlMoveMemory(TargetPages, SourcePages, Length * sizeof(PFN_TYPE)); + RtlCopyMemory(TargetPages, SourcePages, Length * sizeof(PFN_TYPE)); } /* Modified: trunk/reactos/ntoskrnl/io/iomgr/rawfs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/rawfs.c?…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/rawfs.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/rawfs.c Sun Oct 22 13:06:58 2006 @@ -780,20 +780,20 @@ IN PFILE_FS_ATTRIBUTE_INFORMATION Buffer, IN OUT PULONG Length) { + const WCHAR szRawFSName[] = L"RAW"; ULONG ReturnLength; PAGED_CODE(); /* Check if the buffer is large enough for our name ("RAW") */ ReturnLength = FIELD_OFFSET(FILE_FS_ATTRIBUTE_INFORMATION, - FileSystemName[0]); - ReturnLength += sizeof(L"RAW"); + FileSystemName[sizeof(szRawFSName) / sizeof(szRawFSName[0])]); if (*Length < ReturnLength) return STATUS_BUFFER_OVERFLOW; /* Output the data */ Buffer->FileSystemAttributes = 0; Buffer->MaximumComponentNameLength = 0; Buffer->FileSystemNameLength = 6; - RtlMoveMemory(&Buffer->FileSystemName[0], L"RAW", 6); + RtlCopyMemory(&Buffer->FileSystemName[0], szRawFSName, sizeof(szRawFSName)); /* Return length and success */ *Length -= ReturnLength; Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Sun Oct 22 13:06:58 2006 @@ -932,7 +932,7 @@ if (Stack) { - RtlMoveMemory(&IrpSp->Parameters, + RtlCopyMemory(&IrpSp->Parameters, &Stack->Parameters, sizeof(Stack->Parameters)); } Modified: trunk/reactos/ntoskrnl/kd/kdio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd/kdio.c?rev=245…
============================================================================== --- trunk/reactos/ntoskrnl/kd/kdio.c (original) +++ trunk/reactos/ntoskrnl/kd/kdio.c Sun Oct 22 13:06:58 2006 @@ -64,7 +64,7 @@ if ((CurrentPosition + StringLength) > BufferSize) return; /* Add the string to the buffer */ - RtlMoveMemory(&DebugBuffer[CurrentPosition], String, StringLength); + RtlCopyMemory(&DebugBuffer[CurrentPosition], String, StringLength); /* Update the Current Position */ CurrentPosition += StringLength; Modified: trunk/reactos/ntoskrnl/ke/except.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/except.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ke/except.c (original) +++ trunk/reactos/ntoskrnl/ke/except.c Sun Oct 22 13:06:58 2006 @@ -24,7 +24,7 @@ /* We'll have to make a copy and probe it */ ProbeForRead(Context, sizeof(CONTEXT), sizeof(ULONG)); - RtlMoveMemory(&LocalContext, Context, sizeof(CONTEXT)); + RtlCopyMemory(&LocalContext, Context, sizeof(CONTEXT)); Context = &LocalContext; /* Convert the context into Exception/Trap Frames */ @@ -128,8 +128,8 @@ ProbeForRead(ExceptionRecord, Size, sizeof(ULONG)); /* Now make copies in the stack */ - RtlMoveMemory(&LocalContext, Context, sizeof(CONTEXT)); - RtlMoveMemory(&LocalExceptionRecord, ExceptionRecord, Size); + RtlCopyMemory(&LocalContext, Context, sizeof(CONTEXT)); + RtlCopyMemory(&LocalExceptionRecord, ExceptionRecord, Size); Context = &LocalContext; ExceptionRecord = &LocalExceptionRecord; Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/exp.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/exp.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c Sun Oct 22 13:06:58 2006 @@ -26,7 +26,7 @@ _SEH_ACCESS_LOCALS(KiCopyInfo); /* Copy the exception records and return to the handler */ - RtlMoveMemory((PVOID)&_SEH_VAR(SehExceptRecord), + RtlCopyMemory((PVOID)&_SEH_VAR(SehExceptRecord), _SEH_GetExceptionPointers()->ExceptionRecord, sizeof(EXCEPTION_RECORD)); return EXCEPTION_EXECUTE_HANDLER; @@ -776,7 +776,7 @@ /* Copy the exception address and record */ _SEH_VAR(SehExceptRecord).ExceptionAddress = ExceptionRecord->ExceptionAddress; - RtlMoveMemory(ExceptionRecord, + RtlCopyMemory(ExceptionRecord, (PVOID)&_SEH_VAR(SehExceptRecord), sizeof(EXCEPTION_RECORD)); Modified: trunk/reactos/ntoskrnl/ke/i386/thread.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/thread.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/thread.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/thread.c Sun Oct 22 13:06:58 2006 @@ -88,7 +88,7 @@ DPRINT("Setting up a user-mode thread. InitFrame at: %p\n", InitFrame); /* Copy over the context we got */ - RtlMoveMemory(&LocalContext, ContextPointer, sizeof(CONTEXT)); + RtlCopyMemory(&LocalContext, ContextPointer, sizeof(CONTEXT)); Context = &LocalContext; ContextFlags = CONTEXT_CONTROL; Modified: trunk/reactos/ntoskrnl/ke/i386/usercall.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/usercall.…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/usercall.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/usercall.c Sun Oct 22 13:06:58 2006 @@ -24,7 +24,7 @@ _SEH_ACCESS_LOCALS(KiCopyInfo); /* Copy the exception records and return to the handler */ - RtlMoveMemory((PVOID)&_SEH_VAR(SehExceptRecord), + RtlCopyMemory((PVOID)&_SEH_VAR(SehExceptRecord), _SEH_GetExceptionPointers()->ExceptionRecord, sizeof(EXCEPTION_RECORD)); return EXCEPTION_EXECUTE_HANDLER; @@ -93,7 +93,7 @@ ASSERT(!(Stack & 3)); /* Copy data into it */ - RtlMoveMemory((PVOID)(Stack + (4 * sizeof(ULONG_PTR))), + RtlCopyMemory((PVOID)(Stack + (4 * sizeof(ULONG_PTR))), &Context, sizeof(CONTEXT)); Modified: trunk/reactos/ntoskrnl/ke/i386/v86vdm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/v86vdm.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/v86vdm.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/v86vdm.c Sun Oct 22 13:06:58 2006 @@ -60,7 +60,7 @@ *VdmState = 0; /* Copy the context */ - RtlMoveMemory(&VdmTib->VdmContext, Context, ContextSize); + RtlCopyMemory(&VdmTib->VdmContext, Context, ContextSize); VdmTib->VdmContext.SegCs = (ULONG_PTR)Trampoline >> 4; VdmTib->VdmContext.SegSs = (ULONG_PTR)Trampoline >> 4; VdmTib->VdmContext.Eip = 0; @@ -88,7 +88,7 @@ /* Make sure there's space for two IOPMs, then copy & clear the current */ //ASSERT(((PKGDTENTRY)&KeGetPcr()->GDT[KGDT_TSS / 8])->LimitLow >= // (0x2000 + IOPM_OFFSET - 1)); - RtlMoveMemory(Ki386IopmSaveArea, &Tss->IoMaps[0].IoMap, PAGE_SIZE * 2); + RtlCopyMemory(Ki386IopmSaveArea, &Tss->IoMaps[0].IoMap, PAGE_SIZE * 2); RtlZeroMemory(&Tss->IoMaps[0].IoMap, PAGE_SIZE * 2); /* Save the old offset and base, and set the new ones */ @@ -101,7 +101,7 @@ Ki386SetupAndExitToV86Mode(VdmTeb); /* Restore IOPM */ - RtlMoveMemory(&Tss->IoMaps[0].IoMap, Ki386IopmSaveArea, PAGE_SIZE * 2); + RtlCopyMemory(&Tss->IoMaps[0].IoMap, Ki386IopmSaveArea, PAGE_SIZE * 2); Process->IopmOffset = OldOffset; Tss->IoMapBase = OldBase; @@ -109,7 +109,7 @@ KeRevertToUserAffinityThread(); /* Restore context */ - RtlMoveMemory(Context, &VdmTib->VdmContext, ContextSize); + RtlCopyMemory(Context, &VdmTib->VdmContext, ContextSize); Context->ContextFlags = CONTEXT_FULL; /* Free VDM objects */ Modified: trunk/reactos/ntoskrnl/ob/obdir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obdir.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obdir.c (original) +++ trunk/reactos/ntoskrnl/ob/obdir.c Sun Oct 22 13:06:58 2006 @@ -343,7 +343,7 @@ /* Write back the handle to the caller */ *DirectoryHandle = hDirectory; } - _SEH_HANDLE + _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) { /* Get the exception code */ Status = _SEH_GetExceptionCode(); @@ -585,7 +585,7 @@ while (Count--) { /* Copy the name buffer */ - RtlMoveMemory(p, + RtlCopyMemory(p, DirectoryInfo->Name.Buffer, DirectoryInfo->Name.Length); @@ -599,7 +599,7 @@ *p++ = UNICODE_NULL; /* Now copy the type name buffer */ - RtlMoveMemory(p, + RtlCopyMemory(p, DirectoryInfo->TypeName.Buffer, DirectoryInfo->TypeName.Length); @@ -620,14 +620,22 @@ *Context = CurrentEntry; } - /* Copy the buffer */ - RtlMoveMemory(Buffer, - LocalBuffer, - (TotalLength <= BufferLength) ? - TotalLength : BufferLength); - - /* Check if the caller requested the return length and return it*/ - if (ReturnLength) *ReturnLength = TotalLength; + _SEH_TRY + { + /* Copy the buffer */ + RtlCopyMemory(Buffer, + LocalBuffer, + (TotalLength <= BufferLength) ? + TotalLength : BufferLength); + + /* Check if the caller requested the return length and return it*/ + if (ReturnLength) *ReturnLength = TotalLength; + } + _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; /* Dereference the directory and free our buffer */ ObDereferenceObject(Directory); @@ -718,7 +726,7 @@ /* Return the handle back to the caller */ *DirectoryHandle = hDirectory; } - _SEH_HANDLE + _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) { /* Get the exception code */ Status = _SEH_GetExceptionCode(); Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c Sun Oct 22 13:06:58 2006 @@ -1251,143 +1251,142 @@ ObjectHeader = OBJECT_TO_OBJECT_HEADER(Object); } - /* Check the information class */ - switch (ObjectInformationClass) - { - /* Basic info */ - case ObjectBasicInformation: - - /* Validate length */ - InfoLength = sizeof(OBJECT_BASIC_INFORMATION); - if (Length != sizeof(OBJECT_BASIC_INFORMATION)) - { - /* Fail */ - Status = STATUS_INFO_LENGTH_MISMATCH; + _SEH_TRY + { + /* Check the information class */ + switch (ObjectInformationClass) + { + /* Basic info */ + case ObjectBasicInformation: + + /* Validate length */ + InfoLength = sizeof(OBJECT_BASIC_INFORMATION); + if (Length != sizeof(OBJECT_BASIC_INFORMATION)) + { + /* Fail */ + Status = STATUS_INFO_LENGTH_MISMATCH; + break; + } + + /* Fill out the basic information */ + BasicInfo = (POBJECT_BASIC_INFORMATION)ObjectInformation; + BasicInfo->Attributes = HandleInfo.HandleAttributes; + BasicInfo->GrantedAccess = HandleInfo.GrantedAccess; + BasicInfo->HandleCount = ObjectHeader->HandleCount; + BasicInfo->PointerCount = ObjectHeader->PointerCount; + + /* Permanent/Exclusive Flags are NOT in Handle attributes! */ + if (ObjectHeader->Flags & OB_FLAG_EXCLUSIVE) + { + /* Set the flag */ + BasicInfo->Attributes |= OBJ_EXCLUSIVE; + } + if (ObjectHeader->Flags & OB_FLAG_PERMANENT) + { + /* Set the flag */ + BasicInfo->Attributes |= OBJ_PERMANENT; + } + + /* Copy quota information */ + BasicInfo->PagedPoolUsage = 0; /* FIXME*/ + BasicInfo->NonPagedPoolUsage = 0; /* FIXME*/ + + /* Copy name information */ + BasicInfo->NameInformationLength = 0; /* FIXME*/ + BasicInfo->TypeInformationLength = 0; /* FIXME*/ + + /* Copy security information */ + BasicInfo->SecurityDescriptorLength = 0; /* FIXME*/ + + /* Check if this is a symlink */ + if (ObjectHeader->Type == ObSymbolicLinkType) + { + /* Return the creation time */ + BasicInfo->CreateTime.QuadPart = + ((POBJECT_SYMBOLIC_LINK)Object)->CreationTime.QuadPart; + } + else + { + /* Otherwise return 0 */ + BasicInfo->CreateTime.QuadPart = (ULONGLONG)0; + } + + /* Break out with success */ + Status = STATUS_SUCCESS; break; - } - - /* Fill out the basic information */ - BasicInfo = (POBJECT_BASIC_INFORMATION)ObjectInformation; - BasicInfo->Attributes = HandleInfo.HandleAttributes; - BasicInfo->GrantedAccess = HandleInfo.GrantedAccess; - BasicInfo->HandleCount = ObjectHeader->HandleCount; - BasicInfo->PointerCount = ObjectHeader->PointerCount; - - /* Permanent/Exclusive Flags are NOT in Handle attributes! */ - if (ObjectHeader->Flags & OB_FLAG_EXCLUSIVE) - { - /* Set the flag */ - BasicInfo->Attributes |= OBJ_EXCLUSIVE; - } - if (ObjectHeader->Flags & OB_FLAG_PERMANENT) - { - /* Set the flag */ - BasicInfo->Attributes |= OBJ_PERMANENT; - } - - /* Copy quota information */ - BasicInfo->PagedPoolUsage = 0; /* FIXME*/ - BasicInfo->NonPagedPoolUsage = 0; /* FIXME*/ - - /* Copy name information */ - BasicInfo->NameInformationLength = 0; /* FIXME*/ - BasicInfo->TypeInformationLength = 0; /* FIXME*/ - - /* Copy security information */ - BasicInfo->SecurityDescriptorLength = 0; /* FIXME*/ - - /* Check if this is a symlink */ - if (ObjectHeader->Type == ObSymbolicLinkType) - { - /* Return the creation time */ - BasicInfo->CreateTime.QuadPart = - ((POBJECT_SYMBOLIC_LINK)Object)->CreationTime.QuadPart; - } - else - { - /* Otherwise return 0 */ - BasicInfo->CreateTime.QuadPart = (ULONGLONG)0; - } - - /* Break out with success */ - Status = STATUS_SUCCESS; - break; - - /* Name information */ - case ObjectNameInformation: - - /* Call the helper and break out */ - Status = ObQueryNameString(Object, - (POBJECT_NAME_INFORMATION) - ObjectInformation, - Length, - &InfoLength); - break; - - /* Information about this type */ - case ObjectTypeInformation: - DPRINT1("NOT IMPLEMENTED!\n"); - Status = STATUS_NOT_IMPLEMENTED; - break; - - /* Information about all types */ - case ObjectAllTypesInformation: - DPRINT1("NOT IMPLEMENTED!\n"); - Status = STATUS_NOT_IMPLEMENTED; - break; - - /* Information about the handle flags */ - case ObjectHandleInformation: - - /* Validate length */ - InfoLength = sizeof (OBJECT_HANDLE_ATTRIBUTE_INFORMATION); - if (Length != sizeof (OBJECT_HANDLE_ATTRIBUTE_INFORMATION)) - { - Status = STATUS_INFO_LENGTH_MISMATCH; + + /* Name information */ + case ObjectNameInformation: + + /* Call the helper and break out */ + Status = ObQueryNameString(Object, + (POBJECT_NAME_INFORMATION) + ObjectInformation, + Length, + &InfoLength); break; - } - - /* Get the structure */ - HandleFlags = (POBJECT_HANDLE_ATTRIBUTE_INFORMATION) - ObjectInformation; - - /* Set the flags */ - HandleFlags->Inherit = (HandleInfo.HandleAttributes & - EX_HANDLE_ENTRY_INHERITABLE) != 0; - HandleFlags->ProtectFromClose = (HandleInfo.HandleAttributes & - EX_HANDLE_ENTRY_PROTECTFROMCLOSE) != 0; - - /* Break out with success */ - Status = STATUS_SUCCESS; - break; - - /* Anything else */ - default: - - /* Fail it */ - Status = STATUS_INVALID_INFO_CLASS; - break; - } + + /* Information about this type */ + case ObjectTypeInformation: + DPRINT1("NOT IMPLEMENTED!\n"); + Status = STATUS_NOT_IMPLEMENTED; + break; + + /* Information about all types */ + case ObjectAllTypesInformation: + DPRINT1("NOT IMPLEMENTED!\n"); + Status = STATUS_NOT_IMPLEMENTED; + break; + + /* Information about the handle flags */ + case ObjectHandleInformation: + + /* Validate length */ + InfoLength = sizeof (OBJECT_HANDLE_ATTRIBUTE_INFORMATION); + if (Length != sizeof (OBJECT_HANDLE_ATTRIBUTE_INFORMATION)) + { + Status = STATUS_INFO_LENGTH_MISMATCH; + break; + } + + /* Get the structure */ + HandleFlags = (POBJECT_HANDLE_ATTRIBUTE_INFORMATION) + ObjectInformation; + + /* Set the flags */ + HandleFlags->Inherit = (HandleInfo.HandleAttributes & + EX_HANDLE_ENTRY_INHERITABLE) != 0; + HandleFlags->ProtectFromClose = (HandleInfo.HandleAttributes & + EX_HANDLE_ENTRY_PROTECTFROMCLOSE) != 0; + + /* Break out with success */ + Status = STATUS_SUCCESS; + break; + + /* Anything else */ + default: + + /* Fail it */ + Status = STATUS_INVALID_INFO_CLASS; + break; + } + + /* Check if the caller wanted the return length */ + if (ResultLength) + { + /* Write the length */ + *ResultLength = Length; + } + } + _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) + { + /* Otherwise, get the exception code */ + Status = _SEH_GetExceptionCode(); + } + _SEH_END; /* Dereference the object if we had referenced it */ if (Object) ObDereferenceObject (Object); - - /* Check if the caller wanted the return length */ - if (ResultLength) - { - /* Protect the write to user mode */ - _SEH_TRY - { - /* Write the length */ - *ResultLength = Length; - } - _SEH_HANDLE - { - /* Otherwise, get the exception code */ - Status = _SEH_GetExceptionCode(); - } - _SEH_END; - } /* Return status */ return Status; @@ -1446,8 +1445,28 @@ /* Save the previous mode and actual information */ Context.PreviousMode = ExGetPreviousMode(); - Context.Information = *(POBJECT_HANDLE_ATTRIBUTE_INFORMATION) - ObjectInformation; + + if (Context.PreviousMode != KernelMode) + { + _SEH_TRY + { + ProbeForRead(ObjectInformation, + sizeof(OBJECT_HANDLE_ATTRIBUTE_INFORMATION), + sizeof(ULONG)); + Context.Information = *(POBJECT_HANDLE_ATTRIBUTE_INFORMATION) + ObjectInformation; + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; + + if (!NT_SUCCESS(Status)) return Status; + } + else + Context.Information = *(POBJECT_HANDLE_ATTRIBUTE_INFORMATION) + ObjectInformation; /* Check if this is a kernel handle */ if (ObIsKernelHandle(ObjectHandle, Context.PreviousMode)) Modified: trunk/reactos/ntoskrnl/ob/obname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obname.c (original) +++ trunk/reactos/ntoskrnl/ob/obname.c Sun Oct 22 13:06:58 2006 @@ -500,7 +500,7 @@ ObjectNameInfo = OBJECT_HEADER_TO_NAME_INFO(CurrentHeader); /* Copy the Name */ - RtlMoveMemory(NewName, PartName.Buffer, PartName.MaximumLength); + RtlCopyMemory(NewName, PartName.Buffer, PartName.MaximumLength); /* Free old name */ if (ObjectNameInfo->Name.Buffer) ExFreePool(ObjectNameInfo->Name.Buffer); @@ -792,7 +792,7 @@ /* Start by adding the Object's Name */ ObjectName = (PWCH)((ULONG_PTR)ObjectName - LocalInfo->Name.Length); - RtlMoveMemory(ObjectName, + RtlCopyMemory(ObjectName, LocalInfo->Name.Buffer, LocalInfo->Name.Length); @@ -813,7 +813,7 @@ /* Add the name */ ObjectName = (PWCH)((ULONG_PTR)ObjectName - LocalInfo->Name.Length); - RtlMoveMemory(ObjectName, + RtlCopyMemory(ObjectName, LocalInfo->Name.Buffer, LocalInfo->Name.Length); @@ -859,7 +859,7 @@ /* Make a copy */ DeviceMapInfo->Query.DriveMap = ObSystemDeviceMap->DriveMap; - RtlMoveMemory(DeviceMapInfo->Query.DriveType, + RtlCopyMemory(DeviceMapInfo->Query.DriveType, ObSystemDeviceMap->DriveType, sizeof(ObSystemDeviceMap->DriveType)); Modified: trunk/reactos/ntoskrnl/ob/obsecure.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obsecure.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obsecure.c (original) +++ trunk/reactos/ntoskrnl/ob/obsecure.c Sun Oct 22 13:06:58 2006 @@ -620,7 +620,7 @@ InputSecurityDescriptor); SdCopy = ExAllocatePool(PagedPool, sizeof(*SdCopy)); - RtlMoveMemory(SdCopy, InputSecurityDescriptor, sizeof(*SdCopy)); + RtlCopyMemory(SdCopy, InputSecurityDescriptor, sizeof(*SdCopy)); *OutputSecurityDescriptor = SdCopy; return STATUS_SUCCESS; } Modified: trunk/reactos/ntoskrnl/ob/symlink.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/symlink.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ob/symlink.c (original) +++ trunk/reactos/ntoskrnl/ob/symlink.c Sun Oct 22 13:06:58 2006 @@ -152,13 +152,13 @@ if (RemainingName->Length) { /* Copy the new path */ - RtlMoveMemory((PVOID)((ULONG_PTR)NewTargetPath + TargetPath->Length), + RtlCopyMemory((PVOID)((ULONG_PTR)NewTargetPath + TargetPath->Length), RemainingName->Buffer, RemainingName->Length); } /* Copy the target path and null-terminate it */ - RtlMoveMemory(NewTargetPath, TargetPath->Buffer, TargetPath->Length); + RtlCopyMemory(NewTargetPath, TargetPath->Buffer, TargetPath->Length); NewTargetPath[LengthUsed / sizeof(WCHAR)] = UNICODE_NULL; /* If the optimization didn't work, free the old buffer */ @@ -287,7 +287,7 @@ if (!SymbolicLink->LinkTarget.Buffer) return STATUS_NO_MEMORY; /* Copy it */ - RtlMoveMemory(SymbolicLink->LinkTarget.Buffer, + RtlCopyMemory(SymbolicLink->LinkTarget.Buffer, CapturedLinkTarget.Buffer, CapturedLinkTarget.MaximumLength); Modified: trunk/reactos/ntoskrnl/ps/query.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/ps/query.c (original) +++ trunk/reactos/ntoskrnl/ps/query.c Sun Oct 22 13:06:58 2006 @@ -376,7 +376,7 @@ _SEH_TRY { /* Copy it */ - RtlMoveMemory(ProcessInformation, + RtlCopyMemory(ProcessInformation, ImageName, Length); Modified: trunk/reactos/ntoskrnl/se/audit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/audit.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/se/audit.c (original) +++ trunk/reactos/ntoskrnl/se/audit.c Sun Oct 22 13:06:58 2006 @@ -160,7 +160,7 @@ if (ImageName) { /* Make a copy of it */ - RtlMoveMemory(ImageName, + RtlCopyMemory(ImageName, &AuditName->Name, AuditName->Name.MaximumLength + sizeof(UNICODE_STRING)); Modified: trunk/reactos/ntoskrnl/vdm/vdmexec.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/vdm/vdmexec.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/vdm/vdmexec.c (original) +++ trunk/reactos/ntoskrnl/vdm/vdmexec.c Sun Oct 22 13:06:58 2006 @@ -251,7 +251,7 @@ VdmTib->MonitorContext.Eax = STATUS_SUCCESS; /* Make a copy of the monitor context */ - RtlMoveMemory(&Context, &VdmTib->MonitorContext, sizeof(CONTEXT)); + RtlCopyMemory(&Context, &VdmTib->MonitorContext, sizeof(CONTEXT)); /* Switch contexts */ VdmSwapContext(TrapFrame, &VdmTib->VdmContext, &Context);
18 years, 2 months
1
0
0
0
[greatlrd] 24598: correct D3DHAL_DP2OPERATION struct this include file should be rewriten
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Oct 22 12:23:13 2006 New Revision: 24598 URL:
http://svn.reactos.org/svn/reactos?rev=24598&view=rev
Log: correct D3DHAL_DP2OPERATION struct this include file should be rewriten Modified: trunk/reactos/include/ddk/d3dhal.h Modified: trunk/reactos/include/ddk/d3dhal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/d3dhal.h?rev=2…
============================================================================== --- trunk/reactos/include/ddk/d3dhal.h (original) +++ trunk/reactos/include/ddk/d3dhal.h Sun Oct 22 12:23:13 2006 @@ -304,7 +304,6 @@ D3DDP2OP_POINTS = 1, D3DDP2OP_INDEXEDLINELIST = 2, D3DDP2OP_INDEXEDTRIANGLELIST = 3, - D3DDP2OP_RESERVED0 = 4, D3DDP2OP_RENDERSTATE = 8, D3DDP2OP_LINELIST = 15, D3DDP2OP_LINESTRIP = 16, @@ -329,8 +328,7 @@ D3DDP2OP_SETMATERIAL = 33, D3DDP2OP_SETLIGHT = 34, D3DDP2OP_CREATELIGHT = 35, - D3DDP2OP_SETTRANSFORM = 36, - D3DDP2OP_EXT = 37, + D3DDP2OP_SETTRANSFORM = 36, D3DDP2OP_TEXBLT = 38, D3DDP2OP_STATESET = 39, D3DDP2OP_SETPRIORITY = 40, @@ -339,7 +337,58 @@ D3DDP2OP_CLEAR = 42, /* DirectX 7 interfaces */ D3DDP2OP_SETTEXLOD = 43, - D3DPP2OP_SETCLIPPLANE = 44 + D3DPP2OP_SETCLIPPLANE = 44, +#if(DIRECT3D_VERSION >= 0x0800) + D3DDP2OP_CREATEVERTEXSHADER = 45, + D3DDP2OP_DELETEVERTEXSHADER = 46, + D3DDP2OP_SETVERTEXSHADER = 47, + D3DDP2OP_SETVERTEXSHADERCONST = 48, + D3DDP2OP_SETSTREAMSOURCE = 49, + D3DDP2OP_SETSTREAMSOURCEUM = 50, + D3DDP2OP_SETINDICES = 51, + D3DDP2OP_DRAWPRIMITIVE = 52, + D3DDP2OP_DRAWINDEXEDPRIMITIVE = 53, + D3DDP2OP_CREATEPIXELSHADER = 54, + D3DDP2OP_DELETEPIXELSHADER = 55, + D3DDP2OP_SETPIXELSHADER = 56, + D3DDP2OP_SETPIXELSHADERCONST = 57, + D3DDP2OP_CLIPPEDTRIANGLEFAN = 58, + D3DDP2OP_DRAWPRIMITIVE2 = 59, + D3DDP2OP_DRAWINDEXEDPRIMITIVE2= 60, + D3DDP2OP_DRAWRECTPATCH = 61, + D3DDP2OP_DRAWTRIPATCH = 62, + D3DDP2OP_VOLUMEBLT = 63, + D3DDP2OP_BUFFERBLT = 64, + D3DDP2OP_MULTIPLYTRANSFORM = 65, + D3DDP2OP_ADDDIRTYRECT = 66, + D3DDP2OP_ADDDIRTYBOX = 67, +#endif +#if(DIRECT3D_VERSION >= 0x0900) + D3DDP2OP_CREATEVERTEXSHADERDECL = 71, + D3DDP2OP_DELETEVERTEXSHADERDECL = 72, + D3DDP2OP_SETVERTEXSHADERDECL = 73, + D3DDP2OP_CREATEVERTEXSHADERFUNC = 74, + D3DDP2OP_DELETEVERTEXSHADERFUNC = 75, + D3DDP2OP_SETVERTEXSHADERFUNC = 76, + D3DDP2OP_SETVERTEXSHADERCONSTI = 77, + D3DDP2OP_SETSCISSORRECT = 79, + D3DDP2OP_SETSTREAMSOURCE2 = 80, + D3DDP2OP_BLT = 81, + D3DDP2OP_COLORFILL = 82, + D3DDP2OP_SETVERTEXSHADERCONSTB = 83, + D3DDP2OP_CREATEQUERY = 84, + D3DDP2OP_SETRENDERTARGET2 = 85, + D3DDP2OP_SETDEPTHSTENCIL = 86, + D3DDP2OP_RESPONSECONTINUE = 87, + D3DDP2OP_RESPONSEQUERY = 88, + D3DDP2OP_GENERATEMIPSUBLEVELS = 89, + D3DDP2OP_DELETEQUERY = 90, + D3DDP2OP_ISSUEQUERY = 91, + D3DDP2OP_SETPIXELSHADERCONSTI = 93, + D3DDP2OP_SETPIXELSHADERCONSTB = 94, + D3DDP2OP_SETSTREAMSOURCEFREQ = 95, + D3DDP2OP_SURFACEBLT = 96 +#endif } D3DHAL_DP2OPERATION; /* point primitives */
18 years, 2 months
1
0
0
0
[arty] 24597: Build an entirely new page table.
by arty@svn.reactos.org
Author: arty Date: Sun Oct 22 11:24:21 2006 New Revision: 24597 URL:
http://svn.reactos.org/svn/reactos?rev=24597&view=rev
Log: Build an entirely new page table. Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c branches/powerpc/reactos/boot/freeldr/freeldr/include/mmu.h Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c Sun Oct 22 11:24:21 2006 @@ -139,44 +139,92 @@ } } +typedef struct _DIRECTORY_ENTRY { + ULONG Virt, Phys; +} DIRECTORY_ENTRY; + +typedef struct _DIRECTORY_HEADER { + UINT NumberOfPages; + UINT DirectoryPage, UsedSpace; + DIRECTORY_ENTRY *Directory[1]; +} DIRECTORY_HEADER; + +DIRECTORY_ENTRY * +GetPageMapping( DIRECTORY_HEADER *TranslationMap, ULONG Number ) { + if( Number >= (ULONG)TranslationMap->NumberOfPages ) return 0; + else { + int EntriesPerPage = (1<<PFN_SHIFT)/sizeof(DIRECTORY_ENTRY); + return &TranslationMap->Directory + [Number/EntriesPerPage][Number%EntriesPerPage]; + } +} + +VOID +AddPageMapping( DIRECTORY_HEADER *TranslationMap, + ULONG Virt, + ULONG OldVirt) { + ULONG Phys; + DIRECTORY_ENTRY *Entry; + if( !TranslationMap->DirectoryPage || + TranslationMap->UsedSpace >= ((1<<PFN_SHIFT)/sizeof(DIRECTORY_ENTRY)) ) + { + TranslationMap->Directory + [TranslationMap->DirectoryPage] = MmAllocateMemory(1<<PFN_SHIFT); + TranslationMap->UsedSpace = 0; + TranslationMap->DirectoryPage++; + AddPageMapping + (TranslationMap, + (ULONG)TranslationMap->Directory + [TranslationMap->DirectoryPage-1],0); + } + Phys = PpcVirt2phys(Virt,0); + TranslationMap->NumberOfPages++; + Entry = GetPageMapping(TranslationMap, TranslationMap->NumberOfPages-1); + Entry->Virt = OldVirt ? OldVirt : Virt; Entry->Phys = Phys; + TranslationMap->UsedSpace++; +} + VOID NTAPI FrLdrStartup(ULONG Magic) { KernelEntryFn KernelEntryAddress = (KernelEntryFn)(KernelEntry + KernelBase); - register ULONG_PTR i asm("r4"), j asm("r5"); - UINT NeededPTE = ((UINT)KernelMemory) >> PFN_SHIFT; - UINT NeededMemory = - (2 * sizeof(ULONG_PTR) * (NeededPTE + NeededPTE / 512)) + - sizeof(BootInfo) + sizeof(BootDigits); - UINT NeededPages = ROUND_UP(NeededMemory,(1<<PFN_SHIFT)); - register PULONG_PTR TranslationMap asm("r6") = - MmAllocateMemory(NeededMemory); + register ULONG_PTR i asm("r4"), j asm("r5") = 0; + register DIRECTORY_HEADER *TranslationMap asm("r6") = + MmAllocateMemory(1<<PFN_SHIFT); boot_infos_t *LocalBootInfo = (boot_infos_t *)TranslationMap; - TranslationMap = (PULONG_PTR) + TranslationMap = (DIRECTORY_HEADER *) (((PCHAR)&LocalBootInfo[1]) + sizeof(BootDigits)); memcpy(&LocalBootInfo[1], BootDigits, sizeof(BootDigits)); *LocalBootInfo = BootInfo; LocalBootInfo->dispFont = (font_char *)&LocalBootInfo[1]; - - TranslationMap[0] = (ULONG_PTR)FrLdrStartup; - for( i = 1; i < NeededPages; i++ ) - { - TranslationMap[i*2] = NeededMemory+(i<<PFN_SHIFT); - } - - for( j = 0; j < KernelMemorySize>>PFN_SHIFT; j++ ) - { - TranslationMap[(i+j)*2] = ((UINT)(KernelMemory+(i<<PFN_SHIFT))); - } - - for( i = 0; i < j; i++ ) - { - TranslationMap[(i*2)+1] = PpcVirt2phys(TranslationMap[i*2],0); - } - - printf("Built map of %d pages\n", j); + ULONG_PTR KernelVirtAddr, NewMapSdr = + (ULONG_PTR)MmAllocateMemory(128*1024); + DIRECTORY_ENTRY *Entry; + + NewMapSdr = ROUND_UP(NewMapSdr,64*1024); + printf("New SDR1 value will be %x\n", NewMapSdr); + + memset(TranslationMap,0,sizeof(*TranslationMap)); + + /* Add the page containing the page directory */ + AddPageMapping( TranslationMap, (ULONG)TranslationMap, 0 ); + + /* Map freeldr space 0xe00000 ... 0xe50000 */ + for( i = 0xe00000; i < 0xe50000; i += (1<<PFN_SHIFT),j++ ) { + AddPageMapping( TranslationMap, i, 0 ); + } + + /* Map kernel space 0x80000000 ... */ + for( i = (ULONG)KernelMemory; + i < (ULONG)KernelMemory + KernelMemorySize; + i += (1<<PFN_SHIFT),j++ ) { + KernelVirtAddr = LoaderBlock.KernelBase + (i - (ULONG)KernelMemory); + AddPageMapping( TranslationMap, i, KernelVirtAddr ); + } + + printf("Built map of %d pages\n", TranslationMap->NumberOfPages); /* * Stuff page table entries for the page containing this code, @@ -185,22 +233,20 @@ * * When done, we'll be able to flop over to kernel land! */ - for( i = 0; i < j; i++ ) - { - DrawNumber(LocalBootInfo,i,10,90); - DrawNumber(LocalBootInfo,TranslationMap[i*2],10,100); - DrawNumber(LocalBootInfo,TranslationMap[i*2+1],10,110); - - InsertPageEntry - (TranslationMap[i*2], - TranslationMap[(i*2)+1], - (i>>10)); + for( i = 0, Entry = GetPageMapping( TranslationMap, i ); + Entry; + i++, Entry = GetPageMapping( TranslationMap, i ) ) { + DrawNumber(LocalBootInfo,Entry->Virt,10,90); + DrawNumber(LocalBootInfo,Entry->Phys,100,90); + InsertPageEntry( Entry->Virt, Entry->Phys, + (i & 0x3ff) >> 3, NewMapSdr ); } /* Tell them we're booting */ - DrawNumber(LocalBootInfo,0x1cabba9e,10,120); - DrawNumber(LocalBootInfo,(ULONG)KernelEntryAddress,100,120); - + DrawNumber(LocalBootInfo,0x1cabba9e,10,100); + DrawNumber(LocalBootInfo,(ULONG)KernelEntryAddress,100,100); + + SetSDR1( NewMapSdr ); KernelEntryAddress( (void*)LocalBootInfo ); while(1); } @@ -481,6 +527,10 @@ LongPtr = (PULONG)ShortPtr; *LongPtr += Delta; break; + + default: + printf("Unknown relocation %d\n", *TypeOffset >> 12); + break; } TypeOffset++; Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c Sun Oct 22 11:24:21 2006 @@ -227,6 +227,10 @@ register int res asm("r3"); __asm__("mfsdr1 3"); return res; +} + +inline void SetSDR1( int sdr ) { + __asm__("mtsdr1 3"); } inline int BatHit( int bath, int batl, int virt ) { @@ -293,9 +297,9 @@ } /* Add a new page table entry for the indicated mapping */ -BOOLEAN InsertPageEntry( int virt, int phys, int slot ) { +BOOLEAN InsertPageEntry( int virt, int phys, int slot, int _sdr1 ) { int i, ptehi, ptelo; - int sdr1 = GetSDR1(); + int sdr1 = _sdr1 ? _sdr1 : GetSDR1(); int sr = GetSR( (virt >> 28) & 0xf ); int vsid = sr & 0xfffffff; int physbase = sdr1 & ~0xffff; @@ -303,7 +307,7 @@ int valo = (vsid << 28) | (virt & 0xfffffff); int hash = (vsid & 0x7ffff) ^ ((valo >> 12) & 0xffff); int ptegaddr = ((hashmask & hash) * 64) + physbase; - + for( i = 0; i < 8; i++ ) { ptehi = GetPhys( ptegaddr + (i * 8) ); @@ -315,6 +319,12 @@ SetPhys( ptegaddr + (i * 8), ptehi ); SetPhys( ptegaddr + (i * 8) + 4, ptelo ); + __asm__("ptesync"); + __asm__("tlbie %0,0" : : "r" (virt)); + __asm__("eieio"); + __asm__("tlbsync"); + __asm__("ptesync"); + return TRUE; } Modified: branches/powerpc/reactos/boot/freeldr/freeldr/include/mmu.h URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/include/mmu.h (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/include/mmu.h Sun Oct 22 11:24:21 2006 @@ -12,10 +12,11 @@ void GetBat( int bat, int inst, int *batHi, int *batLo ); void SetBat( int bat, int inst, int batHi, int batLo ); int GetSDR1(); +void SetSDR1( int newsdr ); int BatHit( int bath, int batl, int virt ); int BatTranslate( int bath, int batl, int virt ); /* translate address */ int PpcVirt2phys( int virt, int inst ); -BOOLEAN InsertPageEntry( int virt, int phys, int slot ); +BOOLEAN InsertPageEntry( int virt, int phys, int slot, int sdr ); #endif/*FREELDR_MMU_H*/
18 years, 2 months
1
0
0
0
[greatlrd] 24596: return code scanner for D3DParseUnknownCommand to figout what it support.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sun Oct 22 11:15:06 2006 New Revision: 24596 URL:
http://svn.reactos.org/svn/reactos?rev=24596&view=rev
Log: return code scanner for D3DParseUnknownCommand to figout what it support. Added: trunk/rosapps/tests/D3DParseUnknownCommand_show/ trunk/rosapps/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild (with props) trunk/rosapps/tests/D3DParseUnknownCommand_show/main.c (with props) Modified: trunk/rosapps/tests/directory.rbuild Added: trunk/rosapps/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/tests/D3DParseUnknownComma…
============================================================================== --- trunk/rosapps/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild (added) +++ trunk/rosapps/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild Sun Oct 22 11:15:06 2006 @@ -1,0 +1,11 @@ +<module name="D3DParseUnknownCommand_show" type="win32cui" installbase="bin" installname="D3DParseUnknownCommand_show" allowwarnings="true"> + <define name="_WIN32_IE">0x0501</define> + <define name="_WIN32_WINNT">0x0501</define> + <define name="__USE_W32API" /> + <library>kernel32</library> + <library>gdi32</library> + <library>ddraw</library> + <library>string</library> + <library>user32</library> + <file>main.c</file> +</module> Propchange: trunk/rosapps/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rosapps/tests/D3DParseUnknownCommand_show/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/tests/D3DParseUnknownComma…
============================================================================== --- trunk/rosapps/tests/D3DParseUnknownCommand_show/main.c (added) +++ trunk/rosapps/tests/D3DParseUnknownCommand_show/main.c Sun Oct 22 11:15:06 2006 @@ -1,0 +1,49 @@ + +#include <windows.h> +#include <stdio.h> + +#include <ddrawi.h> +#include <d3dhal.h> + +/* Black Box program for D3DParseUnknownCommand in ddraw.dll + * + * This program scaning all return valu that D3DParseUnknownCommand have in ddraw.dll + * This command is not 100% document in MSDN so I using ddk kit doc and WinCE document + * and ms ddk / ms sdk to figout the basic. and MSDN was unclare what this command support for + * D3DHAL_DP2COMMAND dp2command->bCommand so I wrote this small scanner + * + * it will show D3DParseUnknownCommand dp2command->bCommand support follow command + * command hex dec + * D3DDP2OP_VIEWPORTINFO (aka 0x1c) 28 + * D3DDP2OP_WINFO (aka 0x1d) 29 + * Unknown (aka 0x0d) 13 + * + * no doc in msdn about command 13 (dec) I will exaime it later + * + */ + +INT main(INT argc, CHAR argv[]); +VOID BuildReturnCode(DWORD * ReturnCode); + +INT main(INT argc, TCHAR argv[]) +{ + DWORD ReturnCode[256]; + + BuildReturnCode(ReturnCode); + + return 0; +} + +VOID BuildReturnCode(DWORD * ReturnCode) +{ + INT t; + D3DHAL_DP2COMMAND dp2command; + DWORD lplpvReturnedCommand[2]; + + for (t=0;t<256;t++) + { + dp2command.bCommand = t; + ReturnCode[t] = D3DParseUnknownCommand ( (LPVOID) &dp2command, (LPVOID *) lplpvReturnedCommand) ; + printf("D3DParseUnknownCommand return code = %x command %d \n", ReturnCode[t], t); + } +} Propchange: trunk/rosapps/tests/D3DParseUnknownCommand_show/main.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rosapps/tests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/tests/directory.rbuild?rev…
============================================================================== --- trunk/rosapps/tests/directory.rbuild (original) +++ trunk/rosapps/tests/directory.rbuild Sun Oct 22 11:15:06 2006 @@ -67,6 +67,9 @@ <directory name="dnsquery"> <xi:include href="dnsquery/dnsquery.rbuild" /> </directory> +<directory name="D3DParseUnknownCommand_show"> + <xi:include href="D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild" /> +</directory> <directory name="DxHalTest"> <xi:include href="DxHalTest/DxHalTest.rbuild" /> </directory>
18 years, 2 months
1
0
0
0
[ion] 24595: - Implement DbgkpQueueMessage. This is the main bi-directional communication routine for the newer non-LPC Debug Object. - Implement DbgkPostFakeProcessCreateMessages (and stub DbgkpPostFakeThreadMessages and DbgkpPostFakeModuleMessages). These are required when attaching to a process after threads have been created and modules loaded, so that the debugger can have a valid state. - Still missing the two functions to Set/Clear the Debug Object, will do these next.
by ion@svn.reactos.org
Author: ion Date: Sat Oct 21 23:26:54 2006 New Revision: 24595 URL:
http://svn.reactos.org/svn/reactos?rev=24595&view=rev
Log: - Implement DbgkpQueueMessage. This is the main bi-directional communication routine for the newer non-LPC Debug Object. - Implement DbgkPostFakeProcessCreateMessages (and stub DbgkpPostFakeThreadMessages and DbgkpPostFakeModuleMessages). These are required when attaching to a process after threads have been created and modules loaded, so that the debugger can have a valid state. - Still missing the two functions to Set/Clear the Debug Object, will do these next. Modified: trunk/reactos/ntoskrnl/dbgk/debug.c Modified: trunk/reactos/ntoskrnl/dbgk/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/dbgk/debug.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/dbgk/debug.c (original) +++ trunk/reactos/ntoskrnl/dbgk/debug.c Sat Oct 21 23:26:54 2006 @@ -23,7 +23,35 @@ DEBUG_OBJECT_ALL_ACCESS }; +static const INFORMATION_CLASS_INFO DbgkpDebugObjectInfoClass[] = +{ + /* DebugObjectUnusedInformation */ + ICI_SQ_SAME(sizeof(ULONG), sizeof(ULONG), 0), + /* DebugObjectKillProcessOnExitInformation */ + ICI_SQ_SAME(sizeof(DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION), sizeof(ULONG), ICIF_SET), +}; + /* PRIVATE FUNCTIONS *********************************************************/ + +NTSTATUS +NTAPI +DbgkpSetProcessDebugObject(IN PEPROCESS Process, + IN PDEBUG_OBJECT DebugObject, + IN NTSTATUS MsgStatus, + IN PETHREAD LastThread) +{ + /* FIXME: TODO */ + return STATUS_UNSUCCESSFUL; +} + +NTSTATUS +NTAPI +DbgkClearProcessDebugObject(IN PEPROCESS Process, + IN PDEBUG_OBJECT SourceDebugObject) +{ + /* FIXME: TODO */ + return STATUS_UNSUCCESSFUL; +} NTSTATUS NTAPI @@ -33,8 +61,157 @@ IN ULONG Flags, IN PDEBUG_OBJECT TargetObject OPTIONAL) { - /* FIXME: TODO */ - return STATUS_UNSUCCESSFUL; + PDEBUG_EVENT DebugEvent; + DEBUG_EVENT LocalDebugEvent; + PDEBUG_OBJECT DebugObject; + NTSTATUS Status; + BOOLEAN NewEvent; + PAGED_CODE(); + + /* Check if we have to allocate a debug event */ + NewEvent = (Flags & 2) ? TRUE : FALSE; + if (NewEvent) + { + /* Allocate it */ + DebugEvent = ExAllocatePoolWithTag(NonPagedPool, + sizeof(DEBUG_EVENT), + TAG('D', 'b', 'g', 'E')); + if (!DebugEvent) return STATUS_INSUFFICIENT_RESOURCES; + + /* Set flags */ + DebugEvent->Flags = Flags | 4; + + /* Reference the thread and process */ + ObReferenceObject(Thread); + ObReferenceObject(Process); + + /* Set the current thread */ + DebugEvent->BackoutThread = PsGetCurrentThread(); + + /* Set the debug object */ + DebugObject = TargetObject; + } + else + { + /* Use the debug event on the stack */ + DebugEvent = &LocalDebugEvent; + DebugEvent->Flags = Flags; + + /* Acquire the port lock */ + ExAcquireFastMutex(&DbgkpProcessDebugPortMutex); + + /* Get the debug object */ + DebugObject = Process->DebugPort; + + /* Check what kind of API message this is */ + switch (Message->ApiNumber) + { + /* Process or thread creation */ + case DbgKmCreateThreadApi: + case DbgKmCreateProcessApi: + + /* Make sure we're not skipping creation messages */ + if (Thread->SkipCreationMsg) DebugObject = NULL; + break; + + /* Process or thread exit */ + case DbgKmExitThreadApi: + case DbgKmExitProcessApi: + + /* Make sure we're not skipping exit messages */ + if (Thread->SkipTerminationMsg) DebugObject = NULL; + + /* No special handling for other messages */ + default: + break; + } + } + + /* Setup the Debug Event */ + KeInitializeEvent(&DebugEvent->ContinueEvent, SynchronizationEvent, FALSE); + DebugEvent->Process = Process; + DebugEvent->Thread = Thread; + RtlMoveMemory(&DebugEvent->ApiMsg, Message, sizeof(DBGKM_MSG)); + DebugEvent->ClientId = Thread->Cid; + + /* Check if we have a port object */ + if (!DebugObject) + { + /* Fail */ + Status = STATUS_PORT_NOT_SET; + } + else + { + /* Acquire the debug object mutex */ + ExAcquireFastMutex(&DebugObject->Mutex); + + /* Check if a debugger is active */ + if (!DebugObject->DebuggerInactive) + { + /* Add the event into the object's list */ + InsertTailList(&DebugObject->EventList, &DebugEvent->EventList); + + /* Check if we have to signal it */ + if (!NewEvent) + { + /* Signal it */ + KeSetEvent(&DebugObject->EventsPresent, + IO_NO_INCREMENT, + FALSE); + } + + /* Set success */ + Status = STATUS_SUCCESS; + } + else + { + /* No debugger */ + Status = STATUS_DEBUGGER_INACTIVE; + } + + /* Release the object lock */ + ExReleaseFastMutex(&DebugObject->Mutex); + } + + /* Check if we had acquired the port lock */ + if (!NewEvent) + { + /* Release it */ + ExReleaseFastMutex(&DbgkpProcessDebugPortMutex); + + /* Check if we got here through success */ + if (NT_SUCCESS(Status)) + { + /* Wait on the continue event */ + KeWaitForSingleObject(&DebugEvent->ContinueEvent, + Executive, + KernelMode, + FALSE, + NULL); + + /* Copy API Message back */ + RtlMoveMemory(Message, &DebugEvent->ApiMsg, sizeof(DBGKM_MSG)); + + /* Set return status */ + Status = DebugEvent->Status; + } + } + else + { + /* Check if we failed */ + if (!NT_SUCCESS(Status)) + { + /* Dereference the process and thread */ + ObDereferenceObject(Thread); + ObDereferenceObject(Process); + + /* Free the debug event */ + ExFreePool(DebugEvent); + } + } + + /* Return status */ + return Status; } NTSTATUS @@ -283,33 +460,74 @@ NTSTATUS NTAPI +DbgkpPostFakeModuleMessages(IN PEPROCESS Process, + IN PETHREAD Thread, + IN PDEBUG_OBJECT DebugObject) +{ + /* FIXME: TODO */ + return STATUS_UNSUCCESSFUL; +} + +NTSTATUS +NTAPI +DbgkpPostFakeThreadMessages(IN PEPROCESS Process, + IN PDEBUG_OBJECT DebugObject, + IN PETHREAD StartThread, + OUT PETHREAD *FirstThread, + OUT PETHREAD *LastThread) +{ + /* FIXME: TODO */ + return STATUS_UNSUCCESSFUL; +} + +NTSTATUS +NTAPI DbgkpPostFakeProcessCreateMessages(IN PEPROCESS Process, IN PDEBUG_OBJECT DebugObject, - IN PETHREAD *LastThread) -{ - /* FIXME: Implement */ - *LastThread = NULL; - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -DbgkpSetProcessDebugObject(IN PEPROCESS Process, - IN PDEBUG_OBJECT DebugObject, - IN NTSTATUS MsgStatus, - IN PETHREAD LastThread) -{ - /* FIXME: TODO */ - return STATUS_UNSUCCESSFUL; -} - -NTSTATUS -NTAPI -DbgkClearProcessDebugObject(IN PEPROCESS Process, - IN PDEBUG_OBJECT SourceDebugObject) -{ - /* FIXME: TODO */ - return STATUS_UNSUCCESSFUL; + OUT PETHREAD *LastThread) +{ + KAPC_STATE ApcState; + PETHREAD FirstThread, FinalThread; + PETHREAD ReturnThread = NULL; + NTSTATUS Status; + PAGED_CODE(); + + /* Attach to the process */ + KeStackAttachProcess(&Process->Pcb, &ApcState); + + /* Post the fake thread messages */ + Status = DbgkpPostFakeThreadMessages(Process, + DebugObject, + NULL, + &FirstThread, + &FinalThread); + if (NT_SUCCESS(Status)) + { + /* Send the fake module messages too */ + Status = DbgkpPostFakeModuleMessages(Process, + FirstThread, + DebugObject); + if (!NT_SUCCESS(Status)) + { + /* We failed, dereference the final thread */ + ObDereferenceObject(FinalThread); + } + else + { + /* Set the final thread */ + ReturnThread = FinalThread; + } + + /* Dereference the first thread */ + ObDereferenceObject(FirstThread); + } + + /* Detach from the process */ + KeUnstackDetachProcess(&ApcState); + + /* Return the last thread */ + *LastThread = ReturnThread; + return Status; } VOID @@ -1003,14 +1221,6 @@ return Status; } -static const INFORMATION_CLASS_INFO DbgkpDebugObjectInfoClass[] = -{ - /* DebugObjectUnusedInformation */ - ICI_SQ_SAME(sizeof(ULONG), sizeof(ULONG), 0), - /* DebugObjectKillProcessOnExitInformation */ - ICI_SQ_SAME(sizeof(DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION), sizeof(ULONG), ICIF_SET), -}; - NTSTATUS NTAPI NtSetInformationDebugObject(IN HANDLE DebugHandle, @@ -1034,16 +1244,19 @@ DebugInformationLength, PreviousMode); - /* Return required length to user-mode */ + /* Check if the caller wanted the return length */ if (ReturnLength) { + /* Enter SEH for probe */ _SEH_TRY { + /* Return required length to user-mode */ ProbeForWriteUlong(ReturnLength); *ReturnLength = sizeof(*DebugInfo); } _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) { + /* Get SEH Exception code */ Status = _SEH_GetExceptionCode(); } _SEH_END; @@ -1108,11 +1321,13 @@ /* Clear the initial wait state change structure */ RtlZeroMemory(&WaitStateChange, sizeof(WaitStateChange)); - /* Check if we came with a timeout from user mode */ + /* Check if the call was from user mode */ if (PreviousMode != KernelMode) { + /* Protect probe in SEH */ _SEH_TRY { + /* Check if we came with a timeout */ if (Timeout) { /* Make a copy on the stack */ @@ -1120,6 +1335,7 @@ Timeout = &SafeTimeOut; } + /* Probe the state change structure */ ProbeForWrite(StateChange, sizeof(*StateChange), sizeof(ULONG)); } _SEH_HANDLE @@ -1279,19 +1495,22 @@ /* We're, dereference the object */ ObDereferenceObject(DebugObject); - /* Return our wait state change structure */ + /* Protect write with SEH */ _SEH_TRY { - RtlCopyMemory(StateChange, + /* Return our wait state change structure */ + RtlMoveMemory(StateChange, &WaitStateChange, sizeof(DBGUI_WAIT_STATE_CHANGE)); } _SEH_EXCEPT(_SEH_ExSystemExceptionFilter) { + /* Get SEH Exception code */ Status = _SEH_GetExceptionCode(); } _SEH_END; + /* Return status */ return Status; }
18 years, 2 months
1
0
0
0
[janderwald] 24594: - quit sysreg when checkpoint USETUP_COMPLETED is reached
by janderwald@svn.reactos.org
Author: janderwald Date: Sat Oct 21 21:59:15 2006 New Revision: 24594 URL:
http://svn.reactos.org/svn/reactos?rev=24594&view=rev
Log: - quit sysreg when checkpoint USETUP_COMPLETED is reached Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.cpp (original) +++ trunk/reactos/tools/sysreg/rosboot_test.cpp Sat Oct 21 21:59:15 2006 @@ -137,6 +137,21 @@ cerr << line << endl; + if (line.find (_T("SYSREG_CHECKPOINT")) != string::npos) + { + line.erase (0, line.find (_T("SYSREG_CHECKPOINT")) + 19); + if (!_tcsncmp(line.c_str (), _T("USETUP_COMPLETE"), 15)) + { + /// + /// we need to stop the emulator to avoid + /// looping again into USETUP (at least with bootcdregtest) + + return false; + } + + } + + if (line.find (_T("*** Fatal System Error")) != string::npos) { cerr << "BSOD detected" <<endl;
18 years, 2 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
36
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Results per page:
10
25
50
100
200