[Skiboot] [PATCH v2 4/5] hdata: Add memory hierarchy under xscom node

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Aug 28 17:18:02 AEST 2017


We have memory to chip mapping but doesn't have complete memory hierarchy.
This patch adds memory hierarchy under xscom node. This is specific to
P9 system as these hierarchy may change between processor generation.

It uses memory controller ID details and populates nodes like:
  xscom@<addr>/mcbist@<mcbist_id>/mcs@<mcs_id>/mca@<mca_id>/dimm@<resource_id>

Also this patch adds few properties under dimm node.
Finally make sure xscom nodes created before calling memory_parse().

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
Changes in v2:
  - Fixed test case failures

-Vasant

 hdata/memory.c               | 118 ++++++++++++++++++++++++++++++++++++++++++-
 hdata/spira.c                |   6 +--
 hdata/test/p8-840-spira.dts  |  70 ++++++++++++-------------
 hdata/test/p81-811.spira.dts |  96 +++++++++++++++++------------------
 4 files changed, 202 insertions(+), 88 deletions(-)

diff --git a/hdata/memory.c b/hdata/memory.c
index dbb0ac4..d1570eb 100644
--- a/hdata/memory.c
+++ b/hdata/memory.c
@@ -22,6 +22,7 @@
 #include <mem_region.h>
 #include <types.h>
 #include <inttypes.h>
+#include <processor.h>
 
 #include "spira.h"
 #include "hdata.h"
@@ -44,8 +45,13 @@ struct HDIF_ms_area_address_range {
 	__be32 chip;
 	__be32 mirror_attr;
 	__be64 mirror_start;
+	__be32 controller_id;
 } __packed;
 
+#define MS_CONTROLLER_MCBIST_ID(id)	GETFIELD(PPC_BITMASK32(0, 1), id)
+#define MS_CONTROLLER_MCS_ID(id)	GETFIELD(PPC_BITMASK32(4, 7), id)
+#define MS_CONTROLLER_MCA_ID(id)	GETFIELD(PPC_BITMASK32(8, 23), id)
+
 struct HDIF_ms_area_id {
 	__be16 id;
 #define MS_PTYPE_RISER_CARD	0x8000
@@ -313,6 +319,109 @@ static void vpd_add_ram_area(const struct HDIF_common_hdr *msarea)
 	}
 }
 
