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 2015
----- 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
18 participants
347 discussions
Start a n
N
ew thread
[aandrejevic] 69427: [FAST486] Reading/writing to memory should #SS(0) when the segment is the stack segment, and #GP(0) otherwise. It should never generate #NP.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Fri Oct 2 15:11:24 2015 New Revision: 69427 URL:
http://svn.reactos.org/svn/reactos?rev=69427&view=rev
Log: [FAST486] Reading/writing to memory should #SS(0) when the segment is the stack segment, and #GP(0) otherwise. It should never generate #NP. Modified: trunk/reactos/lib/fast486/common.c Modified: trunk/reactos/lib/fast486/common.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/common.c?rev=6…
============================================================================== --- trunk/reactos/lib/fast486/common.c [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/common.c [iso-8859-1] Fri Oct 2 15:11:24 2015 @@ -42,6 +42,8 @@ { ULONG LinearAddress; PFAST486_SEG_REG CachedDescriptor; + FAST486_EXCEPTIONS Exception = SegmentReg != FAST486_REG_SS + ? FAST486_EXCEPTION_GP : FAST486_EXCEPTION_SS; ASSERT(SegmentReg < FAST486_NUM_SEG_REGS); @@ -53,7 +55,7 @@ if ((Offset + Size - 1) > CachedDescriptor->Limit) { /* Read beyond limit */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486Exception(State, Exception); return FALSE; } } @@ -62,7 +64,7 @@ if (Offset < CachedDescriptor->Limit) { /* Read beyond limit */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486Exception(State, Exception); return FALSE; } } @@ -74,14 +76,14 @@ if (!CachedDescriptor->Present) { - Fast486Exception(State, FAST486_EXCEPTION_NP); + Fast486Exception(State, Exception); return FALSE; } if ((!InstFetch && (CachedDescriptor->Rpl > CachedDescriptor->Dpl)) || (Fast486GetCurrentPrivLevel(State) > CachedDescriptor->Dpl)) { - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486Exception(State, Exception); return FALSE; } @@ -90,7 +92,7 @@ if (!CachedDescriptor->Executable) { /* Data segment not executable */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486Exception(State, Exception); return FALSE; } } @@ -99,7 +101,7 @@ if (CachedDescriptor->Executable && (!CachedDescriptor->ReadWrite)) { /* Code segment not readable */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486Exception(State, Exception); return FALSE; } } @@ -166,6 +168,8 @@ { ULONG LinearAddress; PFAST486_SEG_REG CachedDescriptor; + FAST486_EXCEPTIONS Exception = SegmentReg != FAST486_REG_SS + ? FAST486_EXCEPTION_GP : FAST486_EXCEPTION_SS; ASSERT(SegmentReg < FAST486_NUM_SEG_REGS); @@ -177,7 +181,7 @@ if ((Offset + Size - 1) > CachedDescriptor->Limit) { /* Write beyond limit */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486Exception(State, Exception); return FALSE; } } @@ -185,8 +189,8 @@ { if (Offset < CachedDescriptor->Limit) { - /* Read beyond limit */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + /* Write beyond limit */ + Fast486Exception(State, Exception); return FALSE; } } @@ -198,27 +202,27 @@ if (!CachedDescriptor->Present) { - Fast486Exception(State, FAST486_EXCEPTION_NP); + Fast486Exception(State, Exception); return FALSE; } if ((CachedDescriptor->Rpl > CachedDescriptor->Dpl) || (Fast486GetCurrentPrivLevel(State) > CachedDescriptor->Dpl)) { - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486Exception(State, Exception); return FALSE; } if (CachedDescriptor->Executable) { /* Code segment not writable */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486Exception(State, Exception); return FALSE; } else if (!CachedDescriptor->ReadWrite) { /* Data segment not writeable */ - Fast486Exception(State, FAST486_EXCEPTION_GP); + Fast486Exception(State, Exception); return FALSE; } }
9 years, 2 months
1
0
0
0
[akhaldi] 69426: [INCLUDES] Improve the FILE header section. Brought to you by Adam Stachowicz. CORE-10114
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Oct 1 18:12:45 2015 New Revision: 69426 URL:
http://svn.reactos.org/svn/reactos?rev=69426&view=rev
Log: [INCLUDES] Improve the FILE header section. Brought to you by Adam Stachowicz. CORE-10114 Modified: trunk/reactos/include/psdk/ddkernel.h trunk/reactos/include/psdk/dmemmgr.h trunk/reactos/include/psdk/driverspecs.h trunk/reactos/include/psdk/dvp.h trunk/reactos/include/psdk/objerror.h trunk/reactos/include/psdk/polarity.h trunk/reactos/include/reactos/arm/peripherals/pl190.h trunk/reactos/include/reactos/arm/peripherals/sp804.h trunk/reactos/include/reactos/drivers/afd/shared.h trunk/reactos/include/reactos/libs/cportlib/cportlib.h trunk/reactos/include/reactos/libs/fslib/ext2lib.h trunk/reactos/include/reactos/libs/fslib/vfatlib.h trunk/reactos/include/reactos/libs/fslib/vfatxlib.h trunk/reactos/include/reactos/libs/umpnpmgr/sysguid.h trunk/reactos/include/reactos/services/services.h trunk/reactos/include/reactos/subsys/lsass/lsass.h trunk/reactos/include/reactos/subsys/sm/smmsg.h trunk/reactos/include/reactos/version.h.cmake trunk/reactos/include/reactos/winsock/msafd.h trunk/reactos/include/reactos/winsock/msafdlib.h trunk/reactos/include/reactos/winsock/mswinsock.h trunk/reactos/include/reactos/winsock/nsp_dns.h trunk/reactos/include/reactos/winsock/rnr20lib.h trunk/reactos/include/reactos/winsock/ws2help.h trunk/reactos/include/reactos/winsock/wsmobile.h Modified: trunk/reactos/include/psdk/ddkernel.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ddkernel.h?re…
============================================================================== --- trunk/reactos/include/psdk/ddkernel.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/ddkernel.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel - * FILE: + * FILE: include/psdk/ddkernel.h * PURPOSE: Directx headers * PROGRAMMER: Magnus Olsen (greatlrd) * Modified: trunk/reactos/include/psdk/dmemmgr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/dmemmgr.h?rev…
============================================================================== --- trunk/reactos/include/psdk/dmemmgr.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/dmemmgr.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel - * FILE: + * FILE: include/psdk/dmemmgr.h * PURPOSE: Directx headers * PROGRAMMER: Magnus Olsen (greatlrd) * Modified: trunk/reactos/include/psdk/driverspecs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/driverspecs.h…
============================================================================== --- trunk/reactos/include/psdk/driverspecs.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/driverspecs.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS DDK * COPYRIGHT: This file is in the Public Domain. - * FILE: driverspecs.h + * FILE: include/psdk/driverspecs.h * ABSTRACT: This header stubs out Driver Verifier annotations to * allow drivers using them to compile with our header set. */ Modified: trunk/reactos/include/psdk/dvp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/dvp.h?rev=694…
============================================================================== --- trunk/reactos/include/psdk/dvp.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/dvp.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel - * FILE: + * FILE: include/psdk/dvp.h * PURPOSE: Directx headers * PROGRAMMER: Magnus Olsen (greatlrd) * Modified: trunk/reactos/include/psdk/objerror.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/objerror.h?re…
============================================================================== --- trunk/reactos/include/psdk/objerror.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/objerror.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel - * FILE: + * FILE: include/psdk/objerror.h * PURPOSE: Directx headers * PROGRAMMER: Magnus Olsen (greatlrd) * Modified: trunk/reactos/include/psdk/polarity.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/polarity.h?re…
============================================================================== --- trunk/reactos/include/psdk/polarity.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/polarity.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: This file is in the public domain. * PROJECT: ReactOS kernel - * FILE: + * FILE: include/psdk/polarity.h * PURPOSE: * PROGRAMMER: Magnus Olsen (greatlrd) * Modified: trunk/reactos/include/reactos/arm/peripherals/pl190.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arm/periph…
============================================================================== --- trunk/reactos/include/reactos/arm/peripherals/pl190.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/arm/peripherals/pl190.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: BSD - See COPYING.ARM in the top level directory - * FILE: include/reactos/arm/targets/pl190.h + * FILE: include/reactos/arm/peripherals/pl190.h * PURPOSE: PL190 Registers and Constants * PROGRAMMERS: ReactOS Portable Systems Group */ Modified: trunk/reactos/include/reactos/arm/peripherals/sp804.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/arm/periph…
============================================================================== --- trunk/reactos/include/reactos/arm/peripherals/sp804.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/arm/peripherals/sp804.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Kernel * LICENSE: BSD - See COPYING.ARM in the top level directory - * FILE: include/reactos/arm/targets/pl011.h + * FILE: include/reactos/arm/peripherals/sp804.h * PURPOSE: SB804 Registers and Constants * PROGRAMMERS: ReactOS Portable Systems Group */ Modified: trunk/reactos/include/reactos/drivers/afd/shared.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drivers/af…
============================================================================== --- trunk/reactos/include/reactos/drivers/afd/shared.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/drivers/afd/shared.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Ancillary Function Driver - * FILE: include/afd/shared.h + * FILE: include/reactos/drivers/afd/shared.h * PURPOSE: Shared definitions for AFD.SYS and MSAFD.DLL */ #ifndef __AFD_SHARED_H Modified: trunk/reactos/include/reactos/libs/cportlib/cportlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/cport…
============================================================================== --- trunk/reactos/include/reactos/libs/cportlib/cportlib.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/cportlib/cportlib.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS ComPort Library * LICENSE: BSD - See COPYING.ARM in the top level directory - * FILE: include/reactos/lib/cportlib/cportlib.h + * FILE: include/reactos/libs/cportlib/cportlib.h * PURPOSE: Header for the ComPort Library * PROGRAMMERS: ReactOS Portable Systems Group */ Modified: trunk/reactos/include/reactos/libs/fslib/ext2lib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/fslib…
============================================================================== --- trunk/reactos/include/reactos/libs/fslib/ext2lib.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/fslib/ext2lib.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS EXT2 filesystem library - * FILE: include/fslib/ext2lib.h + * FILE: include/reactos/libs/fslib/ext2lib.h * PURPOSE: Public definitions for ext2 filesystem library */ #ifndef __EXT2LIB_H Modified: trunk/reactos/include/reactos/libs/fslib/vfatlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/fslib…
============================================================================== --- trunk/reactos/include/reactos/libs/fslib/vfatlib.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/fslib/vfatlib.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS VFAT filesystem library - * FILE: include/fslib/vfatlib.h + * FILE: include/reactos/libs/fslib/vfatlib.h * PURPOSE: Public definitions for vfat filesystem library */ #ifndef __VFATLIB_H Modified: trunk/reactos/include/reactos/libs/fslib/vfatxlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/fslib…
============================================================================== --- trunk/reactos/include/reactos/libs/fslib/vfatxlib.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/fslib/vfatxlib.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS VFAT filesystem library - * FILE: include/fslib/vfatlib.h + * FILE: include/reactos/libs/fslib/vfatxlib.h * PURPOSE: Public definitions for vfat filesystem library */ #ifndef __VFATXLIB_H Modified: trunk/reactos/include/reactos/libs/umpnpmgr/sysguid.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/umpnp…
============================================================================== --- trunk/reactos/include/reactos/libs/umpnpmgr/sysguid.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/umpnpmgr/sysguid.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS UserMode PnP - * FILE: ntoskrnl/rtl/libsupp.c + * FILE: include/reactos/libs/umpnpmgr/sysguid.h * PURPOSE: GUIDs shared between umpnpmgr and the Kernel PnP Manager * PROGRAMMERS: Eric Kohl */ Modified: trunk/reactos/include/reactos/services/services.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/services/s…
============================================================================== --- trunk/reactos/include/reactos/services/services.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/services/services.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: include/services/services.h + * FILE: include/reactos/services/services.h * PURPOSE: Private interface between SERVICES.EXE and ADVAPI32.DLL * PROGRAMMER: Eric Kohl */ Modified: trunk/reactos/include/reactos/subsys/lsass/lsass.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/lsa…
============================================================================== --- trunk/reactos/include/reactos/subsys/lsass/lsass.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/subsys/lsass/lsass.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries - * FILE: include/lsass/lsass.h + * FILE: include/reactos/subsys/lsass/lsass.h * PURPOSE: LSASS API declarations * UPDATE HISTORY: * Created 05/08/00 Modified: trunk/reactos/include/reactos/subsys/sm/smmsg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/subsys/sm/…
============================================================================== --- trunk/reactos/include/reactos/subsys/sm/smmsg.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/subsys/sm/smmsg.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * PROJECT: ReactOS Windows-Compatible Session Manager * LICENSE: BSD 2-Clause License - * FILE: include/reactos/subsystems/sm/smmsg.h + * FILE: include/reactos/subsys/sm/smmsg.h * PURPOSE: SMSS (SB and SM) Message Format * PROGRAMMERS: Alex Ionescu */ Modified: trunk/reactos/include/reactos/version.h.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/version.h.…
============================================================================== --- trunk/reactos/include/reactos/version.h.cmake [iso-8859-1] (original) +++ trunk/reactos/include/reactos/version.h.cmake [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: include/internal/version.h + * FILE: include/reactos/version.h.cmake * PURPOSE: Defines the current version * PROGRAMMER: David Welch (welch(a)mcmail.com) * REVISIONS: Modified: trunk/reactos/include/reactos/winsock/msafd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/winsock/ms…
============================================================================== --- trunk/reactos/include/reactos/winsock/msafd.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/winsock/msafd.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Ancillary Function Driver DLL - * FILE: include/msafd.h + * FILE: include/reactos/winsock/msafd.h * PURPOSE: Ancillary Function Driver DLL header */ Modified: trunk/reactos/include/reactos/winsock/msafdlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/winsock/ms…
============================================================================== --- trunk/reactos/include/reactos/winsock/msafdlib.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/winsock/msafdlib.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS WinSock 2 NSP - * FILE: lib/mswsock/sock.h + * FILE: include/reactos/winsock/msafdlib.h * PURPOSE: Winsock 2 SPI Utility Header */ Modified: trunk/reactos/include/reactos/winsock/mswinsock.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/winsock/ms…
============================================================================== --- trunk/reactos/include/reactos/winsock/mswinsock.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/winsock/mswinsock.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Ancillary Function Driver DLL - * FILE: include/mswsock.h + * FILE: include/reactos/winsock/mswinsock.h * PURPOSE: Ancillary Function Driver DLL header */ #ifndef __MSWINSOCK_H Modified: trunk/reactos/include/reactos/winsock/nsp_dns.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/winsock/ns…
============================================================================== --- trunk/reactos/include/reactos/winsock/nsp_dns.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/winsock/nsp_dns.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS WinSock 2 Headers - * FILE: include/winsock/nsp_dns.h + * FILE: include/reactos/winsock/nsp_dns.h * PURPOSE: WinSock 2 Shared NSP Header */ Modified: trunk/reactos/include/reactos/winsock/rnr20lib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/winsock/rn…
============================================================================== --- trunk/reactos/include/reactos/winsock/rnr20lib.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/winsock/rnr20lib.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS WinSock 2 NSP - * FILE: include/nsp_dns.h + * FILE: include/reactos/winsock/rnr20lib.h * PURPOSE: WinSock 2 NSP Header */ Modified: trunk/reactos/include/reactos/winsock/ws2help.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/winsock/ws…
============================================================================== --- trunk/reactos/include/reactos/winsock/ws2help.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/winsock/ws2help.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS WinSock 2 Helper DLL - * FILE: include/libs/winsock/ws2help.h + * FILE: include/reactos/winsock/ws2help.h * PURPOSE: WinSock 2 Helper DLL header */ Modified: trunk/reactos/include/reactos/winsock/wsmobile.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/winsock/ws…
============================================================================== --- trunk/reactos/include/reactos/winsock/wsmobile.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/winsock/wsmobile.h [iso-8859-1] Thu Oct 1 18:12:45 2015 @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS WinSock 2 NSP - * FILE: include/nsp_dns.h + * FILE: include/reactos/winsock/wsmobile.h * PURPOSE: WinSock 2 NSP Header */
9 years, 2 months
1
0
0
0
[akhaldi] 69425: [RAPPS] Get rid of the flickering of the URL in the download dialog and decode it. By Ismael Ferreras Morezuelas. CORE-9060
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Oct 1 09:37:55 2015 New Revision: 69425 URL:
http://svn.reactos.org/svn/reactos?rev=69425&view=rev
Log: [RAPPS] Get rid of the flickering of the URL in the download dialog and decode it. By Ismael Ferreras Morezuelas. CORE-9060 Modified: trunk/reactos/base/applications/rapps/loaddlg.c Modified: trunk/reactos/base/applications/rapps/loaddlg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/lo…
============================================================================== --- trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] Thu Oct 1 09:37:55 2015 @@ -6,6 +6,7 @@ * Copyright 2004 Mike McCormack (for CodeWeavers) * Copyright 2005 Ge van Geldorp (gvg(a)reactos.org) * Copyright 2009 Dmitry Chapyshev (dmitry(a)reactos.org) + * Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros(a)gmail.com) */ /* * Based on Wine dlls/shdocvw/shdocvw_main.c @@ -37,6 +38,7 @@ LONG ref; HWND hDialog; BOOL *pbCancelled; + BOOL UrlHasBeenCopied; } IBindStatusCallbackImpl; static @@ -111,7 +113,6 @@ IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface; HWND Item; LONG r; - WCHAR OldText[100]; Item = GetDlgItem(This->hDialog, IDC_DOWNLOAD_PROGRESS); if (Item && ulProgressMax) @@ -120,13 +121,29 @@ } Item = GetDlgItem(This->hDialog, IDC_DOWNLOAD_STATUS); - if (Item && szStatusText) - { - SendMessageW(Item, WM_GETTEXT, sizeof(OldText) / sizeof(OldText[0]), (LPARAM) OldText); - if (sizeof(OldText) / sizeof(OldText[0]) - 1 <= wcslen(OldText) || 0 != wcscmp(OldText, szStatusText)) + if (Item && szStatusText && wcslen(szStatusText) > 0 && This->UrlHasBeenCopied == FALSE) + { + DWORD len = wcslen(szStatusText) * sizeof(WCHAR); + PWSTR buf = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); + + if (buf) { - SendMessageW(Item, WM_SETTEXT, 0, (LPARAM) szStatusText); + /* beautify our url for display purposes */ + InternetCanonicalizeUrl(szStatusText, buf, &len, ICU_DECODE | ICU_NO_ENCODE); + + /* paste it into our dialog, free the temp buffer + and don't do it again in this instance */ + SendMessageW(Item, WM_SETTEXT, 0, (LPARAM)buf); + HeapFree(GetProcessHeap(), 0, buf); } + else + { + /* our computer is old and rusty and does not have enough ram for this, + use the ugly version and call it a day */ + SendMessageW(Item, WM_SETTEXT, 0, (LPARAM)szStatusText); + } + + This->UrlHasBeenCopied = TRUE; } SetLastError(0);
9 years, 2 months
1
0
0
0
[aandrejevic] 69424: [FAST486] Fix the TSS limit validity check. Implement I/O privilege checking.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Thu Oct 1 02:24:17 2015 New Revision: 69424 URL:
http://svn.reactos.org/svn/reactos?rev=69424&view=rev
Log: [FAST486] Fix the TSS limit validity check. Implement I/O privilege checking. Modified: trunk/reactos/lib/fast486/common.c trunk/reactos/lib/fast486/common.inl trunk/reactos/lib/fast486/opcodes.c Modified: trunk/reactos/lib/fast486/common.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/common.c?rev=6…
============================================================================== --- trunk/reactos/lib/fast486/common.c [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/common.c [iso-8859-1] Thu Oct 1 02:24:17 2015 @@ -628,8 +628,8 @@ PFAST486_LEGACY_TSS NewLegacyTss = (PFAST486_LEGACY_TSS)&NewTss; USHORT NewLdtr, NewEs, NewCs, NewSs, NewDs; - if (State->TaskReg.Limit < (sizeof(FAST486_TSS) - 1) - && State->TaskReg.Limit != (sizeof(FAST486_LEGACY_TSS) - 1)) + if ((State->TaskReg.Modern && State->TaskReg.Limit < (sizeof(FAST486_TSS) - 1)) + || (!State->TaskReg.Modern && State->TaskReg.Limit < (sizeof(FAST486_LEGACY_TSS) - 1))) { /* Invalid task register limit */ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_TS, State->TaskReg.Selector); @@ -882,6 +882,7 @@ State->TaskReg.Selector = Selector; State->TaskReg.Base = NewTssAddress; State->TaskReg.Limit = NewTssLimit; + State->TaskReg.Modern = (NewTssDescriptor.Signature == FAST486_BUSY_TSS_SIGNATURE); if (NewTssDescriptor.Signature == FAST486_BUSY_TSS_SIGNATURE) { Modified: trunk/reactos/lib/fast486/common.inl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/common.inl?rev…
============================================================================== --- trunk/reactos/lib/fast486/common.inl [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/common.inl [iso-8859-1] Thu Oct 1 02:24:17 2015 @@ -1599,6 +1599,54 @@ return TRUE; } +FORCEINLINE +BOOLEAN +FASTCALL +Fast486IoPrivilegeCheck(PFAST486_STATE State, USHORT Port) +{ + UCHAR Bits; + ULONG Location; + FAST486_TSS Tss; + + /* Access is always allowed if the CPL is less than or equal to the IOPL */ + if (State->Cpl <= State->Flags.Iopl) return TRUE; + + /* Legacy Task State Segments have no IOPB */ + if (!State->TaskReg.Modern) return FALSE; + + /* Read the TSS */ + if (!Fast486ReadLinearMemory(State, State->TaskReg.Base, &Tss, sizeof(FAST486_TSS), FALSE)) + { + /* Exception occurred */ + return FALSE; + } + + Location = State->TaskReg.Base + HIWORD(Tss.IopbOffset) + (Port >> 3); + + if (Location > State->TaskReg.Limit) + { + /* Access denied */ + Fast486Exception(State, FAST486_EXCEPTION_GP); + return FALSE; + } + + /* Read the appropriate bit from the TSS IOPB */ + if (!Fast486ReadLinearMemory(State, Location, &Bits, sizeof(UCHAR), FALSE)) + { + /* Exception occurred */ + return FALSE; + } + + if (Bits & (1 << (Port & 0x07))) + { + /* Access denied */ + Fast486Exception(State, FAST486_EXCEPTION_GP); + return FALSE; + } + + return TRUE; +} + #ifndef FAST486_NO_FPU FORCEINLINE Modified: trunk/reactos/lib/fast486/opcodes.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/opcodes.c?rev=…
============================================================================== --- trunk/reactos/lib/fast486/opcodes.c [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/opcodes.c [iso-8859-1] Thu Oct 1 02:24:17 2015 @@ -790,6 +790,8 @@ Port = State->GeneralRegs[FAST486_REG_EDX].LowWord; } + if (!Fast486IoPrivilegeCheck(State, Port)) return; + /* Read a byte from the I/O port */ State->IoReadCallback(State, Port, &Data, 1, sizeof(UCHAR)); @@ -828,6 +830,8 @@ Port = State->GeneralRegs[FAST486_REG_EDX].LowWord; } + if (!Fast486IoPrivilegeCheck(State, Port)) return; + if (Size) { ULONG Data; @@ -876,6 +880,8 @@ Port = State->GeneralRegs[FAST486_REG_EDX].LowWord; } + if (!Fast486IoPrivilegeCheck(State, Port)) return; + /* Read the value from AL */ Data = State->GeneralRegs[FAST486_REG_EAX].LowByte; @@ -913,6 +919,8 @@ /* The port number is in DX */ Port = State->GeneralRegs[FAST486_REG_EDX].LowWord; } + + if (!Fast486IoPrivilegeCheck(State, Port)) return; if (Size) { @@ -5836,6 +5844,8 @@ TOGGLE_OPSIZE(OperandSize); TOGGLE_ADSIZE(AddressSize); + if (!Fast486IoPrivilegeCheck(State, State->GeneralRegs[FAST486_REG_EDX].LowWord)) return; + /* Calculate the size */ if (Opcode == 0x6C) DataSize = sizeof(UCHAR); else DataSize = OperandSize ? sizeof(ULONG) : sizeof(USHORT); @@ -5973,6 +5983,8 @@ TOGGLE_OPSIZE(OperandSize); TOGGLE_ADSIZE(AddressSize); + + if (!Fast486IoPrivilegeCheck(State, State->GeneralRegs[FAST486_REG_EDX].LowWord)) return; /* Calculate the size */ if (Opcode == 0x6E) DataSize = sizeof(UCHAR);
9 years, 2 months
1
0
0
0
[hbelusca] 69423: [NTVDM]: Fix the open-file dialog filter.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Oct 1 02:03:31 2015 New Revision: 69423 URL:
http://svn.reactos.org/svn/reactos?rev=69423&view=rev
Log: [NTVDM]: Fix the open-file dialog filter. Modified: trunk/reactos/subsystems/mvdm/ntvdm/emulator.c Modified: trunk/reactos/subsystems/mvdm/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/emul…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] Thu Oct 1 02:03:31 2015 @@ -423,7 +423,7 @@ ofn.lpstrTitle = "Select a virtual floppy image"; ofn.Flags = OFN_EXPLORER | OFN_ENABLESIZING | OFN_LONGNAMES | OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; // ofn.FlagsEx = OFN_EX_NOPLACESBAR; - ofn.lpstrFilter = "Virtual floppy images (*.vfd;*.img;*.ima;*.dsk)\0*.vfd\0All files (*.*)\0*.*\0"; + ofn.lpstrFilter = "Virtual floppy images (*.vfd;*.img;*.ima;*.dsk)\0*.vfd;*.img;*.ima;*.dsk\0All files (*.*)\0*.*\0\0"; ofn.lpstrDefExt = "vfd"; ofn.nFilterIndex = 0; ofn.lpstrFile = szFile;
9 years, 2 months
1
0
0
0
[hbelusca] 69422: [NTVDM] - Temporarily hack the boot sequence to floppy, then hard disk. See r69421; will be improved in the future. - Complete the BIOS 16-bit bootstrap code.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Oct 1 00:37:38 2015 New Revision: 69422 URL:
http://svn.reactos.org/svn/reactos?rev=69422&view=rev
Log: [NTVDM] - Temporarily hack the boot sequence to floppy, then hard disk. See r69421; will be improved in the future. - Complete the BIOS 16-bit bootstrap code. Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c trunk/reactos/subsystems/mvdm/ntvdm/hardware/cmos.c Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] Thu Oct 1 00:37:38 2015 @@ -20,6 +20,7 @@ #include "cpu/cpu.h" // for EMULATOR_FLAG_CF #include "cpu/bop.h" #include "int32.h" +#include <isvbop.h> #include <bios/bios.h> #include <bios/rom.h> @@ -155,7 +156,8 @@ { LOBYTE(EMULATOR_BOP), HIBYTE(EMULATOR_BOP), BOP_RESET, // Call BIOS POST 0xCD, BIOS_BOOTSTRAP_LOADER, // INT 0x19 -// LOBYTE(EMULATOR_BOP), HIBYTE(EMULATOR_BOP), BOP_UNSIMULATE + 0xCD, BIOS_ROM_BASIC, // INT 0x18 + LOBYTE(EMULATOR_BOP), HIBYTE(EMULATOR_BOP), BOP_UNSIMULATE }; Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/cmos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/hardware/cmos.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/hardware/cmos.c [iso-8859-1] Thu Oct 1 00:37:38 2015 @@ -483,6 +483,9 @@ CmosMemory.ShutdownStatus = 0x00; CmosMemory.EquipmentList = CMOS_EQUIPMENT_LIST; + // HACK: For the moment, set the boot sequence to: 1-Floppy, 2-Hard Disk . + CmosMemory.Regs[CMOS_REG_SYSOP] |= (1 << 5); + /* Memory settings */ /*
9 years, 2 months
1
0
0
0
[hbelusca] 69421: [NTVDM] - Add a basic boot sequence functionality (read from CMOS); will be improved in the future. - Print a "FATAL BOOT FAILURE" error message when INT 18h is called. - Fail sta...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu Oct 1 00:09:24 2015 New Revision: 69421 URL:
http://svn.reactos.org/svn/reactos?rev=69421&view=rev
Log: [NTVDM] - Add a basic boot sequence functionality (read from CMOS); will be improved in the future. - Print a "FATAL BOOT FAILURE" error message when INT 18h is called. - Fail startup if we cannot mount the available hard disk images. - Improve some diagnostic error messages. Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.c trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.h trunk/reactos/subsystems/mvdm/ntvdm/emulator.c trunk/reactos/subsystems/mvdm/ntvdm/hardware/cmos.h trunk/reactos/subsystems/mvdm/ntvdm/hardware/disk.c trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.c trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.h Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c [iso-8859-1] Thu Oct 1 00:09:24 2015 @@ -161,6 +161,31 @@ /* PRIVATE FUNCTIONS **********************************************************/ +static VOID BiosCharPrint(CHAR Character) +{ + /* Save AX and BX */ + USHORT AX = getAX(); + USHORT BX = getBX(); + + /* + * Set the parameters: + * AL contains the character to print, + * BL contains the character attribute, + * BH contains the video page to use. + */ + setAL(Character); + setBL(DEFAULT_ATTRIBUTE); + setBH(Bda->VideoPage); + + /* Call the BIOS INT 10h, AH=0Eh "Teletype Output" */ + setAH(0x0E); + Int32Call(&BiosContext, BIOS_VIDEO_INTERRUPT); + + /* Restore AX and BX */ + setBX(BX); + setAX(AX); +} + static VOID WINAPI BiosException(LPWORD Stack) { /* Get the exception number and call the emulator API */ @@ -505,6 +530,8 @@ static VOID WINAPI BiosRomBasic(LPWORD Stack) { + PrintMessageAnsi(BiosCharPrint, "FATAL: INT18: BOOT FAILURE."); + /* ROM Basic is unsupported, display a message to the user */ DisplayMessage(L"NTVDM doesn't support ROM Basic. The VDM is closing."); @@ -518,79 +545,110 @@ static VOID WINAPI BiosBootstrapLoader(LPWORD Stack) { - /* - * In real BIOSes one loads the bootsector read from a diskette - * or from a disk, copy it to 0000:7C00 and then boot it. - * Since we are 32-bit VM and we hardcode our DOS at the moment, - * just call the DOS 32-bit initialization code. - */ - - DPRINT("BiosBootstrapLoader -->\n"); - + USHORT BootOrder; + + USHORT AX, BX, CX, DX, ES; + AX = getAX(); + BX = getBX(); + CX = getCX(); + DX = getDX(); + ES = getES(); + + /* + * Read the boot sequence order from the CMOS, old behaviour AMI-style. + * + * For more information, see: + *
http://www.virtualbox.org/svn/vbox/trunk/src/VBox/Devices/PC/BIOS/orgs.asm
+ *
http://www.virtualbox.org/svn/vbox/trunk/src/VBox/Devices/PC/BIOS/boot.c
+ *
http://bochs.sourceforge.net/cgi-bin/lxr/source/iodev/cmos.cc
+ *
https://web.archive.org/web/20111209041013/http://www-ivs.cs.uni-magdeburg.…
+ *
http://www.bioscentral.com/misc/cmosmap.htm
+ */ + IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_SYSOP); + BootOrder = (IOReadB(CMOS_DATA_PORT) & 0x20) >> 5; + + /* + * BootOrder = + * 0: Hard Disk, then Floppy Disk + * 1: Floppy Disk, then Hard Disk + * In all cases, if booting from those devices failed, + * ROM DOS-32 is started. If it fails, INT 18h is called. + */ + + DPRINT("BiosBootstrapLoader (BootOrder = 0x%02X) -->\n", BootOrder); + + /* + * Format of the BootOrder command: + * 2 bytes. Each half-byte contains the ID of the drive to boot. + * Currently defined: + * 0x0: 1st Floppy disk + * 0x1: 1st Hard disk + * Other, or 0xF: Stop boot sequence. + */ + BootOrder = 0xFF00 | ((1 << (4 * BootOrder)) & 0xFF); + +Retry: + switch (BootOrder & 0x0F) { - USHORT i; - - USHORT AX, BX, CX, DX, ES; - AX = getAX(); - BX = getBX(); - CX = getCX(); - DX = getDX(); - ES = getES(); - - // i = 0; - i = 1; - do - { - if (i == 0) - { - /* Boot from 1st floppy drive */ - - setAH(0x02); // Read sectors - setAL(0x01); // Number of sectors - setDH(0x00); // First head - setCH(0x00); // First cylinder - setCL(0x01); // First sector - setDL(0x00); // First diskette drive (used by loader code, so should not be cleared) - setES(0x0000); // Place data in 0000:7C00 - setBX(0x7C00); - BiosDiskService(Stack); - if (!(Stack[STACK_FLAGS] & EMULATOR_FLAG_CF)) goto Quit; - DPRINT1("An error happened while loading the bootsector from floppy 0, error = %d\n", getAH()); - } - else if (i == 1) - { - /* Boot from 1st HDD drive */ - - setAH(0x02); // Read sectors - setAL(0x01); // Number of sectors - setDH(0x00); // First head - setCH(0x00); // First cylinder - setCL(0x01); // First sector - setDL(0x80); // First HDD drive (used by loader code, so should not be cleared) - setES(0x0000); // Place data in 0000:7C00 - setBX(0x7C00); - BiosDiskService(Stack); - if (!(Stack[STACK_FLAGS] & EMULATOR_FLAG_CF)) goto Quit; - DPRINT1("An error happened while loading the bootsector from HDD 0, error = %d\n", getAH()); - } - // } while (i++ < 1); - } while (i-- > 0); - - /* Clear everything, we are going to load DOS32 */ - setAX(AX); - setBX(BX); - setCX(CX); - setDX(DX); - setES(ES); - Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF; + /* Boot from 1st floppy drive */ + case 0: + { + setAH(0x02); // Read sectors + setAL(0x01); // Number of sectors + setDH(0x00); // Head 0 + setCH(0x00); // Cylinder 0 + setCL(0x01); // Sector 1 + setDL(0x00); // First diskette drive (used by loader code, so should not be cleared) + setES(0x0000); // Write data in 0000:7C00 + setBX(0x7C00); + BiosDiskService(Stack); + if (!(Stack[STACK_FLAGS] & EMULATOR_FLAG_CF)) goto Quit; + DPRINT1("An error happened while loading the bootsector from floppy 0, error = %d\n", getAH()); + + break; + } + + /* Boot from 1st HDD drive */ + case 1: + { + setAH(0x02); // Read sectors + setAL(0x01); // Number of sectors + setDH(0x00); // Head 0 + setCH(0x00); // Cylinder 0 + setCL(0x01); // Sector 1 + setDL(0x80); // First HDD drive (used by loader code, so should not be cleared) + setES(0x0000); // Write data in 0000:7C00 + setBX(0x7C00); + BiosDiskService(Stack); + if (!(Stack[STACK_FLAGS] & EMULATOR_FLAG_CF)) goto Quit; + DPRINT1("An error happened while loading the bootsector from HDD 0, error = %d\n", getAH()); + + break; + } + + default: + goto StartDos; } + + /* Go to next drive and invalidate the last half-byte. */ + BootOrder = (BootOrder >> 4) | 0xF000; + goto Retry; + +StartDos: + /* Clear everything, we are going to load DOS32 */ + setAX(AX); + setBX(BX); + setCX(CX); + setDX(DX); + setES(ES); + Stack[STACK_FLAGS] &= ~EMULATOR_FLAG_CF; /* Load our DOS */ DosBootsectorInitialize(); Quit: /* - * Position CPU to 0000:7C00 to boot the OS. + * Jump to 0000:7C00 to boot the OS. * * Since we are called via the INT32 mechanism, we need to correctly set * CS:IP, not by changing the current one (otherwise the interrupt could Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.c [iso-8859-1] Thu Oct 1 00:09:24 2015 @@ -80,83 +80,6 @@ VOID DosCharPrint(CHAR Character) { DosPrintCharacter(DOS_OUTPUT_HANDLE, Character); -} - -/* - * This function, derived from ntvdm.c!DisplayMessage, is used by the BIOS and - * the DOS to display messages to an output device. A printer function is given - * for printing the characters. - */ -static VOID -DisplayMessageAnsiV(IN CHAR_PRINT CharPrint, - IN LPCSTR Format, - IN va_list args) -{ - static CHAR CurChar = 0; - LPSTR str; - -#ifndef WIN2K_COMPLIANT - CHAR StaticBuffer[256]; - LPSTR Buffer = StaticBuffer; // Use the static buffer by default. -#else - CHAR Buffer[2048]; // Large enough. If not, increase it by hand. -#endif - size_t MsgLen; - -#ifndef WIN2K_COMPLIANT - /* - * Retrieve the message length and if it is too long, allocate - * an auxiliary buffer; otherwise use the static buffer. - * The string is built to be NULL-terminated. - */ - MsgLen = _vscprintf(Format, args); - if (MsgLen >= ARRAYSIZE(StaticBuffer)) - { - Buffer = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, (MsgLen + 1) * sizeof(CHAR)); - if (Buffer == NULL) - { - /* Allocation failed, use the static buffer and display a suitable error message */ - Buffer = StaticBuffer; - Format = "DisplayMessageAnsi()\nOriginal message is too long and allocating an auxiliary buffer failed."; - MsgLen = strlen(Format); - } - } -#else - MsgLen = ARRAYSIZE(Buffer) - 1; -#endif - - RtlZeroMemory(Buffer, (MsgLen + 1) * sizeof(CHAR)); - _vsnprintf(Buffer, MsgLen, Format, args); - - /* Display the message */ - DPRINT1("\n\nNTVDM DOS32\n%s\n\n", Buffer); - - MsgLen = strlen(Buffer); - str = Buffer; - while (MsgLen--) - { - if (*str == '\n' && CurChar != '\r') - CharPrint('\r'); - - CurChar = *str++; - CharPrint(CurChar); - } - -#ifndef WIN2K_COMPLIANT - /* Free the buffer if needed */ - if (Buffer != StaticBuffer) RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); -#endif -} - -VOID -DemDisplayMessage(IN CHAR_PRINT CharPrint, - IN LPCSTR Format, ...) -{ - va_list Parameters; - - va_start(Parameters, Format); - DisplayMessageAnsiV(CharPrint, Format, Parameters); - va_end(Parameters); } Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dem.h [iso-8859-1] Thu Oct 1 00:09:24 2015 @@ -29,18 +29,13 @@ /* FUNCTIONS ******************************************************************/ -typedef VOID (*CHAR_PRINT)(IN CHAR Character); VOID BiosCharPrint(CHAR Character); +#define BiosDisplayMessage(Format, ...) \ + PrintMessageAnsi(BiosCharPrint, (Format), ##__VA_ARGS__) + VOID DosCharPrint(CHAR Character); - -VOID DemDisplayMessage(IN CHAR_PRINT CharPrint, - IN LPCSTR Format, ...); - -#define BiosDisplayMessage(Format, ...) \ - DemDisplayMessage(BiosCharPrint, (Format), ##__VA_ARGS__) - #define DosDisplayMessage(Format, ...) \ - DemDisplayMessage(DosCharPrint, (Format), ##__VA_ARGS__) + PrintMessageAnsi(DosCharPrint, (Format), ##__VA_ARGS__) BOOLEAN DosShutdown(BOOLEAN Immediate); Modified: trunk/reactos/subsystems/mvdm/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/emul…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/emulator.c [iso-8859-1] Thu Oct 1 00:09:24 2015 @@ -564,14 +564,22 @@ } } - /* Mount the available hard disks */ + /* + * Mount the available hard disks. Contrary to floppies, failing + * mounting a hard disk is considered as an unrecoverable error. + */ for (i = 0; i < ARRAYSIZE(GlobalSettings.HardDisks); ++i) { if (GlobalSettings.HardDisks[i].Length != 0 && GlobalSettings.HardDisks[i].Buffer && GlobalSettings.HardDisks[i].Buffer != '\0') { - MountDisk(HARD_DISK, i, GlobalSettings.HardDisks[i].Buffer, FALSE); + if (!MountDisk(HARD_DISK, i, GlobalSettings.HardDisks[i].Buffer, FALSE)) + { + wprintf(L"FATAL: Failed to mount hard disk file '%Z'.\n", &GlobalSettings); + EmulatorCleanup(); + return FALSE; + } } } Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/cmos.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/hardware/cmos.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/hardware/cmos.h [iso-8859-1] Thu Oct 1 00:09:24 2015 @@ -70,6 +70,7 @@ CMOS_REG_BASE_MEMORY_HIGH = 0x16, CMOS_REG_EXT_MEMORY_LOW = 0x17, CMOS_REG_EXT_MEMORY_HIGH = 0x18, + CMOS_REG_SYSOP = 0x2D, CMOS_REG_ACTUAL_EXT_MEMORY_LOW = 0x30, CMOS_REG_ACTUAL_EXT_MEMORY_HIGH = 0x31, CMOS_REG_CENTURY = 0x32, Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/disk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/hardware/disk.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/hardware/disk.c [iso-8859-1] Thu Oct 1 00:09:24 2015 @@ -199,7 +199,7 @@ if (FileSize == INVALID_FILE_SIZE && GetLastError() != ERROR_SUCCESS) { /* We failed, bail out */ - DisplayMessage(L"Error when retrieving file size, or size too large (%d).", FileSize); + DisplayMessage(L"MountFDI: Error when retrieving file size, or size too large (%d).", FileSize); return FALSE; } @@ -547,7 +547,11 @@ FileName, hFile != INVALID_HANDLE_VALUE ? "succeeded" : "failed", GetLastError()); /* If we failed, bail out */ - if (hFile == INVALID_HANDLE_VALUE) return FALSE; + if (hFile == INVALID_HANDLE_VALUE) + { + DisplayMessage(L"MountDisk: Error when opening disk file '%S' (Error: %u).", FileName, GetLastError()); + return FALSE; + } /* OK, we have a handle to the file */ @@ -563,7 +567,7 @@ GetLastError() == ERROR_INVALID_FUNCTION) { /* Objects other than real files are not supported */ - DisplayMessage(L"'%S' is not a valid disk file.", FileName); + DisplayMessage(L"MountDisk: '%S' is not a valid disk file.", FileName); goto Quit; } SetLastError(0); @@ -571,7 +575,7 @@ GetLastError() == ERROR_INVALID_FUNCTION) { /* Objects other than real files are not supported */ - DisplayMessage(L"'%S' is not a valid disk file.", FileName); + DisplayMessage(L"MountDisk: '%S' is not a valid disk file.", FileName); goto Quit; } Modified: trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/ntvd…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.c [iso-8859-1] Thu Oct 1 00:09:24 2015 @@ -562,9 +562,9 @@ WCHAR Buffer[2048]; // Large enough. If not, increase it by hand. #endif size_t MsgLen; - va_list Parameters; - - va_start(Parameters, Format); + va_list args; + + va_start(args, Format); #ifndef WIN2K_COMPLIANT /* @@ -572,7 +572,7 @@ * an auxiliary buffer; otherwise use the static buffer. * The string is built to be NULL-terminated. */ - MsgLen = _vscwprintf(Format, Parameters); + MsgLen = _vscwprintf(Format, args); if (MsgLen >= ARRAYSIZE(StaticBuffer)) { Buffer = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, (MsgLen + 1) * sizeof(WCHAR)); @@ -589,13 +589,83 @@ #endif RtlZeroMemory(Buffer, (MsgLen + 1) * sizeof(WCHAR)); - _vsnwprintf(Buffer, MsgLen, Format, Parameters); - - va_end(Parameters); + _vsnwprintf(Buffer, MsgLen, Format, args); + + va_end(args); /* Display the message */ DPRINT1("\n\nNTVDM Subsystem\n%S\n\n", Buffer); MessageBoxW(hConsoleWnd, Buffer, L"NTVDM Subsystem", MB_OK); + +#ifndef WIN2K_COMPLIANT + /* Free the buffer if needed */ + if (Buffer != StaticBuffer) RtlFreeHeap(RtlGetProcessHeap(), 0, Buffer); +#endif +} + +/* + * This function, derived from DisplayMessage, is used by the BIOS and + * the DOS to display messages to an output device. A printer function + * is given for printing the characters. + */ +VOID +PrintMessageAnsi(IN CHAR_PRINT CharPrint, + IN LPCSTR Format, ...) +{ + static CHAR CurChar = 0; + LPSTR str; + +#ifndef WIN2K_COMPLIANT + CHAR StaticBuffer[256]; + LPSTR Buffer = StaticBuffer; // Use the static buffer by default. +#else + CHAR Buffer[2048]; // Large enough. If not, increase it by hand. +#endif + size_t MsgLen; + va_list args; + + va_start(args, Format); + +#ifndef WIN2K_COMPLIANT + /* + * Retrieve the message length and if it is too long, allocate + * an auxiliary buffer; otherwise use the static buffer. + * The string is built to be NULL-terminated. + */ + MsgLen = _vscprintf(Format, args); + if (MsgLen >= ARRAYSIZE(StaticBuffer)) + { + Buffer = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, (MsgLen + 1) * sizeof(CHAR)); + if (Buffer == NULL) + { + /* Allocation failed, use the static buffer and display a suitable error message */ + Buffer = StaticBuffer; + Format = "DisplayMessageAnsi()\nOriginal message is too long and allocating an auxiliary buffer failed."; + MsgLen = strlen(Format); + } + } +#else + MsgLen = ARRAYSIZE(Buffer) - 1; +#endif + + RtlZeroMemory(Buffer, (MsgLen + 1) * sizeof(CHAR)); + _vsnprintf(Buffer, MsgLen, Format, args); + + va_end(args); + + /* Display the message */ + // DPRINT1("\n\nNTVDM DOS32\n%s\n\n", Buffer); + + MsgLen = strlen(Buffer); + str = Buffer; + while (MsgLen--) + { + if (*str == '\n' && CurChar != '\r') + CharPrint('\r'); + + CurChar = *str++; + CharPrint(CurChar); + } #ifndef WIN2K_COMPLIANT /* Free the buffer if needed */ @@ -877,7 +947,7 @@ } #endif - /* Load global VDM settings */ + /* Load the global VDM settings */ LoadGlobalSettings(&GlobalSettings); DPRINT1("\n\n\nNTVDM - Starting...\n\n\n"); Modified: trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/ntvd…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/ntvdm.h [iso-8859-1] Thu Oct 1 00:09:24 2015 @@ -94,7 +94,10 @@ /* * Interface functions */ +typedef VOID (*CHAR_PRINT)(IN CHAR Character); VOID DisplayMessage(IN LPCWSTR Format, ...); +VOID PrintMessageAnsi(IN CHAR_PRINT CharPrint, + IN LPCSTR Format, ...); /*static*/ VOID CreateVdmMenu(HANDLE ConOutHandle);
9 years, 2 months
1
0
0
0
← Newer
1
...
32
33
34
35
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
Results per page:
10
25
50
100
200