Problem with PCI resource allocation under NT4 on DELL GX110

I have a driver which discovers the location of our PCI cards using
HalGetBusData and then uses IoReportResourceUsage to inform NT of their
needs. The driver can handle up to 4 identical cards, each card requires a
4K memory block.

On the DELL GX110 the bios places the cards at an address which causes
IoReportResourceUsage to fail and hence the driver does not load. Strangely
if I NOP out the call to IoReportResourceUsage the card(s) work at the bios
allocated address(es).

I have tried using HalAssignSlotResources and this elects to move the
card(s) to another address and all is well.

My problem is that when I call HalAssignSlotResources with a DeviceObject
for each card I get a blue screen on the second call to
HalAssignSlotResources. Tests have shown that if I call
HalAssignSlotResources with any resources allocated to a DeviceObject it
crashes. But if I do not have them assigned it puts all my cards at the
same address.

Does anyone know a way to workaround this problem ?

I am testing with NT4 , SP5

Best regards

Simon Moruzzi


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

xxxxx@deva.co.uk said:

On the DELL GX110 the bios places the cards at an address which causes
IoReportResourceUsage to fail and hence the driver does not load.
Strangely if I NOP out the call to IoReportResourceUsage the card(s)
work at the bios allocated address(es)

xxxxx@deva.co.uk said:

Does anyone know a way to workaround this problem ?

Yes, don’t buy DELL computers for NT4 use. I’ve encountered DELL BIOS
bugs that Windows 98 and Windows 2000 work around by remapping PCI devices
properly. NT4 is not so good at fixing up this sort of thing so you will
have problems.

Steve Williams “The woods are lovely, dark and deep.
xxxxx@icarus.com But I have promises to keep,
xxxxx@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep.”


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

In general, you should always use HalAssignSlotResources instead of
IoReportResourceUsage for PCI cards. I have seen too many examples where
a call to HalAssignSlotResources fails but a call to
IoReportResourceUsage succeeds. This is because IoReportResourceUsage
just checks if anyone is currently sharing your resources, while
HalAssignSlotResources actually checks if those resources are valid
first, then calls a function like IoReportResourceUsage. If passed in
the correct resources, via HalGetBusData as you are doing,
HalAssignSlotResources usually will fail only if there is a bug with the
BIOS and/or $PIR/MPS/ACPI tables.

In short, use HalAssignSlotResources, and if it fails (and you know
you’re asking for the right resources), take a dump of your PCI Config
Space, and check with the hardware manufacturers to see if they’re
programming your device properly.

Youssef

-----Original Message-----
From: xxxxx@deva.co.uk [mailto:xxxxx@deva.co.uk]
Sent: Sunday, July 15, 2001 9:21 PM
To: NT Developers Interest List
Subject: [ntdev] Problem with PCI resource allocation under NT4 on DELL
GX110

I have a driver which discovers the location of our PCI cards using
HalGetBusData and then uses IoReportResourceUsage to inform NT of their
needs. The driver can handle up to 4 identical cards, each card
requires a
4K memory block.

On the DELL GX110 the bios places the cards at an address which causes
IoReportResourceUsage to fail and hence the driver does not load.
Strangely
if I NOP out the call to IoReportResourceUsage the card(s) work at the
bios
allocated address(es).

I have tried using HalAssignSlotResources and this elects to move the
card(s) to another address and all is well.

My problem is that when I call HalAssignSlotResources with a
DeviceObject
for each card I get a blue screen on the second call to
HalAssignSlotResources. Tests have shown that if I call
HalAssignSlotResources with any resources allocated to a DeviceObject it

crashes. But if I do not have them assigned it puts all my cards at the

same address.

Does anyone know a way to workaround this problem ?

I am testing with NT4 , SP5

Best regards

Simon Moruzzi


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

It isn’t clear if you are using a different device object for each call
to HalAssignSlotResources, if you don’t, indeed the second call will
cause a system failure. (It ought to return an error, but it doesn’t.)
If you are ONLY having problems on specific x86 platforms, you might be
suffering from the nt bug that is worked around by the /PCILOCK boot.ini
hack. See HOWTO: Create a PCI Device Driver for Windows NT
ID: Q152044 and Preventing PCI Resource Conflicts on Intel-Based
Computers
ID: Q148501 in the knowledge base.

Once again: you need a new, different, un-resource-assigned-to device
object for each call to HalAssignSlotResources. If you don’t you will
have problems.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@deva.co.uk
Sent: Monday, July 16, 2001 4:21 AM
To: NT Developers Interest List
Subject: [ntdev] Problem with PCI resource allocation under
NT4 on DELL GX110

I have a driver which discovers the location of our PCI cards using
HalGetBusData and then uses IoReportResourceUsage to inform
NT of their
needs. The driver can handle up to 4 identical cards, each
card requires a
4K memory block.

On the DELL GX110 the bios places the cards at an address
which causes
IoReportResourceUsage to fail and hence the driver does not
load. Strangely
if I NOP out the call to IoReportResourceUsage the card(s)
work at the bios
allocated address(es).

I have tried using HalAssignSlotResources and this elects to move the
card(s) to another address and all is well.

My problem is that when I call HalAssignSlotResources with a
DeviceObject
for each card I get a blue screen on the second call to
HalAssignSlotResources. Tests have shown that if I call
HalAssignSlotResources with any resources allocated to a
DeviceObject it
crashes. But if I do not have them assigned it puts all my
cards at the
same address.

Does anyone know a way to workaround this problem ?

I am testing with NT4 , SP5

Best regards

Simon Moruzzi


You are currently subscribed to ntdev as:
xxxxx@hollistech.com To unsubscribe send a blank email to
leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com