From patchwork Fri Jul 17 04:09:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver O'Halloran X-Patchwork-Id: 1330719 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B7Hgx1jqHz9sRW for ; Fri, 17 Jul 2020 14:09:33 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=kqGkkJoR; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4B7Hgw6tmjzDr8V for ; Fri, 17 Jul 2020 14:09:32 +1000 (AEST) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2a00:1450:4864:20::344; helo=mail-wm1-x344.google.com; envelope-from=oohall@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=kqGkkJoR; dkim-atps=neutral Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4B7Hgm1nTkzDr85 for ; Fri, 17 Jul 2020 14:09:23 +1000 (AEST) Received: by mail-wm1-x344.google.com with SMTP id g10so6405039wmc.1 for ; Thu, 16 Jul 2020 21:09:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vdnmbpq3+utlvATu9v//OOeslhAyd4XURvjjt8LYTJg=; b=kqGkkJoRP/z6QLnwMr8QFmyo9fRxuuJ84ZWgJRUxRfqE7bRfCsfkgaYXuyV/+xXpbC PQW320g5DcsP/WFdZEE4wfmJmT2a0A/AM1FaUw2e7GOCE05EcokANpez+uFgcJP/Qk3u dd4ST1ijrwDyp1+DSwmT96xvSB963Zj+GRmi/4LYFXuOHjGiVfoo6sjpIiYZ+NXkuI9s YWD+OsBhUZO+MMI8tpFAa8F604INzkD3xaSgTJ6p3ZMMQRwaBzq3ET/h3a6tK4rsKGpS ErUZCHR3OpT/BLTRrmndbzEple9f+Syiec0+iYsth51mdesmFztwDPfg/0452Phygtfr k9yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vdnmbpq3+utlvATu9v//OOeslhAyd4XURvjjt8LYTJg=; b=ExIyGS/VaITKHWpFkSL4K+vDtRgF3LfU/W4kqk6C8urOYe+KDk6Bkgbw+9M78XzSJZ iJbNGE2e/0GZ7tXtP3sS3ydzNJRrbiU78qrnOQjJY0y17KNe8Wv55ay6p43QA3RJT47u 3ktVbpbox7b07nQGI04fv00gz1jEVdFquD9Yh3d7Gkwgjw2rhH8rav2X8/S0jBPv0DeZ IWic9uZ7N4JrKEDtToHJt4fQmgzFJNAXsgn1BuCjxjjKQjTMl5UMBE6vzd9S4wxaFfhY lhonlc1eTEedRo5E4ok2WdX7m9J+GZnnYtCoPpHgq8rSMV2UO4fKDPiWwzMTzoslqDWo bpXg== X-Gm-Message-State: AOAM532d/+29HlSj45d8c0qqxLXfo3bzg4Uh/xz+hZ7ntnKx0O1xY8Qx HEQKlf8iXMWV0iPlZchAHS6uHTkrZic= X-Google-Smtp-Source: ABdhPJzI6/55MUqgfOKsD4iRszXoSEeOb4GP9rhwNnwS6rbWATKusJmC7iYKbpOkZBG1n1/60ysDJA== X-Received: by 2002:a1c:804c:: with SMTP id b73mr7100980wmd.59.1594958958921; Thu, 16 Jul 2020 21:09:18 -0700 (PDT) Received: from 192-168-1-18.tpgi.com.au ([203.221.103.183]) by smtp.gmail.com with ESMTPSA id f15sm11173899wmj.44.2020.07.16.21.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jul 2020 21:09:18 -0700 (PDT) From: Oliver O'Halloran To: skiboot@lists.ozlabs.org Date: Fri, 17 Jul 2020 14:09:03 +1000 Message-Id: <20200717040903.1192849-1-oohall@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [Skiboot] [PATCH] hdata: Ensure the prd-label hbrt-code-image is prefixed X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" 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(+) diff --git a/hdata/memory.c b/hdata/memory.c index 5b1a05d23371..0d9486b92ac2 100755 --- a/hdata/memory.c +++ b/hdata/memory.c @@ -827,6 +827,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); } }