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
de304909
Commit
de304909
authored
Jun 03, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delay initialization of I/O permissions until they are first used.
parent
7fe09bce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
miscemu.h
include/miscemu.h
+0
-1
ioports.c
msdos/ioports.c
+6
-3
No files found.
include/miscemu.h
View file @
de304909
...
...
@@ -124,7 +124,6 @@ extern void INT_CtxSetHandler( CONTEXT86 *context, BYTE intnum, FARPROC16 handle
extern
int
INT_RealModeInterrupt
(
BYTE
intnum
,
CONTEXT86
*
context
);
/* msdos/ioports.c */
extern
void
IO_port_init
(
void
);
extern
DWORD
IO_inport
(
int
port
,
int
count
);
extern
void
IO_outport
(
int
port
,
int
count
,
DWORD
value
);
...
...
msdos/ioports.c
View file @
de304909
...
...
@@ -63,7 +63,7 @@ static BYTE cmosimage[64] =
extern
int
iopl
(
int
level
);
static
char
do_direct_port_access
=
0
;
static
char
do_direct_port_access
=
-
1
;
static
char
port_permissions
[
0x10000
];
#define IO_READ 1
...
...
@@ -222,11 +222,12 @@ static inline void outl( DWORD value, WORD port )
#endif
/* DIRECT_IO_ACCESS */
void
IO_port_init
(
)
static
void
IO_port_init
(
void
)
{
#ifdef DIRECT_IO_ACCESS
char
temp
[
1024
];
do_direct_port_access
=
0
;
/* Can we do that? */
if
(
!
iopl
(
3
))
{
iopl
(
0
);
...
...
@@ -255,7 +256,8 @@ DWORD IO_inport( int port, int size )
TRACE
(
"%d-byte value from port 0x%02x
\n
"
,
size
,
port
);
#ifdef DIRECT_IO_ACCESS
#ifdef DIRECT_IO_ACCESS
if
(
do_direct_port_access
==
-
1
)
IO_port_init
();
if
((
do_direct_port_access
)
/* Make sure we have access to the port */
&&
(
port_permissions
[
port
]
&
IO_READ
))
...
...
@@ -365,6 +367,7 @@ void IO_outport( int port, int size, DWORD value )
value
,
size
,
port
);
#ifdef DIRECT_IO_ACCESS
if
(
do_direct_port_access
==
-
1
)
IO_port_init
();
if
((
do_direct_port_access
)
/* Make sure we have access to the port */
&&
(
port_permissions
[
port
]
&
IO_WRITE
))
...
...
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