Re: [U-Boot] Booting armv8 Kernel on UBoot

2016-07-20 Thread Rajkumar Ramasamy
Hi, I did a few more debugging and wanted to share few more information which 
are below:

1) I think QEMU does support EL2, because, the following code is working fine.
mov\xreg1, #0x33ff
msrcptr_el2, \xreg1/* Disable coprocessor traps to EL2 */
2) The machine is still in EL3, when its trying to write to SP_EL2. As SP_EL2 
can be written from EL3 or EL2, I think there is no permission violation 
happening due to this.
mrs \xreg, CurrentEL   /* xreg is 0xc after this line*/
mov\xreg1, sp
msr sp_el2, \xreg1/* Migrate SP */

Please correct me if I am wrong.

--- Original Message ---
Sender : Rajkumar Ramasamy Technical 
Lead/SRI-Bangalore-IoTivity/Samsung Electronics
Date : Jul 21, 2016 09:41 (GMT+05:30)
Title : Booting armv8 Kernel on UBoot

Hi, 
I am trying to boot ARMv8 Linux kernel using U-Boot. I have built the latest 
mainline kernel and U-Boot for aarch64 using defconfig. I am testing this build 
on QEMU V2.6.0.  I have loaded the Image file at 0x8008
"loaded file 
/home/shingu/workspace/linux/linux_mainline_aarch64/arch/arm64/boot/Image from 
8008 to 80B175FF, 00A97600 bytes"
Just before transfering the control to the kernel, U-Boot is trying to switch 
the exception level to EL2 from EL3, since I have "-machine secure=on" in QEMU 
parameters. 
As soon as the stack pointer is migrated, (  mov x0, sp; msr sp_el2, x0)  there 
is an exception occurring, [transferring control to 
arch/arm/cpu/armv8/exceptions.S:102]  which is aborting the boot process with 
following message:
"Synchronous Abort" handler, esr 0x0200
ELR: fef7caa4
LR:  fef7d60c
x0 : fe6fa820 x1 : 
x2 : fef94a88 x3 : 0001
x4 : fe6fa4e0 x5 : 0020
x6 : ff80ffc8 x7 : 
x8 : fe6fa6e0 x9 : 0002
x10: fe6fa55b x11: 0002
x12: 0002 x13: 
x14: 83006fff x15: fef7c8e4
x16: fef7cb68 x17: 
x18: fe6fae00 x19: fefb7b40
x20:  x21: 8008
x22: 0003 x23: fe6fe058
x24:  x25: fefb0918
x26:  x27: fef7d6d8
x28: fe6fe080 x29: fef7d5ec
Resetting CPU ...
resetting ...
Can anyone please help me to understand what I am doing wrong?

The total process is in the following code: [ 
http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv8/transition.S#l16, 
http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/include/asm/macro.h#138]

Have a pleasant day! :)
With Thanks and Regards,
Rajkumar R

Have a pleasant day! :)
With Thanks and Regards,
Rajkumar R
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Booting armv8 Kernel on UBoot

2016-07-20 Thread Rajkumar Ramasamy
Hi, 
I am trying to boot ARMv8 Linux kernel using U-Boot. I have built the latest 
mainline kernel and U-Boot for aarch64 using defconfig. I am testing this build 
on QEMU V2.6.0.  I have loaded the Image file at 0x8008
"loaded file 
/home/shingu/workspace/linux/linux_mainline_aarch64/arch/arm64/boot/Image from 
8008 to 80B175FF, 00A97600 bytes"
Just before transfering the control to the kernel, U-Boot is trying to switch 
the exception level to EL2 from EL3, since I have "-machine secure=on" in QEMU 
parameters. 
As soon as the stack pointer is migrated, (  mov x0, sp; msr sp_el2, x0)  there 
is an exception occurring, [transferring control to 
arch/arm/cpu/armv8/exceptions.S:102]  which is aborting the boot process with 
following message:
"Synchronous Abort" handler, esr 0x0200
ELR: fef7caa4
LR:  fef7d60c
x0 : fe6fa820 x1 : 
x2 : fef94a88 x3 : 0001
x4 : fe6fa4e0 x5 : 0020
x6 : ff80ffc8 x7 : 
x8 : fe6fa6e0 x9 : 0002
x10: fe6fa55b x11: 0002
x12: 0002 x13: 
x14: 83006fff x15: fef7c8e4
x16: fef7cb68 x17: 
x18: fe6fae00 x19: fefb7b40
x20:  x21: 8008
x22: 0003 x23: fe6fe058
x24:  x25: fefb0918
x26:  x27: fef7d6d8
x28: fe6fe080 x29: fef7d5ec
Resetting CPU ...
resetting ...
Can anyone please help me to understand what I am doing wrong?
 
The total process is in the following code: [ 
http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/cpu/armv8/transition.S#l16, 
http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/include/asm/macro.h#138]
 
Have a pleasant day! :)
With Thanks and Regards,
Rajkumar R
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Booting armv8 Kernel on UBoot

