From patchwork Fri Jun 19 01:51:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1312519 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=nrDAxk3E; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49p1yt46Jgz9sRR for ; Fri, 19 Jun 2020 11:52:38 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0EDC982126; Fri, 19 Jun 2020 03:52:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="nrDAxk3E"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 20E8A82126; Fri, 19 Jun 2020 03:52:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5854B82121 for ; Fri, 19 Jun 2020 03:52:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=4322745af=atish.patra@wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1592531531; x=1624067531; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gDpRUTNbDAzu1UJgZpo3rFU4JTpvHtLbyZJLXgbtbjc=; b=nrDAxk3EyXFuRrz7UKNNeJ4wTyUKsrYfwc40Y32jafxLyG+FL9vn0hJm ayDnGcN3622EKvgnRbMr7hNcquyvE7q+fUCx8FWQRl5KBsEMAwG/WRIpI 9kEmCOMJTUOvkjW45+tzYRrdZTKSjflzj3B95/H02sXO4FJls4Vcri0F7 gkMAEs8fB4b1IZVEqNDnRtJHR530Qd2yOqfFrhb+eWs/XGx1IU2jpIVE1 F8OOvZtAtJ5HQrAfTcKh0MV8dyATcv5CZ5DlkLhpzqW6iXkygrJ1S2pNm ACetK7Eize5gylpgFPn5xLgCeuuxN3QOxOuudv3zkOdrV/V4IkUf7WSzM A==; IronPort-SDR: XXYwm6wh7vzVtvXHwJCafrQZUpTZKYSey/UL3EJxhSzFdWwA69Fr4HPkX3pQu2EgBagjPiXWtf IISQQjcuEUDKD1H+kFnUUuugYwuPe3Pb6tv9wJj/d/WOrE294w+s2qjOLdNvwY+ERy2axh8Q9s uynPUYuZ6iKf64EyRTUV9qN074x2QLhOr62mvoboWsdjiUoo7MttweSXWfPEpt6N2w5jFb6rc/ leiFzT6tdSO/PZbw1twyPqhd/loXCqYIoMgfbXuX8VKwpw28zLyBNIi8ebGJ6fXN9V4HLKnQ4T tkM= X-IronPort-AV: E=Sophos;i="5.75,253,1589212800"; d="scan'208";a="249566739" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 19 Jun 2020 09:52:06 +0800 IronPort-SDR: OTB7xv9BCIukfyqWJVK3JUf50Y38WXJPfpxf6rG0j92JUSExYOku0CU2wy+mxKhs69ZBhi4XSU vRP2iTP/3ZHS/IywJW/Xbj+MRKBRYVS0M= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 18:41:19 -0700 IronPort-SDR: dPf7XXRmEbzrc/bgTI6k76a4LKaO4fLKpkHeuC6ttJfCu7qkVVl5GA9CflS4nCnGE/DOeEZl1r pZE2r50nTUPA== WDCIronportException: Internal Received: from unknown (HELO jedi-01.hgst.com) ([10.86.58.110]) by uls-op-cesaip01.wdc.com with ESMTP; 18 Jun 2020 18:52:07 -0700 From: Atish Patra To: u-boot@lists.denx.de Cc: Atish Patra , Anup Patel , Bin Meng , Heinrich Schuchardt , Jagan Teki , Marek Vasut , Simon Goldschmidt , David Abdurachmanov , Tom Rini Subject: [PATCH 1/3] riscv: Do not return error if reserved node already exists Date: Thu, 18 Jun 2020 18:51:48 -0700 Message-Id: <20200619015150.27745-2-atish.patra@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200619015150.27745-1-atish.patra@wdc.com> References: <20200619015150.27745-1-atish.patra@wdc.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Not all errors are fatal. If a reserved memory node already exists in the destination device tree, we can continue to boot without failing. Signed-off-by: Atish Patra --- arch/riscv/lib/fdt_fixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c index 6db48ad04a56..91524d9a5ae9 100644 --- a/arch/riscv/lib/fdt_fixup.c +++ b/arch/riscv/lib/fdt_fixup.c @@ -62,7 +62,7 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst) pmp_mem.end = addr + size - 1; err = fdtdec_add_reserved_memory(dst, basename, &pmp_mem, &phandle); - if (err < 0) { + if (err < 0 && err != FDT_ERR_EXISTS) { printf("failed to add reserved memory: %d\n", err); return err; } From patchwork Fri Jun 19 01:51:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1312520 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=S8bxEJwm; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49p1z43wD9z9sRR for ; Fri, 19 Jun 2020 11:52:48 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 68BA782135; Fri, 19 Jun 2020 03:52:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="S8bxEJwm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D21F482124; Fri, 19 Jun 2020 03:52:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6115582122 for ; Fri, 19 Jun 2020 03:52:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=4322745af=atish.patra@wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1592531532; x=1624067532; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OlAdoobiBAYE+TT8801d4slfUwqQkorgK49UkeT73c8=; b=S8bxEJwmETz9ke4JqOYjLzVwXzbgaMBeuLRYaXcGokjTLnNH5JmH/NsH TZ8WvXBk+hVPpCgAhXeMGUijN6clnLCBUaBptVY1/0dgWBH3HjOHAv3IO JzYkZ+qlxadKO0hy9WLx6ldG77BZIW39M8+FQAFBEUnb+8wxmYjEqeq0x lySHVtXNVz9EvW3fD97YQDy0Yaw3XQ3dkwqDPj5Y6NIUlu85VzKxrABY5 qvEKceCQFSmI02gaoSg4UaOZztZvErJpMQVQLuoajAsuY9LGQ7dq5JwC7 fH+GhHeMCYsBWtDuQe3tRYJDyOHAjKS3Ik+QaazD97JdJc0K2nb172Bn5 g==; IronPort-SDR: ohHWzANuN3QrNSJjn74f4Wh6ASrKwQ080O6LGR5/K83njjNQGtCz1FEYs8Mdhym7s3eH1DnsRS 6H/ED3zzZFSLLZKVTqkJfIHnjTs/RckXmVISL50hcjS+G98Z+3yaNTOjlJq4+1A+Ce9MACVjrW 3qBFJgQDdoQkyQmXDOpRwE+fvfgwi23sm3W++PLB4jOgFfDrAtMcClC7BOjzEzlgaLPkH2pLcd 18gFMUAKsBxVZ38tgB8ySUGlsgronzk6egyqY2Lxz7LoiUbEuDqGJCoizfoiR2W/MyhQHKCe+J V3g= X-IronPort-AV: E=Sophos;i="5.75,253,1589212800"; d="scan'208";a="249566745" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 19 Jun 2020 09:52:07 +0800 IronPort-SDR: 40t+d/+wq0uh++hzdcYwMDvAzPyildPS5dAWYvhwW3D7nLnL6Hy5w/29ss60iMOyo5wPnanC/f WZTHU8+d6rFymsfdV0mgN7YffZCDswad4= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 18:41:19 -0700 IronPort-SDR: lC35xa/zJ/ep++VxOfu/tE8CRgHU5h1ILNUgsqGB196UWLpUySkZyE0JGYkoZdi/BKLao4qcox 5A7UbNDYG07g== WDCIronportException: Internal Received: from unknown (HELO jedi-01.hgst.com) ([10.86.58.110]) by uls-op-cesaip01.wdc.com with ESMTP; 18 Jun 2020 18:52:07 -0700 From: Atish Patra To: u-boot@lists.denx.de Cc: Atish Patra , Anup Patel , Bin Meng , Heinrich Schuchardt , Jagan Teki , Marek Vasut , Simon Goldschmidt , David Abdurachmanov , Tom Rini Subject: [PATCH 2/3] riscv: Use optimized version of fdtdec_get_addr_size_no_parent Date: Thu, 18 Jun 2020 18:51:49 -0700 Message-Id: <20200619015150.27745-3-atish.patra@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200619015150.27745-1-atish.patra@wdc.com> References: <20200619015150.27745-1-atish.patra@wdc.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean fdtdec_get_addr_size_no_parent is not an optimized version if parent node is already available with the caller. Use fdtdec_get_addr_size_auto_parent to read the "reg" property Signed-off-by: Atish Patra Reviewed-by: Bin Meng --- arch/riscv/lib/fdt_fixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c index 91524d9a5ae9..00b84dccbef0 100644 --- a/arch/riscv/lib/fdt_fixup.c +++ b/arch/riscv/lib/fdt_fixup.c @@ -44,7 +44,7 @@ int riscv_fdt_copy_resv_mem_node(const void *src, void *dst) fdt_for_each_subnode(node, src, offset) { name = fdt_get_name(src, node, NULL); - addr = fdtdec_get_addr_size_auto_noparent(src, node, + addr = fdtdec_get_addr_size_auto_parent(src, offset, node, "reg", 0, &size, false); if (addr == FDT_ADDR_T_NONE) { From patchwork Fri Jun 19 01:51:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 1312521 X-Patchwork-Delegate: xypron.glpk@gmx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.a=rsa-sha256 header.s=dkim.wdc.com header.b=qUVBY6nz; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49p1zG6wp2z9sRR for ; Fri, 19 Jun 2020 11:52:58 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 439218213D; Fri, 19 Jun 2020 03:52:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=wdc.com header.i=@wdc.com header.b="qUVBY6nz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 61A6782126; Fri, 19 Jun 2020 03:52:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8850282124 for ; Fri, 19 Jun 2020 03:52:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=wdc.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=4322745af=atish.patra@wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1592531532; x=1624067532; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VclyrM/jpgRF2h/cBmvbprjxSK8mja3DhpfaRRLaq9Y=; b=qUVBY6nzxH/A2CrrQ++YKGrB7JtfpfEOOTB1bfUi7Eqh5B/FSxIigVOp VTpd6echIj24sE8vmRMk06FSILSmOE8mJK9L9usLbJZshUJk3yS0N1lKE 556FuaBztp/t+74i2Ork5hrEwaYkIDnBpYwX4TszXUK8Co+2KopKeFipx GMnA6gRuFxqvGIAhRslTbJVU2UuxQSsbajoeyQSW8LWeeeE8qThFtoOBH S7at/mIsFc56QXDXliYMu0FGmHFOBP2GAqgHaiVR0orz58qFdg5ImmNfM JFw6cHl81CLf3F5GZf8OJgyJuoMfjlDkRy1TF+oGgHO/IJF2VJytjQh7b Q==; IronPort-SDR: /me+qRLaZzvKZe7OTrsicETI7OJwMsr8cN5oAJ4b+JdfZMUnYJWC1i2yEHuWMEPhD0u5iAuJ3R mQHTOGu7A/6pce7fEw/otP9lfl9Vv5aichQG8v5TvU5tOyUAY5aMEF2JFgsatNBLKWgnKJMzAh AIyxxV52V1J81dAvVrvTKXOYlmaTyL1KqtvXktBv19DNJfMB6rBt39Zz65BvyNvniWYpMfjW5b FM0wDbLBIlxMPUgTtzc59wkc/Xdq2pVvoWqNffm1Uuz2l3GNYrLPrrt9CDB6AyHpyiqFn8Q5Mf cK0= X-IronPort-AV: E=Sophos;i="5.75,253,1589212800"; d="scan'208";a="249566750" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 19 Jun 2020 09:52:08 +0800 IronPort-SDR: RMGddmgoNsdADm0VebTPWYyp8xrZQXVoZpIelb49vt7wHWzRpEqn5AGKJ6MLF1Scm1nUgU+2fI ksEPj5AnE8bc88vteZVWvqLxmxjCVjmOc= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 18:41:20 -0700 IronPort-SDR: JfNSGwkzXn6mvxNPFs1+SxE1xDaDPK+fBszUT35kZ5E++aNAPZK47x9dbGiHVHTjSbgHj4dB0G X4yFfTlRYvvg== WDCIronportException: Internal Received: from unknown (HELO jedi-01.hgst.com) ([10.86.58.110]) by uls-op-cesaip01.wdc.com with ESMTP; 18 Jun 2020 18:52:08 -0700 From: Atish Patra To: u-boot@lists.denx.de Cc: Atish Patra , Anup Patel , Bin Meng , Heinrich Schuchardt , Jagan Teki , Marek Vasut , Simon Goldschmidt , David Abdurachmanov , Tom Rini Subject: [PATCH 3/3] cmd: bootefi: Honor the address & size cells properties correctly Date: Thu, 18 Jun 2020 18:51:50 -0700 Message-Id: <20200619015150.27745-4-atish.patra@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200619015150.27745-1-atish.patra@wdc.com> References: <20200619015150.27745-1-atish.patra@wdc.com> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean fdtdec_get_addr_size reads the uses a fixed value for address & size cell properties which may not be correct always. Use the auto variant of the function which automatically reads #address-cells & #size-cells from parent and uses to read the "reg" property. Signed-off-by: Atish Patra --- cmd/bootefi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/bootefi.c b/cmd/bootefi.c index 0f6d0f77507c..5f3fcce597de 100644 --- a/cmd/bootefi.c +++ b/cmd/bootefi.c @@ -190,8 +190,9 @@ static void efi_carve_out_dt_rsv(void *fdt) subnode = fdt_first_subnode(fdt, nodeoffset); while (subnode >= 0) { /* check if this subnode has a reg property */ - addr = fdtdec_get_addr_size(fdt, subnode, "reg", - (fdt_size_t *)&size); + addr = fdtdec_get_addr_size_auto_parent(fdt, nodeoffset, + subnode, "reg", 0, + (fdt_size_t *)&size, false); /* * The /reserved-memory node may have children with * a size instead of a reg property.