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
May 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
15 participants
500 discussions
Start a n
N
ew thread
[hbelusca] 67604: [NTVDM]: hardcoded_values--;
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri May 8 23:47:33 2015 New Revision: 67604 URL:
http://svn.reactos.org/svn/reactos?rev=67604&view=rev
Log: [NTVDM]: hardcoded_values--; Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/device.c [iso-8859-1] Fri May 8 23:47:33 2015 @@ -358,7 +358,7 @@ } /* Create a driver header for this device */ - Segment = DosAllocateMemory(sizeof(DOS_DRIVER) + 10 + PrivateDataSize, NULL); + Segment = DosAllocateMemory(sizeof(DOS_DRIVER) + DEVICE_CODE_SIZE + PrivateDataSize, NULL); if (Segment == 0) return NULL; /* Fill the header with data */
9 years, 7 months
1
0
0
0
[aandrejevic] 67603: [NTVDM] DosTerminateProcess shouldn't blindly attempt to restore the old state, (for example if the process was started manually by a debugger).
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Fri May 8 23:26:15 2015 New Revision: 67603 URL:
http://svn.reactos.org/svn/reactos?rev=67603&view=rev
Log: [NTVDM] DosTerminateProcess shouldn't blindly attempt to restore the old state, (for example if the process was started manually by a debugger). Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.h Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] Fri May 8 23:26:15 2015 @@ -1342,7 +1342,6 @@ BYTE OrgAL = getAL(); LPSTR ProgramName = SEG_OFF_TO_PTR(getDS(), getDX()); PDOS_EXEC_PARAM_BLOCK ParamBlock = SEG_OFF_TO_PTR(getES(), getBX()); - DWORD ReturnAddress = MAKELONG(Stack[STACK_IP], Stack[STACK_CS]); WORD ErrorCode; if (OrgAL <= DOS_LOAD_OVERLAY) @@ -1353,9 +1352,7 @@ if (LoadType == DOS_LOAD_AND_EXECUTE) { /* Create a new process */ - ErrorCode = DosCreateProcess(ProgramName, - ParamBlock, - ReturnAddress); + ErrorCode = DosCreateProcess(ProgramName, ParamBlock); } else #endif @@ -1365,8 +1362,7 @@ ProgramName, ParamBlock, NULL, - NULL, - ReturnAddress); + NULL); } } else if (OrgAL == 0x05) @@ -2003,7 +1999,7 @@ #endif /* Initialize the callback context */ - InitializeContext(&DosContext, 0x0070, 0x0000); + InitializeContext(&DosContext, DOS_CODE_SEGMENT, 0x0000); /* Register the DOS 32-bit Interrupts */ RegisterDosInt32(0x20, DosInt20h ); Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.h [iso-8859-1] Fri May 8 23:26:15 2015 @@ -30,6 +30,7 @@ #define USER_MEMORY_SIZE (0x9FFE - FIRST_MCB_SEGMENT) #define SYSTEM_PSP 0x08 #define SYSTEM_ENV_BLOCK 0x800 +#define DOS_CODE_SEGMENT 0x70 #define DOS_DATA_SEGMENT 0xA0 #define MASTER_SFT_OFFSET 0x100 Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.c [iso-8859-1] Fri May 8 23:26:15 2015 @@ -54,6 +54,7 @@ /* Allocate stack space for the registers */ StackPointer -= sizeof(DOS_REGISTER_STATE); State = SEG_OFF_TO_PTR(getSS(), StackPointer); + setSP(StackPointer); /* Save */ State->EAX = getEAX(); @@ -74,12 +75,10 @@ static inline VOID DosRestoreState(VOID) { PDOS_REGISTER_STATE State; - WORD StackPointer = getSP(); - - /* SS:SP points to the stack on the last entry to INT 21h */ - StackPointer -= (STACK_FLAGS + 1) * 2; /* Interrupt parameters */ - StackPointer -= sizeof(DOS_REGISTER_STATE); /* Pushed state structure */ - State = SEG_OFF_TO_PTR(getSS(), StackPointer); + + /* Pop the state structure from the stack */ + State = SEG_OFF_TO_PTR(getSS(), getSP()); + setSP(getSP() + sizeof(DOS_REGISTER_STATE)); /* Restore */ setEAX(State->EAX); @@ -244,8 +243,7 @@ IN LPCSTR ExecutablePath, IN PDOS_EXEC_PARAM_BLOCK Parameters, IN LPCSTR CommandLine OPTIONAL, - IN LPCSTR Environment OPTIONAL, - IN DWORD ReturnAddress OPTIONAL) + IN LPCSTR Environment OPTIONAL) { DWORD Result = ERROR_SUCCESS; HANDLE FileHandle = INVALID_HANDLE_VALUE, FileMapping = NULL; @@ -264,8 +262,7 @@ DPRINT1("DosLoadExecutable(%d, %s, 0x%08X, 0x%08X)\n", LoadType, ExecutablePath, - Parameters, - ReturnAddress); + Parameters); /* Try to get the full path to the executable */ if (GetFullPathNameA(ExecutablePath, sizeof(FullPath), FullPath, NULL)) @@ -454,8 +451,8 @@ DosChangeMemoryOwner(Segment, Segment); DosChangeMemoryOwner(EnvBlock, Segment); - /* Set INT 22h to the return address */ - ((PULONG)BaseAddress)[0x22] = ReturnAddress; + /* Set INT 22h to the current CS:IP */ + ((PULONG)BaseAddress)[0x22] = MAKELONG(getIP(), getCS()); /* Create the PSP */ DosCreatePsp(Segment, (WORD)TotalSize); @@ -497,7 +494,14 @@ if (LoadType == DOS_LOAD_AND_EXECUTE) { /* Save the program state */ - if (CurrentPsp != SYSTEM_PSP) DosSaveState(); + if (CurrentPsp != SYSTEM_PSP) + { + /* Push the task state */ + DosSaveState(); + + /* Update the last stack in the PSP */ + SEGMENT_TO_PSP(CurrentPsp)->LastStack = MAKELONG(getSP(), getSS()); + } /* Set the initial segment registers */ setDS(Segment); @@ -546,8 +550,8 @@ DosChangeMemoryOwner(Segment, Segment); DosChangeMemoryOwner(EnvBlock, Segment); - /* Set INT 22h to the return address */ - ((PULONG)BaseAddress)[0x22] = ReturnAddress; + /* Set INT 22h to the current CS:IP */ + ((PULONG)BaseAddress)[0x22] = MAKELONG(getIP(), getCS()); /* Create the PSP */ DosCreatePsp(Segment, MaxAllocSize); @@ -570,6 +574,16 @@ if (LoadType == DOS_LOAD_AND_EXECUTE) { + /* Save the program state */ + if (CurrentPsp != SYSTEM_PSP) + { + /* Push the task state */ + DosSaveState(); + + /* Update the last stack in the PSP */ + SEGMENT_TO_PSP(CurrentPsp)->LastStack = MAKELONG(getSP(), getSS()); + } + /* Set the initial segment registers */ setDS(Segment); setES(Segment); @@ -621,7 +635,6 @@ IN LPCSTR Environment OPTIONAL) { DWORD Result; - LPDWORD IntVecTable = (LPDWORD)((ULONG_PTR)BaseAddress); SIZE_T CmdLen = strlen(CommandLine); DPRINT1("Starting '%s' ('%.*s')...\n", @@ -636,8 +649,7 @@ ExecutablePath, NULL, CommandLine, - Environment, - IntVecTable[0x20]); + Environment); if (Result != ERROR_SUCCESS) goto Quit; @@ -665,8 +677,7 @@ #ifndef STANDALONE WORD DosCreateProcess(LPCSTR ProgramName, - PDOS_EXEC_PARAM_BLOCK Parameters, - DWORD ReturnAddress) + PDOS_EXEC_PARAM_BLOCK Parameters) { DWORD Result; DWORD BinaryType; @@ -784,8 +795,7 @@ AppName, Parameters, CmdLine, - Env, - ReturnAddress); + Env); if (Result == ERROR_SUCCESS) { /* Increment the re-entry count */ @@ -924,8 +934,14 @@ setSS(HIWORD(SEGMENT_TO_PSP(CurrentPsp)->LastStack)); setSP(LOWORD(SEGMENT_TO_PSP(CurrentPsp)->LastStack)); - /* Restore the program state */ - DosRestoreState(); + DPRINT1("Terminate returning to %08X\n", PspBlock->TerminateAddress); + + /* Are we returning to DOS code? */ + if (HIWORD(PspBlock->TerminateAddress) == DOS_CODE_SEGMENT) + { + /* Pop the task state */ + DosRestoreState(); + } /* Return control to the parent process */ CpuExecute(HIWORD(PspBlock->TerminateAddress), Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/process.h [iso-8859-1] Fri May 8 23:26:15 2015 @@ -97,8 +97,7 @@ IN LPCSTR ExecutablePath, IN PDOS_EXEC_PARAM_BLOCK Parameters, IN LPCSTR CommandLine OPTIONAL, - IN LPCSTR Environment OPTIONAL, - IN DWORD ReturnAddress OPTIONAL + IN LPCSTR Environment OPTIONAL ); DWORD DosStartProcess( @@ -110,8 +109,7 @@ WORD DosCreateProcess ( LPCSTR ProgramName, - PDOS_EXEC_PARAM_BLOCK Parameters, - DWORD ReturnAddress + PDOS_EXEC_PARAM_BLOCK Parameters ); VOID DosTerminateProcess(WORD Psp, BYTE ReturnCode, WORD KeepResident);
9 years, 7 months
1
0
0
0
[hbelusca] 67602: [NTVDM]: Merge Bios32 ResetBop with POST function.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri May 8 19:43:12 2015 New Revision: 67602 URL:
http://svn.reactos.org/svn/reactos?rev=67602&view=rev
Log: [NTVDM]: Merge Bios32 ResetBop with POST function. Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.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] Fri May 8 19:43:12 2015 @@ -635,8 +635,9 @@ /* * The BIOS POST (Power On-Self Test) */ -VOID -Bios32Post(VOID) +static VOID +WINAPI +Bios32Post(LPWORD Stack) { #if 0 BOOLEAN Success; @@ -644,6 +645,9 @@ BYTE ShutdownStatus; DPRINT("Bios32Post\n"); + + /* Disable interrupts */ + setIF(0); /* Initialize the stack */ // That's what says IBM... (stack at 30:00FF going downwards) @@ -686,7 +690,7 @@ case 0x04: { DPRINT1("Fast restart to Bootstrap Loader...\n"); - return; + goto Quit; // Reenable interrupts and exit. } /* Flush keyboard, issue an EOI... */ @@ -711,7 +715,7 @@ HIWORD(Bda->ResumeEntryPoint), LOWORD(Bda->ResumeEntryPoint)); - /* Position execution pointers to Bda->ResumeEntryPoint and return */ + /* Position execution pointers and return with interrupts disabled */ setCS(HIWORD(Bda->ResumeEntryPoint)); setIP(LOWORD(Bda->ResumeEntryPoint)); return; @@ -764,8 +768,6 @@ /* Initialize the Keyboard, Video and Mouse BIOS */ if (!KbdBios32Initialize() || !VidBios32Initialize() || !MouseBios32Initialize()) { - // return FALSE; - /* Stop the VDM */ EmulatorTerminate(); return; @@ -796,18 +798,8 @@ * the rest of the POST code is executed, typically calling INT 19h * to boot up the OS. */ -} - -static VOID WINAPI Bios32ResetBop(LPWORD Stack) -{ - DPRINT("Bios32ResetBop\n"); - - /* Disable interrupts */ - setIF(0); - - /* Do the POST */ - Bios32Post(); - + +Quit: /* Enable interrupts */ setIF(1); } @@ -839,7 +831,7 @@ *(PBYTE)(SEG_OFF_TO_PTR(0xF000, 0xFFFE)) = BIOS_MODEL; /* Redefine our POST function */ - RegisterBop(BOP_RESET, Bios32ResetBop); + RegisterBop(BOP_RESET, Bios32Post); /* We are done */ return TRUE;
9 years, 7 months
1
0
0
0
[hbelusca] 67601: [NTVDM]: Implement PC reset handling in the BIOS. Used by some apps for switching from protected mode back to real mode the 286 way (see: http://www.rcollins.org/articles/pmbasics...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Fri May 8 19:26:46 2015 New Revision: 67601 URL:
http://svn.reactos.org/svn/reactos?rev=67601&view=rev
Log: [NTVDM]: Implement PC reset handling in the BIOS. Used by some apps for switching from protected mode back to real mode the 286 way (see:
http://www.rcollins.org/articles/pmbasics/
for more details). Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios.h trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/bios/bios.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/bios/bios.h [iso-8859-1] Fri May 8 19:26:46 2015 @@ -74,7 +74,13 @@ WORD CrtBasePort; // 0x63 BYTE CrtModeControl; // 0x65 BYTE CrtColorPaletteMask; // 0x66 - BYTE CassetteData[5]; // 0x67 + + union // 0x67 + { + BYTE CassetteData[5]; // Cassette tape control (unused) + DWORD ResumeEntryPoint; // CS:IP for 286 return from Protected Mode + }; + DWORD TickCounter; // 0x6c BYTE MidnightPassed; // 0x70 BYTE BreakFlag; // 0x71 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] Fri May 8 19:26:46 2015 @@ -31,6 +31,7 @@ #include "hardware/cmos.h" #include "hardware/pic.h" #include "hardware/pit.h" +#include "hardware/ps2.h" /* PRIVATE VARIABLES **********************************************************/ @@ -131,7 +132,7 @@ static BYTE PostCode[] = { LOBYTE(EMULATOR_BOP), HIBYTE(EMULATOR_BOP), BOP_RESET, // Call BIOS POST - 0xCD, 0x19, // INT 0x19, the bootstrap loader interrupt + 0xCD, BIOS_BOOTSTRAP_LOADER, // INT 0x19 // LOBYTE(EMULATOR_BOP), HIBYTE(EMULATOR_BOP), BOP_UNSIMULATE }; @@ -233,9 +234,9 @@ * Return the (usable) extended memory (after 1 MB) * size in kB from CMOS. */ - IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_ACTUAL_EXT_MEMORY_LOW); + IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_ACTUAL_EXT_MEMORY_LOW | CMOS_DISABLE_NMI); Low = IOReadB(CMOS_DATA_PORT); - IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_ACTUAL_EXT_MEMORY_HIGH); + IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_ACTUAL_EXT_MEMORY_HIGH | CMOS_DISABLE_NMI); High = IOReadB(CMOS_DATA_PORT); setAX(MAKEWORD(Low, High)); @@ -607,9 +608,9 @@ * Retrieve the conventional memory size * in kB from CMOS, typically 640 kB. */ - IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_BASE_MEMORY_LOW); + IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_BASE_MEMORY_LOW | CMOS_DISABLE_NMI); Low = IOReadB(CMOS_DATA_PORT); - IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_BASE_MEMORY_HIGH); + IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_BASE_MEMORY_HIGH | CMOS_DISABLE_NMI); High = IOReadB(CMOS_DATA_PORT); Bda->MemorySize = MAKEWORD(Low, High); } @@ -640,6 +641,7 @@ #if 0 BOOLEAN Success; #endif + BYTE ShutdownStatus; DPRINT("Bios32Post\n"); @@ -654,12 +656,80 @@ setDS(BDA_SEGMENT); /* + * Perform early CMOS shutdown status checks + */ + + /* Read the CMOS shutdown status byte and reset it */ + IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_SHUTDOWN_STATUS | CMOS_DISABLE_NMI); + ShutdownStatus = IOReadB(CMOS_DATA_PORT); + IOWriteB(CMOS_ADDRESS_PORT, CMOS_REG_SHUTDOWN_STATUS | CMOS_DISABLE_NMI); + IOWriteB(CMOS_DATA_PORT, 0x00); + + DPRINT1("Bda->SoftReset = 0x%04X ; ShutdownStatus = 0x%02X\n", + Bda->SoftReset, ShutdownStatus); + + switch (ShutdownStatus) + { + /* Shutdown after Memory Tests (unsupported) */ + case 0x01: case 0x02: case 0x03: + /* Shutdown after Protected Mode Tests (unsupported) */ + case 0x06: case 0x07: case 0x08: + /* Shutdown after Block Move Test (unsupported) */ + case 0x09: + { + DisplayMessage(L"Unsupported CMOS Shutdown Status value 0x%02X. The VDM is stopping...", ShutdownStatus); + EmulatorTerminate(); + return; + } + + /* Shutdown to Boot Loader */ + case 0x04: + { + DPRINT1("Fast restart to Bootstrap Loader...\n"); + return; + } + + /* Flush keyboard, issue an EOI... */ + case 0x05: + { + IOReadB(PS2_DATA_PORT); + + /* Send EOI */ + IOWriteB(PIC_SLAVE_CMD , PIC_OCW2_EOI); + IOWriteB(PIC_MASTER_CMD, PIC_OCW2_EOI); + + // Fall back + } + + /* + * ... and far JMP to user-specified location at 0040:0067 + * (Bda->ResumeEntryPoint) with interrupts and NMI disabled. + */ + case 0x0A: + { + DPRINT1("Bda->ResumeEntryPoint = %04X:%04X\n", + HIWORD(Bda->ResumeEntryPoint), + LOWORD(Bda->ResumeEntryPoint)); + + /* Position execution pointers to Bda->ResumeEntryPoint and return */ + setCS(HIWORD(Bda->ResumeEntryPoint)); + setIP(LOWORD(Bda->ResumeEntryPoint)); + return; + } + + /* Soft reset or unexpected shutdown... */ + case 0x00: + /* ... or other possible shutdown codes: just continue the POST */ + default: + break; + } + + /* + * FIXME: UNIMPLEMENTED! * Check the word at 0040h:0072h (Bda->SoftReset) and do one of the * following actions: * - if the word is 0000h, perform a cold reboot (aka. Reset). Everything gets initialized. * - if the word is 1234h, perform a warm reboot (aka. Ctrl-Alt-Del). Some stuff is skipped. - * In case we do a warm reboot, we need to check for the CMOS shutdown flag - * and take a suitable action. */ // FIXME: This is a debug temporary check:
9 years, 7 months
1
0
0
0
[bfreisen] 67600: [MSPAINT_NEW] Convert to C++, update header comments
by bfreisen@svn.reactos.org
Author: bfreisen Date: Fri May 8 16:27:46 2015 New Revision: 67600 URL:
http://svn.reactos.org/svn/reactos?rev=67600&view=rev
Log: [MSPAINT_NEW] Convert to C++, update header comments Added: trunk/reactos/base/applications/mspaint_new/dialogs.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/dialogs.c trunk/reactos/base/applications/mspaint_new/dib.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/dib.c trunk/reactos/base/applications/mspaint_new/drawing.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/drawing.c trunk/reactos/base/applications/mspaint_new/history.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/history.c trunk/reactos/base/applications/mspaint_new/main.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/main.c trunk/reactos/base/applications/mspaint_new/mouse.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/mouse.c trunk/reactos/base/applications/mspaint_new/palette.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/palette.c trunk/reactos/base/applications/mspaint_new/registry.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/registry.c trunk/reactos/base/applications/mspaint_new/scrollbox.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/scrollbox.c trunk/reactos/base/applications/mspaint_new/selection.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/selection.c trunk/reactos/base/applications/mspaint_new/sizebox.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/sizebox.c trunk/reactos/base/applications/mspaint_new/textedit.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/textedit.c trunk/reactos/base/applications/mspaint_new/toolsettings.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/toolsettings.c trunk/reactos/base/applications/mspaint_new/winproc.cpp - copied, changed from r67599, trunk/reactos/base/applications/mspaint_new/winproc.c Removed: trunk/reactos/base/applications/mspaint_new/dialogs.c trunk/reactos/base/applications/mspaint_new/dib.c trunk/reactos/base/applications/mspaint_new/drawing.c trunk/reactos/base/applications/mspaint_new/history.c trunk/reactos/base/applications/mspaint_new/main.c trunk/reactos/base/applications/mspaint_new/mouse.c trunk/reactos/base/applications/mspaint_new/palette.c trunk/reactos/base/applications/mspaint_new/registry.c trunk/reactos/base/applications/mspaint_new/scrollbox.c trunk/reactos/base/applications/mspaint_new/selection.c trunk/reactos/base/applications/mspaint_new/sizebox.c trunk/reactos/base/applications/mspaint_new/textedit.c trunk/reactos/base/applications/mspaint_new/toolsettings.c trunk/reactos/base/applications/mspaint_new/winproc.c Modified: trunk/reactos/base/applications/mspaint_new/CMakeLists.txt trunk/reactos/base/applications/mspaint_new/definitions.h trunk/reactos/base/applications/mspaint_new/dialogs.h trunk/reactos/base/applications/mspaint_new/dib.h trunk/reactos/base/applications/mspaint_new/drawing.h trunk/reactos/base/applications/mspaint_new/globalvar.h trunk/reactos/base/applications/mspaint_new/history.h trunk/reactos/base/applications/mspaint_new/mouse.h trunk/reactos/base/applications/mspaint_new/palette.h trunk/reactos/base/applications/mspaint_new/registry.h trunk/reactos/base/applications/mspaint_new/rsrc.rc trunk/reactos/base/applications/mspaint_new/scrollbox.h trunk/reactos/base/applications/mspaint_new/selection.h trunk/reactos/base/applications/mspaint_new/sizebox.h trunk/reactos/base/applications/mspaint_new/textedit.h trunk/reactos/base/applications/mspaint_new/toolsettings.h trunk/reactos/base/applications/mspaint_new/winproc.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/base/applications/mspaint_new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/definitions.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/dialogs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/dialogs.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/dialogs.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/dialogs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/dib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/dib.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/dib.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/dib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/drawing.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/drawing.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/drawing.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/drawing.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/globalvar.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/history.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/history.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/history.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/history.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/main.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/main.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/mouse.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/mouse.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/mouse.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/palette.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/palette.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/palette.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/palette.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/registry.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/registry.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/registry.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/rsrc.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/scrollbox.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/scrollbox.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/scrollbox.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/scrollbox.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/selection.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/selection.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/selection.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/selection.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/sizebox.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/sizebox.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/sizebox.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/sizebox.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/textedit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/textedit.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/textedit.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/textedit.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/toolsettings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/toolsettings.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/toolsettings.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/toolsettings.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Removed: trunk/reactos/base/applications/mspaint_new/winproc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Copied: trunk/reactos/base/applications/mspaint_new/winproc.cpp (from r67599, trunk/reactos/base/applications/mspaint_new/winproc.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
Modified: trunk/reactos/base/applications/mspaint_new/winproc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
9 years, 7 months
1
0
0
0
[bfreisen] 67599: [MSPAINT_NEW] bootstrap mspaint_new from mspaint
by bfreisen@svn.reactos.org
Author: bfreisen Date: Fri May 8 16:02:36 2015 New Revision: 67599 URL:
http://svn.reactos.org/svn/reactos?rev=67599&view=rev
Log: [MSPAINT_NEW] bootstrap mspaint_new from mspaint Added: trunk/reactos/base/applications/mspaint_new/ - copied from r67598, trunk/reactos/base/applications/mspaint/ Modified: trunk/reactos/base/applications/CMakeLists.txt trunk/reactos/base/applications/mspaint_new/CMakeLists.txt Modified: trunk/reactos/base/applications/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/CMakeLis…
============================================================================== --- trunk/reactos/base/applications/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/applications/CMakeLists.txt [iso-8859-1] Fri May 8 16:02:36 2015 @@ -20,6 +20,7 @@ add_subdirectory(msconfig) add_subdirectory(mscutils) add_subdirectory(mspaint) +add_subdirectory(mspaint_new) add_subdirectory(mstsc) add_subdirectory(network) add_subdirectory(notepad) Modified: trunk/reactos/base/applications/mspaint_new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint_…
============================================================================== --- trunk/reactos/base/applications/mspaint_new/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint_new/CMakeLists.txt [iso-8859-1] Fri May 8 16:02:36 2015 @@ -16,8 +16,8 @@ winproc.c precomp.h) -add_executable(mspaint ${SOURCE} rsrc.rc) -set_module_type(mspaint win32gui UNICODE) -add_importlibs(mspaint hhctrl comdlg32 shell32 user32 gdi32 advapi32 comctl32 msvcrt kernel32) -add_pch(mspaint precomp.h SOURCE) -add_cd_file(TARGET mspaint DESTINATION reactos/system32 FOR all) +add_executable(mspaint_new ${SOURCE} rsrc.rc) +set_module_type(mspaint_new win32gui UNICODE) +add_importlibs(mspaint_new hhctrl comdlg32 shell32 user32 gdi32 advapi32 comctl32 msvcrt kernel32) +add_pch(mspaint_new precomp.h SOURCE) +add_cd_file(TARGET mspaint_new DESTINATION reactos/system32 FOR all)
9 years, 7 months
1
0
0
0
[aandrejevic] 67598: [FAST486] Fix the order of operatins in RETF.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Fri May 8 03:43:31 2015 New Revision: 67598 URL:
http://svn.reactos.org/svn/reactos?rev=67598&view=rev
Log: [FAST486] Fix the order of operatins in RETF. Modified: trunk/reactos/lib/fast486/opcodes.c 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] Fri May 8 03:43:31 2015 @@ -4433,6 +4433,9 @@ ULONG Offset = 0; USHORT BytesToPop = 0; BOOLEAN Size = State->SegmentRegs[FAST486_REG_CS].Size; + ULONG StackPtr; + ULONG StackSel; + UCHAR OldCpl = Fast486GetCurrentPrivLevel(State); /* Make sure this is the right instruction */ ASSERT((Opcode & 0xFE) == 0xCA); @@ -4460,20 +4463,18 @@ return; } - /* Load the new CS */ - if (!Fast486LoadSegment(State, FAST486_REG_CS, Segment)) - { - /* Exception occurred */ - return; + /* Pop the parameters */ + if (State->SegmentRegs[FAST486_REG_SS].Size) + { + State->GeneralRegs[FAST486_REG_ESP].Long += BytesToPop; + } + else + { + State->GeneralRegs[FAST486_REG_ESP].LowWord += BytesToPop; } if ((State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) && !State->Flags.Vm) { - UINT i; - UINT OldCpl = Fast486GetCurrentPrivLevel(State); - ULONG StackPtr; - ULONG StackSel; - if (GET_SEGMENT_RPL(Segment) > OldCpl) { /* Pop ESP */ @@ -4490,6 +4491,22 @@ return; } } + } + + /* Load the new CS */ + if (!Fast486LoadSegment(State, FAST486_REG_CS, Segment)) + { + /* Exception occurred */ + return; + } + + /* Load new (E)IP */ + if (Size) State->InstPtr.Long = Offset; + else State->InstPtr.LowWord = LOWORD(Offset); + + if ((State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) && !State->Flags.Vm) + { + UINT i; /* Update the CPL */ State->Cpl = GET_SEGMENT_RPL(Segment); @@ -4522,18 +4539,6 @@ } } } - } - - /* Load new (E)IP, and if necessary, pop the parameters */ - if (Size) - { - State->InstPtr.Long = Offset; - State->GeneralRegs[FAST486_REG_ESP].Long += BytesToPop; - } - else - { - State->InstPtr.LowWord = LOWORD(Offset); - State->GeneralRegs[FAST486_REG_ESP].LowWord += BytesToPop; } }
9 years, 7 months
1
0
0
0
[aandrejevic] 67597: [FAST486] The "Call" parameter should be true for calls.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Fri May 8 02:30:28 2015 New Revision: 67597 URL:
http://svn.reactos.org/svn/reactos?rev=67597&view=rev
Log: [FAST486] The "Call" parameter should be true for calls. Modified: trunk/reactos/lib/fast486/opgroups.c Modified: trunk/reactos/lib/fast486/opgroups.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/opgroups.c?rev…
============================================================================== --- trunk/reactos/lib/fast486/opgroups.c [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/opgroups.c [iso-8859-1] Fri May 8 02:30:28 2015 @@ -1631,7 +1631,7 @@ if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) { - if (!Fast486ProcessGate(State, Selector, Value, FALSE)) + if (!Fast486ProcessGate(State, Selector, Value, TRUE)) { /* Gate processed or exception occurred */ return;
9 years, 7 months
1
0
0
0
[aandrejevic] 67596: [FAST486] Don't forget to check for gates in 16-bit protected mode too.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Fri May 8 01:34:18 2015 New Revision: 67596 URL:
http://svn.reactos.org/svn/reactos?rev=67596&view=rev
Log: [FAST486] Don't forget to check for gates in 16-bit protected mode too. Modified: trunk/reactos/lib/fast486/opgroups.c Modified: trunk/reactos/lib/fast486/opgroups.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fast486/opgroups.c?rev…
============================================================================== --- trunk/reactos/lib/fast486/opgroups.c [iso-8859-1] (original) +++ trunk/reactos/lib/fast486/opgroups.c [iso-8859-1] Fri May 8 01:34:18 2015 @@ -1629,6 +1629,15 @@ return; } + if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) + { + if (!Fast486ProcessGate(State, Selector, Value, FALSE)) + { + /* Gate processed or exception occurred */ + return; + } + } + /* Push the current value of CS */ if (!Fast486StackPush(State, State->SegmentRegs[FAST486_REG_CS].Selector)) { @@ -1686,6 +1695,15 @@ { /* Exception occurred */ return; + } + + if (State->ControlRegisters[FAST486_REG_CR0] & FAST486_CR0_PE) + { + if (!Fast486ProcessGate(State, Selector, Value, FALSE)) + { + /* Gate processed or exception occurred */ + return; + } } /* Load the new code segment */
9 years, 7 months
1
0
0
0
[hbelusca] 67595: [NTVDM] - Move some interrupt initialization where it belongs and activate few other ones. - Initialize interruct vector for INT 2Ah (Network check) because some apps directly cal...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Thu May 7 23:54:47 2015 New Revision: 67595 URL:
http://svn.reactos.org/svn/reactos?rev=67595&view=rev
Log: [NTVDM] - Move some interrupt initialization where it belongs and activate few other ones. - Initialize interruct vector for INT 2Ah (Network check) because some apps directly call it and crash if it contains NULL. Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/bios32.c trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/vidbios32.c trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.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 May 7 23:54:47 2015 @@ -570,7 +570,6 @@ RegisterBiosInt32(0x17, NULL); RegisterBiosInt32(0x1B, NULL); RegisterBiosInt32(0x4A, NULL); // User Alarm Handler - RegisterBiosInt32(0x6D, NULL); // Video BIOS Entry Point /* Relocated services by the BIOS (when needed) */ RegisterBiosInt32(0x40, NULL); // ROM BIOS Diskette Handler relocated by Hard Disk BIOS Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/vidbios32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/vidbios32.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/bios/bios32/vidbios32.c [iso-8859-1] Thu May 7 23:54:47 2015 @@ -29,6 +29,10 @@ /* Register the BIOS 32-bit Interrupts */ RegisterBiosInt32(BIOS_VIDEO_INTERRUPT, VidBiosVideoService); + /* Vectors that should be implemented */ + RegisterBiosInt32(0x42, NULL); // Relocated Default INT 10h Video Services + RegisterBiosInt32(0x6D, NULL); // Video BIOS Entry Point + return TRUE; } Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c [iso-8859-1] Thu May 7 23:54:47 2015 @@ -3275,15 +3275,17 @@ BOOLEAN VidBiosInitialize(VOID) { - /* Some interrupts are in fact addresses to tables */ - ((PULONG)BaseAddress)[0x1D] = (ULONG)NULL; - // Far pointer to the 8x8 characters 80h-FFh + /* Some vectors are in fact addresses to tables */ + ((PULONG)BaseAddress)[0x1D] = (ULONG)NULL; // Video Parameter Tables + // Far pointer to the 8x8 graphics font for the 8x8 characters 80h-FFh ((PULONG)BaseAddress)[0x1F] = MAKELONG(FONT_8x8_HIGH_OFFSET, VIDEO_BIOS_DATA_SEG); - // ((PULONG)BaseAddress)[0x42] = (ULONG)NULL; - // Far pointer to the 8x16 characters 00h-... + // Far pointer to the character table (EGA, MCGA, VGA) for the 8x16 characters 00h-... ((PULONG)BaseAddress)[0x43] = MAKELONG(FONT_8x16_OFFSET, VIDEO_BIOS_DATA_SEG); - ((PULONG)BaseAddress)[0x44] = (ULONG)NULL; - // ((PULONG)BaseAddress)[0x6D] = (ULONG)NULL; + ((PULONG)BaseAddress)[0x44] = (ULONG)NULL; // ROM BIOS Character Font, Characters 00h-7Fh (PCjr) + + /* Relocated services by the BIOS (when needed) */ + ((PULONG)BaseAddress)[0x42] = (ULONG)NULL; // Relocated Default INT 10h Video Services + ((PULONG)BaseAddress)[0x6D] = (ULONG)NULL; // Video BIOS Entry Point /* Fill the tables */ RtlMoveMemory(SEG_OFF_TO_PTR(VIDEO_BIOS_DATA_SEG, FONT_8x8_OFFSET), Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
============================================================================== --- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/dos.c [iso-8859-1] Thu May 7 23:54:47 2015 @@ -775,7 +775,7 @@ /* Get Interrupt Vector */ case 0x35: { - DWORD FarPointer = ((PDWORD)BaseAddress)[getAL()]; + ULONG FarPointer = ((PULONG)BaseAddress)[getAL()]; /* Read the address from the IDT into ES:BX */ setES(HIWORD(FarPointer)); @@ -2015,6 +2015,9 @@ RegisterDosInt32(0x29, DosFastConOut ); // DOS 2+ Fast Console Output RegisterDosInt32(0x2F, DosInt2Fh ); + /* Unimplemented DOS interrupts */ + RegisterDosInt32(0x2A, NULL); // Network - Installation Check + /* Load the CON driver */ ConDrvInitialize();
9 years, 7 months
1
0
0
0
← Newer
1
...
36
37
38
39
40
41
42
...
50
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Results per page:
10
25
50
100
200