2016-07-20 Thread Rajkumar Ramasamy
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-06-04 Thread Sudeep Holla
On Wed, Jun 4, 2014 at 5:31 AM, Vishal Bhoj vishal.b...@linaro.org wrote:
 Hi,

 Thanks for the help. I am able to boot the kernel on foundation models but
 unable to boot the kernel on the FVP base models. The model itself seem to
 hang while booting the kernel. Here is the log:
 http://pastebin.com/HajuPFZ1


From the log it looks like either you have incorrect GIC DT node
or wrong config GIC parameter to model .

Regards,
Sudeep
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-06-03 Thread Vishal Bhoj
Hi,

Thanks for the help. I am able to boot the kernel on foundation models but
unable to boot the kernel on the FVP base models. The model itself seem to
hang while booting the kernel. Here is the log:
http://pastebin.com/HajuPFZ1

I am investigating on what the last instruction getting executed in the
kernel. In the meantime I wanted to know if people are able to boot the
kernel with the same u-boot binary on FVP Base models. The model version
that I am using is given below:
/usr/local/FVP_Base_AEMv8A-AEMv8A/models/Linux64_GCC-4.1/FVP_Base_AEMv8A-AEMv8A
--version
Fast Models [0.8.5502 (Mar 17 2014)]
Copyright 2000-2014 ARM Limited.
All Rights Reserved.
Top component name: FVP_Base_AEMv8A_AEMv8A


Regards,
Vishal


On 29 May 2014 18:30, feng...@phytium.com.cn feng...@phytium.com.cn wrote:


 hi Tiger,

  Hi, fenghua:
  Followed your steps, I also downloaded  linux-3.14.4.tar.xz .
  And run it with ATF + Uboot.
  It could boot into linux kernel, and hangs at mounting root fs.
 
  Thanks a lot!

 I did not test rootfs. It depends on where you place the rootfs(ramdisk or
 mmc etc).
 The kernel should be reconfigured to support corresponding device.

 Best wishes,
 David


 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-30 Thread feng...@phytium.com.cn

hi Tiger,

 Hi, fenghua:
 Followed your steps, I also downloaded  linux-3.14.4.tar.xz .
 And run it with ATF + Uboot.
 It could boot into linux kernel, and hangs at mounting root fs.
 
 Thanks a lot!

I did not test rootfs. It depends on where you place the rootfs(ramdisk or mmc 
etc).
The kernel should be reconfigured to support corresponding device.

Best wishes,
David


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-27 Thread feng...@phytium.com.cn

Dear Tom, Tiger, 

 
 hi Tom,
 
 On Thu, May 22, 2014 at 10:26:17PM +0800, feng...@phytium.com.cn wrote:
 
 
 Hi ,
 I have added mmc driver into the vexpress64 board file for uboot and tested
 it on FVP base model. I tried booting a kernel on that but it is aborting
 with the following message:
 Final value for argc=3
 Loading Kernel Image ... OK
 kernel loaded at 0x0008, end = 0x00827024
 using: FDT
 reserving fdt memory region: addr=8000 size=1
 ## initrd_high = 0x, copy_to_ram = 1
 ramdisk load start = 0x, ramdisk load end = 0x
 ## device tree at 90008000 ... 9000a850 (len=22609 
 [0x5851])
 Loading Device Tree to 9fffa000, end 9850 ... OK
 Initial value for argc=3
 Final value for argc=3
 ## Transferring control to Linux (at address 8)...
 Starting kernel ...
 
 Synchronous Abort handler, esr 0x0200
 ELR: 8
 LR:  fff90fc8
 x0 : 9fffa000 x1 : 1c09
 x2 : 1c09 x3 : 0020
 x4 : fff6b834 x5 : 
 x6 : fff6bb40 x7 : ffd0
 x8 : 000f x9 : 7ff8e000
 x10: fffb7188 x11: 
 x12: 6000 x13: 0004
 x14: 0003 x15: fffc7c20
 x16:  x17: 
 x18: fff6beb8 x19: 0008
 x20: fffc7a70 x21: 
 x22:  x23: fff6d8d8
 x24:  x25: fffc2630
 x26:  x27: 80008000
 x28:  x29: fff6bb40
 
 Can anyone please provide the procedure on how to boot the kernel with
 u-boot on armv8 models ?
 I always use mkimage converting kernel to uImage and booting it. It works 
 fine.
 Wish this help you.
 
 Which version of the model are you using and which kernel tree?  Thanks!
 
 The model is the most recent FVP from linaro website and the kernel is a very 
 old one.
 But mkimage has nothing to do with the kernel. uImage produced
 by mkimage is correctly loaded by u-boot for aarch64. 
 I will make a test with the most recently kernel and give you feedback.
 
I have made a kernel booting test.

u-boot:  cloned from git tree.
Foundation Model: FM000-KT-00035-r0p8-52rel06.tar, downloaded from arm website.
Linux kernel: linux-3.14.4.tar.xz, stable version from kernel.org

