aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2016-06-13 12:29:06 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-07-28 13:31:58 +1000
commitcb6402af3e01da5457a897cfe590e34d6c71be71 (patch)
treec21371dddf10c9b3d8321d4b24e90331035f1bb3 /hdata
parentd7ce0ac42b49d274c40fe8edf73b10a640116479 (diff)
downloadskiboot-cb6402af3e01da5457a897cfe590e34d6c71be71.zip
skiboot-cb6402af3e01da5457a897cfe590e34d6c71be71.tar.gz
skiboot-cb6402af3e01da5457a897cfe590e34d6c71be71.tar.bz2
hdat/vpd: Add chip-id property to processor chip node under vpd
We have core information under /cpus node and processor chip VPD data (like SN, LN, etc) under /vpd directory. Presently we don't have any property to relate cores and chip information. This patch adds chip-id information for processor chip nodes under vpd. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/spira.c15
-rw-r--r--hdata/test/p8-840-spira.dt2
-rw-r--r--hdata/test/p81-811.spira.dt4
3 files changed, 17 insertions, 4 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index cb97615..e4e6b2d 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -371,7 +371,7 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
const struct HDIF_common_hdr *hdif;
unsigned int i, vpd_sz;
const void *vpd;
- struct dt_node *np;
+ struct dt_node *np, *vpd_node;
for_each_ntuple_idx(&spira.ntuples.proc_chip, hdif, i,
SPPCRD_HDIF_SIG) {
@@ -409,7 +409,11 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
}
/* Add chip VPD */
- dt_add_vpd_node(hdif, SPPCRD_IDATA_FRU_ID, SPPCRD_IDATA_KW_VPD);
+ vpd_node = dt_add_vpd_node(hdif, SPPCRD_IDATA_FRU_ID,
+ SPPCRD_IDATA_KW_VPD);
+ if (vpd_node)
+ dt_add_property_cells(vpd_node, "ibm,chip-id",
+ be32_to_cpu(cinfo->xscom_id));
/* Add module VPD on version A and later */
if (version >= 0x000a) {
@@ -437,7 +441,7 @@ static void add_xscom_sppaca(uint64_t xscom_base)
{
const struct HDIF_common_hdr *hdif;
unsigned int i;
- struct dt_node *np;
+ struct dt_node *np, *vpd_node;
for_each_ntuple_idx(&spira.ntuples.paca, hdif, i, PACA_HDIF_SIG) {
const struct sppaca_cpu_id *id;
@@ -474,7 +478,10 @@ static void add_xscom_sppaca(uint64_t xscom_base)
continue;
/* Add chip VPD */
- dt_add_vpd_node(hdif, SPPACA_IDATA_FRU_ID, SPPACA_IDATA_KW_VPD);
+ vpd_node = dt_add_vpd_node(hdif, SPPACA_IDATA_FRU_ID,
+ SPPACA_IDATA_KW_VPD);
+ if (vpd_node)
+ dt_add_property_cells(vpd_node, "ibm,chip-id", chip_id);
/* Add chip associativity data */
dt_add_property_cells(np, "ibm,ccm-node-id",
diff --git a/hdata/test/p8-840-spira.dt b/hdata/test/p8-840-spira.dt
index 324b616..bcf49d6 100644
--- a/hdata/test/p8-840-spira.dt
+++ b/hdata/test/p8-840-spira.dt
@@ -766,6 +766,7 @@ prop: ibm,enabled-idle-states size: 24 val: 6e617000666173742d736c65657000727677
prop: part-number size: 8 val: 3030465837343800
prop: ccin size: 5 val: 3534453100
prop: description size: 8 val: 556e6b6e6f776e00
+ prop: ibm,chip-id size: 4 val: 00000000
node: processor@1001
prop: ibm,loc-code size: 25 val: 55373843392e3030312e575a53304357582d50312d43333200
prop: fru-type size: 2 val: 5046
@@ -779,6 +780,7 @@ prop: ibm,enabled-idle-states size: 24 val: 6e617000666173742d736c65657000727677
prop: part-number size: 8 val: 3030465837343800
prop: ccin size: 5 val: 3534453100
prop: description size: 8 val: 556e6b6e6f776e00
+ prop: ibm,chip-id size: 4 val: 00000001
node: usb-connector@2902
prop: ibm,loc-code size: 24 val: 55373843392e3030312e575a53304357582d50312d543100
prop: fru-type size: 2 val: 4355
diff --git a/hdata/test/p81-811.spira.dt b/hdata/test/p81-811.spira.dt
index 5b792b4..fd805e4 100644
--- a/hdata/test/p81-811.spira.dt
+++ b/hdata/test/p81-811.spira.dt
@@ -1880,6 +1880,7 @@ prop: ibm,enabled-idle-states size: 24 val: 6e617000666173742d736c65657000727677
prop: part-number size: 8 val: 3030465837343000
prop: ccin size: 5 val: 3534453800
prop: description size: 8 val: 556e6b6e6f776e00
+ prop: ibm,chip-id size: 4 val: 00000000
node: processor@1001
prop: ibm,loc-code size: 25 val: 55373843422e3030312e575a533030414c2d50312d43333200
prop: fru-type size: 2 val: 5046
@@ -1893,6 +1894,7 @@ prop: ibm,enabled-idle-states size: 24 val: 6e617000666173742d736c65657000727677
prop: part-number size: 8 val: 3030465837343000
prop: ccin size: 5 val: 3534453800
prop: description size: 8 val: 556e6b6e6f776e00
+ prop: ibm,chip-id size: 4 val: 00000001
node: processor@1002
prop: ibm,loc-code size: 25 val: 55373843422e3030312e575a533030414c2d50312d43333300
prop: fru-type size: 2 val: 5046
@@ -1906,6 +1908,7 @@ prop: ibm,enabled-idle-states size: 24 val: 6e617000666173742d736c65657000727677
prop: part-number size: 8 val: 3030465837343000
prop: ccin size: 5 val: 3534453800
prop: description size: 8 val: 556e6b6e6f776e00
+ prop: ibm,chip-id size: 4 val: 00000010
node: processor@1003
prop: ibm,loc-code size: 25 val: 55373843422e3030312e575a533030414c2d50312d43333300
prop: fru-type size: 2 val: 5046
@@ -1919,6 +1922,7 @@ prop: ibm,enabled-idle-states size: 24 val: 6e617000666173742d736c65657000727677
prop: part-number size: 8 val: 3030465837343000
prop: ccin size: 5 val: 3534453800
prop: description size: 8 val: 556e6b6e6f776e00
+ prop: ibm,chip-id size: 4 val: 00000011
node: usb-connector@2900
prop: ibm,loc-code size: 24 val: 55373843422e3030312e575a533030414c2d50312d543500
prop: fru-type size: 2 val: 4355