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