From 80cb77739c42a292e33814a0361dce9f5886d41a Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Fri, 17 Jul 2020 14:09:03 +1000 Subject: 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 Signed-off-by: Oliver O'Halloran --- hdata/memory.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hdata') 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); } } -- cgit v1.1