I have a device with class code 0x0600 which is a mistake I can’t change. As a result Windows will not allocate its requested memory resources. I verified this by switching one of my boards to have this config space class code and I lost my memory. The Windows device manager reports only an interrupt resource but no memory. PCI bios sees the memory request. My Windows driver doesn’t see its memory resource and is basically useless. Do I have any options as far as getting windows to allocate this memory before I load my driver? It looks like the Host PCI Device code of 00 won’t allocate memory(execpt in Linux). It would be nice to have a value of 80(PCI to PCI Bridge) but I’m stuck.
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
0x80 is “Other Bridge”. Windows treats it as a PCI function in terms of resources allocation and config header type.
0x04 is P2P bridge.
Calvin Guan
Sr. Staff Engineer (DDK MVP)
NetXtreme Vista/LH Server Miniport
Broadcom Corporation @ Irvine CA
Connecting Everything(r)
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Eric Heim
Sent: Friday, October 06, 2006 12:51 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] PCI problem
I have a device with class code 0x0600 which is a mistake I can’t change.? As a result Windows will not allocate its requested memory resources.? I verified this by switching one of my boards to have this config space class code and I lost my memory.? The Windows device manager reports only an interrupt resource but no memory.? PCI bios sees the memory request.? My Windows driver doesn’t see its memory resource and is basically useless.? Do I have any options as far as getting windows to allocate this memory before I load my driver?? It looks like the Host PCI Device code of 00 won’t allocate memory(execpt in Linux).? It would be nice to have a value of 80(PCI to PCI Bridge) but I’m stuck.
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2?/min or less. — 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
I don’t remember the details of which subclass code is what. I just know the device we have has a mistake such that windows won’t give me memory. The class code of 0x0600, in this instance, is a manufacturer mistake. Is there anything I can do in windows to work around this problem? Where can I get info on how windows treats various subclasses?
Is your BIOS set for NON-PNP OS, or do you let windows handle
that? Is your memory BAR getting filled in? There are always
solutions, but probably nothing elegant. I am new to PCI drivers, so
anything I say is probably wrong, but it may be possible to allocate
your own memory buffer and stuff the BAR yourself.
-z
At 02:28 PM 10/6/2006, you wrote:
I don’t remember the details of which subclass code is what. I just
know the device we have has a mistake such that windows won’t give
me memory. The class code of 0x0600, in this instance, is a
manufacturer mistake. Is there anything I can do in windows to work
around this problem? Where can I get info on how windows treats
various subclasses?
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
Windows is doing that because the definition of Class 6 - Subclass 0 has
been effectively established by precedent (by lots of existing chipsets) in
such a way that Windows *absolutely positively must never touch the memory
BARs on the the device.* Lots of chipsets die a horrible death if you touch
the BARs on the “host bridge” device, which is the one with that class code.
With that said, you can work around this. You’ll have to supply a handler
for IRP_MN_FILTER_RESOURCE_REQUIREMENTS and handle it as the PCI driver
would handle IRP_MN_QUERY_RESOURCE_REQUIREMENTS. Add in the missing memory
requirements. Then program your own BARs. Then remove these extra
resources in IRP_MN_START_DEVICE before the IRP gets down to the PCI driver.
The PCI driver must never see the changes you’ve made, so you’ll need to
keep the original contents of these IRPs around and put them in the various
IRPs when they get sent down to PCI and then put your stuff back when the
IRPs come back up to you.
This is all much easier with KMDF, believe it or not, as Doron and I worked
pretty hard to make this scenario work. You just supply the stuff you’re
adding and KMDF will manage inserting and removing it when necessary.
- Jake Oshins
Windows Kernel Team
“Eric Heim” wrote in message
news:xxxxx@ntdev…
I have a device with class code 0x0600 which is a mistake I can’t change.
As a result Windows will not allocate its requested memory resources. I
verified this by switching one of my boards to have this config space class
code and I lost my memory. The Windows device manager reports only an
interrupt resource but no memory. PCI bios sees the memory request. My
Windows driver doesn’t see its memory resource and is basically useless. Do
I have any options as far as getting windows to allocate this memory before
I load my driver? It looks like the Host PCI Device code of 00 won’t
allocate memory(execpt in Linux). It would be nice to have a value of
80(PCI to PCI Bridge) but I’m stuck.
Hi Jake,
Can you clarify something for me? I thought that windows
would only program BAR’s if you enable PNP OS in your
BIOS. Microsoft’s own Knowledge Base article recommends turning off
PNP in the BIOS. The idea being that the the mother board
manufacturer (BIOS writer) can better balance the resources since the
they have more knowledge about the hardware particulars on that
board. Have I misinterpreted something? If I haven’t your reply (a
great one BTW) seems to assume that PNP OS is enabled in the BIOS.
Thanks in advance for your explanation,
-z
At 01:33 PM 10/7/2006, you wrote:
Windows is doing that because the definition of Class 6 - Subclass 0 has
been effectively established by precedent (by lots of existing chipsets) in
such a way that Windows *absolutely positively must never touch the memory
BARs on the the device.* Lots of chipsets die a horrible death if you touch
the BARs on the “host bridge” device, which is the one with that class code.
With that said, you can work around this. You’ll have to supply a handler
for IRP_MN_FILTER_RESOURCE_REQUIREMENTS and handle it as the PCI driver
would handle IRP_MN_QUERY_RESOURCE_REQUIREMENTS. Add in the missing memory
requirements. Then program your own BARs. Then remove these extra
resources in IRP_MN_START_DEVICE before the IRP gets down to the PCI driver.
The PCI driver must never see the changes you’ve made, so you’ll need to
keep the original contents of these IRPs around and put them in the various
IRPs when they get sent down to PCI and then put your stuff back when the
IRPs come back up to you.
This is all much easier with KMDF, believe it or not, as Doron and I worked
pretty hard to make this scenario work. You just supply the stuff you’re
adding and KMDF will manage inserting and removing it when necessary.
- Jake Oshins
Windows Kernel Team