PCI / DDK / unknown CmResourceType

U

UHAP023

Dear All,
I am writing a WDM driver for an in-house custom PCI card. The
development machine is a Win2k, Pentium/Intel chipset and the card is
based around AMCC's S5920 chip. The chip is configured for 4-passthru
regions (#1-#4, 8 bytes wide) for my card's add-on hardware. In
addition the S5920's internal configuration registers are mapped to
passthru region#0 which is 128 bytes wide.

Below is the kernel debugging O/P as logged by Sysinternal's
Debugview, from when I 'reinstall' my driver, which is built in
checked mode. I'm using the WinXP SP1 DDK. I want the driver to check
that it receives exactly and only 5 port-class resources corresponding
to the 5 PCI bus passthru regions. The trouble is it receives 10
resources!

I'm pretty sure that the spurious 'extra' 5 resources are those logged
as 'type unknown'. The S5920 is incapable to doing DMA. I have it
configured to generate no interrupts and to map no memory resources --
so it should present only those 5 port-class resources to the
plug-and-play bios.

The machine also runs Linux and the Linux PCI Utilities' lspci command
confirms the 5 port resources are the only ones seen by the Pnp bios.

So, my question is _what are_ those 'type unknown' resources and what
should I do about them? ATM, while developing the driver I'm just
ignoring them but that seems very bad practice to leave it like that in the
production version?

Thanks
Tom Crane

-------------------------------------------------------------------------------------------------------------------
00000000 0.00000000 MASPTEST - Entering DriverEntry: DriverObject FDDA2370
00000001 0.00003269 MASPTEST - Running under NT
00000002 0.00676427 MASPTEST - Entering AddDevice: DriverObject FDDA2370, pdo FDF03830
00000003 0.01031276 MASPTEST - PNP Request (IRP_MN_FILTER_RESOURCE_REQUIREMENTS)
00000004 0.01224708 MASPTEST - PNP Request (IRP_MN_QUERY_INTERFACE)
00000005 0.03551009 MASPTEST - PNP Request (IRP_MN_START_DEVICE)
00000006 0.03564838 MASPTEST - Resources:
00000007 0.03571375 type CmResourceTypePort
00000008 0.03577158 start 00000FC80 length 80
00000009 0.03579420 type unknown
00000010 0.03582186 type CmResourceTypePort
00000011 0.03587382 start 00000FC70 length 8
00000012 0.03589645 type unknown
00000013 0.03592411 type CmResourceTypePort
00000014 0.03597607 start 00000FC60 length 8
00000015 0.03599786 type unknown
00000016 0.03602552 type CmResourceTypePort
00000017 0.03607832 start 00000FC50 length 8
00000018 0.03610011 type unknown
00000019 0.03612777 type CmResourceTypePort
00000020 0.03617973 start 00000FC40 length 8
00000021 0.03620236 type unknown
00000022 0.03623420 MASPTEST - Translated Resources:
00000023 0.03626018 type CmResourceTypePort
00000024 0.03631466 start 00000FC80 length 80
00000025 0.03633645 type unknown
00000026 0.03636327 type CmResourceTypePort
00000027 0.03641523 start 00000FC70 length 8
00000028 0.03643702 type unknown
00000029 0.03646384 type CmResourceTypePort
00000030 0.03651580 start 00000FC60 length 8
00000031 0.03653843 type unknown
00000032 0.03656609 type CmResourceTypePort
00000033 0.03661805 start 00000FC50 length 8
00000034 0.03663984 type unknown
00000035 0.03666666 type CmResourceTypePort
00000036 0.03671862 start 00000FC40 length 8
00000037 0.03674209 type unknown
00000038 0.03681919 MASPTEST - S5920 should have 5 passthru region resources but 10 were detected
00000039 0.05565957 MASPTEST - PNP Request (IRP_MN_REMOVE_DEVICE)
00000040 0.05570567 MASPTEST - To REMOVED from STOPPED
00000041 0.06569911 MASPTEST - Entering DriverUnload: DriverObject FDDA2370
 
U

UHAP023

Dear All,
I am writing a WDM driver for an in-house custom PCI card. The
development machine is a Win2k, Pentium/Intel chipset and the card is
based around AMCC's S5920 chip. The chip is configured for 4-passthru
regions (#1-#4, 8 bytes wide) for my card's add-on hardware. In
addition the S5920's internal configuration registers are mapped to
passthru region#0 which is 128 bytes wide.
Below is the kernel debugging O/P as logged by Sysinternal's
Debugview, from when I 'reinstall' my driver, which is built in
checked mode. I'm using the WinXP SP1 DDK. I want the driver to check
that it receives exactly and only 5 port-class resources corresponding
to the 5 PCI bus passthru regions. The trouble is it receives 10
resources!
I'm pretty sure that the spurious 'extra' 5 resources are those logged
as 'type unknown'. The S5920 is incapable to doing DMA. I have it
configured to generate no interrupts and to map no memory resources --
so it should present only those 5 port-class resources to the
plug-and-play bios.
The machine also runs Linux and the Linux PCI Utilities' lspci command
confirms the 5 port resources are the only ones seen by the Pnp bios.
So, my question is _what are_ those 'type unknown' resources and what
should I do about them? ATM, while developing the driver I'm just
ignoring them but that seems very bad practice to leave it like that in the
production version?

Apologies for following up my own post but... I should have added that
the Resource logged as 'type unknown' is in fact 0x81. ie. Code
snippets from my StartDevice routine,

NTSTATUS StartDevice(DEVICE_OBJECT *fdo, CM_PARTIAL_RESOURCE_LIST *raw, CM_PARTIAL_RESOURCE_LIST *translated)
{
if (!translated)
return STATUS_DEVICE_CONFIGURATION_ERROR;

CM_PARTIAL_RESOURCE_DESCRIPTOR *resource = translated->PartialDescriptors;

for (UCHAR i = 0; i < 10; ++i, ++resource)
{
KdPrint((DRIVERNAME " - S5920 i=%d: resource->Type=%X\n",i,resource->Type));
.....


is logged as;

00000037 0.08005065 MASPTEST - S5920 i=0: resource->Type=1
00000039 0.08015542 MASPTEST - S5920 i=1: resource->Type=81
00000041 0.08025180 MASPTEST - S5920 i=2: resource->Type=1
00000043 0.08035237 MASPTEST - S5920 i=3: resource->Type=81
00000045 0.08044875 MASPTEST - S5920 i=4: resource->Type=1
00000047 0.08054848 MASPTEST - S5920 i=5: resource->Type=81
00000049 0.08064403 MASPTEST - S5920 i=6: resource->Type=1
00000051 0.08074376 MASPTEST - S5920 i=7: resource->Type=81
00000053 0.08084014 MASPTEST - S5920 i=8: resource->Type=1
00000055 0.08094071 MASPTEST - S5920 i=9: resource->Type=81

The resource->Type=1 are the valid port resources and the 0x81's the
mystery ones.

Any ideas?
Thanks
Tom Crane.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top