From patchwork Wed Aug 2 20:34:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 796833 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xN5Cz6tqfz9s81 for ; Thu, 3 Aug 2017 06:59:43 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A3D16C21E39; Wed, 2 Aug 2017 20:47:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 31418C21E10; Wed, 2 Aug 2017 20:45:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E01B6C21DA1; Wed, 2 Aug 2017 20:43:51 +0000 (UTC) Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by lists.denx.de (Postfix) with ESMTPS id 4F713C21DC0 for ; Wed, 2 Aug 2017 20:43:47 +0000 (UTC) Received: from [86.59.122.178] (port=53932 helo=android.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1dd0NF-0002Ai-UC; Wed, 02 Aug 2017 22:36:10 +0200 From: Philipp Tomsich To: u-boot@lists.denx.de Date: Wed, 2 Aug 2017 22:34:56 +0200 Message-Id: <1501706105-7490-62-git-send-email-philipp.tomsich@theobroma-systems.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1501706105-7490-1-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1501706105-7490-1-git-send-email-philipp.tomsich@theobroma-systems.com> Cc: Stefan Agner , Klaus Goger Subject: [U-Boot] [PATCH v4 61/66] spl: support TPL_STACK, TPL_MAX_SIZE and TPL_TEXT_BASE via Kconfig X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Let's clean up behind ourselves and move the (newly defined) TPL_STACK, TPL_MAX_SIZE and TPL_TEXT_BASE into Kconfig. Given that 0x0 might be considered to be valid values for TPL_TEXT_BASE and TPL_STACK, we need to introduce helper config options ("TPL_NEEDS_SEPARATE_...") to indicate that these symbols are used (and not inherited from their SPL variants) for any given target-platform. Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- Changes in v4: None Changes in v3: - moves TPL_STACK, TPL_MAX_SIZE and TPL_TEXT_BASE to Kconfig Changes in v2: None common/spl/Kconfig | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index b01d4f1..08013b7 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -725,6 +725,45 @@ config TPL_LDSCRIPT U-Boot stage. Set this to the path of the linker-script to be used for TPL. + May be left empty to trigger the Makefile infrastructure to + fall back to the linker-script used for the SPL stage. + +config TPL_NEEDS_SEPARATE_TEXT_BASE + bool "TPL needs a separate text-base" + default n + depends on TPL + help + Enable, if the TPL stage should not inherit its text-base + from the SPL stage. When enabled, a base address for the + .text sections of the TPL stage has to be set below. + +config TPL_NEEDS_SEPARATE_STACK + bool "TPL needs a separate initial stack-pointer" + default n + depends on TPL + help + Enable, if the TPL stage should not inherit its initial + stack-pointer from the settings for the SPL stage. + +config TPL_TEXT_BASE + hex "Base address for the .text section of the TPL stage" + depends on TPL_NEEDS_SEPARATE_TEXT_BASE + help + The base address for the .text section of the TPL stage. + +config TPL_MAX_SIZE + int "Maximum size (in bytes) for the TPL stage" + depends on TPL + help + The maximum size (in bytes) of the TPL stage. + +config TPL_STACK + hex "Address of the initial stack-pointer for the TPL stage" + depends on TPL_NEEDS_SEPARATE_STACK + help + The address of the initial stack-pointer for the TPL stage. + Usually this will be the (aligned) top-of-stack. + config TPL_BOOTROM_SUPPORT bool "Support returning to the BOOTROM (from TPL)" help