From patchwork Wed Aug 14 10:59:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 819121 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp645741wrm; Wed, 14 Aug 2024 04:03:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVbHCIyE/nSYPqacf4K6aFMB4jmODFHyB6RWe2O4/42xk0Jq/rJakFfEG1ZqfyBzpHi2ObhJKBLEEx1L/qVPvOR X-Google-Smtp-Source: AGHT+IGLYkyaT00FFxzX4rdHiK4AO1BKqeSZAji842955ayhoDqyh11w9fvkadOXbzFpvpEx+Nt1 X-Received: by 2002:a2e:d02:0:b0:2ec:5c94:3d99 with SMTP id 38308e7fff4ca-2f3aa1a5887mr12898901fa.2.1723633436768; Wed, 14 Aug 2024 04:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723633436; cv=none; d=google.com; s=arc-20160816; b=hX4NRzSsAKNqX9Qk/dk8+X0G7Cg4H63BFcvj3Yu3fC/IezJ8BYsZC6c25W62TcfQTE 6u0v1zFlavdg6jGuA7fF4filN10T8NqRjpiLZ+c7w+hR+/Ti7s+tChAnb0Z/2sE6LGMy +AXvlnsZCB0jFngL4IGiCI4h2jvm+62qsyFscwL93d3AUg608kPn6NPTJ1Fl+z2obdUT hs63RGYZlQXAAqkyvGA6GT+6JIE5v7jQQKX8B7781n8LlWTeDZEGtH0W89sxQdAXPl/9 1lGjHBmaKewb4jDNFWR7xGCe8HtWpulPu6HWY9tx5+RvXQ3aTwYa5KapPYq2495yKwql 1PIA== 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=aKc/p4PH7MhmHDvA4jyGuiLvZwhK63E2+RM0xPzkUq0=; fh=w4WyT9xL7ErtT1TeetrD/m0Y0mAgjnERgxacGUpGjSg=; b=e4xZBtMVacf2NSwPOiaKSiza9oLukoIEeR0ZRxsk7dTyn2lY0EFrT5Mr+CyR7A2JmY X9Iqd73NI2+BVm6pZ/5KFigoZLaMdxiIdfLsdpF8G9mfc4lSswXSY6pJPJJlX1WZ0qzc i1w8l0fuEKJbbB5jFD6K8alHwzXvxZ/D4e2YHUXCnedWYTIB7wfPBpLhQd65jk97XT9b 7j4hgdtl2LpveY6/HDjOGl+grsELVOqOqjiQhiJbqNpRgzDHLYoEgcMo1moh8BRtxE2H bZxB9v5cLYiD4VjDwq2UbHGpG9sSsnVR8TjAMhzKxWYyxvSsA+uZEqFWoisKKNC/EXGQ /ypg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id a640c23a62f3a-a80f3fa45f2si199371766b.214.2024.08.14.04.03.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 04:03:56 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 98B9788A37; Wed, 14 Aug 2024 13:02:17 +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 9E64A88A35; Wed, 14 Aug 2024 13:02:16 +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 AB56588A37 for ; Wed, 14 Aug 2024 13:02:08 +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 12DC8DA7; Wed, 14 Aug 2024 04:02:34 -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 93CC73F58B; Wed, 14 Aug 2024 04:02:03 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Ilias Apalodimas , Heinrich Schuchardt , Simon Glass , Marek Vasut , Tom Rini , Mark Kettenis , Michal Simek , Patrick DELAUNAY , Patrice CHOTARD , Huan Wang , Angelo Dureghello , Daniel Schwierzeck , Thomas Chou , Rick Chen , Max Filippov , Sughosh Ganu Subject: [PATCH v2 19/32] sandbox: move the TCG event log to the start of ram memory Date: Wed, 14 Aug 2024 16:29:56 +0530 Message-Id: <20240814110009.45310-20-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240814110009.45310-1-sughosh.ganu@linaro.org> References: <20240814110009.45310-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 TCG event log buffer is being set at the end of ram memory. This region of memory is to be reserved as LMB_NOMAP memory in the LMB memory map. The current location of this buffer overlaps with the memory region reserved for the U-Boot image, which is at the top of the usable memory. This worked earlier as the LMB memory map was not global but caller specific, but fails now because of the overlap. Move the TCG event log buffer to the start of the ram memory region instead. Move the location of the bloblist address up by 8KB to accomodate the event log buffer, and update the sandbox memory map specified in the documentation accordingly. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V1: * Rejig the memory map to have the event log at 0xb000 and bloblist at 0xd000. * Update the memory map in the document accordingly. arch/sandbox/dts/test.dts | 2 +- common/Kconfig | 2 +- doc/arch/sandbox/sandbox.rst | 3 ++- test/lib/kconfig.c | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 5fb5eac862..76a9bc3b01 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -78,7 +78,7 @@ event_log: tcg_event_log { no-map; - reg = <(CFG_SYS_SDRAM_SIZE - 0x2000) 0x2000>; + reg = <(CFG_SYS_SDRAM_BASE + 0xb000) 0x2000>; }; }; diff --git a/common/Kconfig b/common/Kconfig index 83c81edac2..7762dd216b 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1054,7 +1054,7 @@ endchoice config BLOBLIST_ADDR hex "Address of bloblist" - default 0xb000 if SANDBOX + default 0xd000 if SANDBOX depends on BLOBLIST_FIXED help Sets the address of the bloblist, set up by the first part of U-Boot diff --git a/doc/arch/sandbox/sandbox.rst b/doc/arch/sandbox/sandbox.rst index 5f8db12665..698634a65f 100644 --- a/doc/arch/sandbox/sandbox.rst +++ b/doc/arch/sandbox/sandbox.rst @@ -659,7 +659,8 @@ that are mapped into that memory: Addr Config Usage ======= ======================== =============================== 100 CONFIG_SYS_FDT_LOAD_ADDR Device tree - b000 CONFIG_BLOBLIST_ADDR Blob list + b000 TCG Event log TCG Event Log + d000 CONFIG_BLOBLIST_ADDR Blob list 10000 CFG_MALLOC_F_ADDR Early memory allocation f0000 CONFIG_PRE_CON_BUF_ADDR Pre-console buffer 100000 CONFIG_TRACE_EARLY_ADDR Early trace buffer (if enabled). Also used diff --git a/test/lib/kconfig.c b/test/lib/kconfig.c index 0c463bb794..a3fc56a9ec 100644 --- a/test/lib/kconfig.c +++ b/test/lib/kconfig.c @@ -21,9 +21,9 @@ static int lib_test_is_enabled(struct unit_test_state *uts) ut_asserteq(0, CONFIG_IS_ENABLED(OF_PLATDATA)); ut_asserteq(0, CONFIG_IS_ENABLED(_UNDEFINED)); - ut_asserteq(0xb000, + ut_asserteq(0xd000, IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED, CONFIG_BLOBLIST_ADDR)); - ut_asserteq(0xb000, + ut_asserteq(0xd000, CONFIG_IF_ENABLED_INT(BLOBLIST_FIXED, BLOBLIST_ADDR)); /*