I/O ports blocking

Hi. I’ve made WDM driver for some PCI hardware. Why does it block
access to I/O ports when my driver is installed? I mean I have some
program in Windows98 that accesses directly to I/O ports. I
installed my driver and now that program doesn’t work. How can I make
my driver nonblockable?
Thanks.

  • MB

If 98, I can’t help, but if 2000 and above … user mode does not access IO
ports. That requires a kernel mode component called a device driver.


Gary G. Little
Seagate Technologies, LLC

“Stanislav Kraev” wrote in message news:xxxxx@ntdev…
>
> Hi. I’ve made WDM driver for some PCI hardware. Why does it block
> access to I/O ports when my driver is installed? I mean I have some
> program in Windows98 that accesses directly to I/O ports. I
> installed my driver and now that program doesn’t work. How can I make
> my driver nonblockable?
> Thanks.
>
> - MB
>
>
>

Any programs which access ports directly are bad programs, so, nothing bad
in a bad program stopped working -)

Only drivers must access the ports.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Stanislav Kraev”
To: “Windows System Software Devs Interest List”
Sent: Monday, November 03, 2003 7:53 PM
Subject: [ntdev] I/O ports blocking

> Hi. I’ve made WDM driver for some PCI hardware. Why does it block
> access to I/O ports when my driver is installed? I mean I have some
> program in Windows98 that accesses directly to I/O ports. I
> installed my driver and now that program doesn’t work. How can I make
> my driver nonblockable?
> Thanks.
>
> - MB
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

Question is not how can I use I/O ports directly but why other drivers
don’t block access and my blocks.

MSS> Any programs which access ports directly are bad programs, so, nothing bad
MSS> in a bad program stopped working -)

MSS> Only drivers must access the ports.

MSS> Maxim Shatskih, Windows DDK MVP
MSS> StorageCraft Corporation
MSS> xxxxx@storagecraft.com
MSS> http://www.storagecraft.com

MSS> ----- Original Message -----
MSS> From: “Stanislav Kraev”
MSS> To: “Windows System Software Devs Interest List”
MSS> Sent: Monday, November 03, 2003 7:53 PM
MSS> Subject: [ntdev] I/O ports blocking

>> Hi. I’ve made WDM driver for some PCI hardware. Why does it block
>> access to I/O ports when my driver is installed? I mean I have some
>> program in Windows98 that accesses directly to I/O ports. I
>> installed my driver and now that program doesn’t work. How can I make
>> my driver nonblockable?
>> Thanks.
>>
>> - MB
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
MSS> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com

MSS> —
MSS> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

MSS> You are currently subscribed to ntdev as: xxxxx@gtn.ru
MSS> To unsubscribe send a blank email to xxxxx@lists.osr.com

The architecture is set such that an I/O instruction can be issued provided
the CPL is less or equal than the IOPL. The IOPL sits in the EFLAGS
register, so, there’s always a way if that’s what one wants. One great use
for user level I/O is when we’re debugging hardware, say, running diags on a
new chip.

You guys must keep in mind, that not every code a kernel dev writes ends up
in a production driver ! A flexible, quality OS must allow for that, too.

Alberto.

-----Original Message-----
From: Gary G. Little [mailto:xxxxx@seagate.com]
Sent: Monday, November 03, 2003 12:40 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: I/O ports blocking

If 98, I can’t help, but if 2000 and above … user mode does not access IO
ports. That requires a kernel mode component called a device driver.


Gary G. Little
Seagate Technologies, LLC

“Stanislav Kraev” wrote in message news:xxxxx@ntdev…
>
> Hi. I’ve made WDM driver for some PCI hardware. Why does it block
> access to I/O ports when my driver is installed? I mean I have some
> program in Windows98 that accesses directly to I/O ports. I
> installed my driver and now that program doesn’t work. How can I make
> my driver nonblockable?
> Thanks.
>
> - MB
>
>
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.

(1) Yes you have to have a driver to access hardware or the io bitmap.
(2) Note you could write a virtual vdd but you still need a driver to
really get the data.

Does Win2K/XP play games with the EFLAGS ? Because if they don’t, it’s a
simple thing to build a driver that sets IOPL=3 once and forever.
Alternatively, one can write a driver with to IOCTLs, one being IoRead and
the other being IoWrite.

It’s simple enough, where there’s a will there’s a way.

Alberto.

-----Original Message-----
From: William Michael Jones [mailto:xxxxx@earthlink.net]
Sent: Tuesday, November 04, 2003 10:31 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: I/O ports blocking

(1) Yes you have to have a driver to access hardware or the io bitmap.
(2) Note you could write a virtual vdd but you still need a driver to
really get the data.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@compuware.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.

I think the OP’s Question was bit different. If I recall, it is win98
system, had a 16bit pgm to access the I/O ports, now there is another driver
WDM type, and when the driver is active, 16bit pgm can not access those I/O
ports.

Offhand, I dont remember the PCI resource acquisition, but may be there is
something to indicate shared access, not sure though. VDD is only needed on
NT family, and for std I/O port accesses NTVDM is already there to give a
backdoor to 16bit pgm (WOW) for I/O port accesses !!!

-prokash
----- Original Message -----
From: “William Michael Jones”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, November 04, 2003 7:30 AM
Subject: [ntdev] Re: I/O ports blocking

> (1) Yes you have to have a driver to access hardware or the io bitmap.
> (2) Note you could write a virtual vdd but you still need a driver to
> really get the data.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@garlic.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

> NT family, and for std I/O port accesses NTVDM is already there to give a

backdoor to 16bit pgm (WOW) for I/O port accesses !!!

VGA only I think?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Yes, I think you are right, but for other I/O ports that VDD trail is fairly
straight forward …

-prokash
----- Original Message -----
From: “Maxim S. Shatskih”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, November 05, 2003 9:09 AM
Subject: [ntdev] Re: I/O ports blocking

> > NT family, and for std I/O port accesses NTVDM is already there to give
a
> > backdoor to 16bit pgm (WOW) for I/O port accesses !!!
>
> VGA only I think?
>
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
> xxxxx@storagecraft.com
> http://www.storagecraft.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@garlic.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>

Can anybody just tell my why one WDM driver blocks port access through
_outp() user mode function and another one doesn’t?

PS> Yes, I think you are right, but for other I/O ports that VDD trail is fairly
PS> straight forward …

PS> -prokash
PS> ----- Original Message -----
PS> From: “Maxim S. Shatskih”
PS> To: “Windows System Software Devs Interest List”
PS> Sent: Wednesday, November 05, 2003 9:09 AM
PS> Subject: [ntdev] Re: I/O ports blocking

>> > NT family, and for std I/O port accesses NTVDM is already there to give
PS> a
>> > backdoor to 16bit pgm (WOW) for I/O port accesses !!!
>>
>> VGA only I think?
>>
>> Maxim Shatskih, Windows DDK MVP
>> StorageCraft Corporation
>> xxxxx@storagecraft.com
>> http://www.storagecraft.com
>>
>>
>> —
>> Questions? First check the Kernel Driver FAQ at
PS> http://www.osronline.com/article.cfm?id=256
>>
>> You are currently subscribed to ntdev as: xxxxx@garlic.com
>> To unsubscribe send a blank email to xxxxx@lists.osr.com
>>
>>

PS> —
PS> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

PS> You are currently subscribed to ntdev as: xxxxx@gtn.ru
PS> To unsubscribe send a blank email to xxxxx@lists.osr.com


? ??? Stanislav Kraev mailto:xxxxx@gtn.ru