All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm64: Juno/FVP: adjust kernel load address
@ 2016-01-04 15:43 Andre Przywara
  2016-01-05  9:48 ` Linus Walleij
  2016-01-09  3:35 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Andre Przywara @ 2016-01-04 15:43 UTC (permalink / raw)
  To: u-boot

The default kernel load offset for an arm64 kernel is 0x80000, so
U-Boot takes cares of moving the loaded kernel to a matching memory
location just before booting it.
Since we run with caches off, this takes a while for any decently
sized kernel - with no output explaining the reason for the delay
(unless one uses a DEBUG build).
By adjusting the default load offset for Juno and VFP to be 512K
aligned in the first place we can skip this copying and boot much
faster.
Tested on Juno.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 include/configs/vexpress_aemv8a.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/configs/vexpress_aemv8a.h b/include/configs/vexpress_aemv8a.h
index c767f90..814934a 100644
--- a/include/configs/vexpress_aemv8a.h
+++ b/include/configs/vexpress_aemv8a.h
@@ -189,7 +189,7 @@
 #define CONFIG_EXTRA_ENV_SETTINGS	\
 				"kernel_name=norkern\0"	\
 				"kernel_alt_name=Image\0"	\
-				"kernel_addr=0x80000000\0" \
+				"kernel_addr=0x80080000\0" \
 				"initrd_name=ramdisk.img\0"	\
 				"initrd_addr=0x84000000\0"	\
 				"fdt_name=board.dtb\0" \
@@ -233,7 +233,7 @@
 #elif CONFIG_TARGET_VEXPRESS64_BASE_FVP
 #define CONFIG_EXTRA_ENV_SETTINGS	\
 				"kernel_name=Image\0"		\
-				"kernel_addr=0x80000000\0"	\
+				"kernel_addr=0x80080000\0"	\
 				"initrd_name=ramdisk.img\0"	\
 				"initrd_addr=0x88000000\0"	\
 				"fdt_name=devtree.dtb\0"	\
-- 
2.6.4

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

* [U-Boot] [PATCH] arm64: Juno/FVP: adjust kernel load address
  2016-01-04 15:43 [U-Boot] [PATCH] arm64: Juno/FVP: adjust kernel load address Andre Przywara
@ 2016-01-05  9:48 ` Linus Walleij
  2016-01-05 14:41   ` Ryan Harkin
  2016-01-09  3:35 ` [U-Boot] " Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2016-01-05  9:48 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 4, 2016 at 4:43 PM, Andre Przywara <andre.przywara@arm.com> wrote:

> The default kernel load offset for an arm64 kernel is 0x80000, so
> U-Boot takes cares of moving the loaded kernel to a matching memory
> location just before booting it.
> Since we run with caches off, this takes a while for any decently
> sized kernel - with no output explaining the reason for the delay
> (unless one uses a DEBUG build).
> By adjusting the default load offset for Juno and VFP to be 512K
> aligned in the first place we can skip this copying and boot much
> faster.
> Tested on Juno.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Pretty cool. Almost deserves a comment directly in the config
file so people don't screw up the geniusness :)

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* [U-Boot] [PATCH] arm64: Juno/FVP: adjust kernel load address
  2016-01-05  9:48 ` Linus Walleij
@ 2016-01-05 14:41   ` Ryan Harkin
  0 siblings, 0 replies; 4+ messages in thread
From: Ryan Harkin @ 2016-01-05 14:41 UTC (permalink / raw)
  To: u-boot

On 5 January 2016 at 09:48, Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Jan 4, 2016 at 4:43 PM, Andre Przywara <andre.przywara@arm.com> wrote:
>
>> The default kernel load offset for an arm64 kernel is 0x80000, so
>> U-Boot takes cares of moving the loaded kernel to a matching memory
>> location just before booting it.
>> Since we run with caches off, this takes a while for any decently
>> sized kernel - with no output explaining the reason for the delay
>> (unless one uses a DEBUG build).
>> By adjusting the default load offset for Juno and VFP to be 512K
>> aligned in the first place we can skip this copying and boot much
>> faster.
>> Tested on Juno.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>
> Pretty cool. Almost deserves a comment directly in the config
> file so people don't screw up the geniusness :)
>

And I tested it on Juno.  At first I didn't notice much difference,
but then I actually timed it and it ~halves the time to get the kernel
started from 9 secs to about 4 or 5 secs on my R0 board (after hitting
enter on "run bootcmd").

I didn't test the FVP change because I always use the DRAM config and
I'm not set up to test semihosting.  However, the DRAM config already
has this change, so I'm confident it's the right thing to do.

> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>

>
> Yours,
> Linus Walleij

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

* [U-Boot] arm64: Juno/FVP: adjust kernel load address
  2016-01-04 15:43 [U-Boot] [PATCH] arm64: Juno/FVP: adjust kernel load address Andre Przywara
  2016-01-05  9:48 ` Linus Walleij
@ 2016-01-09  3:35 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-01-09  3:35 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 04, 2016 at 03:43:36PM +0000, Andre Przywara wrote:

> The default kernel load offset for an arm64 kernel is 0x80000, so
> U-Boot takes cares of moving the loaded kernel to a matching memory
> location just before booting it.
> Since we run with caches off, this takes a while for any decently
> sized kernel - with no output explaining the reason for the delay
> (unless one uses a DEBUG build).
> By adjusting the default load offset for Juno and VFP to be 512K
> aligned in the first place we can skip this copying and boot much
> faster.
> Tested on Juno.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160108/5086b408/attachment.sig>

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

end of thread, other threads:[~2016-01-09  3:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-04 15:43 [U-Boot] [PATCH] arm64: Juno/FVP: adjust kernel load address Andre Przywara
2016-01-05  9:48 ` Linus Walleij
2016-01-05 14:41   ` Ryan Harkin
2016-01-09  3:35 ` [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.