[{"id":1764585,"web_url":"http://patchwork.ozlabs.org/comment/1764585/","msgid":"<6FB23618-F418-4C59-AC71-DA917C5DB86E@theobroma-systems.com>","list_archive_url":null,"date":"2017-09-07T08:36:40","subject":"Re: [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and\n\tparameter","submitter":{"id":53488,"url":"http://patchwork.ozlabs.org/api/people/53488/","name":"Philipp Tomsich","email":"philipp.tomsich@theobroma-systems.com"},"content":"Kever,\n\n> On 7 Sep 2017, at 09:00, Kever Yang <kever.yang@rock-chips.com> wrote:\n> \n> Rename the bl31_entry() function with 'spl_' prefix and add one\n> parameter for bl31 entry address since we can get it from spl_image header.\n\nJust as a heads-up, I also have a patch in my queue (i.e. to submit this week) that\nintegrates as IH_OS_ARM_TRUSTED_FIRMWARE and adds the option to pass\na pointer to the FDT as a platform-parameter.\n\nI’ll copy you, so we can then figure out how to best merge your and my changes\nand apply those at the same time.\n\nRegards,\nPhilipp.\n\n> \n> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>\n> ---\n> \n> common/spl/spl.c     | 2 +-\n> common/spl/spl_atf.c | 4 ++--\n> include/spl.h        | 6 +++++-\n> 3 files changed, 8 insertions(+), 4 deletions(-)\n> \n> diff --git a/common/spl/spl.c b/common/spl/spl.c\n> index 6ff390c..1d8bbb2 100644\n> --- a/common/spl/spl.c\n> +++ b/common/spl/spl.c\n> @@ -427,7 +427,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)\n> \n> \tif (CONFIG_IS_ENABLED(ATF_SUPPORT)) {\n> \t\tdebug(\"loaded - jumping to U-Boot via ATF BL31.\\n\");\n> -\t\tbl31_entry();\n> +\t\tspl_bl31_entry((void *)spl_image.entry_point);\n> \t}\n> \n> \tif (CONFIG_IS_ENABLED(OPTEE_SUPPORT)) {\n> diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c\n> index 6e8f928..2f6fff9 100644\n> --- a/common/spl/spl_atf.c\n> +++ b/common/spl/spl_atf.c\n> @@ -82,13 +82,13 @@ void raw_write_daif(unsigned int daif)\n> \t__asm__ __volatile__(\"msr DAIF, %0\\n\\t\" : : \"r\" (daif) : \"memory\");\n> }\n> \n> -void bl31_entry(void)\n> +void spl_bl31_entry(void *entry_addr)\n> {\n> \tstruct bl31_params *bl31_params;\n> \tvoid (*entry)(struct bl31_params *params, void *plat_params) = NULL;\n> \n> \tbl31_params = bl2_plat_get_bl31_params();\n> -\tentry = (void *)CONFIG_SPL_ATF_TEXT_BASE;\n> +\tentry = entry_addr;\n> \n> \traw_write_daif(SPSR_EXCEPTION_MASK);\n> \tdcache_disable();\n> diff --git a/include/spl.h b/include/spl.h\n> index 13d46ed..d21a3d2 100644\n> --- a/include/spl.h\n> +++ b/include/spl.h\n> @@ -267,7 +267,11 @@ int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr);\n> int spl_mmc_load_image(struct spl_image_info *spl_image,\n> \t\t       struct spl_boot_device *bootdev);\n> \n> -void bl31_entry(void);\n> +/**\n> + * spl_bl31_entry - entry function for ATF bl31\n> + * @entry_addr - entry address of bl31 text\n> + */\n> +void spl_bl31_entry(void *entry_addr);\n> \n> /**\n>  * spl_optee_entry - entry function for optee\n> -- \n> 1.9.1\n>","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 3xnv2G2XNDz9t2M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 18:36:52 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 79E50C21DE6; Thu,  7 Sep 2017 08:36:48 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id A037EC21C72;\n\tThu,  7 Sep 2017 08:36:46 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 1E654C21C97; Thu,  7 Sep 2017 08:36:45 +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 C71C5C21C40\n\tfor <u-boot@lists.denx.de>; Thu,  7 Sep 2017 08:36:44 +0000 (UTC)","from 89-104-28-141.customer.bnet.at ([89.104.28.141]:51382\n\thelo=[192.168.2.129]) by mail.theobroma-systems.com with esmtpsa\n\t(TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80)\n\t(envelope-from <philipp.tomsich@theobroma-systems.com>)\n\tid 1dpsIj-0001ar-Lx; Thu, 07 Sep 2017 10:36:41 +0200"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"*","X-Spam-Status":"No, score=1.0 required=5.0 tests=HK_NAME_DR autolearn=no\n\tautolearn_force=no version=3.4.0","Mime-Version":"1.0 (Mac OS X Mail 10.3 \\(3273\\))","From":"\"Dr. Philipp Tomsich\" <philipp.tomsich@theobroma-systems.com>","In-Reply-To":"<1504767608-8846-1-git-send-email-kever.yang@rock-chips.com>","Date":"Thu, 7 Sep 2017 10:36:40 +0200","Message-Id":"<6FB23618-F418-4C59-AC71-DA917C5DB86E@theobroma-systems.com>","References":"<1504767608-8846-1-git-send-email-kever.yang@rock-chips.com>","To":"Kever Yang <kever.yang@rock-chips.com>","X-Mailer":"Apple Mail (2.3273)","Cc":"Stefan Agner <stefan.agner@toradex.com>,\n\tU-Boot Mailing List <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and\n\tparameter","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>","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>"}},{"id":1767205,"web_url":"http://patchwork.ozlabs.org/comment/1767205/","msgid":"<E1drnPe-00083Q-DH@mail.theobroma-systems.com>","list_archive_url":null,"date":"2017-09-12T15:47:46","subject":"Re: [U-Boot] [U-Boot,\n\t1/3] spl: update bl31_entry() with new name and parameter","submitter":{"id":53488,"url":"http://patchwork.ozlabs.org/api/people/53488/","name":"Philipp Tomsich","email":"philipp.tomsich@theobroma-systems.com"},"content":"> Rename the bl31_entry() function with 'spl_' prefix and add one\n> parameter for bl31 entry address since we can get it from spl_image header.\n> \n> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>\n> ---\n> \n>  common/spl/spl.c     | 2 +-\n>  common/spl/spl_atf.c | 4 ++--\n>  include/spl.h        | 6 +++++-\n>  3 files changed, 8 insertions(+), 4 deletions(-)\n> \n\nAcked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>","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 3xs8rq1pmsz9s7f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 02:10:02 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid B5CA7C222B3; Tue, 12 Sep 2017 16:05:40 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 42D19C222B9;\n\tTue, 12 Sep 2017 16:04:44 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 3052AC22104; Tue, 12 Sep 2017 16:04:00 +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 4B8F8C2224A\n\tfor <u-boot@lists.denx.de>; Tue, 12 Sep 2017 16:03:56 +0000 (UTC)","from [86.59.122.178] (port=60150 helo=vpn-10-11-0-14.lan)\n\tby mail.theobroma-systems.com with esmtpsa\n\t(TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80)\n\t(envelope-from <philipp.tomsich@theobroma-systems.com>)\n\tid 1drnPe-00083Q-DH; Tue, 12 Sep 2017 17:47:46 +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","MIME-Version":"1.0","From":"Philipp Tomsich <philipp.tomsich@theobroma-systems.com>","To":"Kever Yang <kever.yang@rock-chips.com>","In-Reply-To":"<1504767608-8846-1-git-send-email-kever.yang@rock-chips.com>","References":"<1504767608-8846-1-git-send-email-kever.yang@rock-chips.com>","Message-Id":"<E1drnPe-00083Q-DH@mail.theobroma-systems.com>","Date":"Tue, 12 Sep 2017 17:47:46 +0200","Cc":"u-boot@lists.denx.de, Stefan Agner <stefan.agner@toradex.com>","Subject":"Re: [U-Boot] [U-Boot,\n\t1/3] spl: update bl31_entry() with new name and parameter","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>","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>"}}]