PCI Multifunction Driver (2nd part- problem!)

Thanks for everyone’s help.

Now I can see our new PCI device (w/ 2 same cores for now) recognized by
BIOS and Windows via my old unifunction driver. However, even though each
one is given a different BAR0, none can be access as before. We checked PCI
bus, and found out it was silent. Is there anything I missed?

AH


Find a local pizza place, movie theater, and more….then map the best route!
http://maps.live.com/?icid=hmtag1&FORM=MGAC01

Another thing is do I have to change the class to ‘Multifunction’ in the
installation INF?

From: “Ta H.”
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: [ntdev] PCI Multifunction Driver (2nd part- problem!)
>Date: Mon, 12 Mar 2007 18:34:13 -0800
>
>Thanks for everyone’s help.
>
>Now I can see our new PCI device (w/ 2 same cores for now) recognized by
>BIOS and Windows via my old unifunction driver. However, even though each
>one is given a different BAR0, none can be access as before. We checked
>PCI bus, and found out it was silent. Is there anything I missed?
>
>AH
>
>
>Find a local pizza place, movie theater, and more….then map the best route!
>http://maps.live.com/?icid=hmtag1&FORM=MGAC01
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer


Find what you need at prices you’ll love. Compare products and save at MSN®
Shopping.
http://shopping.msn.com/default/shp/?ptnrid=37,ptnrdata=24102&tcode=T001MSN20A0701

Ta H. wrote:

Another thing is do I have to change the class to ‘Multifunction’ in
the installation INF?

Esentially, the sole purpose of the “class” is to determine where your
device is shown in Device Manager. You need to decide where you want it
to show up.

You don’t have a specific driver for the “multifunction” part, right?
It’s just that, where you had 1 device before, now you have more than
1? If so, then leave the class as it was.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thanks for the clarification, Tim

Do I ever need to know the ‘function number’ for using Bar0 for each
function? Now I encounter the issue that the translated BAR0 address
returned by MmMapIoSpace() does not seem to be able to access any of the
functions any more. One inetresting finding is BAR0 values are different
between the cases of enabling one core and enabling three cores. The
address is assigned to #3 Core instead.

Regards,

AH

From: Tim Roberts
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: Re: [ntdev] PCI Multifunction Driver (2nd part- problem!)
>Date: Tue, 13 Mar 2007 13:14:44 -0700
>
>Ta H. wrote:
> > Another thing is do I have to change the class to ‘Multifunction’ in
> > the installation INF?
>
>Esentially, the sole purpose of the “class” is to determine where your
>device is shown in Device Manager. You need to decide where you want it
>to show up.
>
>You don’t have a specific driver for the “multifunction” part, right?
>It’s just that, where you had 1 device before, now you have more than
>1? If so, then leave the class as it was.
>
>–
>Tim Roberts, xxxxx@probo.com
>Providenza & Boekelheide, Inc.
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer

_________________________________________________________________
Find what you need at prices you’ll love. Compare products and save at MSN®
Shopping.
http://shopping.msn.com/default/shp/?ptnrid=37,ptnrdata=24102&tcode=T001MSN20A0701

Ta H. wrote:

Thanks for the clarification, Tim

Do I ever need to know the ‘function number’ for using Bar0 for each
function? Now I encounter the issue that the translated BAR0 address
returned by MmMapIoSpace() does not seem to be able to access any of
the functions any more. One inetresting finding is BAR0 values are
different between the cases of enabling one core and enabling three
cores. The address is assigned to #3 Core instead.

If each PCI function is getting its own driver (and I think that’s the
case for you), then each driver should be given the resources for that
specific PCI function.

Each function has its own separate PCI configuration space, and will get
its own BAR assignments. Is your device expecting that?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

There is only one driver for all functions. Each function has its own
configuration space. From Control Panel, I can see it is a single device
with multiple functions. I also see my StartDevice being called 3 times for
3 functions. That is just like the 3-deivce case. It is puzzling to
identify where the problem is. HW? SW? or both???

Regards,

AH

From: Tim Roberts
>Reply-To: “Windows System Software Devs Interest List”
>
>To: “Windows System Software Devs Interest List”
>Subject: Re: [ntdev] PCI Multifunction Driver (2nd part- problem!)
>Date: Tue, 13 Mar 2007 16:24:25 -0700
>
>Ta H. wrote:
> > Thanks for the clarification, Tim
> >
> > Do I ever need to know the ‘function number’ for using Bar0 for each
> > function? Now I encounter the issue that the translated BAR0 address
> > returned by MmMapIoSpace() does not seem to be able to access any of
> > the functions any more. One inetresting finding is BAR0 values are
> > different between the cases of enabling one core and enabling three
> > cores. The address is assigned to #3 Core instead.
>
>If each PCI function is getting its own driver (and I think that’s the
>case for you), then each driver should be given the resources for that
>specific PCI function.
>
>Each function has its own separate PCI configuration space, and will get
>its own BAR assignments. Is your device expecting that?
>
>–
>Tim Roberts, xxxxx@probo.com
>Providenza & Boekelheide, Inc.
>
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>To unsubscribe, visit the List Server section of OSR Online at
>http://www.osronline.com/page.cfm?name=ListServer

_________________________________________________________________
Mortgage rates as low as 4.625% - Refinance $150,000 loan for $579 a month.
Intro*Terms
https://www2.nextag.com/goto.jsp?product=100000035&url=%2Fst.jsp&tm=y&search=mortgage_text_links_88_h27f6&disc=y&vers=743&s=4056&p=5117

Ta H. wrote:

There is only one driver for all functions. Each function has its
own configuration space. From Control Panel, I can see it is a single
device with multiple functions. I also see my StartDevice being
called 3 times for 3 functions. That is just like the 3-deivce case.
It is puzzling to identify where the problem is. HW? SW? or both???

Yes, it’s puzzling. Have you gone in with the kernel debugger and
verified that the virtual addresses you’re getting from MmMapIoSpace
really map to the physical addresses you expect, and that you can access
the memory space using the physical address commands (!dd)?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.