steps:
1. compile u-boot,  replace CONFIG_GICV3 with CONFIG_GICV2 in vexpress_aemv8a.h
due to GICv3 support has not been upstream to kernel mainline.

2. compile linux kernel, use arch/arm64/boot/configs/defconfig as the default 
configuration.
then, 
mkimage -A arm64 -O linux -C none -T kernel -a 0x8008 -e 0x8008 -n 
3.14.4 -d Image uImage

3. use linux/arch/arm64/boot/dts/foundation-v8.dts as the device tree, because 
CONFIG_SYS_TEXT_BASE is  0x8000 I reconfigure 'cpu-release-addr' as 
0x8007fff0.
   then,
   dtc  foundation-v8.dts -O dtb -o u-boot.dtb

4. run foundation model:
Foundation_v8 --image=u-boot.elf --data=uImage@0x9000 
--data=u-boot.dtb@0xa000 --cores=4

5. In u-boot command line, type the following command to boot os,
bootm 0x9000 - 0xa000

I did not test the rootfs yet.

Best regards,
David


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-27 Thread TigerLiu
Hi, fenghua:
Followed your steps, I also downloaded  linux-3.14.4.tar.xz .
And run it with ATF + Uboot.
It could boot into linux kernel, and hangs at mounting root fs.

Thanks a lot!

Best wishes,
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-26 Thread feng...@phytium.com.cn

hi Tom,

 On Thu, May 22, 2014 at 10:26:17PM +0800, feng...@phytium.com.cn wrote:
 
 
 Hi ,
 I have added mmc driver into the vexpress64 board file for uboot and tested
 it on FVP base model. I tried booting a kernel on that but it is aborting
 with the following message:
 Final value for argc=3
  Loading Kernel Image ... OK
  kernel loaded at 0x0008, end = 0x00827024
 using: FDT
  reserving fdt memory region: addr=8000 size=1
 ## initrd_high = 0x, copy_to_ram = 1
  ramdisk load start = 0x, ramdisk load end = 0x
 ## device tree at 90008000 ... 9000a850 (len=22609 [0x5851])
  Loading Device Tree to 9fffa000, end 9850 ... OK
 Initial value for argc=3
 Final value for argc=3
 ## Transferring control to Linux (at address 8)...
 Starting kernel ...
 
 Synchronous Abort handler, esr 0x0200
 ELR: 8
 LR:  fff90fc8
 x0 : 9fffa000 x1 : 1c09
 x2 : 1c09 x3 : 0020
 x4 : fff6b834 x5 : 
 x6 : fff6bb40 x7 : ffd0
 x8 : 000f x9 : 7ff8e000
 x10: fffb7188 x11: 
 x12: 6000 x13: 0004
 x14: 0003 x15: fffc7c20
 x16:  x17: 
 x18: fff6beb8 x19: 0008
 x20: fffc7a70 x21: 
 x22:  x23: fff6d8d8
 x24:  x25: fffc2630
 x26:  x27: 80008000
 x28:  x29: fff6bb40
 
 Can anyone please provide the procedure on how to boot the kernel with
 u-boot on armv8 models ?
 I always use mkimage converting kernel to uImage and booting it. It works 
 fine.
 Wish this help you.
 
 Which version of the model are you using and which kernel tree?  Thanks!
 
The model is the most recent FVP from linaro website and the kernel is a very 
old one.
But mkimage has nothing to do with the kernel. uImage produced
by mkimage is correctly loaded by u-boot for aarch64. 
I will make a test with the most recently kernel and give you feedback.

Best regards,
David
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-22 Thread Vishal Bhoj
Hi,

Thanks for the inputs.


On 21 May 2014 21:04, Mark Rutland mark.rutl...@arm.com wrote:

 On Wed, May 21, 2014 at 04:28:53PM +0100, Tom Rini wrote:
  On Wed, May 21, 2014 at 10:40:38AM +0100, Mark Rutland wrote:
   On Wed, May 21, 2014 at 09:46:35AM +0100, Vishal Bhoj wrote:
Hi ,
  
   Hi,
  
I have added mmc driver into the vexpress64 board file for uboot and
 tested
it on FVP base model. I tried booting a kernel on that but it is
 aborting
with the following message:
Final value for argc=3
   Loading Kernel Image ... OK
   kernel loaded at 0x0008, end = 0x00827024
using: FDT
   reserving fdt memory region: addr=8000 size=1
## initrd_high = 0x, copy_to_ram = 1
   ramdisk load start = 0x, ramdisk load end = 0x
## device tree at 90008000 ... 9000a850 (len=22609
 [0x5851])
   Loading Device Tree to 9fffa000, end 9850 ...
 OK
Initial value for argc=3
Final value for argc=3
## Transferring control to Linux (at address 8)...
Starting kernel ...
   
Synchronous Abort handler, esr 0x0200
  
   That ESR_ELx value means Unknown/uncategorized. It would be fantastic
 if
   U-Boot would tell us what EL it's branching to the kernel at as a
 matter
   of course -- it's not really possible to debug from logs otherwise.
  
   Which EL are you loading the kernel at?
 
  So, this I suspect is one of the problems I was trying to describe to
  you back at ELC which turned out to be loading things at the very wrong
  address (0x8 rather than 0x8008).

 That would certainly explain it. From the lines above stating that the
 kernel had been loaded to 0x8 I assumed that memory had been
 configured there.

 
  Vishal, cay you apply:
  http://patchwork.ozlabs.org/patch/345746/
  http://patchwork.ozlabs.org/patch/345748/
  http://patchwork.ozlabs.org/patch/345749/
  http://patchwork.ozlabs.org/patch/345747/
 

Included these patches.

  I need to do a v2 still to address some feedback, and then also say we
  require Mark's recent series to add an image size field (and other
  cleanups) and make use of that (and the rest of the series
  changes/clarifications).

Can you please share the patches. I am currently booting 3.10 Linaro stable
kernel which works with ARM's trusted firmware + UEFI. The same kernel with
the above patches doesn't boot on u-boot. Is there any specific kernel tree
you suggest I should use which is known to boot on uboot + models ?

I have generated uImage with loadaddress as 0x8008 and tried booting
but doesn't boot. Here are the logs:
http://pastebin.com/T882rK3P


 I'll try to get a v2 out on my series shortly, it'd be nice to have as
 soon as possible. :)

 Cheers,
 Mark.

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-22 Thread Tom Rini
On Thu, May 22, 2014 at 11:18:24AM +0530, Vishal Bhoj wrote:
 Hi,
 
 Thanks for the inputs.
 
 
 On 21 May 2014 21:04, Mark Rutland mark.rutl...@arm.com wrote:
 
  On Wed, May 21, 2014 at 04:28:53PM +0100, Tom Rini wrote:
   On Wed, May 21, 2014 at 10:40:38AM +0100, Mark Rutland wrote:
On Wed, May 21, 2014 at 09:46:35AM +0100, Vishal Bhoj wrote:
 Hi ,
   
Hi,
   
 I have added mmc driver into the vexpress64 board file for uboot and
  tested
 it on FVP base model. I tried booting a kernel on that but it is
  aborting
 with the following message:
 Final value for argc=3
Loading Kernel Image ... OK
kernel loaded at 0x0008, end = 0x00827024
 using: FDT
reserving fdt memory region: addr=8000 size=1
 ## initrd_high = 0x, copy_to_ram = 1
ramdisk load start = 0x, ramdisk load end = 0x
 ## device tree at 90008000 ... 9000a850 (len=22609
  [0x5851])
Loading Device Tree to 9fffa000, end 9850 ...
  OK
 Initial value for argc=3
 Final value for argc=3
 ## Transferring control to Linux (at address 8)...
 Starting kernel ...

 Synchronous Abort handler, esr 0x0200
   
That ESR_ELx value means Unknown/uncategorized. It would be fantastic
  if
U-Boot would tell us what EL it's branching to the kernel at as a
  matter
of course -- it's not really possible to debug from logs otherwise.
   
Which EL are you loading the kernel at?
  
   So, this I suspect is one of the problems I was trying to describe to
   you back at ELC which turned out to be loading things at the very wrong
   address (0x8 rather than 0x8008).
 
  That would certainly explain it. From the lines above stating that the
  kernel had been loaded to 0x8 I assumed that memory had been
  configured there.
 
  
   Vishal, cay you apply:
   http://patchwork.ozlabs.org/patch/345746/
   http://patchwork.ozlabs.org/patch/345748/
   http://patchwork.ozlabs.org/patch/345749/
   http://patchwork.ozlabs.org/patch/345747/
  
 
 Included these patches.
 
   I need to do a v2 still to address some feedback, and then also say we
   require Mark's recent series to add an image size field (and other
   cleanups) and make use of that (and the rest of the series
   changes/clarifications).
 
 Can you please share the patches. I am currently booting 3.10 Linaro stable
 kernel which works with ARM's trusted firmware + UEFI. The same kernel with
 the above patches doesn't boot on u-boot. Is there any specific kernel tree
 you suggest I should use which is known to boot on uboot + models ?
 
 I have generated uImage with loadaddress as 0x8008 and tried booting
 but doesn't boot. Here are the logs:
 http://pastebin.com/T882rK3P

What are your bootargs?  Can you add in earlyprintk=pl011,0x1c09
consolelog=9 ?

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-22 Thread Vishal Bhoj
Hi,


On 22 May 2014 18:09, Tom Rini tr...@ti.com wrote:

 On Thu, May 22, 2014 at 11:18:24AM +0530, Vishal Bhoj wrote:
  Hi,
 
  Thanks for the inputs.
 
 
  On 21 May 2014 21:04, Mark Rutland mark.rutl...@arm.com wrote:
 
   On Wed, May 21, 2014 at 04:28:53PM +0100, Tom Rini wrote:
