aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2020-07-17 14:09:03 +1000
committerOliver O'Halloran <oohall@gmail.com>2020-08-07 16:00:20 +1000
commit80cb77739c42a292e33814a0361dce9f5886d41a (patch)
tree868cefe249d1dc2b008354f1f94945c7c5a99cda /hdata
parentabe4c4799ffee4be12674ad59fc0bc521b0724f3 (diff)
downloadskiboot-80cb77739c42a292e33814a0361dce9f5886d41a.zip
skiboot-80cb77739c42a292e33814a0361dce9f5886d41a.tar.gz
skiboot-80cb77739c42a292e33814a0361dce9f5886d41a.tar.bz2
hdata: Ensure the prd-label hbrt-code-image is prefixed
Older versions of opal-prd (i.e. most of them shipped by distros) expect the HBRT image to have the PRD label of "ibm,hbrt-code-image". Commit c3bfa3209559 ("hdata: Fix reserved node label search") made opal-prd check for both strings, but since opal-prd itself is the only component interested in locating the hbrt-code-image we might as well just add the prefix in firmware. Cc: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hdata')
-rwxr-xr-xhdata/memory.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hdata/memory.c b/hdata/memory.c
index bd47fee..6602add 100755
--- a/hdata/memory.c
+++ b/hdata/memory.c
@@ -822,6 +822,15 @@ static void get_hb_reserved_mem(struct HDIF_common_hdr *ms_vpd)
dt_add_property_cells(node, "ibm,prd-instance",
(be32_to_cpu(hb_resv_mem->type_instance) & 0xffffff));
+ /*
+ * Most reservations are used by HBRT itself so we should leave
+ * the label as-is. The exception is hbrt-code-image which is
+ * used by opal-prd to locate the HBRT image. Older versions
+ * of opal-prd expect this to be "ibm,hbrt-code-image" so make
+ * sure the prefix is there.
+ */
+ if (!strcmp(label, "hbrt-code-image"))
+ strcpy(label, "ibm,hbrt-code-image");
dt_add_property_string(node, "ibm,prd-label", label);
}
}