Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jan 2014 16:02:23 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        Nomad Esst <noname.esst@yahoo.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Access pci devices' serial numbers programmatically
Message-ID:  <37639448.Wf1F1apyVZ@pippin.baldwin.cx>
In-Reply-To: <1389765959.45668.YahooMailNeo@web162702.mail.bf1.yahoo.com>
References:  <1389515545.51283.YahooMailNeo@web162704.mail.bf1.yahoo.com> <201401140824.03549.jhb@freebsd.org> <1389765959.45668.YahooMailNeo@web162702.mail.bf1.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 14 January 2014 22:05:59 Nomad Esst wrote:
> Yes I'm trying to get these information from user-land. Any ideas now?

I just committed a change to HEAD to add a new flag to pciconf to dump VPD 
data.  If you just need it in a shell script then 'pciconf -lV <device>' might 
be sufficient for you.  If you want it programmatically, you can use the new 
ioctl I added to retrieve it from the kernel.

If you need to do this on an older OS version where you can't backport my 
change (or upgrade to a version with this change), then you can use direct 
config register access to find the VPD capability and read the data directly 
using the VPD registers.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37639448.Wf1F1apyVZ>