Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose more properties to all devices in /proc/device-tree/vpd #10

Merged

Conversation

glassrose
Copy link

For PowerKVM hosts, the device-tree exposed by the OPAL firmware is present at /proc/device-tree.
We find the device specific vital product data listed in linux at /proc/device-tree/vpd.
Here we are making hwinfo display more of unexposed vpd information on PPC hosts.

This patch exposes following device properties:
ccin - Custom Card Identification Number
fru-number - Field Replaceable Unit Number
ibm,loc-code - location code(s) for the Field Replacable Unit
serial-number - 12 characters serial number (8 characters in old format)
part-number - part number
description - device description

The output will be something like:
...
36 @01 vpd
name "vpd", model "", dtype "", compat "ibm,opal-v3-vpd"
ccin "", fru-number "", location-code "U8286.42A.10D6CFT", serial-number "", part-number ","
description ""

37 @36 vpd/root-node-vpd@a000
name "root-node-vpd", model "", dtype "", compat ""
ccin "", fru-number "", location-code "U8286.42A.10D6CFT", serial-number "", part-number ","
description ""

38 @37 vpd/root-node-vpd@a000/system-vpd@1c00
name "system-vpd", model "", dtype "", compat ""
ccin "", fru-number "", location-code "U8286.42A.10D6CFT", serial-number "", part-number ","
description ""

39 @37 vpd/root-node-vpd@a000/root-node-vpd@a001
name "root-node-vpd", model "", dtype "", compat ""
ccin "", fru-number "", location-code "U8286.42A.10D6CFT", serial-number "", part-number ","
description ""

40 @37 vpd/root-node-vpd@a000/enclosure@1e00
name "enclosure", model "", dtype "", compat ""
ccin "2CD4", fru-number "00E1962", location-code "U78C9.001.WZS007X", serial-number "YL30UF39H00M", part-number "00E3352,"
description "System planar 2S4U"

41 @40 vpd/root-node-vpd@a000/enclosure@1e00/service-processor@200
name "service-processor", model "", dtype "", compat ""
ccin "2CD4", fru-number "00E1962", location-code "U78C9.001.WZS007X-P1", serial-number "YL30UF39H00M", part-number "00E3352,"
description "System planar 2S4U"
...

Signed-off-by: Chandni Verma chandni@linux.vnet.ibm.com

For PowerKVM hosts, the device-tree exposed by the OPAL firmware is present at /proc/device-tree.
We find the device specific vital product data listed in linux at /proc/device-tree/vpd.
Here we are making hwinfo display more of unexposed vpd information on PPC hosts.

This patch exposes following device properties:
ccin          - Custom Card Identification Number
fru-number    - Field Replaceable Unit Number
ibm,loc-code  - location code(s) for the Field Replacable Unit
serial-number - 12 characters serial number (8 characters in old format)
part-number   - part number
description   - device description

The output will be something like:
...
  36 @01  vpd
    name "vpd", model "", dtype "", compat "ibm,opal-v3-vpd"
    ccin "", fru-number "", location-code "U8286.42A.10D6CFT", serial-number "", part-number ","
    description ""

  37 @36  vpd/root-node-vpd@a000
    name "root-node-vpd", model "", dtype "", compat ""
    ccin "", fru-number "", location-code "U8286.42A.10D6CFT", serial-number "", part-number ","
    description ""

  38 @37  vpd/root-node-vpd@a000/system-vpd@1c00
    name "system-vpd", model "", dtype "", compat ""
    ccin "", fru-number "", location-code "U8286.42A.10D6CFT", serial-number "", part-number ","
    description ""

  39 @37  vpd/root-node-vpd@a000/root-node-vpd@a001
    name "root-node-vpd", model "", dtype "", compat ""
    ccin "", fru-number "", location-code "U8286.42A.10D6CFT", serial-number "", part-number ","
    description ""

  40 @37  vpd/root-node-vpd@a000/enclosure@1e00
    name "enclosure", model "", dtype "", compat ""
    ccin "2CD4", fru-number "00E1962", location-code "U78C9.001.WZS007X", serial-number "YL30UF39H00M", part-number "00E3352,"
    description "System planar 2S4U"

  41 @40  vpd/root-node-vpd@a000/enclosure@1e00/service-processor@200
    name "service-processor", model "", dtype "", compat ""
    ccin "2CD4", fru-number "00E1962", location-code "U78C9.001.WZS007X-P1", serial-number "YL30UF39H00M", part-number "00E3352,"
    description "System planar 2S4U"
...

Signed-off-by: Chandni Verma <chandni@linux.vnet.ibm.com>
@wfeldt
Copy link
Member

wfeldt commented Aug 6, 2015

looks ok, thanks!

wfeldt added a commit that referenced this pull request Aug 6, 2015
…es-126057

Expose more properties to all devices in /proc/device-tree/vpd
@wfeldt wfeldt merged commit 55cc421 into openSUSE:master Aug 6, 2015
@glassrose
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants