From patchwork Wed May 8 18:14:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 1097178 X-Patchwork-Delegate: sbabic@denx.de 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="OopIAYbg"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 44zl6s4CRpz9s5c for ; Thu, 9 May 2019 04:16:53 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3B202C21DED; Wed, 8 May 2019 18:15:54 +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=T_DKIM_INVALID 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 6F4D9C21E30; Wed, 8 May 2019 18:15:23 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id E472FC21E07; Wed, 8 May 2019 18:15:15 +0000 (UTC) Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by lists.denx.de (Postfix) with ESMTPS id C3E01C21E02 for ; Wed, 8 May 2019 18:15:12 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id p27so8015182eda.1 for ; Wed, 08 May 2019 11:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gshTQTEiw/fu2LyjBvDDAxJa+Gp7Lde5czfI/pBAyk4=; b=OopIAYbgYLAUa6zuwZ6Rtz1dkFSfvonvnaifGKm8WtQP8LFI3DFC7rCIWELX7hpQPJ OjsgBfCzKAvQ5HUraT+7VOZ1OKf4BegH3dZo7rriYTqdKWiJEhdgetUdvBlJ21LQZtsv 7hcpx4EA0rU1aFx8pShKtf2q+QVAohdkVOoArb4Uj8YyzjgeyZngwc+53sxjemYZBDGs auVdu07kkq3o5SMUJewxmYjedhvDj5+WtZoy3+R9HbeDRVZMlbYmdh791BoeZbRIgHff 5s8+MwtkKXTZpeItoQpCeRnc/url1YNUtHPhkNZrFWQOL6DlwQJWZRGIYdXX0sUyhDic EhCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gshTQTEiw/fu2LyjBvDDAxJa+Gp7Lde5czfI/pBAyk4=; b=P9MuTmh/2NyCISU6zyyqjGq9IjEWJZZM26NhrzOV55dtlCR5iElnGO7wPDcbMYDV/Y W31tFnF83PGdn4Mcw1TlNRW/jsTAGkrw2b0OHZUY4t/I8seJEZX5Y79wx4L5eaKBt65l bYtjAavVLKdm4NE19iMQfyeRuvlSIGwdhu4yNGuw37KIPynIX2uyNCjrnxKCKu7aGyMt UZvdqRJjnvoenX7lBsUDi+bX8DJSGBlkxpuX7+6ntrxFpWFd7pMuPLP7fhCbLimzI78m R84oQiOe4ak1ZtwAEvsZ90xB4c+JPg3KNHcPJh+aKQnpSWrWL6Wg6tqhyCRwNF4kbKmv uYXw== X-Gm-Message-State: APjAAAWW97uUS4IqZVkZsouyiRrkR6KHaBJmmd0vyQpKN4NR6cxASEh0 tUha2FcCRUMVgJ65hyOO0/EScIfimho= X-Google-Smtp-Source: APXvYqxEOhmBtk6RiRsG79I0sLzF0lf02Xx23jSSxBNTGZquRAGPmQdLuMIX5yNcW+FBQCjKwgWcIg== X-Received: by 2002:a50:9025:: with SMTP id b34mr39881294eda.145.1557339312140; Wed, 08 May 2019 11:15:12 -0700 (PDT) Received: from event-horizon.net ([80.111.179.123]) by smtp.gmail.com with ESMTPSA id r2sm2809106ejp.76.2019.05.08.11.15.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 11:15:11 -0700 (PDT) From: Bryan O'Donoghue To: u-boot@lists.denx.de, fabio.estevam@nxp.com, maxime.ripard@free-electrons.com, breno.lima@nxp.com, pjtexier@koncepto.io, trini@konsulko.com, peng.fan@nxp.com Date: Wed, 8 May 2019 19:14:44 +0100 Message-Id: <20190508181448.20452-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190508181448.20452-1-bryan.odonoghue@linaro.org> References: <20190508181448.20452-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 3/7] warp7: include: configs: Differentiate bootscript address from loadaddr 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Reusing the loadaddr to load the boot script breaks some of the logic we want to have around the bootscript/FIT load addresses. Making a dedicated bootscript address allows us to differentiate the bootscript load address from the Linux Kernel or OPTEE load address, thus ensuring that no matter what the load sequence the bootscript and Kernel/OPTEE binary load addresses do not conflict. Signed-off-by: Bryan O'Donoghue --- include/configs/warp7.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/configs/warp7.h b/include/configs/warp7.h index 95955fd626..0c63050833 100644 --- a/include/configs/warp7.h +++ b/include/configs/warp7.h @@ -50,6 +50,7 @@ "script=boot.scr\0" \ "bootscr_fitimage_name=bootscr\0" \ "script_signed=boot.scr.imx-signed\0" \ + "bootscriptaddr=0x83200000\0" \ "image=zImage\0" \ "console=ttymxc0\0" \ "ethact=usb_ether\0" \ @@ -70,16 +71,16 @@ "warp7_auth_or_fail=hab_auth_img_or_fail ${hab_ivt_addr} ${filesize} 0;\0" \ "do_bootscript_hab=" \ "if test ${hab_enabled} -eq 1; then " \ - "setexpr hab_ivt_addr ${loadaddr} - ${ivt_offset}; " \ + "setexpr hab_ivt_addr ${bootscriptaddr} - ${ivt_offset}; " \ "setenv script ${script_signed}; " \ "load mmc ${mmcdev}:${mmcpart} ${hab_ivt_addr} ${script}; " \ "run warp7_auth_or_fail; " \ "run bootscript; "\ "fi;\0" \ "loadbootscript=" \ - "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ + "load mmc ${mmcdev}:${mmcpart} ${bootscriptaddr} ${script};\0" \ "bootscript=echo Running bootscript from mmc ...; " \ - "source\0" \ + BOOT_SCR_STRING \ "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ "mmcboot=echo Booting from mmc ...; " \