aboutsummaryrefslogtreecommitdiff
path: root/hdata/vpd.c
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-01-13 17:56:18 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-01-16 09:55:43 +1100
commit3dadd152b06756ae3dafa21d579885d9bff5a27e (patch)
tree748df5c3c080d40ff05ee051d644ef3bd5160293 /hdata/vpd.c
parentc134dbfeaa1f24c892919b483c3fc00a05822efb (diff)
downloadskiboot-3dadd152b06756ae3dafa21d579885d9bff5a27e.zip
skiboot-3dadd152b06756ae3dafa21d579885d9bff5a27e.tar.gz
skiboot-3dadd152b06756ae3dafa21d579885d9bff5a27e.tar.bz2
hdat: handle ISDIMM SPD blobs
Previously the HDAT format was only ever used with IBM hardware so it would store vital product data (VPD) blobs in the IBM ASCII Keyword VPD format. With P9 HDAT is used on OpenPower machines which use Industry Standard DIMMs that provide their product data through a "Serial Present Detect" EEPROM mounted on the DIMM. The SPD blob has a different format and is exported in the device-tree under the "spd" property rather than the "ibm,vpd" property. This patch adds support for recognising these blobs and placing them in the appropriate DT property. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata/vpd.c')
-rw-r--r--hdata/vpd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hdata/vpd.c b/hdata/vpd.c
index d9ee77c..cb7a8da 100644
--- a/hdata/vpd.c
+++ b/hdata/vpd.c
@@ -590,7 +590,8 @@ struct dt_node *dt_add_vpd_node(const struct HDIF_common_hdr *hdr,
}
/* Parse VPD fields, ensure that it has not been added already */
- if (!dt_find_property(node, "ibm,vpd")) {
+ if (vpd_valid(fruvpd, fruvpd_sz)
+ && !dt_find_property(node, "ibm,vpd")) {
dt_add_property(node, "ibm,vpd", fruvpd, fruvpd_sz);
vpd_vini_parse(node, fruvpd, fruvpd_sz);
}