Hi everybody,

I have a PCI device which is able to export its Control/Status
Register space (4 KB in size) to both Memory and I/O Address Space.
However, due to the fact that I/O resources requirements are reported
in a single PCI BAR (which in fact is a PCI spec violation), I get a
Code 12 error in Device Manager ("The device cannot find enough free
resources that it can use").
In this case the last function code the PNP Manager sends is
IRP_MN_FILTER_RESOURCE_REQUIREMENTS.

The resource requirements list reads as follows:

Resource Requirements:
Number of Lists: 1
List 0:
Descriptors: 7
Desc 0:
- Option: preferred
- Type: CmResourceTypeMemory
Length : 1000
Alignmt : 00000001
Min.Addr: 00000000.c0000000
Max.Addr: 00000000.c0000000
Desc 1:
- Option: alternative
- Type: CmResourceTypeMemory
Length : 1000
Alignmt : 00001000
Min.Addr: 00000000.00000000
Max.Addr: 00000000.00000000
Desc 2:
- Option: required
- Type: 0x81 - NAK
Desc 3:
- Option: preferred
- Type: CmResourceTypePort
Length : 1000
Alignmt : 00000001
Min.Addr: 00000000.0000c000
Max.Addr: 00000000.0000cfff
Desc 4:
- Option: alternative
- Type: CmResourceTypePort
Length : 1000
Alignmt : 00001000
Min.Addr: 00000000.00000000
Max.Addr: 00000000.ffffffff
Desc 5:
- Option: required
- Type: 0x81 - NAK
Desc 6:
- Option: required
- Type: CmResourceTypeInterrupt
Min.Vector: 24
Max.Vector: 24

Filtering the above list in removing descriptors 3 through 5 from the
list helps: I get an IRP_MN_START_DEVICE and resources look okay in
Device Manager (no I/O address range is assigned).

However, if I inspect the PCI config space of the device I see the I/O
Space bit in the Command Register of PCI Configuration Space enabled.
This happens even if the the I/O Space comes up disabled by BIOS.

To be very clear at this point:
- if there is no driver registered for the device, the I/O Space bit
is left unchanged
- if there is a driver registered but disabled the bit also is left
unchanged
- if the driver is enabled, then I/O decode is enabled (even if I tell
the system I do not want/need I/O ports)

How can I instruct Windows XP to leave the I/O resource disabled?

Thanks for any response!

Gernot

Re: How to inhibit Enabling of I/O Resource by Mark

Mark
Tue Aug 01 06:49:22 CDT 2006

On Mon, 31 Jul 2006 15:05:43 +0200, Gernot Buselmeier
<GBuselmeier@sbs.com> wrote:


Try working with IRP_MN_FILTER_RESOURCE_REQUIREMENTS and see if that
will allow you to remove your IO ports.

>Hi everybody,
>
>I have a PCI device which is able to export its Control/Status
>Register space (4 KB in size) to both Memory and I/O Address Space.
>However, due to the fact that I/O resources requirements are reported
>in a single PCI BAR (which in fact is a PCI spec violation), I get a
>Code 12 error in Device Manager ("The device cannot find enough free
>resources that it can use").
>In this case the last function code the PNP Manager sends is
>IRP_MN_FILTER_RESOURCE_REQUIREMENTS.
>
>The resource requirements list reads as follows:
>
>Resource Requirements:
> Number of Lists: 1
> List 0:
> Descriptors: 7
> Desc 0:
> - Option: preferred
> - Type: CmResourceTypeMemory
> Length : 1000
> Alignmt : 00000001
> Min.Addr: 00000000.c0000000
> Max.Addr: 00000000.c0000000
> Desc 1:
> - Option: alternative
> - Type: CmResourceTypeMemory
> Length : 1000
> Alignmt : 00001000
> Min.Addr: 00000000.00000000
> Max.Addr: 00000000.00000000
> Desc 2:
> - Option: required
> - Type: 0x81 - NAK
> Desc 3:
> - Option: preferred
> - Type: CmResourceTypePort
> Length : 1000
> Alignmt : 00000001
> Min.Addr: 00000000.0000c000
> Max.Addr: 00000000.0000cfff
> Desc 4:
> - Option: alternative
> - Type: CmResourceTypePort
> Length : 1000
> Alignmt : 00001000
> Min.Addr: 00000000.00000000
> Max.Addr: 00000000.ffffffff
> Desc 5:
> - Option: required
> - Type: 0x81 - NAK
> Desc 6:
> - Option: required
> - Type: CmResourceTypeInterrupt
> Min.Vector: 24
> Max.Vector: 24
>
>Filtering the above list in removing descriptors 3 through 5 from the
>list helps: I get an IRP_MN_START_DEVICE and resources look okay in
>Device Manager (no I/O address range is assigned).
>
>However, if I inspect the PCI config space of the device I see the I/O
>Space bit in the Command Register of PCI Configuration Space enabled.
>This happens even if the the I/O Space comes up disabled by BIOS.
>
>To be very clear at this point:
>- if there is no driver registered for the device, the I/O Space bit
>is left unchanged
>- if there is a driver registered but disabled the bit also is left
>unchanged
>- if the driver is enabled, then I/O decode is enabled (even if I tell
>the system I do not want/need I/O ports)
>
>How can I instruct Windows XP to leave the I/O resource disabled?
>
>Thanks for any response!
>
>Gernot


=====================
Mark Roddy DDK MVP
Windows Vista/2003/XP/2000 Consulting
Device and Filesystem Drivers
Hollis Technology Solutions 603-321-1032
www.hollistech.com

Re: How to inhibit Enabling of I/O Resource by Gernot

Gernot
Wed Aug 02 11:09:17 CDT 2006

On Tue, 01 Aug 2006 07:49:22 -0400, Mark Roddy <markr@hollistech.com>
wrote:

>On Mon, 31 Jul 2006 15:05:43 +0200, Gernot Buselmeier
><GBuselmeier@sbs.com> wrote:
>
>
>Try working with IRP_MN_FILTER_RESOURCE_REQUIREMENTS and see if that
>will allow you to remove your IO ports.
>

Hi Mark,

I filtered the resource requirements and get a IRP_MN_START_DEVICE w/o
the I/O ports. However, the point is that Windows keeps enabling the
I/O window in PCI Config Space Command register.

Gernot

>
>
>=====================
>Mark Roddy DDK MVP
>Windows Vista/2003/XP/2000 Consulting
>Device and Filesystem Drivers
>Hollis Technology Solutions 603-321-1032
>www.hollistech.com

Re: How to inhibit Enabling of I/O Resource by Eliyas

Eliyas
Sat Aug 05 11:51:14 CDT 2006

I remember having a discussion on this with pci bus driver engineer when I
was writing the PCIDRV sample. On pre vista OS, filtering the I/O port
resource is not going to make any difference. I will try to dig out the
email on Monday to see if I there is any explanation to this behavior.

-Eliyas


"Gernot Buselmeier" <GBuselmeier@sbs.com> wrote in message
news:acj1d2d6pgprlphr912ebjdtlem0ptahbt@4ax.com...
> On Tue, 01 Aug 2006 07:49:22 -0400, Mark Roddy <markr@hollistech.com>
> wrote:
>
>>On Mon, 31 Jul 2006 15:05:43 +0200, Gernot Buselmeier
>><GBuselmeier@sbs.com> wrote:
>>
>>
>>Try working with IRP_MN_FILTER_RESOURCE_REQUIREMENTS and see if that
>>will allow you to remove your IO ports.
>>
>
> Hi Mark,
>
> I filtered the resource requirements and get a IRP_MN_START_DEVICE w/o
> the I/O ports. However, the point is that Windows keeps enabling the
> I/O window in PCI Config Space Command register.
>
> Gernot
>
>>
>>
>>=====================
>>Mark Roddy DDK MVP
>>Windows Vista/2003/XP/2000 Consulting
>>Device and Filesystem Drivers
>>Hollis Technology Solutions 603-321-1032
>>www.hollistech.com



Re: How to inhibit Enabling of I/O Resource by Gernot

Gernot
Thu Aug 24 01:17:05 CDT 2006

Eliyas

any news on this?
BTW: Where can I find your PCIDRV example? I found nothing in the DDK
version I use (3790).

Thanks,
Gernot

On Sat, 5 Aug 2006 09:51:14 -0700, "Eliyas Yakub [MSFT]"
<eliyasy@online.microsoft.com> wrote:

>I remember having a discussion on this with pci bus driver engineer when I
>was writing the PCIDRV sample. On pre vista OS, filtering the I/O port
>resource is not going to make any difference. I will try to dig out the
>email on Monday to see if I there is any explanation to this behavior.
>
>-Eliyas

Re: How to inhibit Enabling of I/O Resource by Don

Don
Thu Aug 24 07:04:06 CDT 2006

For PCIDRV get the Windows Server 2003 SP1 DDK, it is included in KMDF which
you can download at http://www.microsoft.com/whdc/driver/wdf/KMDF_pkg.mspx


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply




"Gernot Buselmeier" <GBuselmeier@sbs.com> wrote in message
news:cugqe250i6bfd4at46q52au360lag9ktub@4ax.com...
> Eliyas
>
> any news on this?
> BTW: Where can I find your PCIDRV example? I found nothing in the DDK
> version I use (3790).
>
> Thanks,
> Gernot
>
> On Sat, 5 Aug 2006 09:51:14 -0700, "Eliyas Yakub [MSFT]"
> <eliyasy@online.microsoft.com> wrote:
>
>>I remember having a discussion on this with pci bus driver engineer when I
>>was writing the PCIDRV sample. On pre vista OS, filtering the I/O port
>>resource is not going to make any difference. I will try to dig out the
>>email on Monday to see if I there is any explanation to this behavior.
>>
>>-Eliyas



Re: How to inhibit Enabling of I/O Resource by Eliyas

Eliyas
Mon Aug 28 14:13:25 CDT 2006

I did find the thread. All it says is that on Win2K/XP/Server 2000 gold even
if you filter out the I/O resources, it's not going to make any difference.
The system is not going to assign it to anybody else and it wouldn't clear
the I/O decode either, so the device will start decoding whatever happens to
be in the hardware.

On Server 2003 SP1 and Vista, this issue is fixed. You can find more about
that in this article.

http://www.microsoft.com/whdc/system/bus/pci/IO-rsc.mspx

--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.microsoft.com/whdc/driver/tips/default.mspx