On Wed, May 21, 2014 at 10:40:38AM +0100, Mark Rutland wrote:
 On Wed, May 21, 2014 at 09:46:35AM +0100, Vishal Bhoj wrote:
  Hi ,

 Hi,

  I have added mmc driver into the vexpress64 board file for uboot
 and
   tested
  it on FVP base model. I tried booting a kernel on that but it is
   aborting
  with the following message:
  Final value for argc=3
 Loading Kernel Image ... OK
 kernel loaded at 0x0008, end = 0x00827024
  using: FDT
 reserving fdt memory region: addr=8000 size=1
  ## initrd_high = 0x, copy_to_ram = 1
 ramdisk load start = 0x, ramdisk load end = 0x
  ## device tree at 90008000 ... 9000a850
 (len=22609
   [0x5851])
 Loading Device Tree to 9fffa000, end 9850
 ...
   OK
  Initial value for argc=3
  Final value for argc=3
  ## Transferring control to Linux (at address 8)...
  Starting kernel ...
 
  Synchronous Abort handler, esr 0x0200

 That ESR_ELx value means Unknown/uncategorized. It would be
 fantastic
   if
 U-Boot would tell us what EL it's branching to the kernel at as a
   matter
 of course -- it's not really possible to debug from logs otherwise.

 Which EL are you loading the kernel at?
   
So, this I suspect is one of the problems I was trying to describe to
you back at ELC which turned out to be loading things at the very
 wrong
address (0x8 rather than 0x8008).
  
   That would certainly explain it. From the lines above stating that the
   kernel had been loaded to 0x8 I assumed that memory had been
   configured there.
  
   
Vishal, cay you apply:
http://patchwork.ozlabs.org/patch/345746/
http://patchwork.ozlabs.org/patch/345748/
http://patchwork.ozlabs.org/patch/345749/
http://patchwork.ozlabs.org/patch/345747/
   
  
  Included these patches.
 
I need to do a v2 still to address some feedback, and then also say
 we
require Mark's recent series to add an image size field (and other
cleanups) and make use of that (and the rest of the series
changes/clarifications).
  
  Can you please share the patches. I am currently booting 3.10 Linaro
 stable
  kernel which works with ARM's trusted firmware + UEFI. The same kernel
 with
  the above patches doesn't boot on u-boot. Is there any specific kernel
 tree
  you suggest I should use which is known to boot on uboot + models ?
 
  I have generated uImage with loadaddress as 0x8008 and tried booting
  but doesn't boot. Here are the logs:
  http://pastebin.com/T882rK3P

 What are your bootargs?  Can you add in earlyprintk=pl011,0x1c09
 consolelog=9 ?

That helps. I could get some logs. Here is the logs:
http://pastebin.com/eAjWDS8t

I see few things going wrong:
[0.00] GIC CPU mask not found - kernel will fail to boot.

