Child device resources

Hi,

Can a parent (PCI) device with no resources, access the resources of a
child device???

For example, the Intel ICH-7M/U LPC Interface Controller (driver is
isapnp.sys) has several child devices, once of which is simply
“Motherboard Resources” with a bunch of I/O ranges.

Can I write a filter driver for the interface controller that accesses one
of the port i/o ranges in the child device, without having to write a
driver for that device?

The problem I have is that the child device has an overlap in I/O ranges
with the System CMOS/real time clock device (also under the LPC Interface
Controller). The system is fine with it until I try to install a driver
for one of the child devices - it complains of a resource conflict and
won’t load my driver! I can’t uninstall either device… :frowning:

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>

Mark McDougall wrote:

Can a parent (PCI) device with no resources, access the resources of a
child device???

Yes - if these devices have private interface to deal
with the resource sharing and power management.

–pa

Pavel A. wrote:

Yes - if these devices have private interface to deal
with the resource sharing and power management.

Hmmm, well what I have seems to work…

My filter driver reads the PCI config space for the LPC bridge and
extracts a few address ranges for the chipset configuration registers and
also the I/O address range for the TCO registers. The device associated
with the TCO I/O range does not have a driver.

My filter driver subsequently accesses the TCO I/O address range directly
using READ_PORT_XXX etc in an IOCTL handler.

I believe there is a bug in the motherboard driver that is loaded for this
platform. There is an overlap in I/O addresses for the “Motherboard
Resources” and “CMOS/Real Time Clock” devices under the LPC Bridge. This
problem is preventing me loading a driver for the “Motherboard Resources”
device. So I’m SOOL anyway, I can’t see another way around it.

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>

“Motherboard Resources” is the name given to nodes in the BIOS which claim
resources. BIOSes claim resources so that their SMM code doesn’t collide
with OS code. By trying to interact with one of these, you’re asking for a
collision with the BIOS. Your results will probably be flaky.


Jake Oshins
Hyper-V I/O Architect
Windows Kernel Team

This post implies no warranties and confers no rights.


“Mark McDougall” wrote in message news:xxxxx@ntdev…
> Hi,
>
> Can a parent (PCI) device with no resources, access the resources of a
> child device???
>
> For example, the Intel ICH-7M/U LPC Interface Controller (driver is
> isapnp.sys) has several child devices, once of which is simply
> “Motherboard Resources” with a bunch of I/O ranges.
>
> Can I write a filter driver for the interface controller that accesses one
> of the port i/o ranges in the child device, without having to write a
> driver for that device?
>
> The problem I have is that the child device has an overlap in I/O ranges
> with the System CMOS/real time clock device (also under the LPC Interface
> Controller). The system is fine with it until I try to install a driver
> for one of the child devices - it complains of a resource conflict and
> won’t load my driver! I can’t uninstall either device… :frowning:
>
> Regards,
>
> –
> Mark McDougall, Engineer
> Virtual Logic Pty Ltd, http:
> 21-25 King St, Rockdale, 2216
> Ph: +612-9599-3255 Fax: +612-9599-3266
></http:>

Jake Oshins wrote:

“Motherboard Resources” is the name given to nodes in the BIOS which
claim resources. BIOSes claim resources so that their SMM code doesn’t
collide with OS code. By trying to interact with one of these, you’re
asking for a collision with the BIOS. Your results will probably be
flaky.

So what you’re saying is that a windows driver can never access
“Motherboard Resources”??? Ie. writing a “non-flaky” windows-based (or any
other OS for that matter) TCO watchdog driver is technically impossible!?!

I should also add that part of the driver “disables SMI access”. Perhaps
that prevents the BIOS from fiddling with the TCO watchdog???

Don’t get me wrong, I appreciate what you’re saying - can you confirm my
summation above?

FWIW I studied the Linux kernel driver and it does exactly the same.

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>

I think that in order to answer your question you’d have to either find the
guy who wrote your BIOS and confirm that the SMM BIOS isn’t ever going to
touch the thing or find the Intel BIOS Writer’s Guide (they’re usually
distributed only after you sign something) that explains how they intended
the BIOS to interact with the thing and look at the sample code they handed
to your BIOS guy.


Jake Oshins
Hyper-V I/O Architect
Windows Kernel Team

This post implies no warranties and confers no rights.


“Mark McDougall” wrote in message news:xxxxx@ntdev…
> Jake Oshins wrote:
>
>> “Motherboard Resources” is the name given to nodes in the BIOS which
>> claim resources. BIOSes claim resources so that their SMM code doesn’t
>> collide with OS code. By trying to interact with one of these, you’re
>> asking for a collision with the BIOS. Your results will probably be
>> flaky.
>
> So what you’re saying is that a windows driver can never access
> “Motherboard Resources”??? Ie. writing a “non-flaky” windows-based (or any
> other OS for that matter) TCO watchdog driver is technically impossible!?!
>
> I should also add that part of the driver “disables SMI access”. Perhaps
> that prevents the BIOS from fiddling with the TCO watchdog???
>
> Don’t get me wrong, I appreciate what you’re saying - can you confirm my
> summation above?
>
> FWIW I studied the Linux kernel driver and it does exactly the same.
>
> Regards,
>
> –
> Mark McDougall, Engineer
> Virtual Logic Pty Ltd, http:
> 21-25 King St, Rockdale, 2216
> Ph: +612-9599-3255 Fax: +612-9599-3266
></http:>

Jake Oshins wrote:

I think that in order to answer your question you’d have to either find
the guy who wrote your BIOS and confirm that the SMM BIOS isn’t ever
going to touch the thing or find the Intel BIOS Writer’s Guide (they’re
usually distributed only after you sign something) that explains how
they intended the BIOS to interact with the thing and look at the sample
code they handed to your BIOS guy.

Actually, in this case it’s a closed system and the BIOS has been
customised for the client. I just found out today that one of the options
they were considering was getting the BIOS vendor to write a “driver”, but
they opted instead for a windows driver for a variety of reasons.

So I guess it’s safe in this case.

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>

Then you should get the BIOS to change, in a way that will make your life
much simpler. Tell them to change the PnP ID on that “Motherboard
Resources” node to one you choose. You could make it a string like
“MarkMacDougallWatchdog” or something that sounds a little bit more
appropriate in a business setting. Then your driver will load on top of
something that gets automatically enumerated and it will be assigned the
resources you need by the PnP manager.


Jake Oshins
Hyper-V I/O Architect
Windows Kernel Team

This post implies no warranties and confers no rights.


“Mark McDougall” wrote in message news:xxxxx@ntdev…
> Jake Oshins wrote:
>
>> I think that in order to answer your question you’d have to either find
>> the guy who wrote your BIOS and confirm that the SMM BIOS isn’t ever
>> going to touch the thing or find the Intel BIOS Writer’s Guide (they’re
>> usually distributed only after you sign something) that explains how
>> they intended the BIOS to interact with the thing and look at the sample
>> code they handed to your BIOS guy.
>
> Actually, in this case it’s a closed system and the BIOS has been
> customised for the client. I just found out today that one of the options
> they were considering was getting the BIOS vendor to write a “driver”, but
> they opted instead for a windows driver for a variety of reasons.
>
> So I guess it’s safe in this case.
>
> Regards,
>
> –
> Mark McDougall, Engineer
> Virtual Logic Pty Ltd, http:
> 21-25 King St, Rockdale, 2216
> Ph: +612-9599-3255 Fax: +612-9599-3266
></http:>

Jake Oshins wrote:

Then you should get the BIOS to change, in a way that will make your
life much simpler. Tell them to change the PnP ID on that “Motherboard
Resources” node to one you choose. You could make it a string like
“MarkMacDougallWatchdog” or something that sounds a little bit more
appropriate in a business setting. Then your driver will load on top of
something that gets automatically enumerated and it will be assigned the
resources you need by the PnP manager.

I’ll make that suggestion - thanks!

Regards,


Mark McDougall, Engineer
Virtual Logic Pty Ltd, http:
21-25 King St, Rockdale, 2216
Ph: +612-9599-3255 Fax: +612-9599-3266</http:>