[Skiboot] [PATCH 2/3] hdata/spira: parse vpd to add part-number and serial-number to xscom@ node

Stewart Smith stewart at linux.ibm.com
Fri Apr 6 15:16:45 AEST 2018


From: Stewart Smith <stewart at linux.vnet.ibm.com>

Expected by FWTS and associates our processor with the part/serial
number, which is obviously a good thing for one's own sanity.

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 hdata/spira.c                | 4 +++-
 hdata/test/p8-840-spira.dts  | 4 ++++
 hdata/test/p81-811.spira.dts | 8 ++++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/hdata/spira.c b/hdata/spira.c
index 0724dcc42ae9..320ed3b3aaad 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -558,9 +558,11 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
 		if (version >= 0x000a) {
 			vpd = HDIF_get_idata(hdif, SPPCRD_IDATA_MODULE_VPD,
 					     &vpd_sz);
-			if (CHECK_SPPTR(vpd))
+			if (CHECK_SPPTR(vpd)) {
 				dt_add_property(np, "ibm,module-vpd", vpd,
 						vpd_sz);
+				vpd_data_parse(np, vpd, vpd_sz);
+			}
 		}
 
 		/*
diff --git a/hdata/test/p8-840-spira.dts b/hdata/test/p8-840-spira.dts
index a1c238f285cd..62a2f52bc327 100644
--- a/hdata/test/p8-840-spira.dts
+++ b/hdata/test/p8-840-spira.dts
@@ -966,6 +966,8 @@
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78C9.001.WZS0CWX-P1-C32";
 		ibm,module-vpd = <0xcafebeef 0x10000 0xa502aa2f>;
+		part-number = "00KV631";
+		serial-number = "YA1932063562";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x0>;
@@ -1029,6 +1031,8 @@
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78C9.001.WZS0CWX-P1-C32";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x9f87fa41>;
+		part-number = "00KV631";
+		serial-number = "YA1932063562";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x0>;
diff --git a/hdata/test/p81-811.spira.dts b/hdata/test/p81-811.spira.dts
index e3224b04fef6..ba9b3551f630 100644
--- a/hdata/test/p81-811.spira.dts
+++ b/hdata/test/p81-811.spira.dts
@@ -2185,6 +2185,8 @@
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78CB.001.WZS00AL-P1-C32";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x3e067c18>;
+		part-number = "00KV627";
+		serial-number = "YA1932096951";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x0>;
@@ -2248,6 +2250,8 @@
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78CB.001.WZS00AL-P1-C32";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x1b85218f>;
+		part-number = "00KV627";
+		serial-number = "YA1932096951";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x0>;
@@ -2308,6 +2312,8 @@
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78CB.001.WZS00AL-P1-C33";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x36f99ead>;
+		part-number = "00KV627";
+		serial-number = "YA1932096950";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x1>;
@@ -2359,6 +2365,8 @@
 		ibm,occ-functional-state = <0x1>;
 		ibm,loc-code = "U78CB.001.WZS00AL-P1-C33";
 		ibm,module-vpd = <0xcafebeef 0x10000 0x65fe8f66>;
+		part-number = "00KV627";
+		serial-number = "YA1932096950";
 		ibm,ccm-node-id = <0x0>;
 		ibm,hw-card-id = <0x0>;
 		ibm,hw-module-id = <0x1>;
-- 
2.14.3



More information about the Skiboot mailing list