{"id":815065,"url":"http://patchwork.ozlabs.org/api/1.2/patches/815065/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/1505758708-29213-6-git-send-email-philipp.tomsich@theobroma-systems.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<1505758708-29213-6-git-send-email-philipp.tomsich@theobroma-systems.com>","list_archive_url":null,"date":"2017-09-18T18:18:28","name":"[U-Boot,v2,5/5] rockchip: back-to-bootrom: do not compile bootrom.o in thumb mode","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"2e828ec404b65dbf2294671ff04fd67ab2897f8d","submitter":{"id":53488,"url":"http://patchwork.ozlabs.org/api/1.2/people/53488/?format=json","name":"Philipp Tomsich","email":"philipp.tomsich@theobroma-systems.com"},"delegate":{"id":69486,"url":"http://patchwork.ozlabs.org/api/1.2/users/69486/?format=json","username":"ptomsich","first_name":"Philipp","last_name":"Tomsich","email":"philipp.tomsich@theobroma-systems.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/1505758708-29213-6-git-send-email-philipp.tomsich@theobroma-systems.com/mbox/","series":[{"id":3697,"url":"http://patchwork.ozlabs.org/api/1.2/series/3697/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=3697","date":"2017-09-18T18:18:23","name":"rockchip: back-to-bootrom: replace assembly-implementation with C-code","version":2,"mbox":"http://patchwork.ozlabs.org/series/3697/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/815065/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/815065/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwvT60DRVz9s7B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 04:20:57 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 48CD4C21D92; Mon, 18 Sep 2017 18:19:55 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 99C30C21DC0;\n\tMon, 18 Sep 2017 18:18:43 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 45B2EC21C4C; Mon, 18 Sep 2017 18:18:39 +0000 (UTC)","from mail.theobroma-systems.com (vegas.theobroma-systems.com\n\t[144.76.126.164])\n\tby lists.denx.de (Postfix) with ESMTPS id C37F2C21C57\n\tfor <u-boot@lists.denx.de>; Mon, 18 Sep 2017 18:18:38 +0000 (UTC)","from [86.59.122.178] (port=34776 helo=android.lan)\n\tby mail.theobroma-systems.com with esmtpsa\n\t(TLS1.2:RSA_AES_128_CBC_SHA256:128)\n\t(Exim 4.80) (envelope-from <philipp.tomsich@theobroma-systems.com>)\n\tid 1du0cu-00053h-Jf; Mon, 18 Sep 2017 20:18:36 +0200"],"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\n\tautolearn_force=no version=3.4.0","From":"Philipp Tomsich <philipp.tomsich@theobroma-systems.com>","To":"u-boot@lists.denx.de","Date":"Mon, 18 Sep 2017 20:18:28 +0200","Message-Id":"<1505758708-29213-6-git-send-email-philipp.tomsich@theobroma-systems.com>","X-Mailer":"git-send-email 2.1.4","In-Reply-To":"<1505758708-29213-1-git-send-email-philipp.tomsich@theobroma-systems.com>","References":"<1505758708-29213-1-git-send-email-philipp.tomsich@theobroma-systems.com>","Cc":"Klaus Goger <klaus.goger@theobroma-systems.com>,\n\tAndy Yan <andy.yan@rock-chips.com>","Subject":"[U-Boot] [PATCH v2 5/5] rockchip: back-to-bootrom: do not compile\n\tbootrom.o in thumb mode","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"With start.o being compiled to A32 for ARMv7 (and no Thumb mode), we\nneed to ensure that the call to save_boot_params_ret either happens\nfrom ARM mode or uses an interwork branch.\n\nTo keep things simple, we force bootrom.o to always be A32 code by\nsetting specific CFLAGS for this compilation unit.  Note that marking\nsave_boot_params_ret with the 'target(arm)'-function attribute did not\ngenerate an interwork branch when calling save_boot_params_ret.\n\nReported-by: Andy Yan <andy.yan@rock-chips.com>\nSigned-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>\n\n---\n\nChanges in v2: None\n\n arch/arm/mach-rockchip/Makefile | 6 ++++++\n 1 file changed, 6 insertions(+)","diff":"diff --git a/arch/arm/mach-rockchip/Makefile b/arch/arm/mach-rockchip/Makefile\nindex f8b23ea..405b30c 100644\n--- a/arch/arm/mach-rockchip/Makefile\n+++ b/arch/arm/mach-rockchip/Makefile\n@@ -4,6 +4,12 @@\n # SPDX-License-Identifier:\tGPL-2.0+\n #\n \n+# The bootrom-helper needs to be ARM (i.e. not Thumb code) due to the\n+# way setjmp/longjmp is implemented.\n+ifndef CONFIG_ARM64\n+CFLAGS_bootrom.o := -marm\n+endif\n+\n # We don't want the bootrom-helper present in a full U-Boot build, as\n # this may have entered from ATF with the stack-pointer pointing to\n # inaccessible/protected memory (and the bootrom-helper assumes that\n","prefixes":["U-Boot","v2","5/5"]}