I am interested in reading and updating the PCI bus latency timer setting
for all devices. This is for the purpose of enabling better audio
performance by reducing the timer setting of video cards which are often set
at the maximum amount and starve the audio card.
I can do my own homework, and I am working through a device driver book and
the DDK, but the PCI bus is not much documented in the DDK, as far as I can
tell–though many busses are. I can see that a kernel mode driver can do
some calls to HAL functions, and this might do the trick, but I believe that
architecture is deprecated, and I am wondering if I can do the PCI thing
with a WDM-style driver?
I initially tried to find WMI functions to do this, but I could not find
anything that got to the PCI bus timer latency, so I concluded that a device
driver was necessary.
So, if anyone can point me in the right direction as far as preferred
approach and location of documentation, I would be most grateful.
The interface to do the config space reads & writes is documented.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Mark Knutson”
Newsgroups: ntdev
To: “Windows System Software Devs Interest List”
Sent: Sunday, May 23, 2004 9:42 PM
Subject: [ntdev] How to get at PCI latency timer setting
> I am interested in reading and updating the PCI bus latency timer setting
> for all devices. This is for the purpose of enabling better audio
> performance by reducing the timer setting of video cards which are often set
> at the maximum amount and starve the audio card.
>
> I can do my own homework, and I am working through a device driver book and
> the DDK, but the PCI bus is not much documented in the DDK, as far as I can
> tell–though many busses are. I can see that a kernel mode driver can do
> some calls to HAL functions, and this might do the trick, but I believe that
> architecture is deprecated, and I am wondering if I can do the PCI thing
> with a WDM-style driver?
>
> I initially tried to find WMI functions to do this, but I could not find
> anything that got to the PCI bus timer latency, so I concluded that a device
> driver was necessary.
>
> So, if anyone can point me in the right direction as far as preferred
> approach and location of documentation, I would be most grateful.
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Go to the Audiotrak site (something like www.audiotrak.de, I think) and hunt
for the faq on the inca88, which is a discontinued card. You will find a
link to a handy utility that does exactly what you want, with pretty
graphics and all.
Note that it doesn’t always help. I have a MOTU 324 card that works just
fine in a 1GHz Duron on a k7s5a montherboard, but on a 2.4GHz Athelon
machine using an Nvidia chipset, the card simply refuses to run more than
1.5 of the three possible devices, claiming continuous PCI overruns at
around 12MB/sec. Changing the latencies didn’t help, and I finally had to
put the card back in the slow machine to get it to run at all. Real
annoying since I bought the faster machine specifically to run this card on
a faster processor. I concluded that there is something basically broken
with the PCI implementation in the NVidia chipset, if it can’t manage
24MB/sec without trashing 50% of the data.
Loren
I am getting a little more on top of this issue after a bit of review.
Here is the DDK doc I was referring to:
The HalGetBusData routine is obsolete and is exported only to support
existing drivers. Use the PnP Manager’s IRP_MN_QUERY_INTERFACE and
IRP_MN_READ_CONFIG requests instead.
The HalSetBusData routine is obsolete and is exported only to support
existing drivers. Use the PnP Manager’s IRP_MN_QUERY_INTERFACE and
IRP_MN_WRITE_CONFIG requests instead.
My original post was imprecise because even though kernal mode drivers are
not encouraged, it is the hal… functions that I was remembering were
obsolete.
So my thinking is that I can get a PCI driver shell going and then figure
out how to work with the IRP_MN… functions to get at the latency timer
setting.
I note that there is a pcisig which presumably has lots of doc, and it is
only $3,000 to join. So what am I waiting for?
> The HalSetBusData routine is obsolete and is exported only to support
existing drivers. Use the PnP Manager’s IRP_MN_QUERY_INTERFACE and
IRP_MN_WRITE_CONFIG requests instead.
Correct. Use them to update the latency timer.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
> I note that there is a pcisig which presumably has lots of
doc, and it is
only $3,000 to join. So what am I waiting for?
The PCISIG will only tell you how to access the registers in the PCI spec,
and I’m pretty sure it will not tell you anything about how that interfaces
with the OS, which you’ll need to know to make it useful for any practical
use of it.
PCISIG is more for the pure hardware bods than the software side of things.
It will have a register map and such, but there are several sources for that
which are completely free of charage, such as the ElanSC520 register spec
from AMD, or any of the chipset specs from AMD or Intel, network chip specs
from any number of sources, etc.
–
Mats
You can only use the queryInterface or read/writeConfig requests if you
actually have a pci device to begin with. I think you said you wanted a
generic facility to access all pci devices. In that case you are stuck with
the obsolete Hal routines and are vulnerable to OS release changes.
=====================
Mark Roddy
-----Original Message-----
From: Mark Knutson [mailto:xxxxx@mark-knutson.com]
Sent: Sunday, May 23, 2004 8:58 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] How to get at PCI latency timer setting
I am getting a little more on top of this issue after a bit
of review.
Here is the DDK doc I was referring to:
The HalGetBusData routine is obsolete and is exported only to
support existing drivers. Use the PnP Manager’s
IRP_MN_QUERY_INTERFACE and IRP_MN_READ_CONFIG requests instead.
The HalSetBusData routine is obsolete and is exported only to
support existing drivers. Use the PnP Manager’s
IRP_MN_QUERY_INTERFACE and IRP_MN_WRITE_CONFIG requests instead.
My original post was imprecise because even though kernal
mode drivers are not encouraged, it is the hal… functions
that I was remembering were obsolete.
So my thinking is that I can get a PCI driver shell going and
then figure out how to work with the IRP_MN… functions to
get at the latency timer setting.
I note that there is a pcisig which presumably has lots of
doc, and it is only $3,000 to join. So what am I waiting for?
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
xxxxx@lists.osr.com