* [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter
@ 2017-09-07 7:00 Kever Yang
2017-09-07 7:00 ` [U-Boot] [PATCH 2/3] spl: remove SPL_ATF_TEXT_BASE config option Kever Yang
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Kever Yang @ 2017-09-07 7:00 UTC (permalink / raw)
To: u-boot
Rename the bl31_entry() function with 'spl_' prefix and add one
parameter for bl31 entry address since we can get it from spl_image header.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
common/spl/spl.c | 2 +-
common/spl/spl_atf.c | 4 ++--
include/spl.h | 6 +++++-
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 6ff390c..1d8bbb2 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -427,7 +427,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
if (CONFIG_IS_ENABLED(ATF_SUPPORT)) {
debug("loaded - jumping to U-Boot via ATF BL31.\n");
- bl31_entry();
+ spl_bl31_entry((void *)spl_image.entry_point);
}
if (CONFIG_IS_ENABLED(OPTEE_SUPPORT)) {
diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
index 6e8f928..2f6fff9 100644
--- a/common/spl/spl_atf.c
+++ b/common/spl/spl_atf.c
@@ -82,13 +82,13 @@ void raw_write_daif(unsigned int daif)
__asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory");
}
-void bl31_entry(void)
+void spl_bl31_entry(void *entry_addr)
{
struct bl31_params *bl31_params;
void (*entry)(struct bl31_params *params, void *plat_params) = NULL;
bl31_params = bl2_plat_get_bl31_params();
- entry = (void *)CONFIG_SPL_ATF_TEXT_BASE;
+ entry = entry_addr;
raw_write_daif(SPSR_EXCEPTION_MASK);
dcache_disable();
diff --git a/include/spl.h b/include/spl.h
index 13d46ed..d21a3d2 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -267,7 +267,11 @@ int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr);
int spl_mmc_load_image(struct spl_image_info *spl_image,
struct spl_boot_device *bootdev);
-void bl31_entry(void);
+/**
+ * spl_bl31_entry - entry function for ATF bl31
+ * @entry_addr - entry address of bl31 text
+ */
+void spl_bl31_entry(void *entry_addr);
/**
* spl_optee_entry - entry function for optee
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 2/3] spl: remove SPL_ATF_TEXT_BASE config option
2017-09-07 7:00 [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter Kever Yang
@ 2017-09-07 7:00 ` Kever Yang
2017-09-12 15:47 ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-09-07 7:00 ` [U-Boot] [PATCH 3/3] rockchip: remove CONFIG_SPL_ATF_TEXT_BASE for all boards Kever Yang
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Kever Yang @ 2017-09-07 7:00 UTC (permalink / raw)
To: u-boot
We don't need SPL_ATF_TEXT_BASE since we can get the bl31 entry
from spl_image.entry_point.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
common/spl/Kconfig | 6 ------
1 file changed, 6 deletions(-)
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 85f8d66..3a74ca3 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -694,12 +694,6 @@ config SPL_ATF_SUPPORT
is loaded by SPL(which is considered as BL2 in ATF terminology).
More detail at: https://github.com/ARM-software/arm-trusted-firmware
-config SPL_ATF_TEXT_BASE
- depends on SPL_ATF_SUPPORT
- hex "ATF BL31 base address"
- help
- This is the base address in memory for ATF BL31 text and entry point.
-
config SPL_OPTEE_SUPPORT
bool "Support OP-TEE Trusted OS"
depends on ARM
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 3/3] rockchip: remove CONFIG_SPL_ATF_TEXT_BASE for all boards
2017-09-07 7:00 [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter Kever Yang
2017-09-07 7:00 ` [U-Boot] [PATCH 2/3] spl: remove SPL_ATF_TEXT_BASE config option Kever Yang
@ 2017-09-07 7:00 ` Kever Yang
2017-09-12 15:47 ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-09-07 8:36 ` [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter Dr. Philipp Tomsich
2017-09-12 15:47 ` [U-Boot] [U-Boot, " Philipp Tomsich
3 siblings, 1 reply; 7+ messages in thread
From: Kever Yang @ 2017-09-07 7:00 UTC (permalink / raw)
To: u-boot
After update bl31_entry(), we don't need CONFIG_SPL_ATF_TEXT_BASE.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---
configs/firefly-rk3399_defconfig | 1 -
configs/lion-rk3368_defconfig | 1 -
2 files changed, 2 deletions(-)
diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
index eead166..d9dc887 100644
--- a/configs/firefly-rk3399_defconfig
+++ b/configs/firefly-rk3399_defconfig
@@ -15,7 +15,6 @@ CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x4000
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
CONFIG_SPL_ATF_SUPPORT=y
-CONFIG_SPL_ATF_TEXT_BASE=0x00010000
CONFIG_FASTBOOT=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_CMD_FASTBOOT=y
diff --git a/configs/lion-rk3368_defconfig b/configs/lion-rk3368_defconfig
index 73547f8..9735f17 100644
--- a/configs/lion-rk3368_defconfig
+++ b/configs/lion-rk3368_defconfig
@@ -29,7 +29,6 @@ CONFIG_TPL_SYS_MALLOC_SIMPLE=y
CONFIG_SPL_STACK_R=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x200
CONFIG_SPL_ATF_SUPPORT=y
-CONFIG_SPL_ATF_TEXT_BASE=0x10000
CONFIG_TPL=y
CONFIG_TPL_BOOTROM_SUPPORT=y
CONFIG_TPL_DRIVERS_MISC_SUPPORT=y
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter
2017-09-07 7:00 [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter Kever Yang
2017-09-07 7:00 ` [U-Boot] [PATCH 2/3] spl: remove SPL_ATF_TEXT_BASE config option Kever Yang
2017-09-07 7:00 ` [U-Boot] [PATCH 3/3] rockchip: remove CONFIG_SPL_ATF_TEXT_BASE for all boards Kever Yang
@ 2017-09-07 8:36 ` Dr. Philipp Tomsich
2017-09-12 15:47 ` [U-Boot] [U-Boot, " Philipp Tomsich
3 siblings, 0 replies; 7+ messages in thread
From: Dr. Philipp Tomsich @ 2017-09-07 8:36 UTC (permalink / raw)
To: u-boot
Kever,
> On 7 Sep 2017, at 09:00, Kever Yang <kever.yang@rock-chips.com> wrote:
>
> Rename the bl31_entry() function with 'spl_' prefix and add one
> parameter for bl31 entry address since we can get it from spl_image header.
Just as a heads-up, I also have a patch in my queue (i.e. to submit this week) that
integrates as IH_OS_ARM_TRUSTED_FIRMWARE and adds the option to pass
a pointer to the FDT as a platform-parameter.
I’ll copy you, so we can then figure out how to best merge your and my changes
and apply those at the same time.
Regards,
Philipp.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> common/spl/spl.c | 2 +-
> common/spl/spl_atf.c | 4 ++--
> include/spl.h | 6 +++++-
> 3 files changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index 6ff390c..1d8bbb2 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -427,7 +427,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
>
> if (CONFIG_IS_ENABLED(ATF_SUPPORT)) {
> debug("loaded - jumping to U-Boot via ATF BL31.\n");
> - bl31_entry();
> + spl_bl31_entry((void *)spl_image.entry_point);
> }
>
> if (CONFIG_IS_ENABLED(OPTEE_SUPPORT)) {
> diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c
> index 6e8f928..2f6fff9 100644
> --- a/common/spl/spl_atf.c
> +++ b/common/spl/spl_atf.c
> @@ -82,13 +82,13 @@ void raw_write_daif(unsigned int daif)
> __asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory");
> }
>
> -void bl31_entry(void)
> +void spl_bl31_entry(void *entry_addr)
> {
> struct bl31_params *bl31_params;
> void (*entry)(struct bl31_params *params, void *plat_params) = NULL;
>
> bl31_params = bl2_plat_get_bl31_params();
> - entry = (void *)CONFIG_SPL_ATF_TEXT_BASE;
> + entry = entry_addr;
>
> raw_write_daif(SPSR_EXCEPTION_MASK);
> dcache_disable();
> diff --git a/include/spl.h b/include/spl.h
> index 13d46ed..d21a3d2 100644
> --- a/include/spl.h
> +++ b/include/spl.h
> @@ -267,7 +267,11 @@ int spl_dfu_cmd(int usbctrl, char *dfu_alt_info, char *interface, char *devstr);
> int spl_mmc_load_image(struct spl_image_info *spl_image,
> struct spl_boot_device *bootdev);
>
> -void bl31_entry(void);
> +/**
> + * spl_bl31_entry - entry function for ATF bl31
> + * @entry_addr - entry address of bl31 text
> + */
> +void spl_bl31_entry(void *entry_addr);
>
> /**
> * spl_optee_entry - entry function for optee
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [U-Boot, 3/3] rockchip: remove CONFIG_SPL_ATF_TEXT_BASE for all boards
2017-09-07 7:00 ` [U-Boot] [PATCH 3/3] rockchip: remove CONFIG_SPL_ATF_TEXT_BASE for all boards Kever Yang
@ 2017-09-12 15:47 ` Philipp Tomsich
0 siblings, 0 replies; 7+ messages in thread
From: Philipp Tomsich @ 2017-09-12 15:47 UTC (permalink / raw)
To: u-boot
> After update bl31_entry(), we don't need CONFIG_SPL_ATF_TEXT_BASE.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> configs/firefly-rk3399_defconfig | 1 -
> configs/lion-rk3368_defconfig | 1 -
> 2 files changed, 2 deletions(-)
>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [U-Boot, 1/3] spl: update bl31_entry() with new name and parameter
2017-09-07 7:00 [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter Kever Yang
` (2 preceding siblings ...)
2017-09-07 8:36 ` [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter Dr. Philipp Tomsich
@ 2017-09-12 15:47 ` Philipp Tomsich
3 siblings, 0 replies; 7+ messages in thread
From: Philipp Tomsich @ 2017-09-12 15:47 UTC (permalink / raw)
To: u-boot
> Rename the bl31_entry() function with 'spl_' prefix and add one
> parameter for bl31 entry address since we can get it from spl_image header.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> common/spl/spl.c | 2 +-
> common/spl/spl_atf.c | 4 ++--
> include/spl.h | 6 +++++-
> 3 files changed, 8 insertions(+), 4 deletions(-)
>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] [U-Boot, 2/3] spl: remove SPL_ATF_TEXT_BASE config option
2017-09-07 7:00 ` [U-Boot] [PATCH 2/3] spl: remove SPL_ATF_TEXT_BASE config option Kever Yang
@ 2017-09-12 15:47 ` Philipp Tomsich
0 siblings, 0 replies; 7+ messages in thread
From: Philipp Tomsich @ 2017-09-12 15:47 UTC (permalink / raw)
To: u-boot
> We don't need SPL_ATF_TEXT_BASE since we can get the bl31 entry
> from spl_image.entry_point.
>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
>
> common/spl/Kconfig | 6 ------
> 1 file changed, 6 deletions(-)
>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-09-12 15:47 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-07 7:00 [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter Kever Yang
2017-09-07 7:00 ` [U-Boot] [PATCH 2/3] spl: remove SPL_ATF_TEXT_BASE config option Kever Yang
2017-09-12 15:47 ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-09-07 7:00 ` [U-Boot] [PATCH 3/3] rockchip: remove CONFIG_SPL_ATF_TEXT_BASE for all boards Kever Yang
2017-09-12 15:47 ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-09-07 8:36 ` [U-Boot] [PATCH 1/3] spl: update bl31_entry() with new name and parameter Dr. Philipp Tomsich
2017-09-12 15:47 ` [U-Boot] [U-Boot, " Philipp Tomsich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.