A bus driver for a non compliant multi-function device question

I’ve been working on a bus driver for a device that has a number of
distinct functions in a single memory BAR. I currently have the problem
that the bus driver receives the hardware resources with the memory
being considered CmResourceShareDeviceExclusive but I need to break this
region into smaller pieces and hand them off to the enumerated devices.
This causes a sharing conflict, that is reported in the device manager.

What am I missing here? I do not want to require access to the hardware
through helper functions in the bus driver since in most cases these are
hardware resources for common devices just packed into a single BAR.

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

To assign resources to a child, you need to implement an arbiter. The arbiter interfaces are not documented though. You don’t need hw access helper functions , but you do need a custom interface to query for the “assigned” resources that the fdo sends to your PDOs.

d


From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Don Burn [xxxxx@acm.org]
Sent: Monday, June 06, 2011 7:34 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] A bus driver for a non compliant multi-function device question

I’ve been working on a bus driver for a device that has a number of
distinct functions in a single memory BAR. I currently have the problem
that the bus driver receives the hardware resources with the memory
being considered CmResourceShareDeviceExclusive but I need to break this
region into smaller pieces and hand them off to the enumerated devices.
This causes a sharing conflict, that is reported in the device manager.

What am I missing here? I do not want to require access to the hardware
through helper functions in the bus driver since in most cases these are
hardware resources for common devices just packed into a single BAR.

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

So this sounds like there is no way with a documented interface to split
a BAR in a bus driver. If this is the case I will probably go the
helper function route, and have my client repo a number of inbox
drivers. Bummer.

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Doron Holan” wrote in message
news:xxxxx@ntdev:

> To assign resources to a child, you need to implement an arbiter. The arbiter interfaces are not documented though. You don’t need hw access helper functions , but you do need a custom interface to query for the “assigned” resources that the fdo sends to your PDOs.
>
> d
> ________________________________________
> From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Don Burn [xxxxx@acm.org]
> Sent: Monday, June 06, 2011 7:34 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] A bus driver for a non compliant multi-function device question
>
> I’ve been working on a bus driver for a device that has a number of
> distinct functions in a single memory BAR. I currently have the problem
> that the bus driver receives the hardware resources with the memory
> being considered CmResourceShareDeviceExclusive but I need to break this
> region into smaller pieces and hand them off to the enumerated devices.
> This causes a sharing conflict, that is reported in the device manager.
>
> What am I missing here? I do not want to require access to the hardware
> through helper functions in the bus driver since in most cases these are
> hardware resources for common devices just packed into a single BAR.
>
>
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Or make your hw multi function compliant…

D


From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Don Burn [xxxxx@acm.org]
Sent: Monday, June 06, 2011 8:40 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] A bus driver for a non compliant multi-function device question

So this sounds like there is no way with a documented interface to split
a BAR in a bus driver. If this is the case I will probably go the
helper function route, and have my client repo a number of inbox
drivers. Bummer.

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Doron Holan” wrote in message
news:xxxxx@ntdev:

> To assign resources to a child, you need to implement an arbiter. The arbiter interfaces are not documented though. You don’t need hw access helper functions , but you do need a custom interface to query for the “assigned” resources that the fdo sends to your PDOs.
>
> d
> ________________________________________
> From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Don Burn [xxxxx@acm.org]
> Sent: Monday, June 06, 2011 7:34 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] A bus driver for a non compliant multi-function device question
>
> I’ve been working on a bus driver for a device that has a number of
> distinct functions in a single memory BAR. I currently have the problem
> that the bus driver receives the hardware resources with the memory
> being considered CmResourceShareDeviceExclusive but I need to break this
> region into smaller pieces and hand them off to the enumerated devices.
> This causes a sharing conflict, that is reported in the device manager.
>
> What am I missing here? I do not want to require access to the hardware
> through helper functions in the bus driver since in most cases these are
> hardware resources for common devices just packed into a single BAR.
>
>
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Easier said than done with a lot of the FPGA PCI interface designs when
you have a lot of functions. Add to the KMDF wish list the capability
of implementing an arbiter interface.

Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“Doron Holan” wrote in message
news:xxxxx@ntdev:

> Or make your hw multi function compliant…
>
> D
>
> From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Don Burn [xxxxx@acm.org]
> Sent: Monday, June 06, 2011 8:40 AM
> To: Windows System Software Devs Interest List
> Subject: RE:[ntdev] A bus driver for a non compliant multi-function device question
>
> So this sounds like there is no way with a documented interface to split
> a BAR in a bus driver. If this is the case I will probably go the
> helper function route, and have my client repo a number of inbox
> drivers. Bummer.
>
>
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev:
>
> > To assign resources to a child, you need to implement an arbiter. The arbiter interfaces are not documented though. You don’t need hw access helper functions , but you do need a custom interface to query for the “assigned” resources that the fdo sends to your PDOs.
> >
> > d
> >

> > From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Don Burn [xxxxx@acm.org]
> > Sent: Monday, June 06, 2011 7:34 AM
> > To: Windows System Software Devs Interest List
> > Subject: [ntdev] A bus driver for a non compliant multi-function device question
> >
> > I’ve been working on a bus driver for a device that has a number of
> > distinct functions in a single memory BAR. I currently have the problem
> > that the bus driver receives the hardware resources with the memory
> > being considered CmResourceShareDeviceExclusive but I need to break this
> > region into smaller pieces and hand them off to the enumerated devices.
> > This causes a sharing conflict, that is reported in the device manager.
> >
> > What am I missing here? I do not want to require access to the hardware
> > through helper functions in the bus driver since in most cases these are
> > hardware resources for common devices just packed into a single BAR.
> >
> >
> > Don Burn (MVP, Windows DKD)
> > Windows Filesystem and Driver Consulting
> > Website: http://www.windrvr.com
> > Blog: http://msmvps.com/blogs/WinDrvr
> >
> >
> >
> >
> > —
> > NTDEV is sponsored by OSR
> >
> > For our schedule of WDF, WDM, debugging and other seminars visit:
> > http://www.osr.com/seminars
> >
> > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Reverse-engineering mf.sys can help, it does the job similar to one you want but not exactly such.

Look at its MN_QUERY_INTERFACE part, to the vtable of arbiter interface, and then to these functions.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

“Don Burn” wrote in message news:xxxxx@ntdev…
> So this sounds like there is no way with a documented interface to split
> a BAR in a bus driver. If this is the case I will probably go the
> helper function route, and have my client repo a number of inbox
> drivers. Bummer.
>
>
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
> “Doron Holan” wrote in message
> news:xxxxx@ntdev:
>
>> To assign resources to a child, you need to implement an arbiter. The arbiter interfaces are not documented though. You don’t need hw access helper functions , but you do need a custom interface to query for the “assigned” resources that the fdo sends to your PDOs.
>>
>> d
>> ________________________________________
>> From: xxxxx@lists.osr.com [xxxxx@lists.osr.com] on behalf of Don Burn [xxxxx@acm.org]
>> Sent: Monday, June 06, 2011 7:34 AM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] A bus driver for a non compliant multi-function device question
>>
>> I’ve been working on a bus driver for a device that has a number of
>> distinct functions in a single memory BAR. I currently have the problem
>> that the bus driver receives the hardware resources with the memory
>> being considered CmResourceShareDeviceExclusive but I need to break this
>> region into smaller pieces and hand them off to the enumerated devices.
>> This causes a sharing conflict, that is reported in the device manager.
>>
>> What am I missing here? I do not want to require access to the hardware
>> through helper functions in the bus driver since in most cases these are
>> hardware resources for common devices just packed into a single BAR.
>>
>>
>> Don Burn (MVP, Windows DKD)
>> Windows Filesystem and Driver Consulting
>> Website: http://www.windrvr.com
>> Blog: http://msmvps.com/blogs/WinDrvr
>>
>>
>>
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>
>