Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jun 2012 09:45:39 -0700
From:      Devin Teske <devin.teske@fisglobal.com>
To:        Rick Miller <vmiller@hostileadmin.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: How do I determine support for $xx?
Message-ID:  <7BDA2790-A852-4BA1-B6D3-BCA3C465A341@fisglobal.com>
In-Reply-To: <CAHzLAVHJL-%2B5Aofcf%2BG8p19ZQX0s5QA=M4t5D7Hz%2B-Fwuoqkgg@mail.gmail.com>
References:  <CAHzLAVHJL-%2B5Aofcf%2BG8p19ZQX0s5QA=M4t5D7Hz%2B-Fwuoqkgg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Rick (!),

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

> Hi All,
>=20
> 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 pcidatab=
ase.com are all good starts (for me at least).

When I'm integrating new/old hardware there isn't "one path" that I take. I=
t 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...
>=20
> 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 f=
ew 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:
>=20
> "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."
>=20
> 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.
>=20

You really need to know the 4-digit hexadecimal Vendor ID and Model ID of t=
he chipset to KNOW that a source module will probe/attach to a given hardwa=
re by-spec. Probing/attaching is mostly done by registry arrays defining th=
ese 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), t=
hen you'll get a line like the following in /var/run/dmesg.boot:

	pci0: <unknown card> (vendor=3D0x1106, dev=3D0x3057) at 4.4

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

	http://pcidatabase.com/search.php?device_search_str=3D0x3057&device_search=
=3DSearch

Which comes up as:

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

That's the unknown device.

But, let's focus on BCM5720=85

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=3D0x1106, dev=3D0x165f) 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 thi=
s source file:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/bge/if_bgereg.h?annotate=
=3D1.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 re=
cursively grep src/sys/dev for those hex values (make sure to do it case in=
sensitively). Investigating each match (especially if it ends in "_reg.h" o=
r "_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?
>=20

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'r=
e finding in code.
--=20
Devin

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7BDA2790-A852-4BA1-B6D3-BCA3C465A341>