+static void add_mca_dimm_info(struct dt_node *mca,
+			      const struct HDIF_common_hdr *msarea)
+{
+	unsigned int i;
+	const struct HDIF_child_ptr *ramptr;
+	const struct HDIF_common_hdr *ramarea;
+	const struct spira_fru_id *fru_id;
+	const struct HDIF_ram_area_id *ram_id;
+	const struct HDIF_ram_area_size *ram_area_sz;
+	struct dt_node *dimm;
+
+	ramptr = HDIF_child_arr(msarea, 0);
+	if (!CHECK_SPPTR(ramptr)) {
+		prerror("MS AREA: No RAM area at %p\n", msarea);
+		return;
+	}
+
+	for (i = 0; i < be32_to_cpu(ramptr->count); i++) {
+		ramarea = HDIF_child(msarea, ramptr, i, "RAM   ");
+		if (!CHECK_SPPTR(ramarea))
+			continue;
+
+		fru_id = HDIF_get_idata(ramarea, 0, NULL);
+		if (!fru_id)
+			continue;
+
+		/* Use Resource ID to add dimm node */
+		dimm = dt_find_by_name_addr(mca, "dimm",
+					    be16_to_cpu(fru_id->rsrc_id));
+		if (dimm)
+			continue;
+		dimm= dt_new_addr(mca, "dimm", be16_to_cpu(fru_id->rsrc_id));
+		assert(dimm);
+
+		/* Add location code */
+		slca_vpd_add_loc_code(dimm, be16_to_cpu(fru_id->slca_index));
+
+		/* DIMM size */
+		ram_area_sz = HDIF_get_idata(ramarea, 3, NULL);
+		if (!CHECK_SPPTR(ram_area_sz))
+			continue;
+		dt_add_property_cells(dimm, "size", be32_to_cpu(ram_area_sz->mb));
+
+		/* DIMM state */
+		ram_id = HDIF_get_idata(ramarea, 2, NULL);
+		if (!CHECK_SPPTR(ram_id))
+			continue;
+		if ((be16_to_cpu(ram_id->flags) & RAM_AREA_INSTALLED) &&
+		    (be16_to_cpu(ram_id->flags) & RAM_AREA_FUNCTIONAL))
+			dt_add_property_string(dimm, "status", "okay");
+		else
+			dt_add_property_string(dimm, "status", "disabled");
+	}
+}
+
+static void add_memory_controller(const struct HDIF_common_hdr *msarea,
+				  const struct HDIF_ms_area_address_range *arange)
+{
+	uint32_t chip_id, version;
+	uint32_t controller_id, mcbist_id, mcs_id, mca_id;
+	struct dt_node *xscom, *mcbist, *mcs, *mca;
+
+	/*
+	 * Memory hierarchy may change between processor version. Presently
+	 * its creating memory hierarchy for P9 (Nimbus) only.
+	 */
+	version = PVR_TYPE(mfspr(SPR_PVR));
+	if (version != PVR_TYPE_P9)
+		return;
+
+	chip_id = pcid_to_chip_id(be32_to_cpu(arange->chip));
+	controller_id = be32_to_cpu(arange->controller_id);
+	xscom = find_xscom_for_chip(chip_id);
+	if (!xscom) {
+		prlog(PR_WARNING,
+		      "MS AREA: Can't find XSCOM for chip %d\n", chip_id);
+		return;
+	}
+
+	mcbist_id = MS_CONTROLLER_MCBIST_ID(controller_id);
+	mcbist = dt_find_by_name_addr(xscom, "mcbist", mcbist_id);
+	if (!mcbist) {
+		mcbist = dt_new_addr(xscom, "mcbist", mcbist_id);
+		assert(mcbist);
+	}
+
+	mcs_id = MS_CONTROLLER_MCS_ID(controller_id);
+	mcs = dt_find_by_name_addr(mcbist, "mcs", mcs_id);
+	if (!mcs) {
+		mcs = dt_new_addr(mcbist, "mcs", mcs_id);
+		assert(mcs);
+	}
+
+	mca_id = MS_CONTROLLER_MCA_ID(controller_id);
+	mca = dt_find_by_name_addr(mcs, "mca", mca_id);
+	if (!mca) {
+		mca = dt_new_addr(mcs, "mca", mca_id);
+		assert(mca);
+	}
+
+	add_mca_dimm_info(mca, msarea);
+}
+
 static void get_msareas(struct dt_node *root,
 			const struct HDIF_common_hdr *ms_vpd)
 {
@@ -332,7 +441,7 @@ static void get_msareas(struct dt_node *root,
 		const struct HDIF_ms_area_address_range *arange;
 		const struct HDIF_ms_area_id *id;
 		const void *fruid;
-		unsigned int size, j;
+		unsigned int size, j, offset;
 		u16 flags;
 
 		msarea = HDIF_child(ms_vpd, msptr, i, "MSAREA");
@@ -372,7 +481,8 @@ static void get_msareas(struct dt_node *root,
 			return;
 		}
 
-		if (be32_to_cpu(arr->eactsz) < sizeof(*arange)) {
+		offset = offsetof(struct HDIF_ms_area_address_range, mirror_start);
+		if (be32_to_cpu(arr->eactsz) < offset) {
 			prerror("MS VPD: %p msarea #%i arange size too small!\n",
 				ms_vpd, i);
 			return;
@@ -392,6 +502,10 @@ static void get_msareas(struct dt_node *root,
 		/* This offset is from the arr, not the header! */
 		arange = (void *)arr + be32_to_cpu(arr->offset);
 		for (j = 0; j < be32_to_cpu(arr->ecnt); j++) {
+			offset = offsetof(struct HDIF_ms_area_address_range, controller_id);
+			if (be32_to_cpu(arr->eactsz) >= offset)
+				add_memory_controller(msarea, arange);
+
 			if (!add_address_range(root, id, arange))
 				return;
 			arange = (void *)arange + be32_to_cpu(arr->esize);
diff --git a/hdata/spira.c b/hdata/spira.c
index b58be7c..8833271 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -1314,12 +1314,12 @@ int parse_hdat(bool is_opal)
 	/* IPL params */
 	add_iplparams();
 
-	/* Parse MS VPD */
-	memory_parse();
-
 	/* Add XSCOM node (must be before chiptod, IO and FSP) */
 	add_xscom();
 
+	/* Parse MS VPD */
+	memory_parse();
+
 	/* Add any FSPs */
 	fsp_parse();
 
diff --git a/hdata/test/p8-840-spira.dts b/hdata/test/p8-840-spira.dts
index dbb3618..39088db 100644
--- a/hdata/test/p8-840-spira.dts
+++ b/hdata/test/p8-840-spira.dts
@@ -568,7 +568,7 @@
 	};
 
 	memory at 0 {
-		phandle = <0x42>;
+		phandle = <0x46>;
 		device_type = "memory";
 		ibm,chip-id = <0x0>;
 		reg = <0x0 0x0 0x8 0x0>;
@@ -581,12 +581,12 @@
 		ibm,loc-code = "U8286.41A.TU00163";
 
 		root-node-vpd at a000 {
-			phandle = <0x24>;
+			phandle = <0x25>;
 			ibm,loc-code = "U8286.41A.TU00163";
 			fru-type = [56 56];
 
 			enclosure at 1e00 {
-				phandle = <0x27>;
+				phandle = <0x28>;
 				ibm,loc-code = "U78C9.001.WZS0CWX";
 				fru-type = [45 56];
 				ibm,vpd = <0x848c0052 0x54045649 0x4e494452 0x10492f4f 0x20424143 0x4b504c41 0x4e452020 0x20434501 0x31565a02 0x3031464e 0x7373459 0x34333434 0x504e0730 0x30453432 0x3431534e 0xc594c33 0x30554635 0x354e3030 0x36434304 0x32434435 0x50520821 0x0 0x48 0x45043030 0x30324354 0x480f300 0x26485702 0x74233 0x6000000 0x142 0x34010042 0x370c0000 0x0 0x0 0x5046 0x2000078 0x841c0052 0x54044c58 0x5230565a 0x230314c 0x58083100 0x4010030 0x435046 0x2000078 0x84440052 0x54045643 0x454e4452 0x6434543 0x20202053 0x4507575a 0x53304357 0x58544d08 0x20202020 0x20202020 0x46430837 0x3843392d 0x30303152 0x470400a0 0xb32c5242 0x4202020 0x20504603 0x78 0x0>;
@@ -601,19 +601,19 @@
 				description = "System planar 1S4U";
 
 				air-mover at 3a00 {
-					phandle = <0x3e>;
+					phandle = <0x3f>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-A1";
 					fru-type = [41 4d];
 				};
 
 				air-mover at 3a01 {
-					phandle = <0x3f>;
+					phandle = <0x40>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-A2";
 					fru-type = [41 4d];
 				};
 
 				backplane at 800 {
-					phandle = <0x28>;
+					phandle = <0x29>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-P1";
 					fru-type = [42 50];
 					ibm,vpd = <0x848c0052 0x54045649 0x4e494452 0x10492f4f 0x20424143 0x4b504c41 0x4e452020 0x20434501 0x31565a02 0x3031464e 0x7373459 0x34333434 0x504e0730 0x30453432 0x3431534e 0xc594c33 0x30554635 0x354e3030 0x36434304 0x32434435 0x50520821 0x0 0x48 0x45043030 0x30324354 0x480f300 0x26485702 0x74233 0x6000000 0x142 0x34010042 0x370c0000 0x0 0x0 0x5046 0x2000078 0x841c0052 0x54044c58 0x5230565a 0x230314c 0x58083100 0x4010030 0x435046 0x2000078 0x0>;
@@ -628,7 +628,7 @@
 					description = "System planar 1S4U";
 
 					anchor-card at 500 {
-						phandle = <0x2f>;
+						phandle = <0x30>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-C13";
 						fru-type = [41 56];
 						ibm,vpd = <0x84cc0052 0x54045649 0x4e494452 0x10414e43 0x484f5220 0x20202020 0x20202020 0x20434501 0x31565a02 0x3031464e 0x7303045 0x32313532 0x504e0730 0x30453231 0x3438534e 0xc594c31 0x30424733 0x3132314e 0x4a434304 0x35324632 0x50520881 0x300000 0x48 0x45043030 0x31304354 0x440b400 0x485702 0x14233 0x6000000 0x142 0x34010042 0x370c0000 0x0 0x0 0x4239 0x3c435331 0x58150757 0x4e705f53 0x50f139a0 0xbf7efeb7 0x44d314d 0xd7cd74f2 0x862d884d 0x327cb552 0x79809378 0xa24d333e 0x6aed1eb8 0x49dab34d 0x344e1745 0x9bf468e9 0xa1504603 0x78 0x0>;
@@ -644,7 +644,7 @@
 					};
 
 					backplane-extender at 900 {
-						phandle = <0x29>;
+						phandle = <0x2a>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-C1";
 						fru-type = [42 58];
 						ibm,vpd = <0x84800052 0x54045649 0x4e494452 0x104e4154 0x49564520 0x492f4f20 0x43415244 0x20434501 0x31565a02 0x3031464e 0x7303045 0x31393630 0x504e0730 0x30453338 0x3039534e 0xc594c31 0x30554635 0x3537304c 0x39434304 0x32423042 0x48450430 0x30303143 0x540480b5 0x4857 0x2000142 0x33060000 0x0 0x42340100 0x42370c00 0x0 0x0 0x50 0x46010078 0x0>;
@@ -659,38 +659,38 @@
 						description = "Native I/O Card";
 
 						serial-connector at 2a00 {
-							phandle = <0x2c>;
+							phandle = <0x2d>;
 							ibm,loc-code = "U78C9.001.WZS0CWX-P1-C1-T1";
 							fru-type = [43 53];
 						};
 
 						usb-connector at 2900 {
-							phandle = <0x2a>;
+							phandle = <0x2b>;
 							ibm,loc-code = "U78C9.001.WZS0CWX-P1-C1-T3";
 							fru-type = [43 55];
 						};
 
 						usb-connector at 2901 {
-							phandle = <0x2b>;
+							phandle = <0x2c>;
 							ibm,loc-code = "U78C9.001.WZS0CWX-P1-C1-T2";
 							fru-type = [43 55];
 						};
 					};
 
 					hmc-connector at 2d00 {
-						phandle = <0x34>;
+						phandle = <0x35>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-T3";
 						fru-type = [48 4d];
 					};
 
 					hmc-connector at 2d01 {
-						phandle = <0x35>;
+						phandle = <0x36>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-T4";
 						fru-type = [48 4d];
 					};
 
 					ms-dimm at d000 {
-						phandle = <0x36>;
+						phandle = <0x37>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-C16";
 						fru-type = [4d 53];
 						ibm,vpd = <0x84940052 0x54045649 0x4e494452 0x1049424d 0x20313647 0x42204d53 0x20202020 0x20434501 0x31565a02 0x3034464e 0x7343154 0x39353735 0x504e0734 0x31543935 0x3735534e 0xc594833 0x314d5333 0x41343031 0x31434304 0x33314530 0x50520849 0x0 0x1000053 0x5a073030 0x31363338 0x34484504 0x30303031 0x43540400 0x48 0x57020090 0x42330600 0x0 0x423401 0x42370c 0x0 0x0 0x0 0x50460078 0x0>;
@@ -709,7 +709,7 @@
 					};
 
 					ms-dimm at d002 {
-						phandle = <0x37>;
+						phandle = <0x38>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-C18";
 						fru-type = [4d 53];
 						ibm,vpd = <0x84940052 0x54045649 0x4e494452 0x1049424d 0x20313647 0x42204d53 0x20202020 0x20434501 0x31565a02 0x3034464e 0x7343154 0x39353735 0x504e0734 0x31543935 0x3735534e 0xc594833 0x314d5533 0x41433143 0x50434304 0x33314530 0x50520849 0x0 0x1000053 0x5a073030 0x31363338 0x34484504 0x30303031 0x43540400 0x48 0x57020090 0x42330600 0x0 0x423401 0x42370c 0x0 0x0 0x0 0x50460078 0x0>;
@@ -728,7 +728,7 @@
 					};
 
 					processor at 1000 {
-						phandle = <0x2d>;
+						phandle = <0x2e>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-C32";
 						fru-type = [50 46];
 						ibm,vpd = [84 8c 00 52 54 04 56 49 4e 49 44 52 10 30 36 2d 57 41 59 20 50 52 4f 43 20 43 55 4f 44 46 4e 07 30 30 46 58 35 32 33 50 4e 07 30 30 46 58 37 34 38 53 4e 0c 59 41 31 39 33 32 30 36 33 35 36 32 43 43 04 35 34 45 31 48 45 04 30 30 30 31 43 54 04 00 00 00 00 48 57 02 00 01 42 33 06 00 00 00 00 00 00 42 34 01 00 42 37 0c 00 00 00 00 00 00 00 00 00 00 00 00 50 52 08 35 00 30 01 44 00 80 01 56 5a 02 30 31 43 45 01 31 50 46 02 00 00 78 00];
@@ -745,7 +745,7 @@
 					};
 
 					processor at 1001 {
-						phandle = <0x2e>;
+						phandle = <0x2f>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-C32";
 						fru-type = [50 46];
 						ibm,vpd = [84 8c 00 52 54 04 56 49 4e 49 44 52 10 30 36 2d 57 41 59 20 50 52 4f 43 20 43 55 4f 44 46 4e 07 30 30 46 58 35 32 33 50 4e 07 30 30 46 58 37 34 38 53 4e 0c 59 41 31 39 33 32 30 36 33 35 36 32 43 43 04 35 34 45 31 48 45 04 30 30 30 31 43 54 04 00 00 00 00 48 57 02 00 01 42 33 06 00 00 00 00 00 00 42 34 01 00 42 37 0c 00 00 00 00 00 00 00 00 00 00 00 00 50 52 08 35 00 30 01 44 00 80 01 56 5a 02 30 31 43 45 01 31 50 46 02 00 00 78 00];
@@ -762,56 +762,56 @@
 					};
 
 					usb-connector at 2902 {
-						phandle = <0x30>;
+						phandle = <0x31>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-T1";
 						fru-type = [43 55];
 					};
 
 					usb-connector at 2903 {
-						phandle = <0x31>;
+						phandle = <0x32>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-T2";
 						fru-type = [43 55];
 					};
 
 					usb-connector at 2904 {
-						phandle = <0x32>;
+						phandle = <0x33>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-T5";
 						fru-type = [43 55];
 					};
 
 					usb-connector at 2905 {
-						phandle = <0x33>;
+						phandle = <0x34>;
 						ibm,loc-code = "U78C9.001.WZS0CWX-P1-T6";
 						fru-type = [43 55];
 					};
 				};
 
 				dasd-backplane at 2400 {
-					phandle = <0x3a>;
+					phandle = <0x3b>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-P2";
 					fru-type = [44 42];
 				};
 
 				dasd-backplane at 2401 {
-					phandle = <0x3b>;
+					phandle = <0x3c>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-P2";
 					fru-type = [44 42];
 				};
 
 				enclosure-fault-led at a300 {
-					phandle = <0x41>;
+					phandle = <0x42>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-D1";
 					fru-type = [45 46];
 				};
 
 				enclosure-led at a200 {
-					phandle = <0x40>;
+					phandle = <0x41>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-D1";
 					fru-type = [45 49];
 				};
 
 				op-panel at 300 {
-					phandle = <0x39>;
+					phandle = <0x3a>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-D1";
 					fru-type = [4f 50];
 					ibm,vpd = <0x84800052 0x54045649 0x4e494452 0x10434543 0x204f5020 0x50414e45 0x4c202020 0x20434501 0x31565a02 0x3032464e 0x7303045 0x31393636 0x504e0730 0x30453239 0x3532534e 0xc594c33 0x30554633 0x38453033 0x52434304 0x32423038 0x48450430 0x30303143 0x540480b5 0x4857 0x2000242 0x33060000 0x0 0x42340100 0x42370c00 0x0 0x0 0x50 0x46010078 0x0>;
@@ -827,19 +827,19 @@
 				};
 
 				power-supply at 3102 {
-					phandle = <0x3c>;
+					phandle = <0x3d>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-E3";
 					fru-type = [50 53];
 				};
 
 				power-supply at 3103 {
-					phandle = <0x3d>;
+					phandle = <0x3e>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-E4";
 					fru-type = [50 53];
 				};
 
 				service-processor at 200 {
-					phandle = <0x38>;
+					phandle = <0x39>;
 					ibm,loc-code = "U78C9.001.WZS0CWX-P1";
 					fru-type = [53 50];
 					ibm,vpd = <0x848c0052 0x54045649 0x4e494452 0x10492f4f 0x20424143 0x4b504c41 0x4e452020 0x20434501 0x31565a02 0x3031464e 0x7373459 0x34333434 0x504e0730 0x30453432 0x3431534e 0xc594c33 0x30554635 0x354e3030 0x36434304 0x32434435 0x50520821 0x0 0x48 0x45043030 0x30324354 0x480f300 0x26485702 0x74233 0x6000000 0x142 0x34010042 0x370c0000 0x0 0x0 0x5046 0x2000078 0x841c0052 0x54044c58 0x5230565a 0x230314c 0x58083100 0x4010030 0x435046 0x2000078 0x84500052 0x54045652 0x31304452 0x10465350 0x20202020 0x20202020 0x20202020 0x20464704 0x564e5350 0x44430f42 0x44203230 0x31323032 0x32303038 0x3030464c 0x14503120 0x20202020 0x20202020 0x20202020 0x20202020 0x20504603 0x78 0x84400052 0x54045657 0x31304452 0x10465350 0x20565731 0x30202020 0x20202020 0x20474420 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x50460078 0x0>;
@@ -856,13 +856,13 @@
 			};
 
 			root-node-vpd at a001 {
-				phandle = <0x25>;
+				phandle = <0x26>;
 				ibm,loc-code = "U8286.41A.TU00163";
 				fru-type = [56 56];
 			};
 
 			system-vpd at 1c00 {
-				phandle = <0x26>;
+				phandle = <0x27>;
 				ibm,loc-code = "U8286.41A.TU00163";
 				fru-type = [53 56];
 			};
@@ -870,7 +870,7 @@
 	};
 
 	xscom at 3fc0000000000 {
-		phandle = <0x43>;
+		phandle = <0x24>;
 		ibm,chip-id = <0x0>;
 		ibm,proc-chip-id = <0x0>;
 		#address-cells = <0x1>;
@@ -923,7 +923,7 @@
 		};
 
 		psihb at 2010900 {
-			phandle = <0x44>;
+			phandle = <0x43>;
 			reg = <0x2010900 0x20>;
 			compatible = "ibm,power8-psihb-x", "ibm,psihb-x";
 			boot-link;
@@ -932,7 +932,7 @@
 	};
 
 	xscom at 3fc0800000000 {
-		phandle = <0x45>;
+		phandle = <0x44>;
 		ibm,chip-id = <0x1>;
 		ibm,proc-chip-id = <0x1>;
 		#address-cells = <0x1>;
@@ -985,7 +985,7 @@
 		};
 
 		psihb at 2010900 {
-			phandle = <0x46>;
+			phandle = <0x45>;
 			reg = <0x2010900 0x20>;
 			compatible = "ibm,power8-psihb-x", "ibm,psihb-x";
 		};
diff --git a/hdata/test/p81-811.spira.dts b/hdata/test/p81-811.spira.dts
index b3d5a94..6571e49 100644
--- a/hdata/test/p81-811.spira.dts
+++ b/hdata/test/p81-811.spira.dts
@@ -1660,14 +1660,14 @@
 	};
 
 	memory at 0 {
-		phandle = <0x82>;
+		phandle = <0x8a>;
 		device_type = "memory";
 		ibm,chip-id = <0x0>;
 		reg = <0x0 0x0 0x10 0x0>;
 	};
 
 	memory at 1000000000 {
-		phandle = <0x83>;
+		phandle = <0x8b>;
 		device_type = "memory";
 		ibm,chip-id = <0x10>;
 		reg = <0x10 0x0 0x10 0x0>;
@@ -1680,24 +1680,24 @@
 		ibm,loc-code = "U8247.22L.1010C8A";
 
 		root-node-vpd at a000 {
-			phandle = <0x5c>;
+			phandle = <0x5d>;
 			ibm,loc-code = "U8247.22L.1010C8A";
 			fru-type = [56 56];
 
 			enclosure-fault-led at a300 {
-				phandle = <0x81>;
+				phandle = <0x82>;
 				ibm,loc-code = "U78CB.001.WZS00AL";
 				fru-type = [45 46];
 			};
 
 			enclosure-led at a200 {
-				phandle = <0x80>;
+				phandle = <0x81>;
 				ibm,loc-code = "U78CB.001.WZS00AL";
 				fru-type = [45 49];
 			};
 
 			enclosure at 1e00 {
-				phandle = <0x5f>;
+				phandle = <0x60>;
 				ibm,loc-code = "U78CB.001.WZS00AL";
 				fru-type = [45 56];
 				ibm,vpd = <0x848c0052 0x54045649 0x4e494452 0x10492f4f 0x20424143 0x4b504c41 0x4e452020 0x20434501 0x31565a02 0x3032464e 0x7303045 0x32303232 0x504e0730 0x30453339 0x3937534e 0xc594c31 0x30554634 0x324c3031 0x33434304 0x32434436 0x50520821 0x0 0x48 0x45043030 0x30324354 0x480f300 0x26485702 0x44233 0x6000000 0x142 0x34010042 0x370c0000 0x0 0x0 0x5046 0x2000078 0x841c0052 0x54044c58 0x5230565a 0x230314c 0x58083100 0x4010030 0x425046 0x2000078 0x84440052 0x54045643 0x454e4452 0x6434543 0x20202053 0x4507575a 0x53303041 0x4c544d08 0x20202020 0x20202020 0x46430837 0x3843422d 0x30303152 0x47040000 0x5242 0x4202020 0x20504603 0x78 0x0>;
@@ -1712,43 +1712,43 @@
 				description = "System planar 2S2U";
 
 				air-mover at 3a00 {
-					phandle = <0x7a>;
+					phandle = <0x7b>;
 					ibm,loc-code = "U78CB.001.WZS00AL-A1";
 					fru-type = [41 4d];
 				};
 
 				air-mover at 3a01 {
-					phandle = <0x7b>;
+					phandle = <0x7c>;
 					ibm,loc-code = "U78CB.001.WZS00AL-A3";
 					fru-type = [41 4d];
 				};
 
 				air-mover at 3a02 {
-					phandle = <0x7c>;
+					phandle = <0x7d>;
 					ibm,loc-code = "U78CB.001.WZS00AL-A4";
 					fru-type = [41 4d];
 				};
 
 				air-mover at 3a03 {
-					phandle = <0x7d>;
+					phandle = <0x7e>;
 					ibm,loc-code = "U78CB.001.WZS00AL-A6";
 					fru-type = [41 4d];
 				};
 
 				air-mover at 3a04 {
-					phandle = <0x7e>;
+					phandle = <0x7f>;
 					ibm,loc-code = "U78CB.001.WZS00AL-A2";
 					fru-type = [41 4d];
 				};
 
 				air-mover at 3a05 {
-					phandle = <0x7f>;
+					phandle = <0x80>;
 					ibm,loc-code = "U78CB.001.WZS00AL-A5";
 					fru-type = [41 4d];
 				};
 
 				backplane at 800 {
-					phandle = <0x60>;
+					phandle = <0x61>;
 					ibm,loc-code = "U78CB.001.WZS00AL-P1";
 					fru-type = [42 50];
 					ibm,vpd = <0x848c0052 0x54045649 0x4e494452 0x10492f4f 0x20424143 0x4b504c41 0x4e452020 0x20434501 0x31565a02 0x3032464e 0x7303045 0x32303232 0x504e0730 0x30453339 0x3937534e 0xc594c31 0x30554634 0x324c3031 0x33434304 0x32434436 0x50520821 0x0 0x48 0x45043030 0x30324354 0x480f300 0x26485702 0x44233 0x6000000 0x142 0x34010042 0x370c0000 0x0 0x0 0x5046 0x2000078 0x841c0052 0x54044c58 0x5230565a 0x230314c 0x58083100 0x4010030 0x425046 0x2000078 0x0>;
@@ -1763,7 +1763,7 @@
 					description = "System planar 2S2U";
 
 					anchor-card at 500 {
-						phandle = <0x69>;
+						phandle = <0x6a>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C13";
 						fru-type = [41 56];
 						ibm,vpd = <0x84cc0052 0x54045649 0x4e494452 0x10414e43 0x484f5220 0x20202020 0x20202020 0x20434501 0x31565a02 0x3031464e 0x7303045 0x33343237 0x504e0730 0x30453231 0x3438534e 0xc594c31 0x30313134 0x32523030 0x30434304 0x35323444 0x50520881 0x300000 0x48 0x45043030 0x31304354 0x440b400 0x485702 0x14233 0x6000000 0x142 0x34010042 0x370c0000 0x0 0x0 0x4239 0x3c435340 0x55110351 0xdd6da253 0x5049652f 0x45748f7b 0x44d31c5 0x31833edf 0x1e75724d 0x328d48c1 0xb4246b02 0xee4d3367 0xb454d848 0x9f3a254d 0x340dadc4 0x4124b5ed 0xd5504603 0x78 0x0>;
@@ -1779,7 +1779,7 @@
 					};
 
 					backplane-extender at 900 {
-						phandle = <0x61>;
+						phandle = <0x62>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C1";
 						fru-type = [42 58];
 						ibm,vpd = <0x84800052 0x54045649 0x4e494452 0x104e4154 0x49564520 0x492f4f20 0x43415244 0x20434501 0x31565a02 0x3031464e 0x7303045 0x32313634 0x504e0730 0x30453338 0x3131534e 0xc594c31 0x30554634 0x324c3030 0x31434304 0x32423042 0x48450430 0x30303143 0x540480b5 0x4857 0x2000142 0x33060000 0x0 0x42340100 0x42370c00 0x0 0x0 0x50 0x46010078 0x0>;
@@ -1794,38 +1794,38 @@
 						description = "Native I/O Card";
 
 						serial-connector at 2a00 {
-							phandle = <0x64>;
+							phandle = <0x65>;
 							ibm,loc-code = "U78CB.001.WZS00AL-P1-C1-T1";
 							fru-type = [43 53];
 						};
 
 						usb-connector at 2901 {
-							phandle = <0x62>;
+							phandle = <0x63>;
 							ibm,loc-code = "U78CB.001.WZS00AL-P1-C1-T2";
 							fru-type = [43 55];
 						};
 
 						usb-connector at 2904 {
-							phandle = <0x63>;
+							phandle = <0x64>;
 							ibm,loc-code = "U78CB.001.WZS00AL-P1-C1-T3";
 							fru-type = [43 55];
 						};
 					};
 
 					ethernet-connector at 2800 {
-						phandle = <0x6a>;
+						phandle = <0x6b>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-T1 ";
 						fru-type = [43 45];
 					};
 
 					ethernet-connector at 2801 {
-						phandle = <0x6b>;
+						phandle = <0x6c>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-T2 ";
 						fru-type = [43 45];
 					};
 
 					ms-dimm at d000 {
-						phandle = <0x70>;
+						phandle = <0x71>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C16";
 						fru-type = [4d 53];
 						ibm,vpd = <0x84940052 0x54045649 0x4e494452 0x1049424d 0x20333247 0x42204d53 0x20202020 0x20434501 0x31565a02 0x3132464e 0x730304a 0x41363634 0x504e0730 0x304a4136 0x3634534e 0xc594831 0x304d5534 0x32443141 0x39434304 0x33314539 0x50520849 0x0 0x1000053 0x5a073030 0x33323736 0x38484504 0x30303031 0x43540400 0x48 0x57020100 0x42330600 0x0 0x423401 0x42370c 0x0 0x0 0x0 0x50460078 0x0>;
@@ -1844,7 +1844,7 @@
 					};
 
 					ms-dimm at d002 {
-						phandle = <0x71>;
+						phandle = <0x72>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C18";
 						fru-type = [4d 53];
 						ibm,vpd = <0x84940052 0x54045649 0x4e494452 0x1049424d 0x20333247 0x42204d53 0x20202020 0x20434501 0x31565a02 0x3132464e 0x730304a 0x41363634 0x504e0730 0x304a4136 0x3634534e 0xc594831 0x304d5534 0x32443141 0x36434304 0x33314539 0x50520849 0x0 0x1000053 0x5a073030 0x33323736 0x38484504 0x30303031 0x43540400 0x48 0x57020100 0x42330600 0x0 0x423401 0x42370c 0x0 0x0 0x0 0x50460078 0x0>;
@@ -1863,7 +1863,7 @@
 					};
 
 					ms-dimm at d008 {
-						phandle = <0x72>;
+						phandle = <0x73>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C24";
 						fru-type = [4d 53];
 						ibm,vpd = <0x84940052 0x54045649 0x4e494452 0x1049424d 0x20333247 0x42204d53 0x20202020 0x20434501 0x31565a02 0x3132464e 0x730304a 0x41363634 0x504e0730 0x304a4136 0x3634534e 0xc594831 0x304d5534 0x32433137 0x54434304 0x33314539 0x50520849 0x0 0x1000053 0x5a073030 0x33323736 0x38484504 0x30303031 0x43540400 0x48 0x57020100 0x42330600 0x0 0x423401 0x42370c 0x0 0x0 0x0 0x50460078 0x0>;
@@ -1882,7 +1882,7 @@
 					};
 
 					ms-dimm at d00a {
-						phandle = <0x73>;
+						phandle = <0x74>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C26";
 						fru-type = [4d 53];
 						ibm,vpd = <0x84940052 0x54045649 0x4e494452 0x1049424d 0x20333247 0x42204d53 0x20202020 0x20434501 0x31565a02 0x3132464e 0x730304a 0x41363634 0x504e0730 0x304a4136 0x3634534e 0xc594831 0x304d5534 0x32433141 0x48434304 0x33314539 0x50520849 0x0 0x1000053 0x5a073030 0x33323736 0x38484504 0x30303031 0x43540400 0x48 0x57020100 0x42330600 0x0 0x423401 0x42370c 0x0 0x0 0x0 0x50460078 0x0>;
@@ -1901,7 +1901,7 @@
 					};
 
 					processor at 1000 {
-						phandle = <0x65>;
+						phandle = <0x66>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C32";
 						fru-type = [50 46];
 						ibm,vpd = [84 8c 00 52 54 04 56 49 4e 49 44 52 10 31 30 2d 57 41 59 20 50 52 4f 43 20 43 55 4f 44 46 4e 07 30 30 46 58 35 31 38 50 4e 07 30 30 46 58 37 34 30 53 4e 0c 59 41 31 39 33 32 30 39 36 39 35 31 43 43 04 35 34 45 38 48 45 04 30 30 30 31 43 54 04 00 00 00 00 48 57 02 00 01 42 33 06 00 00 00 00 00 00 42 34 01 00 42 37 0c 00 00 00 00 00 00 00 00 00 00 00 00 50 52 08 35 00 50 01 22 00 80 01 56 5a 02 30 31 43 45 01 31 50 46 02 00 00 78 00];
@@ -1918,7 +1918,7 @@
 					};
 
 					processor at 1001 {
-						phandle = <0x66>;
+						phandle = <0x67>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C32";
 						fru-type = [50 46];
 						ibm,vpd = [84 8c 00 52 54 04 56 49 4e 49 44 52 10 31 30 2d 57 41 59 20 50 52 4f 43 20 43 55 4f 44 46 4e 07 30 30 46 58 35 31 38 50 4e 07 30 30 46 58 37 34 30 53 4e 0c 59 41 31 39 33 32 30 39 36 39 35 31 43 43 04 35 34 45 38 48 45 04 30 30 30 31 43 54 04 00 00 00 00 48 57 02 00 01 42 33 06 00 00 00 00 00 00 42 34 01 00 42 37 0c 00 00 00 00 00 00 00 00 00 00 00 00 50 52 08 35 00 50 01 22 00 80 01 56 5a 02 30 31 43 45 01 31 50 46 02 00 00 78 00];
@@ -1935,7 +1935,7 @@
 					};
 
 					processor at 1002 {
-						phandle = <0x67>;
+						phandle = <0x68>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C33";
 						fru-type = [50 46];
 						ibm,vpd = [84 8c 00 52 54 04 56 49 4e 49 44 52 10 31 30 2d 57 41 59 20 50 52 4f 43 20 43 55 4f 44 46 4e 07 30 30 46 58 35 31 38 50 4e 07 30 30 46 58 37 34 30 53 4e 0c 59 41 31 39 33 32 30 39 36 39 35 30 43 43 04 35 34 45 38 48 45 04 30 30 30 31 43 54 04 00 00 00 00 48 57 02 00 01 42 33 06 00 00 00 00 00 00 42 34 01 00 42 37 0c 00 00 00 00 00 00 00 00 00 00 00 00 50 52 08 35 00 50 01 22 00 80 01 56 5a 02 30 31 43 45 01 31 50 46 02 00 00 78 00];
@@ -1952,7 +1952,7 @@
 					};
 
 					processor at 1003 {
-						phandle = <0x68>;
+						phandle = <0x69>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-C33";
 						fru-type = [50 46];
 						ibm,vpd = [84 8c 00 52 54 04 56 49 4e 49 44 52 10 31 30 2d 57 41 59 20 50 52 4f 43 20 43 55 4f 44 46 4e 07 30 30 46 58 35 31 38 50 4e 07 30 30 46 58 37 34 30 53 4e 0c 59 41 31 39 33 32 30 39 36 39 35 30 43 43 04 35 34 45 38 48 45 04 30 30 30 31 43 54 04 00 00 00 00 48 57 02 00 01 42 33 06 00 00 00 00 00 00 42 34 01 00 42 37 0c 00 00 00 00 00 00 00 00 00 00 00 00 50 52 08 35 00 50 01 22 00 80 01 56 5a 02 30 31 43 45 01 31 50 46 02 00 00 78 00];
@@ -1969,44 +1969,44 @@
 					};
 
 					usb-connector at 2900 {
-						phandle = <0x6c>;
+						phandle = <0x6d>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-T5";
 						fru-type = [43 55];
 					};
 
 					usb-connector at 2902 {
-						phandle = <0x6d>;
+						phandle = <0x6e>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-T6";
 						fru-type = [43 55];
 					};
 
 					usb-connector at 2903 {
-						phandle = <0x6e>;
+						phandle = <0x6f>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-T3";
 						fru-type = [43 55];
 					};
 
 					usb-connector at 2905 {
-						phandle = <0x6f>;
+						phandle = <0x70>;
 						ibm,loc-code = "U78CB.001.WZS00AL-P1-T4";
 						fru-type = [43 55];
 					};
 				};
 
 				dasd-backplane at 2400 {
-					phandle = <0x76>;
+					phandle = <0x77>;
 					ibm,loc-code = "U78CB.001.WZS00AL-P2";
 					fru-type = [44 42];
 				};
 
 				dasd-backplane at 2401 {
-					phandle = <0x77>;
+					phandle = <0x78>;
 					ibm,loc-code = "U78CB.001.WZS00AL-P2";
 					fru-type = [44 42];
 				};
 
 				op-panel at 300 {
-					phandle = <0x75>;
+					phandle = <0x76>;
 					ibm,loc-code = "U78CB.001.WZS00AL-D1";
 					fru-type = [4f 50];
 					ibm,vpd = <0x84800052 0x54045649 0x4e494452 0x10434543 0x204f5020 0x50414e45 0x4c202020 0x20434501 0x31565a02 0x3032464e 0x7303045 0x31393636 0x504e0730 0x30453337 0x3730534e 0xc594c31 0x30554634 0x31383030 0x46434304 0x32423038 0x48450430 0x30303143 0x540480b5 0x4857 0x2000342 0x33060000 0x0 0x42340100 0x42370c00 0x0 0x0 0x50 0x46010078 0x0>;
@@ -2022,19 +2022,19 @@
 				};
 
 				power-supply at 3100 {
-					phandle = <0x78>;
+					phandle = <0x79>;
 					ibm,loc-code = "U78CB.001.WZS00AL-E1";
 					fru-type = [50 53];
 				};
 
 				power-supply at 3101 {
-					phandle = <0x79>;
+					phandle = <0x7a>;
 					ibm,loc-code = "U78CB.001.WZS00AL-E2";
 					fru-type = [50 53];
 				};
 
 				service-processor at 200 {
-					phandle = <0x74>;
+					phandle = <0x75>;
 					ibm,loc-code = "U78CB.001.WZS00AL-P1";
 					fru-type = [53 50];
 					ibm,vpd = <0x848c0052 0x54045649 0x4e494452 0x10492f4f 0x20424143 0x4b504c41 0x4e452020 0x20434501 0x31565a02 0x3032464e 0x7303045 0x32303232 0x504e0730 0x30453339 0x3937534e 0xc594c31 0x30554634 0x324c3031 0x33434304 0x32434436 0x50520821 0x0 0x48 0x45043030 0x30324354 0x480f300 0x26485702 0x44233 0x6000000 0x142 0x34010042 0x370c0000 0x0 0x0 0x5046 0x2000078 0x841c0052 0x54044c58 0x5230565a 0x230314c 0x58083100 0x4010030 0x425046 0x2000078 0x84500052 0x54045652 0x31304452 0x10465350 0x20202020 0x20202020 0x20202020 0x20464704 0x564e5350 0x44430f42 0x44203230 0x31323038 0x32333038 0x3030464c 0x14503120 0x20202020 0x20202020 0x20202020 0x20202020 0x20504603 0x78 0x84400052 0x54045657 0x31304452 0x10465350 0x20565731 0x30202020 0x20202020 0x20474420 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x50460078 0x0>;
@@ -2051,13 +2051,13 @@
 			};
 
 			root-node-vpd at a001 {
-				phandle = <0x5d>;
+				phandle = <0x5e>;
 				ibm,loc-code = "U8247.22L.1010C8A";
 				fru-type = [56 56];
 			};
 
 			system-vpd at 1c00 {
-				phandle = <0x5e>;
+				phandle = <0x5f>;
 				ibm,loc-code = "U8247.22L.1010C8A";
 				fru-type = [53 56];
 			};
@@ -2065,7 +2065,7 @@
 	};
 
 	xscom at 3fc0000000000 {
-		phandle = <0x84>;
+		phandle = <0x5c>;
 		ibm,chip-id = <0x0>;
 		ibm,proc-chip-id = <0x0>;
 		#address-cells = <0x1>;
@@ -2118,7 +2118,7 @@
 		};
 
 		psihb at 2010900 {
-			phandle = <0x85>;
+			phandle = <0x83>;
 			reg = <0x2010900 0x20>;
 			compatible = "ibm,power8-psihb-x", "ibm,psihb-x";
 			boot-link;
@@ -2127,7 +2127,7 @@
 	};
 
 	xscom at 3fc0800000000 {
-		phandle = <0x86>;
+		phandle = <0x84>;
 		ibm,chip-id = <0x1>;
 		ibm,proc-chip-id = <0x1>;
 		#address-cells = <0x1>;
@@ -2179,14 +2179,14 @@
 		};
 
 		psihb at 2010900 {
-			phandle = <0x87>;
+			phandle = <0x85>;
 			reg = <0x2010900 0x20>;
 			compatible = "ibm,power8-psihb-x", "ibm,psihb-x";
 		};
 	};
 
 	xscom at 3fc8000000000 {
-		phandle = <0x88>;
+		phandle = <0x86>;
 		ibm,chip-id = <0x10>;
 		ibm,proc-chip-id = <0x2>;
 		#address-cells = <0x1>;
@@ -2228,7 +2228,7 @@
 		};
 
 		psihb at 2010900 {
-			phandle = <0x89>;
+			phandle = <0x87>;
 			reg = <0x2010900 0x20>;
 			compatible = "ibm,power8-psihb-x", "ibm,psihb-x";
 			status = "ok";
@@ -2236,7 +2236,7 @@
 	};
 
 	xscom at 3fc8800000000 {
-		phandle = <0x8a>;
+		phandle = <0x88>;
 		ibm,chip-id = <0x11>;
 		ibm,proc-chip-id = <0x3>;
 		#address-cells = <0x1>;
@@ -2288,7 +2288,7 @@
 		};
 
 		psihb at 2010900 {
-			phandle = <0x8b>;
+			phandle = <0x89>;
 			reg = <0x2010900 0x20>;
 			compatible = "ibm,power8-psihb-x", "ibm,psihb-x";
 		};
-- 
2.9.3



More information about the Skiboot mailing list