diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2020-06-22 04:11:38 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2020-06-22 04:11:38 +0000 |
commit | e18f482c2f3185af258857d8cc0b11fd077c38d6 (patch) | |
tree | fe97cc1cdc2d3c023d4d69423f5ae2e2e0482ef9 /sbin | |
parent | 31602e4bd373067943db5dbb611a7ad3c1b4ac47 (diff) |
let userland read vpd info from a pci device.
reading vpd stuff is useful when you're trying to get support
information about a pci device, eg, if you want a serial number,
or firmware versions, or specific part name or number, it's likely
available via vpd. also, im sick of having the diff in my tree.
the vpd info is not accessed as bytes read from a capability, but
is read via a register in the capability. the same register also
supports updating or writing vpd info, which sounds like a bad idea
to let userland have raw access to.
this adds an ioctl so that userland can ask the kernel to read via
the vpd register on its behalf. this ensures that the only access
is read access, and it's sanity checked.
tested by hrvoje popovski on many devices.
ok jmatthew@
Diffstat (limited to 'sbin')
0 files changed, 0 insertions, 0 deletions