[Skiboot] [PATCH] hdata: Ensure the prd-label hbrt-code-image is prefixed

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Jul 20 15:45:58 AEST 2020


On 7/17/20 9:39 AM, Oliver O'Halloran wrote:
> 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 at linux.vnet.ibm.com>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>

Patch looks good to me. May be we should make below change as well.. so that 
`opal-prd`
search for `ibm,hbrt-code-image` first.

diff --git a/external/opal-prd/opal-prd.c b/external/opal-prd/opal-prd.c
index 40e5a9841..665005434 100644
--- a/external/opal-prd/opal-prd.c
+++ b/external/opal-prd/opal-prd.c
@@ -2192,10 +2192,9 @@ static int run_prd_daemon(struct opal_prd_ctx *ctx)
                         goto out_close;
                 }
         } else {
-               rc = map_hbrt_physmem(ctx, hbrt_code_region_name);
+               rc = map_hbrt_physmem(ctx, hbrt_code_region_name_ibm);
                 if (rc) {
-                       /* Fallback to old style ibm,prd-label */
-                       rc = map_hbrt_physmem(ctx, hbrt_code_region_name_ibm);
+                       rc = map_hbrt_physmem(ctx, hbrt_code_region_name);
                         if (rc) {
                                 pr_log(LOG_ERR, "IMAGE: Can't access hbrt "
                                                 "physical memory");


-Vasant


More information about the Skiboot mailing list