[  113.978373] swapper/0[1]: undefined instruction: pc=ffc88008
[  113.978454] Code:   d402 d65f03c0 (d403)
[  113.978510] Internal error: Oops - undefined instruction: 0 [#1] SMP
[  113.978553] Modules linked in:
[  113.978610] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.39 #2
[  113.978673] task: ffc07dc85440 ti: ffc07dc88000 task.ti:
ffc07dc88000
[  113.978749] PC is at __invoke_psci_fn_smc+0x0/0x8
[  113.978815] LR is at psci_cpu_on+0x2c/0x54

-

It looks like kernel is trying to communicate to the ARM's trusted
firmware. I am not an expert, please correct me if this assumption is wrong.


Is there a way to run uboot above ARM trusted firmware ?


 --
 Tom

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-22 Thread feng...@phytium.com.cn


 Hi ,
 I have added mmc driver into the vexpress64 board file for uboot and tested
 it on FVP base model. I tried booting a kernel on that but it is aborting
 with the following message:
 Final value for argc=3
   Loading Kernel Image ... OK
   kernel loaded at 0x0008, end = 0x00827024
 using: FDT
   reserving fdt memory region: addr=8000 size=1
 ## initrd_high = 0x, copy_to_ram = 1
   ramdisk load start = 0x, ramdisk load end = 0x
 ## device tree at 90008000 ... 9000a850 (len=22609 [0x5851])
   Loading Device Tree to 9fffa000, end 9850 ... OK
 Initial value for argc=3
 Final value for argc=3
 ## Transferring control to Linux (at address 8)...
 Starting kernel ...
 
 Synchronous Abort handler, esr 0x0200
 ELR: 8
 LR:  fff90fc8
 x0 : 9fffa000 x1 : 1c09
 x2 : 1c09 x3 : 0020
 x4 : fff6b834 x5 : 
 x6 : fff6bb40 x7 : ffd0
 x8 : 000f x9 : 7ff8e000
 x10: fffb7188 x11: 
 x12: 6000 x13: 0004
 x14: 0003 x15: fffc7c20
 x16:  x17: 
 x18: fff6beb8 x19: 0008
 x20: fffc7a70 x21: 
 x22:  x23: fff6d8d8
 x24:  x25: fffc2630
 x26:  x27: 80008000
 x28:  x29: fff6bb40
 
 Can anyone please provide the procedure on how to boot the kernel with
 u-boot on armv8 models ?
I always use mkimage converting kernel to uImage and booting it. It works fine.
Wish this help you.

David


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-22 Thread Tom Rini
On Thu, May 22, 2014 at 10:26:17PM +0800, feng...@phytium.com.cn wrote:
 
 
  Hi ,
  I have added mmc driver into the vexpress64 board file for uboot and tested
  it on FVP base model. I tried booting a kernel on that but it is aborting
  with the following message:
  Final value for argc=3
Loading Kernel Image ... OK
kernel loaded at 0x0008, end = 0x00827024
  using: FDT
reserving fdt memory region: addr=8000 size=1
  ## initrd_high = 0x, copy_to_ram = 1
ramdisk load start = 0x, ramdisk load end = 0x
  ## device tree at 90008000 ... 9000a850 (len=22609 [0x5851])
Loading Device Tree to 9fffa000, end 9850 ... OK
  Initial value for argc=3
  Final value for argc=3
  ## Transferring control to Linux (at address 8)...
  Starting kernel ...
  
  Synchronous Abort handler, esr 0x0200
  ELR: 8
  LR:  fff90fc8
  x0 : 9fffa000 x1 : 1c09
  x2 : 1c09 x3 : 0020
  x4 : fff6b834 x5 : 
  x6 : fff6bb40 x7 : ffd0
  x8 : 000f x9 : 7ff8e000
  x10: fffb7188 x11: 
  x12: 6000 x13: 0004
  x14: 0003 x15: fffc7c20
  x16:  x17: 
  x18: fff6beb8 x19: 0008
  x20: fffc7a70 x21: 
  x22:  x23: fff6d8d8
  x24:  x25: fffc2630
  x26:  x27: 80008000
  x28:  x29: fff6bb40
  
  Can anyone please provide the procedure on how to boot the kernel with
  u-boot on armv8 models ?
 I always use mkimage converting kernel to uImage and booting it. It works 
 fine.
 Wish this help you.

Which version of the model are you using and which kernel tree?  Thanks!

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-22 Thread Vishal Bhoj
Hi,


On 22 May 2014 22:06, Tom Rini tr...@ti.com wrote:

 On Thu, May 22, 2014 at 10:26:17PM +0800, feng...@phytium.com.cn wrote:
 
 
   Hi ,
   I have added mmc driver into the vexpress64 board file for uboot and
 tested
   it on FVP base model. I tried booting a kernel on that but it is
 aborting
   with the following message:
   Final value for argc=3
 Loading Kernel Image ... OK
 kernel loaded at 0x0008, end = 0x00827024
   using: FDT
 reserving fdt memory region: addr=8000 size=1
   ## initrd_high = 0x, copy_to_ram = 1
 ramdisk load start = 0x, ramdisk load end = 0x
   ## device tree at 90008000 ... 9000a850 (len=22609
 [0x5851])
 Loading Device Tree to 9fffa000, end 9850 ... OK
   Initial value for argc=3
   Final value for argc=3
   ## Transferring control to Linux (at address 8)...
   Starting kernel ...
  
   Synchronous Abort handler, esr 0x0200
   ELR: 8
   LR:  fff90fc8
   x0 : 9fffa000 x1 : 1c09
   x2 : 1c09 x3 : 0020
   x4 : fff6b834 x5 : 
   x6 : fff6bb40 x7 : ffd0
   x8 : 000f x9 : 7ff8e000
   x10: fffb7188 x11: 
   x12: 6000 x13: 0004
   x14: 0003 x15: fffc7c20
   x16:  x17: 
   x18: fff6beb8 x19: 0008
   x20: fffc7a70 x21: 
   x22:  x23: fff6d8d8
   x24:  x25: fffc2630
   x26:  x27: 80008000
   x28:  x29: fff6bb40
  
   Can anyone please provide the procedure on how to boot the kernel with
   u-boot on armv8 models ?
  I always use mkimage converting kernel to uImage and booting it. It
 works fine.
  Wish this help you.

 Which version of the model are you using and which kernel tree?  Thanks!


I am using 3.10 Linaro stable kernel which is boots up on UEFI [1]. I will
give a try with the mainline kernel next. This is the FVP model version:
FVP_VE_AEMv8A -v
Fast Models [0.8.5202 (Oct 22 2013)]
Copyright 2000-2013 ARM Limited.
All Rights Reserved.
Top component name: FVP_Base_AEMv8A_AEMv8A


[1] https://git.linaro.org/kernel/linux-linaro-stable.git/


 --
 Tom

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-22 Thread TigerLiu
Hi, fenghua:
I always use mkimage converting kernel to uImage and booting it. It
works fine.
Wish this help you.

