From mboxrd@z Thu Jan 1 00:00:00 1970 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 55B35C433F5 for ; Wed, 27 Oct 2021 22:08:03 +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 BB5D960240 for ; Wed, 27 Oct 2021 22:08:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BB5D960240 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nic.cz 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 8395582FE7; Thu, 28 Oct 2021 00:08:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz 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; secure) header.d=nic.cz header.i=@nic.cz header.b="kVf9Gz3s"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1BD51831BA; Thu, 28 Oct 2021 00:07:59 +0200 (CEST) Received: from mail.nic.cz (lists.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id DAB1580D1C for ; Thu, 28 Oct 2021 00:07:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPSA id 5B8401408D7; Thu, 28 Oct 2021 00:07:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1635372474; bh=9j51IQEE8wyK6rRi2yVBBunkfxwqns3qbIrfBaFugd4=; h=Date:From:To; b=kVf9Gz3s4G4Kzr2e/mcmixHQ3NH0FBq435tAE52xr7EbJAAFzHFVo+PGjSjyA1tp0 xV5AdJ7fE41doNuYAHnumAKQd4+9tE52+lBPpgNO1wudhes+IMd3HpGfGovt18bXZ8 9aAw8LZy3s47y7UYFUufGmGMwgiiV7fg/75IKLe4= Date: Thu, 28 Oct 2021 00:07:53 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Stefan Roese Cc: u-boot@lists.denx.de Subject: kirkwood stack size Message-ID: <20211028000753.45cbb531@thinkpad> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Hello Stefan, do you have some ARM Kirkwood board? 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? Marek