Dear experts,
I need to assign extra I/O memory to a PnP PCI device - in addition to resources that it gets in the natural way. The physical address of this memory is passed thru a custom BIOS interface. This memory may be under some normal PCI bridge, or not.
MmMapIoSpace successfully maps it; I just want to indicate it is taken, so other drivers won’t touch it, and it shows up in Device manager.
Is IoReportResourceForDetection the right way to do this?
Regards,
– pa
xxxxx@fastmail.fm wrote:
I need to assign extra I/O memory to a PnP PCI device - in addition to resources that it gets in the natural way.
That’s an extremely odd requirement. How will your PCI device get to
the memory, if it belongs to some other device? How will you do the
address decoding?
The physical address of this memory is passed thru a custom BIOS interface. This memory may be under some normal PCI bridge, or not.
What does that mean, exactly? If it lives on a PCI bus, then it will be
part of some PCI device’s address space. The physical address range
will be assigned by the BIOS and/or PnP, and only the owning driver will
touch it. If it belongs to a driver that doesn’t know about the memory,
then it should be safe enough.
I’m curious to know more about the concept.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Hi Tim,
What does that mean, exactly? If it lives on a PCI bus, then it will be
part of some PCI device’s address space. The physical address range
will be assigned by the BIOS and/or PnP
This is a custom bridge between PCI and certain other bus. It has a register block of fixed size and that is mapped thru a normal PCI BAR. But the windows to map to the other bus must be allocated outtside of this size.
For several machines with these bridges I simply increase the allocation for the registers BAR to contain the bridge space as well, in my IRP_MN_FILTER_RESOURCE_REQUIREMENTS handler.
Except for one machine where this does not work. Instead, the maker of that machine provides the exact address and size of bridge space. So I just happily mapped part of that memory… until recalled that it is not registered anywhere! So in theory someone else can grab it.
I do not know whether the bridge space on this machine is behind a standard PCI bridge, or wired thru a dedicated MTRR or other hardware hackery.
Thanks for reading.
–pa