From patchwork Thu Jun 19 16:52:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 361928 X-Patchwork-Delegate: twarren@nvidia.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 500CB140076 for ; Fri, 20 Jun 2014 02:53:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EC6C84B818; Thu, 19 Jun 2014 18:53:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mr4xc6DeYYK6; Thu, 19 Jun 2014 18:53:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 60C0C4B81A; Thu, 19 Jun 2014 18:53:31 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A08764B75A for ; Thu, 19 Jun 2014 18:53:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J41ung4z2qcx for ; Thu, 19 Jun 2014 18:53:24 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from avon.wwwdotorg.org (avon.wwwdotorg.org [70.85.31.133]) by theia.denx.de (Postfix) with ESMTPS id 577C14B7A9 for ; Thu, 19 Jun 2014 18:53:21 +0200 (CEST) Received: from severn.wwwdotorg.org (unknown [192.168.65.5]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by avon.wwwdotorg.org (Postfix) with ESMTPS id 0AD706440; Thu, 19 Jun 2014 10:53:20 -0600 (MDT) Received: from swarren-lx1.nvidia.com (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by severn.wwwdotorg.org (Postfix) with ESMTPSA id F339EE463E; Thu, 19 Jun 2014 10:53:18 -0600 (MDT) From: Stephen Warren To: u-boot@lists.denx.de, Simon Glass , Tom Warren , Stephen Warren Date: Thu, 19 Jun 2014 10:52:59 -0600 Message-Id: <1403196779-18717-2-git-send-email-swarren@wwwdotorg.org> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1403196779-18717-1-git-send-email-swarren@wwwdotorg.org> References: <1403196779-18717-1-git-send-email-swarren@wwwdotorg.org> X-NVConfidentiality: public X-Virus-Scanned: clamav-milter 0.97.8 at avon.wwwdotorg.org X-Virus-Status: Clean Subject: [U-Boot] [PATCH 2/2] ARM: tegra: set initrd_high so boot scripts work X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Stephen Warren During bootm/z, U-Boot relocates the DTB and initrd to high memory so they are out of the way of the kernel. On ARM at least, some parts of high memory are "highmem" and can't be accessed at early boot. To solve this, we need to restrict this relocation process to use lower parts of RAM that area accessible. For the DTB, an earlier patch of mine set CONFIG_SYS_BOOTMAPSZ. However, since some platforms have different restrictions on DTB and initrd location, that config option doesn't affect the initrd. We need to set the initrd_high environment variable to control the initrd relocation. Since we have carefully chosen the load addresses for the DTB and initrd (see comments in include/configs/tegraNNN-common.h re: values in MEM_LAYOUT_ENV_SETTINGS), we don't actually need any DTB or initrd relocation at all. Skipping relocation removes some redundant work. Hence, set both fdt_high and initrd_high to ffffffff which completely disables relocation. If the user does something unusual, such as using custom locations for the DTB/initrd load address or wanting to use DTB/initrd relocation for some reason, they can simply set these variables to custom values to override these environment defaults. With this change, cmd_sysboot works correctly for a filesystem created by the Fedora installer. Signed-off-by: Stephen Warren --- include/configs/tegra-common-post.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h index 8cfc17a93c74..1c770c90feca 100644 --- a/include/configs/tegra-common-post.h +++ b/include/configs/tegra-common-post.h @@ -173,6 +173,8 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ TEGRA_DEVICE_SETTINGS \ MEM_LAYOUT_ENV_SETTINGS \ + "fdt_high=ffffffff\0" \ + "initrd_high=ffffffff\0" \ BOOTCMDS_COMMON \ BOARD_EXTRA_ENV_SETTINGS