All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3] rockchip: update boot0 hook
@ 2017-12-18  7:05 Kever Yang
  2017-12-18  9:55 ` [U-Boot] [U-Boot,v3] " Philipp Tomsich
  2017-12-18 15:55 ` Philipp Tomsich
  0 siblings, 2 replies; 3+ messages in thread
From: Kever Yang @ 2017-12-18  7:05 UTC (permalink / raw)
  To: u-boot

Rockchip SoCs only need boot0 hook at SPL, and the U-Boot proper do not
need it.

The very beginning of U-Boot proper is different between armv7 and armv8:
armv7 start with ARM_VECTORS while armv8 start with 'b reset'.

Here is the map of very beginning for all cases:
armv7 SPL: TAG(overwrite 'b 1f')+'b reset' + ARM_VECTORS
armv7 U-Boot: ARM_VECTORS
armv8 SPL: TAG(overwrite 'b 1f')+'b reset' + Reserved_iram(rk3399)
armv8 U-Boot: 'b reset'

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

Changes in v3:
- address comments from Philipp

Changes in v2:
- update commit message

 arch/arm/include/asm/arch-rockchip/boot0.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-rockchip/boot0.h b/arch/arm/include/asm/arch-rockchip/boot0.h
index af3a733..5d35c35 100644
--- a/arch/arm/include/asm/arch-rockchip/boot0.h
+++ b/arch/arm/include/asm/arch-rockchip/boot0.h
@@ -39,7 +39,12 @@
 entry_counter:
 	.word   0
 #endif
+
+#if (defined(CONFIG_SPL_BUILD) || defined(CONFIG_ARM64))
+	/* U-Boot proper of armv7 do not need this */
 	b reset
+#endif
+
 #if !defined(CONFIG_ARM64)
 	/*
 	 * For armv7, the addr '_start' will used as vector start address
@@ -50,6 +55,6 @@ _start:
 	ARM_VECTORS
 #endif
 
-#if defined(CONFIG_ROCKCHIP_RK3399) && defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_SPL_BUILD) && (CONFIG_ROCKCHIP_SPL_RESERVE_IRAM > 0)
 	.space CONFIG_ROCKCHIP_SPL_RESERVE_IRAM	/* space for the ATF data */
 #endif
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [U-Boot,v3] rockchip: update boot0 hook
  2017-12-18  7:05 [U-Boot] [PATCH v3] rockchip: update boot0 hook Kever Yang
@ 2017-12-18  9:55 ` Philipp Tomsich
  2017-12-18 15:55 ` Philipp Tomsich
  1 sibling, 0 replies; 3+ messages in thread
From: Philipp Tomsich @ 2017-12-18  9:55 UTC (permalink / raw)
  To: u-boot

> Rockchip SoCs only need boot0 hook at SPL, and the U-Boot proper do not
> need it.
> 
> The very beginning of U-Boot proper is different between armv7 and armv8:
> armv7 start with ARM_VECTORS while armv8 start with 'b reset'.
> 
> Here is the map of very beginning for all cases:
> armv7 SPL: TAG(overwrite 'b 1f')+'b reset' + ARM_VECTORS
> armv7 U-Boot: ARM_VECTORS
> armv8 SPL: TAG(overwrite 'b 1f')+'b reset' + Reserved_iram(rk3399)
> armv8 U-Boot: 'b reset'
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
> Changes in v3:
> - address comments from Philipp
> 
> Changes in v2:
> - update commit message
> 
>  arch/arm/include/asm/arch-rockchip/boot0.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [U-Boot,v3] rockchip: update boot0 hook
  2017-12-18  7:05 [U-Boot] [PATCH v3] rockchip: update boot0 hook Kever Yang
  2017-12-18  9:55 ` [U-Boot] [U-Boot,v3] " Philipp Tomsich
@ 2017-12-18 15:55 ` Philipp Tomsich
  1 sibling, 0 replies; 3+ messages in thread
From: Philipp Tomsich @ 2017-12-18 15:55 UTC (permalink / raw)
  To: u-boot

> Rockchip SoCs only need boot0 hook at SPL, and the U-Boot proper do not
> need it.
> 
> The very beginning of U-Boot proper is different between armv7 and armv8:
> armv7 start with ARM_VECTORS while armv8 start with 'b reset'.
> 
> Here is the map of very beginning for all cases:
> armv7 SPL: TAG(overwrite 'b 1f')+'b reset' + ARM_VECTORS
> armv7 U-Boot: ARM_VECTORS
> armv8 SPL: TAG(overwrite 'b 1f')+'b reset' + Reserved_iram(rk3399)
> armv8 U-Boot: 'b reset'
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
> Changes in v3:
> - address comments from Philipp
> 
> Changes in v2:
> - update commit message
> 
>  arch/arm/include/asm/arch-rockchip/boot0.h | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-18 15:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-18  7:05 [U-Boot] [PATCH v3] rockchip: update boot0 hook Kever Yang
2017-12-18  9:55 ` [U-Boot] [U-Boot,v3] " Philipp Tomsich
2017-12-18 15:55 ` 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.