Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90FE3C433FE for ; Thu, 28 Oct 2021 06:35:19 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA68761056 for ; Thu, 28 Oct 2021 06:35:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DA68761056 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E52C682FE7; Thu, 28 Oct 2021 08:35:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1635402917; bh=10vFWKJftmYX3E/zfNb1vGxd7OnZMQWoZ1vMn2kdKFw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=IuV3AH3I8et6dxMwH/F3/Fk2YD2HaQPLXHENy5ryeHjFmQUHUmTUFpwbterW6IAau rB0OXAhewemNIPoMYD9+hR35funyYZ8/8nZlWRFddVoSzMXd6B618e26Lae6kuvYIS CafV27lwoxIy1zLiObNcgEJJO0EkMazBMSmNPspDeiLjB//PGF75mt8r8J4GTwn+5/ YL0jG5E25g5NCrbHuK6umuZpHoaUVMlOXOoPvORF4B+OPv2eIKDcFhCRClhsylJiTO l8TxPtLryVlxJFpmb419Ht3t6ySdI/DxlfNm75aIHoGW4UM6TneVDmSGzWNNR/Jlti 8y3teiyXNtk8Q== Received: by phobos.denx.de (Postfix, from userid 109) id A8CE6831BA; Thu, 28 Oct 2021 08:35:14 +0200 (CEST) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [IPv6:2001:67c:2050:1::465:107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9B07382FE7 for ; Thu, 28 Oct 2021 08:35:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4Hfwlz3Vn7zQjCy; Thu, 28 Oct 2021 08:35:11 +0200 (CEST) Subject: Re: kirkwood stack size To: =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: u-boot@lists.denx.de, "Tony (bodhi)" References: <20211028000753.45cbb531@thinkpad> From: Stefan Roese Message-ID: Date: Thu, 28 Oct 2021 08:35:08 +0200 MIME-Version: 1.0 In-Reply-To: <20211028000753.45cbb531@thinkpad> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BD2561838 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Hi Marek, On 28.10.21 00:07, Marek BehĂșn wrote: > Hello Stefan, > > do you have some ARM Kirkwood board? No, I don't have of them here. Sorry. > I am working on some env patches, > because the code in the env/ directory is a pain in the ass of old > relics, and Kirkwood is the only platform using the eeprom environment > driver. > > I would like to ask about Kirkwood stack size. > > In arch/arm/mach-kirkwood/include/mach/config.h it says > > /* Kirkwood has 2k of Security SRAM, use it for SP */ > #define CONFIG_SYS_INIT_SP_ADDR 0xC8012000 > > So if I understand correctly, Kirkwood has only 2k of init stack. > > But the env_eeprom_load() method in env/eeprom.c allocates a > CONFIG_ENV_SIZE bytes long array for environment, and CONFIG_ENV_SIZE > is 2k. > > Is the init stack changed to another stack before environment is loaded? > I couldn't find code which would do that. As far as I am able to > determine, this 2k long init stack is used, and this means that the > code in env/eeprom.c is wrong, since it allocates below stack space. > > Maybe no one used newer U-Boot on Kirkwood for a long time and this was > not noticed? Should we remove support for Kirkwood? As you have noticed, Tony is actively working on Kirkwood support lately. Thanks, Stefan