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