From patchwork Mon Aug 26 11:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 822453 Delivered-To: patch@linaro.org Received: by 2002:adf:e044:0:b0:367:895a:4699 with SMTP id w4csp1478108wrh; Mon, 26 Aug 2024 05:03:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW4DkNS0Z6X09z3ZO/lI1awS+Ij0yfg0CV/6G8Fwxs+eAENyeyjZF7D9n8oX5O1samxVxmCPg==@linaro.org X-Google-Smtp-Source: AGHT+IFQGLnLmzHPY5ZR0atVsQneiZCoIt6/47mdEPxBI8eoV9J0wWGzPvg+uHd7oxdGrkGxEbe+ X-Received: by 2002:a05:600c:4f4f:b0:426:61e8:fb3b with SMTP id 5b1f17b1804b1-42acc9fe264mr60828585e9.27.1724673802658; Mon, 26 Aug 2024 05:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724673802; cv=none; d=google.com; s=arc-20240605; b=iIYPt1kv7TKGBte4STe6wI6GyoJIWhfmk/omlu90eXQ89S1Hq0x+3jlyW9v5Nb+kt0 yvVSg8kzsid4+HgJsa9FwI+2hGM4CDUC6KBYquVk2ZH7LlFyuuGVKgEuzKIdXXwneAqb yFE5y2i0H7LlBwQVzjVKeIxBqzYn7uBqql+tftk7mON4m1MPlGk89GyZ0i8h1vnj3kGl 2peJx5we4RfBrv4SJpHQnESw/e/UNuvCZa4n/Y29ZW01Q5ulRxIOSwtnWVWrwCFBQTB8 mmsCU7TaZj4SOtSIJcMIvrrY2aWmYIbiOZf8an6SkY6BlJ6k/3UzhDVVW2pNlD1DEGJ1 O9Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=rtCBKXGTo/jW9SYQTBqiGNMOb8u7bQwmOPvoTyq1lys=; fh=8IbOOFAUJYCfGYrzM0jWqtoOP7AaZuPOmdHZ5mvNk1Q=; b=a2OpGymtS73oLokw17gKe3xVEjuD7NX4HT5SUOUHceOUqeZE9EmYEBD3L57xalh51Z oXzRXTQkeIwhSjK5nkSzjIO7xIw3U9T1SCCMSzIghwuOUe6ENE39MtXUuvJG4z4w7SfB tom/u69ZN3gok4ZtG1Dd7uxZsCfNl4ZpCYGMKPNNT2U2DC1gD8IEx1GwZuf8TxHLJT/s eEKuuZlNyPwF7+2EarRI738RG9Ra4aRlaACdu1gLJ2L80mqPjTQZgapZpuOhm0dq6Qz9 9vkUQm0yzI25xXI/kcS5b0FlB5gY1LlSy3amgCd0148LlbQvV1ak1IRBUOAQ9REyvH7l XWrw==; 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 5b1f17b1804b1-42abed89416si57515565e9.32.2024.08.26.05.03.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Aug 2024 05:03:22 -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 1395188A35; Mon, 26 Aug 2024 14:01:31 +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 9E6FF88B93; Mon, 26 Aug 2024 14:01:29 +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 6D66988B6A for ; Mon, 26 Aug 2024 14:01:27 +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 10706DA7; Mon, 26 Aug 2024 05:01:53 -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 2D3DE3F762; Mon, 26 Aug 2024 05:01:22 -0700 (PDT) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Simon Glass , Tom Rini , Ilias Apalodimas , Heinrich Schuchardt , Marek Vasut , Mark Kettenis , Michal Simek , Patrick DELAUNAY , Patrice CHOTARD , =?utf-8?q?Marek_Beh=C3=BAn?= , Sughosh Ganu Subject: [PATCH v4 19/27] sandbox: move the TCG event log to the start of ram memory Date: Mon, 26 Aug 2024 17:29:32 +0530 Message-Id: <20240826115940.3233167-20-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240826115940.3233167-1-sughosh.ganu@linaro.org> References: <20240826115940.3233167-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 early trace buffer and the load buffer for U-Boot(spl boot) accordingly. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- Changes since V3: None arch/sandbox/dts/test.dts | 2 +- configs/sandbox_spl_defconfig | 2 +- doc/arch/sandbox/sandbox.rst | 5 +++-- lib/Kconfig | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 5fb5eac862..8412506c17 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 + 0x100000) 0x2000>; }; }; diff --git a/configs/sandbox_spl_defconfig b/configs/sandbox_spl_defconfig index f7b92dc844..826a82d092 100644 --- a/configs/sandbox_spl_defconfig +++ b/configs/sandbox_spl_defconfig @@ -1,4 +1,4 @@ -CONFIG_TEXT_BASE=0x200000 +CONFIG_TEXT_BASE=0x400000 CONFIG_SPL_GPIO=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y diff --git a/doc/arch/sandbox/sandbox.rst b/doc/arch/sandbox/sandbox.rst index 5f8db12665..4967551724 100644 --- a/doc/arch/sandbox/sandbox.rst +++ b/doc/arch/sandbox/sandbox.rst @@ -662,7 +662,8 @@ Addr Config Usage b000 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 + 100000 TCG Event log TCG Event Log + 200000 CONFIG_TRACE_EARLY_ADDR Early trace buffer (if enabled). Also used as the SPL load buffer in spl_test_load(). - 200000 CONFIG_TEXT_BASE Load buffer for U-Boot (sandbox_spl only) + 400000 CONFIG_TEXT_BASE Load buffer for U-Boot (sandbox_spl only) ======= ======================== =============================== diff --git a/lib/Kconfig b/lib/Kconfig index e352b5550a..5f282ecb54 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -403,7 +403,7 @@ config TRACE_EARLY_CALL_DEPTH_LIMIT config TRACE_EARLY_ADDR hex "Address of early trace buffer in U-Boot" depends on TRACE_EARLY - default 0x00100000 + default 0x00200000 help Sets the address of the early trace buffer in U-Boot. This memory must be accessible before relocation.