PnP driver and PCI Resources

I’m developing a PnP driver for a PCI device that wants to allocate 64 Mbyte
of memory.

If my device is present at boot time, everything works fine. I am able to
allocate the space I need from the address range allocated to the PCI bus.

If my device is not present at boot time, then it seems that the PCI bus is
allocated less than 64 Mbytes, and my add device fails. Device Manager says
that my device has a problem because it could not find enough resources, and
shows that the parent PCI bus does indeed have less than 64 Mbyte allocated
to it.

Presumably, extra space is allocated at boot time because my device is
discovered, and its resource requirements are taken into account.
Also presumably, if there is nothing plugged into the bus at boot time, the
system makes a guess (or some other sophisticated calculation :wink: about how
much space to allocate for that bus.

(The machine is a Dell 4400, which has 4 PCI HotPlug slots).

When I get the IRP_MN_FILTER_RESOURCE_REQUIREMENTS, I expand the address
range I will accept to 0x0 thru 0xFFFFFFFF, but this doesn’t seem to help.
And the DDK doc says that addresses in a IO_RESOURCE_DESCRIPTOR are
bus-relative anyway.

Is the memory range allocated to a PCI bus at boot time expandable when a
device is plugged in later?
Or do I need to find a way to increase the amount of memory allocated to the
bus at boot time?

Thanks,

Neil


Neil Baylis Email: xxxxx@troikanetworks.com
Troika Networks, Inc Phone: 805 370 2628
www.troikanetworks.com Fax: 805 371 1344


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 will be essentially impossible for you as a driver writer to increase
the memory allocated to the bus at boot time. We rely on the BIOS to
allocate the memory for the bus, so the BIOS for a hotplug machine could
allocate a large chunk of memory for an empty hotplug slot so that a
device could be added to the slot later, but that is obviously out of
your control.

Most of the hotplug machines we have heard about claim only to support
“hot replace” and “hot remove” as opposed to “hot add” because of this
issue. In a “hot replace” scenario, the device is in the slot at boot
time, so you do not hit this issue.

-Eliyas

-----Original Message-----
From: Neil Baylis [mailto:xxxxx@troikanetworks.com]
Sent: Wednesday, April 25, 2001 10:27 AM
To: NT Developers Interest List
Subject: [ntdev] PnP driver and PCI Resources

I’m developing a PnP driver for a PCI device that wants to allocate 64
Mbyte
of memory.

If my device is present at boot time, everything works fine. I am able
to
allocate the space I need from the address range allocated to the PCI
bus.

If my device is not present at boot time, then it seems that the PCI bus
is
allocated less than 64 Mbytes, and my add device fails. Device Manager
says
that my device has a problem because it could not find enough resources,
and
shows that the parent PCI bus does indeed have less than 64 Mbyte
allocated
to it.

Presumably, extra space is allocated at boot time because my device is
discovered, and its resource requirements are taken into account.
Also presumably, if there is nothing plugged into the bus at boot time,
the
system makes a guess (or some other sophisticated calculation :wink: about
how
much space to allocate for that bus.

(The machine is a Dell 4400, which has 4 PCI HotPlug slots).

When I get the IRP_MN_FILTER_RESOURCE_REQUIREMENTS, I expand the address
range I will accept to 0x0 thru 0xFFFFFFFF, but this doesn’t seem to
help.
And the DDK doc says that addresses in a IO_RESOURCE_DESCRIPTOR are
bus-relative anyway.

Is the memory range allocated to a PCI bus at boot time expandable when
a
device is plugged in later?
Or do I need to find a way to increase the amount of memory allocated to
the
bus at boot time?

Thanks,

Neil


Neil Baylis Email: xxxxx@troikanetworks.com
Troika Networks, Inc Phone: 805 370 2628
www.troikanetworks.com Fax: 805 371 1344


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