I followed these steps :
1. git clone git://git.linaro.org/kernel/linaro-aarch64.git
2. compiled it
   % make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- distclean
vexpress_defconfig
% make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4 Image
3. got the Image from arch\arm64\boot dir
4. use mkimage to package Image to uImage
   ./mkimage -n 'linux-3.12' -A arm64 -O linux -T kernel -C none -a
0xC8 -e 0xC8 -d Image uimage

5. run it with FVP model.(free charge licensed ver)
/home/lion/ARMv8/Foundation_v8pkg/models/Linux64_GCC-4.1/Foundation_v8
--cores=2 --no-gicv3 --data=./build/fvp/debug/bl1.bin@0x0
--data=./build/fvp/debug/fip.bin@0x0800
--data=foundation-v8.dtb@0x8200 --data=uimage@0x0008

Then, got the same Synchronous Abort as Bhoj.

So, could you describe your explicit steps to get correct uimage?

Best wishes,
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Booting armv8 kernel on uboot

2014-05-21 Thread Vishal Bhoj
Hi ,
I have added mmc driver into the vexpress64 board file for uboot and tested
it on FVP base model. I tried booting a kernel on that but it is aborting
with the following message:
Final value for argc=3
   Loading Kernel Image ... OK
   kernel loaded at 0x0008, end = 0x00827024
using: FDT
   reserving fdt memory region: addr=8000 size=1
## initrd_high = 0x, copy_to_ram = 1
   ramdisk load start = 0x, ramdisk load end = 0x
## device tree at 90008000 ... 9000a850 (len=22609 [0x5851])
   Loading Device Tree to 9fffa000, end 9850 ... OK
Initial value for argc=3
Final value for argc=3
## Transferring control to Linux (at address 8)...
Starting kernel ...

Synchronous Abort handler, esr 0x0200
ELR: 8
LR:  fff90fc8
x0 : 9fffa000 x1 : 1c09
x2 : 1c09 x3 : 0020
x4 : fff6b834 x5 : 
x6 : fff6bb40 x7 : ffd0
x8 : 000f x9 : 7ff8e000
x10: fffb7188 x11: 
x12: 6000 x13: 0004
x14: 0003 x15: fffc7c20
x16:  x17: 
x18: fff6beb8 x19: 0008
x20: fffc7a70 x21: 
x22:  x23: fff6d8d8
x24:  x25: fffc2630
x26:  x27: 80008000
x28:  x29: fff6bb40

Can anyone please provide the procedure on how to boot the kernel with
u-boot on armv8 models ?



--
View this message in context: 
http://u-boot.10912.n7.nabble.com/Booting-armv8-kernel-on-uboot-tp180377.html
Sent from the U-Boot mailing list archive at Nabble.com.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-21 Thread Mark Rutland
On Wed, May 21, 2014 at 09:46:35AM +0100, Vishal Bhoj wrote:
 Hi ,

Hi,

 I have added mmc driver into the vexpress64 board file for uboot and tested
 it on FVP base model. I tried booting a kernel on that but it is aborting
 with the following message:
 Final value for argc=3
Loading Kernel Image ... OK
kernel loaded at 0x0008, end = 0x00827024
 using: FDT
reserving fdt memory region: addr=8000 size=1
 ## initrd_high = 0x, copy_to_ram = 1
ramdisk load start = 0x, ramdisk load end = 0x
 ## device tree at 90008000 ... 9000a850 (len=22609 [0x5851])
Loading Device Tree to 9fffa000, end 9850 ... OK
 Initial value for argc=3
 Final value for argc=3
 ## Transferring control to Linux (at address 8)...
 Starting kernel ...
 
 Synchronous Abort handler, esr 0x0200

That ESR_ELx value means Unknown/uncategorized. It would be fantastic if
U-Boot would tell us what EL it's branching to the kernel at as a matter
of course -- it's not really possible to debug from logs otherwise.

Which EL are you loading the kernel at?

 ELR: 8

And that's the start address of the loaded kernel image (i.e. the very
first instruction), so the likely cause is that the first instruction is
invalid, either in memory or the I-cache.

It's a shame we don't have a dump here of the value at the ELR, that
could tell us if the Image is corrupt or if some cache maintenance has
been missed.

Are you definitely loading a valid Image?

 LR:  fff90fc8
 x0 : 9fffa000 x1 : 1c09
 x2 : 1c09 x3 : 0020

Unrelated, but x1-x3 should be zero here per the boot protocol. That
needs to be fixed ASAP or it's not going to be possible to ever make use
of them.

