Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

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

Don_Burn_1Don_Burn_1 Member Posts: 4,311
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

Comments

  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,435
    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
    d
  • Don_Burn_1Don_Burn_1 Member Posts: 4,311
    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" <xxxxx@microsoft.com> 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
  • Doron_HolanDoron_Holan Member - All Emails Posts: 10,435
    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" <xxxxx@microsoft.com> 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
    d
  • Don_Burn_1Don_Burn_1 Member Posts: 4,311
    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" <xxxxx@microsoft.com> 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" <xxxxx@microsoft.com> 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
  • Maxim_S._ShatskihMaxim_S._Shatskih Member Posts: 10,396
    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" <xxxxx@acm.org> 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" <xxxxx@microsoft.com> 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
    >
    >
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA