How do I determine support for $xx?

Devin Teske devin.teske at fisglobal.com
Fri Jun 8 16:45:44 UTC 2012


Hi Rick (!),

On Jun 8, 2012, at 8:07 AM, Rick Miller wrote:

> Hi All,
> 
> If this question is better suited for a different list please let me
> know.  Simply stated, my question is 'What is the best source for
> identifying supported hardware?'.

The source!

Actually, pciconf and "grep unknown /var/run/dmesg.boot" and using pcidatabase.com are all good starts (for me at least).

When I'm integrating new/old hardware there isn't "one path" that I take. It really depends on what the situation is.

(and so to give you the best advice, I read-on)


>  Having said that, allow me to pose
> an example...
> 
> I've attempted to identify if various ethernet controllers are
> supported by FreeBSD and the drivers.  I used the hardware notes and
> manpages for the respective ethernet drivers.  The information between
> the two sometimes seems inconsistent and/or inaccurate.  For example,
> the BCM5719 and BCM5720 are unsupported in FreeBSD at this time.

That *was* true, but it's integrated quite well now with 8.3-R. We have a few NEC workstations eval's fresh for testing that are using that hardware.


>  The
> hardware notes at freebsd.org do not specify these controllers are
> supported.  Inspection of the bge(4) manpage implies that the
> controllers are supported as seen in the description section where it
> states:
> 
> "The bge driver provides support for various NICs based on the
> Broadcom BCM570x, 571x, 572x, 575x, 576x, 578x, 5776x and 5778x
> Gigabit Ethernet controller chips and the 590x and 5779x Fast Ethernet
> controller chips."
> 
> I browsed the source and found many references to the BCM5719 and
> BCM5720.  However, I am unfamiliar enough with driver programming in C
> to identify if a controller is fully supported.
> 

You really need to know the 4-digit hexadecimal Vendor ID and Model ID of the chipset to KNOW that a source module will probe/attach to a given hardware by-spec. Probing/attaching is mostly done by registry arrays defining these hex values as what to attach to during probe.

Of course, booting the OS is the best way.

If your HW device is not picked up by any module (built-in or otherwise), then you'll get a line like the following in /var/run/dmesg.boot:

	pci0: <unknown card> (vendor=0x1106, dev=0x3057) at 4.4

There's those hex values. If you take the device value and enter it into pcidatabase.com you'll get:

	http://pcidatabase.com/search.php?device_search_str=0x3057&device_search=Search

Which comes up as:

	"ACPI Power Management Controller" by "VIA Technologies, Inc"

That's the unknown device.

But, let's focus on BCM5720…

If you were running, say, 8.0-R, even if you have the bge(4) driver loaded, you would see this in /var/run/dmesg.boot:

	pciN: <unknown card> (vendor=0x1106, dev=0x165f) at X.Y

NOTE: Insert random numbers for "N", and "X.Y"

How you know that 8.3-R's bge(4) driver supports the BCM5720 is because this source file:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/bge/if_bgereg.h?annotate=1.83.2.35.2.1

NOTE: I specifically pointed you at CVS instead of SVN so that you can see the version tagged for 8.3-R

Specifically, this line:

	2309: #define        BCOM_DEVICEID_BCM5720           0x165F




> Also, I attempted to identify whether the Intel i350 is supported.
> It's not listed in the hardware notes or the igb(4) manpage so I
> suspect it is not supported.

Boot up and see if it shows up as an unknown device. HINT: 0x8086 is often Intel's Vendor ID

It's easier to start that route and get the vendor/device hex so you can recursively grep src/sys/dev for those hex values (make sure to do it case insensitively). Investigating each match (especially if it ends in "_reg.h" or "_reg.c" or "hw.c" etc.) should show you (in code) which modules may (or may not) support a given unknown hardware (either in your current branch or another).

If you're commonly dealing with new hardware on an often-enough basis, then it's advisable to have a copy of HEAD checked out for keeping src/sys/dev up to date for recursive grepping to find out if hardware is supported (in the previously described manner).


>  When I view the igb source, the i350 is
> referenced numerous times.  Are these references simply code in
> preparation for support of the i350?
> 

Maybe. If you have HW specs for the board you're trying to integrate, check for the vendor/device id's and see if they match the references that you're finding in code.
-- 
Devin

_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.


More information about the freebsd-questions mailing list