Thanks,
Mark.

 x4 : fff6b834 x5 : 
 x6 : fff6bb40 x7 : ffd0
 x8 : 000f x9 : 7ff8e000
 x10: fffb7188 x11: 
 x12: 6000 x13: 0004
 x14: 0003 x15: fffc7c20
 x16:  x17: 
 x18: fff6beb8 x19: 0008
 x20: fffc7a70 x21: 
 x22:  x23: fff6d8d8
 x24:  x25: fffc2630
 x26:  x27: 80008000
 x28:  x29: fff6bb40
 
 Can anyone please provide the procedure on how to boot the kernel with
 u-boot on armv8 models ?
 
 
 
 --
 View this message in context: 
 http://u-boot.10912.n7.nabble.com/Booting-armv8-kernel-on-uboot-tp180377.html
 Sent from the U-Boot mailing list archive at Nabble.com.
 ___
 U-Boot mailing list
 U-Boot@lists.denx.de
 http://lists.denx.de/mailman/listinfo/u-boot
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-21 Thread Tom Rini
On Wed, May 21, 2014 at 10:40:38AM +0100, Mark Rutland wrote:
 On Wed, May 21, 2014 at 09:46:35AM +0100, Vishal Bhoj wrote:
  Hi ,
 
 Hi,
 
  I have added mmc driver into the vexpress64 board file for uboot and tested
  it on FVP base model. I tried booting a kernel on that but it is aborting
  with the following message:
  Final value for argc=3
 Loading Kernel Image ... OK
 kernel loaded at 0x0008, end = 0x00827024
  using: FDT
 reserving fdt memory region: addr=8000 size=1
  ## initrd_high = 0x, copy_to_ram = 1
 ramdisk load start = 0x, ramdisk load end = 0x
  ## device tree at 90008000 ... 9000a850 (len=22609 [0x5851])
 Loading Device Tree to 9fffa000, end 9850 ... OK
  Initial value for argc=3
  Final value for argc=3
  ## Transferring control to Linux (at address 8)...
  Starting kernel ...
  
  Synchronous Abort handler, esr 0x0200
 
 That ESR_ELx value means Unknown/uncategorized. It would be fantastic if
 U-Boot would tell us what EL it's branching to the kernel at as a matter
 of course -- it's not really possible to debug from logs otherwise.
 
 Which EL are you loading the kernel at?

So, this I suspect is one of the problems I was trying to describe to
you back at ELC which turned out to be loading things at the very wrong
address (0x8 rather than 0x8008).

Vishal, cay you apply:
http://patchwork.ozlabs.org/patch/345746/
http://patchwork.ozlabs.org/patch/345748/
http://patchwork.ozlabs.org/patch/345749/
http://patchwork.ozlabs.org/patch/345747/

I need to do a v2 still to address some feedback, and then also say we
require Mark's recent series to add an image size field (and other
cleanups) and make use of that (and the rest of the series
changes/clarifications).

But it should get you farther along.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Booting armv8 kernel on uboot

2014-05-21 Thread Mark Rutland
On Wed, May 21, 2014 at 04:28:53PM +0100, Tom Rini wrote:
 On Wed, May 21, 2014 at 10:40:38AM +0100, Mark Rutland wrote:
  On Wed, May 21, 2014 at 09:46:35AM +0100, Vishal Bhoj wrote:
   Hi ,
  
  Hi,
  
   I have added mmc driver into the vexpress64 board file for uboot and 
   tested
   it on FVP base model. I tried booting a kernel on that but it is aborting
   with the following message:
   Final value for argc=3
  Loading Kernel Image ... OK
  kernel loaded at 0x0008, end = 0x00827024
   using: FDT
  reserving fdt memory region: addr=8000 size=1
   ## initrd_high = 0x, copy_to_ram = 1
  ramdisk load start = 0x, ramdisk load end = 0x
   ## device tree at 90008000 ... 9000a850 (len=22609 
   [0x5851])
  Loading Device Tree to 9fffa000, end 9850 ... OK
   Initial value for argc=3
   Final value for argc=3
   ## Transferring control to Linux (at address 8)...
   Starting kernel ...
   
   Synchronous Abort handler, esr 0x0200
  
  That ESR_ELx value means Unknown/uncategorized. It would be fantastic if
  U-Boot would tell us what EL it's branching to the kernel at as a matter
  of course -- it's not really possible to debug from logs otherwise.
  
  Which EL are you loading the kernel at?
 
 So, this I suspect is one of the problems I was trying to describe to
 you back at ELC which turned out to be loading things at the very wrong
 address (0x8 rather than 0x8008).

That would certainly explain it. From the lines above stating that the
kernel had been loaded to 0x8 I assumed that memory had been
configured there.

 
 Vishal, cay you apply:
 http://patchwork.ozlabs.org/patch/345746/
 http://patchwork.ozlabs.org/patch/345748/
 http://patchwork.ozlabs.org/patch/345749/
 http://patchwork.ozlabs.org/patch/345747/
 
 I need to do a v2 still to address some feedback, and then also say we
 require Mark's recent series to add an image size field (and other
 cleanups) and make use of that (and the rest of the series
 changes/clarifications).

I'll try to get a v2 out on my series shortly, it'd be nice to have as
soon as possible. :)

Cheers,
Mark.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot