From patchwork Fri Jun 7 18:52:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 802338 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp949950wro; Fri, 7 Jun 2024 11:58:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXSsNYtIDm7DK7s9yhV0L3XNDqv8sVAyvJgYGTApbeBG1UTGlmO1Ui32bLMctKia+ZD+uOE7vsImBTjGL757LWe X-Google-Smtp-Source: AGHT+IEGxaHBkjDj1Hi5R7V/bqbdLPuSBh1Rvz+2MoU1OdvWA6FGgsVS5Bn0qnfXTU07vERXjOjb X-Received: by 2002:ac2:55ae:0:b0:52b:c121:ebe6 with SMTP id 2adb3069b0e04-52bc121ec9cmr1188761e87.44.1717786689774; Fri, 07 Jun 2024 11:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1717786689; cv=none; d=google.com; s=arc-20160816; b=rW39sedh8ETNBZEGBlvKLM4j4CUoTYXLh4SXz797z+GJY7GClV0ZQLvEB9Sk68Lyft zFu9fVDVapVLc8ejE127bX9537d6KDs+tpT697tIoVcRRmLaerq0Nc7NRcDSit5alk5Y yXUBvPD11N7lBwTNPz8teGV6UdbYt59sPBIdkzZVHUXXCjg3W33DCGD5A/XI7Fm7PrxB prpIu+jVD35upSxzQk1HCboTrjsqnuyXLtKw4Dg4IHr4TbJ4qKc+oYgWToqTS/q0Hw76 P2ifY7qLapyslQxDwTHT33Ff2pv3zjs3ZsGrRgsYHxHGD2abJyFSCwE0LGdFRwJUzrpD gUUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=cLZW3Zsg56Mr77Junauh616jnJmEPC2f7x/qDXNyFBM=; fh=xLSOOz5Q0Mrmzd+lwBRTYS7D/8TpUWM8TEHgIjpMzow=; b=jrsRVhhvsa5erGP95kro+vIteV7QyXGZkabqB/Uc/Al4SoWRaYKDN6mGMPd0L5/Y++ 1i5nIlui8s5Zlj9a5ZNLxCv/5QBlt11JSxbwVHVHpWCvRC/T3J/fUEziQNG5jhIUkg72 v4fD2FRWUYz7ABa7CCs94c7XNVKvyi86C9MRGaJbn+669eHfcjiUdAyjJ3janQFsQDli FfsZ+RDsyEA3IGv7pGTDOe2qmbm7CcD9hjzjLzrgnOfFlWsALaNDVlXkH2itDvNn9VKe gy+ga/S6VpTI3g9g+Sxv8MeouvkIpdTXEBG4ofrFLpDpR6eRL0ZJK0VCujJ9GKtmyrhb AhOQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c805cc397si209538266b.218.2024.06.07.11.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 11:58:09 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2748988556; Fri, 7 Jun 2024 20:55:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 52E3C8848F; Fri, 7 Jun 2024 20:55:02 +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=-1.2 required=5.0 tests=BAYES_00, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 55AED88496 for ; Fri, 7 Jun 2024 20:55:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 448601480; Fri, 7 Jun 2024 11:55:24 -0700 (PDT) Received: from a079122.blr.arm.com (a079122.arm.com [10.162.17.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 286AA3F792; Fri, 7 Jun 2024 11:54:56 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Tom Rini , Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Marek Vasut , Mark Kettenis , Fabio Estevam , Sughosh Ganu Subject: [RFC PATCH 27/31] test: bdinfo: dump the global LMB memory map Date: Sat, 8 Jun 2024 00:22:36 +0530 Message-Id: <20240607185240.1892031-28-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240607185240.1892031-1-sughosh.ganu@linaro.org> References: <20240607185240.1892031-1-sughosh.ganu@linaro.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean The LMB code has been changed to make the memory reservations persistent and global. Make corresponding change the the lmb_test_dump_all() function to print the global LMB added and reserved memory. Signed-off-by: Sughosh Ganu --- test/cmd/bdinfo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index 8ba785fc31..2f90c04b70 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -25,6 +25,8 @@ DECLARE_GLOBAL_DATA_PTR; +extern struct lmb lmb; + /* Declare a new bdinfo test */ #define BDINFO_TEST(_name, _flags) UNIT_TEST(_name, _flags, bdinfo_test) @@ -125,11 +127,11 @@ static int lmb_test_dump_region(struct unit_test_state *uts, return 0; } -static int lmb_test_dump_all(struct unit_test_state *uts, struct lmb *lmb) +static int lmb_test_dump_all(struct unit_test_state *uts) { ut_assert_nextline("lmb_dump_all:"); - ut_assertok(lmb_test_dump_region(uts, &lmb->memory, "memory")); - ut_assertok(lmb_test_dump_region(uts, &lmb->reserved, "reserved")); + ut_assertok(lmb_test_dump_region(uts, &lmb.memory, "memory")); + ut_assertok(lmb_test_dump_region(uts, &lmb.reserved, "reserved")); return 0; } @@ -191,10 +193,8 @@ static int bdinfo_test_all(struct unit_test_state *uts) #endif if (IS_ENABLED(CONFIG_LMB) && gd->fdt_blob) { - struct lmb lmb; - lmb_add_memory(gd->bd); - ut_assertok(lmb_test_dump_all(uts, &lmb)); + ut_assertok(lmb_test_dump_all(uts)); if (IS_ENABLED(CONFIG_OF_REAL)) ut_assert_nextline("devicetree = %s", fdtdec_get_srcname()); }