From patchwork Sun Jan 15 21:15:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1726824 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=MMmz4Lyd; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nw7Jl6lJfz23fk for ; Mon, 16 Jan 2023 08:17:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19AA185565; Sun, 15 Jan 2023 22:16:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="MMmz4Lyd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3F66F8551E; Sun, 15 Jan 2023 22:16:32 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C37CB85582 for ; Sun, 15 Jan 2023 22:16:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2c.google.com with SMTP id 203so2201935iou.13 for ; Sun, 15 Jan 2023 13:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KXcTfE+i2q4S0j1IYOaCEjMpRJAWufJuV9DcLv2njOs=; b=MMmz4Lydggbm1c6AlBtJyjyPYF97/UxbJ7HzBBEJjTnXRCkGKxoyxLmpoH34ENU0Vd QIx9WtyZGsrxQGyyjFF2lbXerb5XqNR3rDrbTLqORP4Y8J2pUT7eRiDpRbUS4vi6RN7y FDi/epXs/iJnYr8L9heytm+6XBe0cmsphvTCY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KXcTfE+i2q4S0j1IYOaCEjMpRJAWufJuV9DcLv2njOs=; b=GxwIIV2CG7lqoKvuFZ9cqb6Lonb7CQdaYFc9dCCigX3RFG+qD3NM6e0aRV5IRNfc5h MtYFa+nbmfcIEYsr2ovqaDHwpV94nvvdh5VVCRxFWnixR4Nd1otnoLQmssMLOmLNrhRh xtPqL8vM9LmzGaxThtz46TdAwEDE7jU+zrGXmkLMRZuaeFtn0qC1bHt9UQAHC8YcN7F6 5F/zre3J0DC4iY9Df7jU/5SPDqnklEvzBkngEt+jo9+KJoP0zA3oEEk56BS8oXt8tuQI ePWTTtqFwVwqlmjlJTq4DDCbYCfip2HN08sMbqZ/VJrwSw6QFg1PoOSyO77q33ImQfs4 +4VA== X-Gm-Message-State: AFqh2kpQrcV8v2DAI5VqQXpacojHyOuuUELCCL76eIx7vcg9x0x6nJec a2kwl4iInuVHGzAFLoXAA1wvgj0WHEDvO8YyIQc= X-Google-Smtp-Source: AMrXdXsjxhrZwkY+Ugkwsw4LYOxXI9WcF2EcpVnVF/K9w+EwIduEMT0OemkTYsHAFul9j7O00+TKPA== X-Received: by 2002:a5d:97d1:0:b0:6e2:e5ee:c437 with SMTP id k17-20020a5d97d1000000b006e2e5eec437mr11413595ios.1.1673817385377; Sun, 15 Jan 2023 13:16:25 -0800 (PST) Received: from sjg1.roam.corp.google.com (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id j6-20020a6bf906000000b007046e9e138esm4329107iog.22.2023.01.15.13.16.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 13:16:25 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Simon Glass , Bin Meng , Michal Suchanek , Ovidiu Panait , =?utf-8?q?Pali_Roh=C3=A1r?= , Rasmus Villemoes , Rick Chen , Stefan Roese Subject: [PATCH 03/24] sandbox: Bring back setting mon_len in global_data Date: Sun, 15 Jan 2023 14:15:40 -0700 Message-Id: <20230115211602.1127661-4-sjg@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230115211602.1127661-1-sjg@chromium.org> References: <20230115211602.1127661-1-sjg@chromium.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.6 at phobos.denx.de X-Virus-Status: Clean This change was made for the benefit of RISC-V but broke other architectures also. In particular, tracing cannot work without this value. Add it back for architectures which support it. Fixes: 3c9fc23c443 ("sandbox: don't refer to symbol _init") Signed-off-by: Simon Glass --- common/board_f.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/board_f.c b/common/board_f.c index 2b4edf30c93..f3c1ab53b1c 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -290,7 +290,10 @@ static int setup_mon_len(void) { #if defined(__ARM__) || defined(__MICROBLAZE__) gd->mon_len = (ulong)&__bss_end - (ulong)_start; +#elif defined(CONFIG_SANDBOX) && !defined(__riscv) + gd->mon_len = (ulong)&_end - (ulong)_init; #elif defined(CONFIG_SANDBOX) + /* gcc does not provide _init in crti.o on RISC-V */ gd->mon_len = 0; #elif defined(CONFIG_EFI_APP) gd->mon_len = (ulong)&_end - (ulong)_init;