All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/1] ARMv8: get new GD address from gd->new_gd directly
@ 2017-09-22  6:39 zijun_hu
  2017-09-25  2:14 ` Simon Glass
  2017-10-09 17:00 ` [U-Boot] [U-Boot, " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: zijun_hu @ 2017-09-22  6:39 UTC (permalink / raw)
  To: u-boot

From: zijun_hu <zijun_hu@htc.com>

the new GD address is calculated via board data BD currently
it require the new GD area locates below BD tightly, so a strict
constraint is imposed on memory layout which maybe make special
platform unpleasant.

fix it by getting new GD address from gd->new_gd directly.

Signed-off-by: zijun_hu <zijun_hu@htc.com>
---
 arch/arm/lib/crt0_64.S | 3 +--
 lib/asm-offsets.c      | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
index 62fad45..9c46c93 100644
--- a/arch/arm/lib/crt0_64.S
+++ b/arch/arm/lib/crt0_64.S
@@ -95,8 +95,7 @@ ENTRY(_main)
  */
 	ldr	x0, [x18, #GD_START_ADDR_SP]	/* x0 <- gd->start_addr_sp */
 	bic	sp, x0, #0xf	/* 16-byte alignment for ABI compliance */
-	ldr	x18, [x18, #GD_BD]		/* x18 <- gd->bd */
-	sub	x18, x18, #GD_SIZE		/* new GD is below bd */
+	ldr	x18, [x18, #GD_NEW_GD]		/* x18 <- gd->new_gd */
 
 	adr	lr, relocation_return
 	ldr	x9, [x18, #GD_RELOC_OFF]	/* x9 <- gd->reloc_off */
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index b04f7c6..f4f1bb8 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -38,5 +38,7 @@ int main(void)
 
 	DEFINE(GD_START_ADDR_SP, offsetof(struct global_data, start_addr_sp));
 
+	DEFINE(GD_NEW_GD, offsetof(struct global_data, new_gd));
+
 	return 0;
 }
-- 
1.9.1

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

* [U-Boot] [PATCH 1/1] ARMv8: get new GD address from gd->new_gd directly
  2017-09-22  6:39 [U-Boot] [PATCH 1/1] ARMv8: get new GD address from gd->new_gd directly zijun_hu
@ 2017-09-25  2:14 ` Simon Glass
  2017-10-09 17:00 ` [U-Boot] [U-Boot, " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2017-09-25  2:14 UTC (permalink / raw)
  To: u-boot

On 22 September 2017 at 00:39, zijun_hu <zijun_hu@zoho.com> wrote:
> From: zijun_hu <zijun_hu@htc.com>
>
> the new GD address is calculated via board data BD currently
> it require the new GD area locates below BD tightly, so a strict
> constraint is imposed on memory layout which maybe make special
> platform unpleasant.
>
> fix it by getting new GD address from gd->new_gd directly.
>
> Signed-off-by: zijun_hu <zijun_hu@htc.com>
> ---
>  arch/arm/lib/crt0_64.S | 3 +--
>  lib/asm-offsets.c      | 2 ++
>  2 files changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [U-Boot] [U-Boot, 1/1] ARMv8: get new GD address from gd->new_gd directly
  2017-09-22  6:39 [U-Boot] [PATCH 1/1] ARMv8: get new GD address from gd->new_gd directly zijun_hu
  2017-09-25  2:14 ` Simon Glass
@ 2017-10-09 17:00 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2017-10-09 17:00 UTC (permalink / raw)
  To: u-boot

On Fri, Sep 22, 2017 at 02:39:13PM +0800, zijun_hu wrote:

> From: zijun_hu <zijun_hu@htc.com>
> 
> the new GD address is calculated via board data BD currently
> it require the new GD area locates below BD tightly, so a strict
> constraint is imposed on memory layout which maybe make special
> platform unpleasant.
> 
> fix it by getting new GD address from gd->new_gd directly.
> 
> Signed-off-by: zijun_hu <zijun_hu@htc.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171009/d4027d34/attachment.sig>

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

end of thread, other threads:[~2017-10-09 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22  6:39 [U-Boot] [PATCH 1/1] ARMv8: get new GD address from gd->new_gd directly zijun_hu
2017-09-25  2:14 ` Simon Glass
2017-10-09 17:00 ` [U-Boot] [U-Boot, " Tom Rini

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.