Failure to allocate resources in a PCIe driver

Hi,

I have a PCIe driver that fails to receive resources during StartDevice. The
AllocatedResources and AllocatedResourcesTranslated structures in the
iostack.parameters.startdevice contain garbage. I’m running XP Pro SP2. This
only appears to be occurring on a particular system brand. On other brands
of system, all works fine. I’ve never run into this before. Does anyone have
a suggestion of what could be happening?

Thanks,

Howard Keller

XPSP2 does not support PCIe, so it would be treated as a PCI device. What do you mean by garbage? The pointers are bogus? Or the list headers are incorrect? Or the contents of the lsit do not contain the resources you think it should? Can you send the output !cmreslist for both the translated and raw resource lists?

d

Howard Keller wrote:

I have a PCIe driver that fails to receive resources during StartDevice. The
AllocatedResources and AllocatedResourcesTranslated structures in the
iostack.parameters.startdevice contain garbage. I’m running XP Pro SP2. This
only appears to be occurring on a particular system brand. On other brands
of system, all works fine. I’ve never run into this before. Does anyone have
a suggestion of what could be happening?

Have you dumped the PCI configuration space to make sure the BARs got
reasonable data? Has your device passed PCI Express certification
testing? Some of the very early PCIe motherboards were very picky about
the initial enumeration process, and would fail devices that might have
been passed by later chipsets.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Hi Tim,

Sorry if I’m posting this a second time. I’m not sure my previous reply made
it. I have a dumb question: How would I go about dumping the PCI
configuration state?
Thanks,

Howard
“Tim Roberts” wrote in message news:xxxxx@ntdev…
> Howard Keller wrote:
>> I have a PCIe driver that fails to receive resources during StartDevice.
>> The
>> AllocatedResources and AllocatedResourcesTranslated structures in the
>> iostack.parameters.startdevice contain garbage. I’m running XP Pro SP2.
>> This
>> only appears to be occurring on a particular system brand. On other
>> brands
>> of system, all works fine. I’ve never run into this before. Does anyone
>> have
>> a suggestion of what could be happening?
>>
>
> Have you dumped the PCI configuration space to make sure the BARs got
> reasonable data? Has your device passed PCI Express certification
> testing? Some of the very early PCIe motherboards were very picky about
> the initial enumeration process, and would fail devices that might have
> been passed by later chipsets.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>

Howard Keller wrote:

Sorry if I’m posting this a second time. I’m not sure my previous reply made
it. I have a dumb question: How would I go about dumping the PCI
configuration state?

Sometimes, your device will echo the PCI config space into its registers
somewhere so you can dump them in the kernel debugger. In lieu of that,
you can download a free PCI Explorer at
http://www.summitsoftconsulting.com/PciExplorer.htm.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

with !pci

mm

>> xxxxx@probo.com 2007-01-25 17:31 >>>
Howard Keller wrote:
Sorry if I’m posting this a second time. I’m not sure my previous
reply made
it. I have a dumb question: How would I go about dumping the PCI
configuration state?

Sometimes, your device will echo the PCI config space into its
registers
somewhere so you can dump them in the kernel debugger. In lieu of
that,
you can download a free PCI Explorer at
http://www.summitsoftconsulting.com/PciExplorer.htm.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


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

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Thanks Tim. I’ll download the PCI Explorer and give it a try.

Howard
“Tim Roberts” wrote in message news:xxxxx@ntdev…
> Howard Keller wrote:
>> Sorry if I’m posting this a second time. I’m not sure my previous reply
>> made
>> it. I have a dumb question: How would I go about dumping the PCI
>> configuration state?
>>
>
> Sometimes, your device will echo the PCI config space into its registers
> somewhere so you can dump them in the kernel debugger. In lieu of that,
> you can download a free PCI Explorer at
> http://www.summitsoftconsulting.com/PciExplorer.htm.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>

Thanks Martin,

I think my eyes must be going bad. I dont Know how I missed that.

Howard

“Martin O’Brien” wrote in message
news:xxxxx@ntdev…
> with !pci
>
> mm
>
>>>> xxxxx@probo.com 2007-01-25 17:31 >>>
> Howard Keller wrote:
>> Sorry if I’m posting this a second time. I’m not sure my previous
> reply made
>> it. I have a dumb question: How would I go about dumping the PCI
>> configuration state?
>>
>
> Sometimes, your device will echo the PCI config space into its
> registers
> somewhere so you can dump them in the kernel debugger. In lieu of
> that,
> you can download a free PCI Explorer at
> http://www.summitsoftconsulting.com/PciExplorer.htm.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Hi Doron,

I’m not sure what happened to my reply to you, but here it is again.

Garbage was not a very informative term to use. The pointer to
AllocatedResources was 0 and most of the entries were memory access error.
The pointer to AllocatedResourcesTranslated was some high value, but the
count was huge. I’ll attach dome of the dump for
AllocatedResoursesTranslated.

Thanks,

Howard

1: kd> ! cmreslist 0x8656a508
CmResourceList at 0x8656a508 Version 0.0 Interface 0 Bus #0
Entry 0 - Unknown (0xb8) Unknown Sharing (0xbf)
Flags (0x867a) -
Data - {0000000000, 0000000000, 0x02020000}
Entry 1 - Null (0) Undetermined Sharing (0)
Flags (0x400) -
Data - {0xf7910a5c, 0xf7910a4c, 0000000000}
Entry 2 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 3 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0x867abda8}
Entry 4 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0x8656a59c}
Entry 5 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0x0000001b}
Entry 6 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 7 - Unknown (0xe0) Unknown Sharing (0x2d)
Flags (0x8679) -
Data - {0000000000, 0xf77a6fa0, 0xf79109ec}
Entry 8 - Unknown (0x1b) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 9 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0x8632ee48, 0000000000, 0000000000}
Entry 10 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 11 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 12 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 13 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 14 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 15 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 16 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 17 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 18 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 19 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 20 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 21 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 22 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0000000000}
Entry 23 - Null (0) Undetermined Sharing (0)
Flags (0000) -
Data - {0000000000, 0000000000, 0x0a330033}
Entry 24 - Unknown (0x49) Unknown Sharing (0x72)
Flags (0x2070) -
Data - {0x8656a370, 0x866e1470, 0x00000008}
Entry 25 - Unknown (0x38) Unknown Sharing (0xa8)
Flags (0x8656) -
Data - {0x8656a6b0, 0x8656a6b0, 0000000000}
Entry 26 - Unknown (0x90) Device Exclusive (0x1)

wrote in message news:xxxxx@ntdev…
> XPSP2 does not support PCIe, so it would be treated as a PCI device. What
> do you mean by garbage? The pointers are bogus? Or the list headers are
> incorrect? Or the contents of the lsit do not contain the resources you
> think it should? Can you send the output !cmreslist for both the
> translated and raw resource lists?
>
> d
>

Based on the output, the pci driver is getting very confused. I would follow the other folks suggestions in this thread and investigate the potential config space that were brought up.

d

Hi Doren,

I thought that may be the case. We will investigate the config space that
was defined in the PCI device bit stream

Thanks,

Howard
wrote in message news:xxxxx@ntdev…
> Based on the output, the pci driver is getting very confused. I would
> follow the other folks suggestions in this thread and investigate the
> potential config space that were brought up.
>
> d
>

Hi all,

I discovered that the cause of the problem appears to be the use of a class
= 0 in the configuration table of the PCIe device. Using a class code, such
as 0x04, appeared to resolve the problem I was seeing on this particular PC
(ASUS P5B-VM)

Howard
“Howard Keller” wrote in message
news:xxxxx@ntdev…
> Hi,
>
> I have a PCIe driver that fails to receive resources during StartDevice.
> The AllocatedResources and AllocatedResourcesTranslated structures in the
> iostack.parameters.startdevice contain garbage. I’m running XP Pro SP2.
> This only appears to be occurring on a particular system brand. On other
> brands of system, all works fine. I’ve never run into this before. Does
> anyone have a suggestion of what could be happening?
>
> Thanks,
>
> Howard Keller
>
>