Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
be3b2569
Commit
be3b2569
authored
Aug 25, 2003
by
Jukka Heinonen
Committed by
Alexandre Julliard
Aug 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make all users of DOSVM_Enter explicitly set V86 flag.
Fix mouse relay stack usage in protected mode. Raw mode switch now handles interrupt flag correctly.
parent
3be5d62b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
21 deletions
+32
-21
devices.c
dlls/winedos/devices.c
+1
-0
dosaspi.c
dlls/winedos/dosaspi.c
+2
-0
dosexe.h
dlls/winedos/dosexe.h
+7
-0
dosvm.c
dlls/winedos/dosvm.c
+3
-6
int31.c
dlls/winedos/int31.c
+12
-1
int33.c
dlls/winedos/int33.c
+6
-0
interrupts.c
dlls/winedos/interrupts.c
+0
-13
module.c
dlls/winedos/module.c
+1
-1
No files found.
dlls/winedos/devices.c
View file @
be3b2569
...
...
@@ -547,6 +547,7 @@ static void DOSDEV_DoReq(void*req, DWORD dev)
/* prepare to call device driver */
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
ctx
.
EFlags
|=
V86_FLAG
;
/* ES:BX points to request for strategy routine */
ctx
.
SegEs
=
HIWORD
(
DOS_LOLSeg
);
...
...
dlls/winedos/dosaspi.c
View file @
be3b2569
...
...
@@ -82,6 +82,8 @@ DOSASPI_PostProc( SRB_ExecSCSICmd *lpPRB )
/* Zero everything */
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
ctx
.
EFlags
|=
V86_FLAG
;
/* CS:IP is routine to call */
ctx
.
SegCs
=
SELECTOROF
(
lpSRB16
->
cmd
.
SRB_PostProc
);
ctx
.
Eip
=
OFFSETOF
(
lpSRB16
->
cmd
.
SRB_PostProc
);
...
...
dlls/winedos/dosexe.h
View file @
be3b2569
...
...
@@ -88,7 +88,14 @@ extern struct DPMI_segments *DOSVM_dpmi_segments;
# define MZ_SUPPORTED
#endif
/* linux-i386 */
/*
* Declare some CONTEXT86.EFlags bits.
* IF_MASK is only pushed into real mode stack.
*/
#define V86_FLAG 0x00020000
#define IF_MASK 0x00000200
#define VIF_MASK 0x00080000
#define VIP_MASK 0x00100000
#define BIOS_DATA ((void *)0x400)
...
...
dlls/winedos/dosvm.c
View file @
be3b2569
...
...
@@ -61,9 +61,6 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
WORD
DOSVM_psp
=
0
;
WORD
DOSVM_retval
=
0
;
#ifdef HAVE_SYS_VM86_H
# include <sys/vm86.h>
#endif
#ifdef HAVE_SYS_MMAN_H
# include <sys/mman.h>
#endif
...
...
@@ -416,7 +413,7 @@ void WINAPI DOSVM_Wait( CONTEXT86 *waitctx )
*/
if
(
!
ISV86
(
&
context
))
{
context
.
EFlags
|=
0x00020000
;
context
.
EFlags
|=
V86_FLAG
;
context
.
SegSs
=
0xffff
;
context
.
Esp
=
0
;
}
...
...
@@ -580,8 +577,8 @@ static WINE_EXCEPTION_FILTER(exception_handler)
int
WINAPI
DOSVM_Enter
(
CONTEXT86
*
context
)
{
/* Some callers forget to turn V86_FLAG on. */
context
->
EFlags
|=
V86_FLAG
;
if
(
!
ISV86
(
context
))
ERR
(
"Called with protected mode context!
\n
"
)
;
__TRY
{
...
...
dlls/winedos/int31.c
View file @
be3b2569
...
...
@@ -696,7 +696,12 @@ void WINAPI DOSVM_RawModeSwitchHandler( CONTEXT86 *context )
rm_ctx
.
Ebp
=
context
->
Ebp
;
rm_ctx
.
SegFs
=
0
;
rm_ctx
.
SegGs
=
0
;
rm_ctx
.
EFlags
=
context
->
EFlags
;
/* at least we need the IF flag */
/* Copy interrupt state. */
if
(
NtCurrentTeb
()
->
dpmi_vif
)
rm_ctx
.
EFlags
=
V86_FLAG
|
VIF_MASK
;
else
rm_ctx
.
EFlags
=
V86_FLAG
;
/* enter real mode again */
TRACE
(
"re-entering real mode at %04lx:%04lx
\n
"
,
rm_ctx
.
SegCs
,
rm_ctx
.
Eip
);
...
...
@@ -721,6 +726,12 @@ void WINAPI DOSVM_RawModeSwitchHandler( CONTEXT86 *context )
context
->
SegFs
=
0
;
context
->
SegGs
=
0
;
/* Copy interrupt state. */
if
(
rm_ctx
.
EFlags
&
VIF_MASK
)
NtCurrentTeb
()
->
dpmi_vif
=
1
;
else
NtCurrentTeb
()
->
dpmi_vif
=
0
;
/* Return to new address and hope that we didn't mess up */
TRACE
(
"re-entering protected mode at %04lx:%08lx
\n
"
,
context
->
SegCs
,
context
->
Eip
);
...
...
dlls/winedos/int33.c
View file @
be3b2569
...
...
@@ -139,6 +139,12 @@ static void MouseRelay(CONTEXT86 *context,void *mdata)
MCALLDATA
*
data
=
(
MCALLDATA
*
)
mdata
;
CONTEXT86
ctx
=
*
context
;
if
(
!
ISV86
(
&
ctx
))
{
ctx
.
EFlags
|=
V86_FLAG
;
ctx
.
SegSs
=
0
;
/* Allocate new stack. */
}
ctx
.
Eax
=
data
->
mask
;
ctx
.
Ebx
=
data
->
but
;
ctx
.
Ecx
=
data
->
x
;
...
...
dlls/winedos/interrupts.c
View file @
be3b2569
...
...
@@ -26,19 +26,6 @@
#include "thread.h"
#ifdef HAVE_SYS_VM86_H
# include <sys/vm86.h>
#endif
#ifndef IF_MASK
#define IF_MASK 0x00000200
#endif
#ifndef VIF_MASK
#define VIF_MASK 0x00080000
#endif
WINE_DEFAULT_DEBUG_CHANNEL
(
int
);
WINE_DECLARE_DEBUG_CHANNEL
(
relay
);
...
...
dlls/winedos/module.c
View file @
be3b2569
...
...
@@ -574,7 +574,7 @@ static DWORD WINAPI MZ_DOSVM( LPVOID lpExtra )
context
.
Esp
=
init_sp
;
context
.
SegDs
=
DOSVM_psp
;
context
.
SegEs
=
DOSVM_psp
;
context
.
EFlags
=
0x00080000
;
/* virtual interrupt flag */
context
.
EFlags
=
V86_FLAG
|
VIF_MASK
;
DOSVM_SetTimer
(
0x10000
);
ret
=
DOSVM_Enter
(
&
context
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment