From: Heiko Stuebner <heiko@sntech.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 8/8] rockchip: rk3288: make both evb variants use atf
Date: Tue, 07 May 2019 09:51:20 +0200 [thread overview]
Message-ID: <2153551.2f3XbEJQ7v@phil> (raw)
In-Reply-To: <526672816.2740575.1557194072777.JavaMail.javamailuser@localhost>
Hi Kever,
Am Dienstag, 7. Mai 2019, 03:54:32 CEST schrieb 杨凯:
> 1 does aarch32 using atf the same way like aarch64? eg. the load/boot flow is:
> tpl->spl->atf->u-boot
Yep, exactly like this - which is the beauty of using ATF :-)
Btw. core rk3288 support meanwhile also reached upstream ATF:
https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=8742f8574bcbb513480c53645dbc5b72ea5f451e
> 2 why does you name it bl32? does it should be bl31?
That is an architectural issue of ARMv7. Where ARMv8 has separate levels
for secure monitor (bl31) and secure os (bl32) on ARMv7 there is no
separate secure monitor and only the secure os level so they have to share.
For this ATF needs to be built together with its intented trust-os.
ATF itself provides sp_min as example / minimal solution, but can also
build against actual optee, with ATF providing the core psci functionality.
See
https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/docs/user-guide.rst#n200
for a bit more explanation.
The small issue I see is how to name things consistently, like it doesn't
really make sense to duplicate params structs that are currently named
bl31_foo, so I reused them. One might think about bl3x_params or so,
or just keep it as bl31_params.
> 3 is it possible to re-use below script instead of dedicate its file?
>
> arch/arm/mach-rockchip/make_fit_atf.py
I already switched to that in my current tree, as I needed the binary
separation for pmusram code to make suspend work :-) .
Heiko
> Thanks,
>
> - Kever
>
> From: "Heiko Stuebner <heiko@sntech.de>"
>
> To: "sjg <sjg@chromium.org>","philipp.tomsich <philipp.tomsich@theobroma-systems.com>"
>
> CC: "hl <hl@rock-chips.com>","kever.yang <kever.yang@rock-chips.com>","u-boot <u-boot@lists.denx.de>","Heiko Stuebner <heiko@sntech.de>"
>
> Sent: 2019-04-05 16:30
>
> Subject: [PATCH 8/8] rockchip: rk3288: make both evb variants use atf
>
> Enable both rk3288-evb variants to load an ATF binary between
> spl and u-boot proper.
>
> Doing the regular spl->u-boot load of course still stays possible
> with this change.
>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
> board/rockchip/evb_rk3288/evb-rk3288.c | 12 +++++-
> board/rockchip/evb_rk3288/fit_spl_atf.its | 52 +++++++++++++++++++++++
> configs/evb-rk3288-act8846_defconfig | 9 +++-
> configs/evb-rk3288-rk808_defconfig | 9 +++-
> 4 files changed, 77 insertions(+), 5 deletions(-)
> create mode 100644 board/rockchip/evb_rk3288/fit_spl_atf.its
>
> diff --git a/board/rockchip/evb_rk3288/evb-rk3288.c b/board/rockchip/evb_rk3288/evb-rk3288.c
> index ec1d03c86c..05aea66db6 100644
> --- a/board/rockchip/evb_rk3288/evb-rk3288.c
> +++ b/board/rockchip/evb_rk3288/evb-rk3288.c
> @@ -15,4 +15,14 @@ void board_boot_order(u32 *spl_boot_list)
> spl_boot_list[1] = BOOT_DEVICE_MMC1;
> }
>
> -#endif
> \ No newline at end of file
> +#endif
> +
> +#ifdef CONFIG_SPL_LOAD_FIT
> +int board_fit_config_name_match(const char *name)
> +{
> + /* Just empty function now - can't decide what to choose */
> + debug("%s: %s\n", __func__, name);
> +
> + return 0;
> +}
> +#endif
> diff --git a/board/rockchip/evb_rk3288/fit_spl_atf.its b/board/rockchip/evb_rk3288/fit_spl_atf.its
> new file mode 100644
> index 0000000000..67aff095d6
> --- /dev/null
> +++ b/board/rockchip/evb_rk3288/fit_spl_atf.its
> @@ -0,0 +1,52 @@
> +/* SPDX-License-Identifier: GPL-2.0+ OR X11 */
> +/*
> + * Copyright (C) 2017 Theobroma Systems Design und Consulting GmbH
> + *
> + * Minimal dts for a SPL FIT image payload.
> + */
> +
> +/dts-v1/;
> +
> +/ {
> + description = "FIT image with U-Boot proper, ATF bl32, DTB";
> + #address-cells = <1>;
> +
> + images {
> + uboot {
> + description = "U-Boot (64-bit)";
> + data = /incbin/("../../../u-boot-nodtb.bin");
> + type = "standalone";
> + os = "U-Boot";
> + arch = "arm64";
> + compression = "none";
> + load = <0x00200000>;
> + };
> + atf {
> + description = "ARM Trusted Firmware";
> + data = /incbin/("../../../bl32-rk3288.bin");
> + type = "firmware";
> + os = "arm-trusted-firmware";
> + arch = "arm64";
> + compression = "none";
> + load = <0x00100000>;
> + entry = <0x00100000>;
> + };
> +
> + fdt {
> + description = "RK3288-EVB flat device-tree";
> + data = /incbin/("../../../u-boot.dtb");
> + type = "flat_dt";
> + compression = "none";
> + };
> + };
> +
> + configurations {
> + default = "conf";
> + conf {
> + description = "Rockchip RK3288-EVB";
> + firmware = "atf";
> + loadables = "uboot";
> + fdt = "fdt";
> + };
> + };
> +};
> diff --git a/configs/evb-rk3288-act8846_defconfig b/configs/evb-rk3288-act8846_defconfig
> index 9c7be78ad7..0fcdaaa697 100644
> --- a/configs/evb-rk3288-act8846_defconfig
> +++ b/configs/evb-rk3288-act8846_defconfig
> @@ -1,21 +1,26 @@
> CONFIG_ARM=y
> CONFIG_ARCH_ROCKCHIP=y
> -CONFIG_SYS_TEXT_BASE=0x00100000
> +CONFIG_SYS_TEXT_BASE=0x00200000
> CONFIG_SYS_MALLOC_F_LEN=0x2000
> CONFIG_ROCKCHIP_RK3288=y
> CONFIG_TARGET_EVB_RK3288=y
> CONFIG_DEBUG_UART_BASE=0xff690000
> CONFIG_DEBUG_UART_CLOCK=24000000
> -CONFIG_SPL_STACK_R_ADDR=0x80000
> +CONFIG_SPL_STACK_R_ADDR=0x600000
> CONFIG_DEBUG_UART=y
> CONFIG_NR_DRAM_BANKS=1
> # CONFIG_ANDROID_BOOT_IMAGE is not set
> +CONFIG_FIT=y
> +CONFIG_FIT_VERBOSE=y
> +CONFIG_SPL_LOAD_FIT=y
> +CONFIG_SPL_FIT_SOURCE="board/rockchip/evb_rk3288/fit_spl_atf.its"
> CONFIG_SILENT_CONSOLE=y
> CONFIG_DEFAULT_FDT_FILE="rk3288-evb-act8846.dtb"
> # CONFIG_DISPLAY_CPUINFO is not set
> CONFIG_DISPLAY_BOARDINFO_LATE=y
> CONFIG_SPL_STACK_R=y
> CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
> +CONFIG_SPL_ATF=y
> CONFIG_CMD_GPIO=y
> CONFIG_CMD_GPT=y
> CONFIG_CMD_I2C=y
> diff --git a/configs/evb-rk3288-rk808_defconfig b/configs/evb-rk3288-rk808_defconfig
> index 73d30c9958..f6b9ce12a1 100644
> --- a/configs/evb-rk3288-rk808_defconfig
> +++ b/configs/evb-rk3288-rk808_defconfig
> @@ -1,21 +1,26 @@
> CONFIG_ARM=y
> CONFIG_ARCH_ROCKCHIP=y
> -CONFIG_SYS_TEXT_BASE=0x00100000
> +CONFIG_SYS_TEXT_BASE=0x00200000
> CONFIG_SYS_MALLOC_F_LEN=0x2000
> CONFIG_ROCKCHIP_RK3288=y
> CONFIG_TARGET_EVB_RK3288=y
> CONFIG_DEBUG_UART_BASE=0xff690000
> CONFIG_DEBUG_UART_CLOCK=24000000
> -CONFIG_SPL_STACK_R_ADDR=0x80000
> +CONFIG_SPL_STACK_R_ADDR=0x600000
> CONFIG_DEBUG_UART=y
> CONFIG_NR_DRAM_BANKS=1
> # CONFIG_ANDROID_BOOT_IMAGE is not set
> +CONFIG_FIT=y
> +CONFIG_FIT_VERBOSE=y
> +CONFIG_SPL_LOAD_FIT=y
> +CONFIG_SPL_FIT_SOURCE="board/rockchip/evb_rk3288/fit_spl_atf.its"
> CONFIG_SILENT_CONSOLE=y
> CONFIG_DEFAULT_FDT_FILE="rk3288-evb-rk808.dtb"
> # CONFIG_DISPLAY_CPUINFO is not set
> CONFIG_DISPLAY_BOARDINFO_LATE=y
> CONFIG_SPL_STACK_R=y
> CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
> +CONFIG_SPL_ATF=y
> CONFIG_CMD_GPIO=y
> CONFIG_CMD_GPT=y
> CONFIG_CMD_I2C=y
>
prev parent reply other threads:[~2019-05-07 7:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 8:30 [U-Boot] [PATCH 0/8] arm-trusted-firmware support for rk3288 Heiko Stuebner
2019-04-05 8:30 ` [U-Boot] [PATCH 1/8] arm: v7: add read_mpidr function for arm32 Heiko Stuebner
2019-04-16 10:29 ` Matthias Brugger
2019-04-05 8:30 ` [U-Boot] [PATCH 2/8] spl: atf: add arm32 variant Heiko Stuebner
2019-04-05 8:30 ` [U-Boot] [PATCH 3/8] rockchip: rk3288: move TPL options to generic position Heiko Stuebner
2019-04-16 9:37 ` Jagan Teki
2019-04-05 8:30 ` [U-Boot] [PATCH 4/8] rockchip: rk3288: adjust load addresses Heiko Stuebner
2019-04-05 8:30 ` [U-Boot] [PATCH 5/8] rockchip: rk3288: reserve first 2MB when build with ATF support Heiko Stuebner
2019-05-07 2:29 ` Kever Yang
2019-04-05 8:30 ` [U-Boot] [PATCH 6/8] rockchip: rk3288: split evb into its two entities Heiko Stuebner
2019-04-05 8:30 ` [U-Boot] [PATCH 7/8] rockchip: rk3288: convert rk3288-evb to use tpl Heiko Stuebner
2019-05-07 2:32 ` Kever Yang
2019-04-05 8:30 ` [U-Boot] [PATCH 8/8] rockchip: rk3288: make both evb variants use atf Heiko Stuebner
2019-05-07 2:28 ` Kever Yang
[not found] ` <526672816.2740575.1557194072777.JavaMail.javamailuser@localhost>
2019-05-07 7:51 ` Heiko Stuebner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2153551.2f3XbEJQ7v@phil \
--to=heiko@sntech.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox