All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Booting armv8 kernel on uboot
@ 2014-05-21  8:46 Vishal Bhoj
  2014-05-21  9:40 ` Mark Rutland
  2014-05-22 14:26 ` fenghua at phytium.com.cn
  0 siblings, 2 replies; 20+ messages in thread
From: Vishal Bhoj @ 2014-05-21  8:46 UTC (permalink / raw)
  To: u-boot

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 0x00080000, end = 0x00827024
using: FDT
   reserving fdt memory region: addr=80000000 size=10000
## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
   ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
## device tree at 0000000090008000 ... 000000009000a850 (len=22609 [0x5851])
   Loading Device Tree to 000000009fffa000, end 000000009ffff850 ... OK
Initial value for argc=3
Final value for argc=3
## Transferring control to Linux (at address 80000)...
Starting kernel ...

"Synchronous Abort" handler, esr 0x02000000
ELR:     80000
LR:      fff90fc8
x0 : 000000009fffa000 x1 : 000000001c090000
x2 : 000000001c090000 x3 : 0000000000000020
x4 : 00000000fff6b834 x5 : 0000000000000000
x6 : 00000000fff6bb40 x7 : 00000000ffffffd0
x8 : 000000000000000f x9 : 000000007ff8e000
x10: 00000000fffb7188 x11: 0000000000000000
x12: 0000000000006000 x13: 0000000000000004
x14: 0000000000000003 x15: 00000000fffc7c20
x16: 0000000000000000 x17: 0000000000000000
x18: 00000000fff6beb8 x19: 0000000000080000
x20: 00000000fffc7a70 x21: 0000000000000000
x22: 0000000000000000 x23: 00000000fff6d8d8
x24: 0000000000000000 x25: 00000000fffc2630
x26: 0000000000000000 x27: 0000000080008000
x28: 0000000000000000 x29: 00000000fff6bb40

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.

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-21  8:46 [U-Boot] Booting armv8 kernel on uboot Vishal Bhoj
@ 2014-05-21  9:40 ` Mark Rutland
  2014-05-21 15:28   ` Tom Rini
  2014-05-22 14:26 ` fenghua at phytium.com.cn
  1 sibling, 1 reply; 20+ messages in thread
From: Mark Rutland @ 2014-05-21  9:40 UTC (permalink / raw)
  To: u-boot

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 0x00080000, end = 0x00827024
> using: FDT
>    reserving fdt memory region: addr=80000000 size=10000
> ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
>    ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
> ## device tree at 0000000090008000 ... 000000009000a850 (len=22609 [0x5851])
>    Loading Device Tree to 000000009fffa000, end 000000009ffff850 ... OK
> Initial value for argc=3
> Final value for argc=3
> ## Transferring control to Linux (at address 80000)...
> Starting kernel ...
> 
> "Synchronous Abort" handler, esr 0x02000000

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:     80000

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 : 000000009fffa000 x1 : 000000001c090000
> x2 : 000000001c090000 x3 : 0000000000000020

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 : 00000000fff6b834 x5 : 0000000000000000
> x6 : 00000000fff6bb40 x7 : 00000000ffffffd0
> x8 : 000000000000000f x9 : 000000007ff8e000
> x10: 00000000fffb7188 x11: 0000000000000000
> x12: 0000000000006000 x13: 0000000000000004
> x14: 0000000000000003 x15: 00000000fffc7c20
> x16: 0000000000000000 x17: 0000000000000000
> x18: 00000000fff6beb8 x19: 0000000000080000
> x20: 00000000fffc7a70 x21: 0000000000000000
> x22: 0000000000000000 x23: 00000000fff6d8d8
> x24: 0000000000000000 x25: 00000000fffc2630
> x26: 0000000000000000 x27: 0000000080008000
> x28: 0000000000000000 x29: 00000000fff6bb40
> 
> 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 at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-21  9:40 ` Mark Rutland
@ 2014-05-21 15:28   ` Tom Rini
  2014-05-21 15:34     ` Mark Rutland
  0 siblings, 1 reply; 20+ messages in thread
From: Tom Rini @ 2014-05-21 15:28 UTC (permalink / raw)
  To: u-boot

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 0x00080000, end = 0x00827024
> > using: FDT
> >    reserving fdt memory region: addr=80000000 size=10000
> > ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
> >    ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
> > ## device tree at 0000000090008000 ... 000000009000a850 (len=22609 [0x5851])
> >    Loading Device Tree to 000000009fffa000, end 000000009ffff850 ... OK
> > Initial value for argc=3
> > Final value for argc=3
> > ## Transferring control to Linux (at address 80000)...
> > Starting kernel ...
> > 
> > "Synchronous Abort" handler, esr 0x02000000
> 
> 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 (0x80000 rather than 0x80080000).

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140521/ad40c473/attachment.pgp>

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-21 15:28   ` Tom Rini
@ 2014-05-21 15:34     ` Mark Rutland
  2014-05-22  5:48       ` Vishal Bhoj
  0 siblings, 1 reply; 20+ messages in thread
From: Mark Rutland @ 2014-05-21 15:34 UTC (permalink / raw)
  To: u-boot

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 0x00080000, end = 0x00827024
> > > using: FDT
> > >    reserving fdt memory region: addr=80000000 size=10000
> > > ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
> > >    ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
> > > ## device tree at 0000000090008000 ... 000000009000a850 (len=22609 [0x5851])
> > >    Loading Device Tree to 000000009fffa000, end 000000009ffff850 ... OK
> > > Initial value for argc=3
> > > Final value for argc=3
> > > ## Transferring control to Linux (at address 80000)...
> > > Starting kernel ...
> > > 
> > > "Synchronous Abort" handler, esr 0x02000000
> > 
> > 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 (0x80000 rather than 0x80080000).

That would certainly explain it. From the lines above stating that the
kernel had been loaded to 0x80000 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.

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-21 15:34     ` Mark Rutland
@ 2014-05-22  5:48       ` Vishal Bhoj
  2014-05-22 12:39         ` Tom Rini
  0 siblings, 1 reply; 20+ messages in thread
From: Vishal Bhoj @ 2014-05-22  5:48 UTC (permalink / raw)
  To: u-boot

Hi,

Thanks for the inputs.


On 21 May 2014 21:04, Mark Rutland <mark.rutland@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 0x00080000, end = 0x00827024
> > > > using: FDT
> > > >    reserving fdt memory region: addr=80000000 size=10000
> > > > ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
> > > >    ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
> > > > ## device tree at 0000000090008000 ... 000000009000a850 (len=22609
> [0x5851])
> > > >    Loading Device Tree to 000000009fffa000, end 000000009ffff850 ...
> OK
> > > > Initial value for argc=3
> > > > Final value for argc=3
> > > > ## Transferring control to Linux (at address 80000)...
> > > > Starting kernel ...
> > > >
> > > > "Synchronous Abort" handler, esr 0x02000000
> > >
> > > 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 (0x80000 rather than 0x80080000).
>
> That would certainly explain it. From the lines above stating that the
> kernel had been loaded to 0x80000 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 0x80080000 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.
>

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-22  5:48       ` Vishal Bhoj
@ 2014-05-22 12:39         ` Tom Rini
  2014-05-22 13:07           ` Vishal Bhoj
  0 siblings, 1 reply; 20+ messages in thread
From: Tom Rini @ 2014-05-22 12:39 UTC (permalink / raw)
  To: u-boot

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.rutland@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 0x00080000, end = 0x00827024
> > > > > using: FDT
> > > > >    reserving fdt memory region: addr=80000000 size=10000
> > > > > ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
> > > > >    ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
> > > > > ## device tree at 0000000090008000 ... 000000009000a850 (len=22609
> > [0x5851])
> > > > >    Loading Device Tree to 000000009fffa000, end 000000009ffff850 ...
> > OK
> > > > > Initial value for argc=3
> > > > > Final value for argc=3
> > > > > ## Transferring control to Linux (at address 80000)...
> > > > > Starting kernel ...
> > > > >
> > > > > "Synchronous Abort" handler, esr 0x02000000
> > > >
> > > > 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 (0x80000 rather than 0x80080000).
> >
> > That would certainly explain it. From the lines above stating that the
> > kernel had been loaded to 0x80000 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 0x80080000 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,0x1c090000
consolelog=9 ?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140522/879f70c9/attachment.pgp>

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-22 12:39         ` Tom Rini
@ 2014-05-22 13:07           ` Vishal Bhoj
  0 siblings, 0 replies; 20+ messages in thread
From: Vishal Bhoj @ 2014-05-22 13:07 UTC (permalink / raw)
  To: u-boot

Hi,


On 22 May 2014 18:09, Tom Rini <trini@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.rutland@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 0x00080000, end = 0x00827024
> > > > > > using: FDT
> > > > > >    reserving fdt memory region: addr=80000000 size=10000
> > > > > > ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
> > > > > >    ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
> > > > > > ## device tree at 0000000090008000 ... 000000009000a850
> (len=22609
> > > [0x5851])
> > > > > >    Loading Device Tree to 000000009fffa000, end 000000009ffff850
> ...
> > > OK
> > > > > > Initial value for argc=3
> > > > > > Final value for argc=3
> > > > > > ## Transferring control to Linux (at address 80000)...
> > > > > > Starting kernel ...
> > > > > >
> > > > > > "Synchronous Abort" handler, esr 0x02000000
> > > > >
> > > > > 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 (0x80000 rather than 0x80080000).
> > >
> > > That would certainly explain it. From the lines above stating that the
> > > kernel had been loaded to 0x80000 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 0x80080000 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,0x1c090000
> consolelog=9 ?
>
That helps. I could get some logs. Here is the logs:
http://pastebin.com/eAjWDS8t

I see few things going wrong:
[    0.000000] GIC CPU mask not found - kernel will fail to boot.
----
[  113.978373] swapper/0[1]: undefined instruction: pc=ffffffc000088008
[  113.978454] Code: 00000000 00000000 d4000002 d65f03c0 (d4000003)
[  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: ffffffc07dc85440 ti: ffffffc07dc88000 task.ti:
ffffffc07dc88000
[  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
>

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-21  8:46 [U-Boot] Booting armv8 kernel on uboot Vishal Bhoj
  2014-05-21  9:40 ` Mark Rutland
@ 2014-05-22 14:26 ` fenghua at phytium.com.cn
  2014-05-22 16:36   ` Tom Rini
  2014-05-23  5:38   ` TigerLiu at via-alliance.com
  1 sibling, 2 replies; 20+ messages in thread
From: fenghua at phytium.com.cn @ 2014-05-22 14:26 UTC (permalink / raw)
  To: u-boot



> 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 0x00080000, end = 0x00827024
> using: FDT
>   reserving fdt memory region: addr=80000000 size=10000
> ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
>   ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
> ## device tree at 0000000090008000 ... 000000009000a850 (len=22609 [0x5851])
>   Loading Device Tree to 000000009fffa000, end 000000009ffff850 ... OK
> Initial value for argc=3
> Final value for argc=3
> ## Transferring control to Linux (at address 80000)...
> Starting kernel ...
> 
> "Synchronous Abort" handler, esr 0x02000000
> ELR:     80000
> LR:      fff90fc8
> x0 : 000000009fffa000 x1 : 000000001c090000
> x2 : 000000001c090000 x3 : 0000000000000020
> x4 : 00000000fff6b834 x5 : 0000000000000000
> x6 : 00000000fff6bb40 x7 : 00000000ffffffd0
> x8 : 000000000000000f x9 : 000000007ff8e000
> x10: 00000000fffb7188 x11: 0000000000000000
> x12: 0000000000006000 x13: 0000000000000004
> x14: 0000000000000003 x15: 00000000fffc7c20
> x16: 0000000000000000 x17: 0000000000000000
> x18: 00000000fff6beb8 x19: 0000000000080000
> x20: 00000000fffc7a70 x21: 0000000000000000
> x22: 0000000000000000 x23: 00000000fff6d8d8
> x24: 0000000000000000 x25: 00000000fffc2630
> x26: 0000000000000000 x27: 0000000080008000
> x28: 0000000000000000 x29: 00000000fff6bb40
> 
> 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

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-22 14:26 ` fenghua at phytium.com.cn
@ 2014-05-22 16:36   ` Tom Rini
  2014-05-22 16:55     ` Vishal Bhoj
  2014-05-26 13:45     ` fenghua at phytium.com.cn
  2014-05-23  5:38   ` TigerLiu at via-alliance.com
  1 sibling, 2 replies; 20+ messages in thread
From: Tom Rini @ 2014-05-22 16:36 UTC (permalink / raw)
  To: u-boot

On Thu, May 22, 2014 at 10:26:17PM +0800, fenghua at 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 0x00080000, end = 0x00827024
> > using: FDT
> >   reserving fdt memory region: addr=80000000 size=10000
> > ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
> >   ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
> > ## device tree at 0000000090008000 ... 000000009000a850 (len=22609 [0x5851])
> >   Loading Device Tree to 000000009fffa000, end 000000009ffff850 ... OK
> > Initial value for argc=3
> > Final value for argc=3
> > ## Transferring control to Linux (at address 80000)...
> > Starting kernel ...
> > 
> > "Synchronous Abort" handler, esr 0x02000000
> > ELR:     80000
> > LR:      fff90fc8
> > x0 : 000000009fffa000 x1 : 000000001c090000
> > x2 : 000000001c090000 x3 : 0000000000000020
> > x4 : 00000000fff6b834 x5 : 0000000000000000
> > x6 : 00000000fff6bb40 x7 : 00000000ffffffd0
> > x8 : 000000000000000f x9 : 000000007ff8e000
> > x10: 00000000fffb7188 x11: 0000000000000000
> > x12: 0000000000006000 x13: 0000000000000004
> > x14: 0000000000000003 x15: 00000000fffc7c20
> > x16: 0000000000000000 x17: 0000000000000000
> > x18: 00000000fff6beb8 x19: 0000000000080000
> > x20: 00000000fffc7a70 x21: 0000000000000000
> > x22: 0000000000000000 x23: 00000000fff6d8d8
> > x24: 0000000000000000 x25: 00000000fffc2630
> > x26: 0000000000000000 x27: 0000000080008000
> > x28: 0000000000000000 x29: 00000000fff6bb40
> > 
> > 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140522/8a8595a6/attachment.pgp>

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-22 16:36   ` Tom Rini
@ 2014-05-22 16:55     ` Vishal Bhoj
  2014-05-26 13:45     ` fenghua at phytium.com.cn
  1 sibling, 0 replies; 20+ messages in thread
From: Vishal Bhoj @ 2014-05-22 16:55 UTC (permalink / raw)
  To: u-boot

Hi,


On 22 May 2014 22:06, Tom Rini <trini@ti.com> wrote:

> On Thu, May 22, 2014 at 10:26:17PM +0800, fenghua at 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 0x00080000, end = 0x00827024
> > > using: FDT
> > >   reserving fdt memory region: addr=80000000 size=10000
> > > ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
> > >   ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
> > > ## device tree at 0000000090008000 ... 000000009000a850 (len=22609
> [0x5851])
> > >   Loading Device Tree to 000000009fffa000, end 000000009ffff850 ... OK
> > > Initial value for argc=3
> > > Final value for argc=3
> > > ## Transferring control to Linux (at address 80000)...
> > > Starting kernel ...
> > >
> > > "Synchronous Abort" handler, esr 0x02000000
> > > ELR:     80000
> > > LR:      fff90fc8
> > > x0 : 000000009fffa000 x1 : 000000001c090000
> > > x2 : 000000001c090000 x3 : 0000000000000020
> > > x4 : 00000000fff6b834 x5 : 0000000000000000
> > > x6 : 00000000fff6bb40 x7 : 00000000ffffffd0
> > > x8 : 000000000000000f x9 : 000000007ff8e000
> > > x10: 00000000fffb7188 x11: 0000000000000000
> > > x12: 0000000000006000 x13: 0000000000000004
> > > x14: 0000000000000003 x15: 00000000fffc7c20
> > > x16: 0000000000000000 x17: 0000000000000000
> > > x18: 00000000fff6beb8 x19: 0000000000080000
> > > x20: 00000000fffc7a70 x21: 0000000000000000
> > > x22: 0000000000000000 x23: 00000000fff6d8d8
> > > x24: 0000000000000000 x25: 00000000fffc2630
> > > x26: 0000000000000000 x27: 0000000080008000
> > > x28: 0000000000000000 x29: 00000000fff6bb40
> > >
> > > 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
>

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-22 14:26 ` fenghua at phytium.com.cn
  2014-05-22 16:36   ` Tom Rini
@ 2014-05-23  5:38   ` TigerLiu at via-alliance.com
  1 sibling, 0 replies; 20+ messages in thread
From: TigerLiu at via-alliance.com @ 2014-05-23  5:38 UTC (permalink / raw)
  To: u-boot

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
0xC000080000 -e 0xC000080000 -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"@0x08000000
--data=foundation-v8.dtb at 0x82000000 --data=uimage at 0x00080000

Then, got the same "Synchronous Abort" as Bhoj.

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

Best wishes,

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-22 16:36   ` Tom Rini
  2014-05-22 16:55     ` Vishal Bhoj
@ 2014-05-26 13:45     ` fenghua at phytium.com.cn
  2014-05-27 13:56       ` fenghua at phytium.com.cn
  1 sibling, 1 reply; 20+ messages in thread
From: fenghua at phytium.com.cn @ 2014-05-26 13:45 UTC (permalink / raw)
  To: u-boot


hi Tom,

> On Thu, May 22, 2014 at 10:26:17PM +0800, fenghua at 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 0x00080000, end = 0x00827024
>>> using: FDT
>>>  reserving fdt memory region: addr=80000000 size=10000
>>> ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
>>>  ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
>>> ## device tree at 0000000090008000 ... 000000009000a850 (len=22609 [0x5851])
>>>  Loading Device Tree to 000000009fffa000, end 000000009ffff850 ... OK
>>> Initial value for argc=3
>>> Final value for argc=3
>>> ## Transferring control to Linux (at address 80000)...
>>> Starting kernel ...
>>> 
>>> "Synchronous Abort" handler, esr 0x02000000
>>> ELR:     80000
>>> LR:      fff90fc8
>>> x0 : 000000009fffa000 x1 : 000000001c090000
>>> x2 : 000000001c090000 x3 : 0000000000000020
>>> x4 : 00000000fff6b834 x5 : 0000000000000000
>>> x6 : 00000000fff6bb40 x7 : 00000000ffffffd0
>>> x8 : 000000000000000f x9 : 000000007ff8e000
>>> x10: 00000000fffb7188 x11: 0000000000000000
>>> x12: 0000000000006000 x13: 0000000000000004
>>> x14: 0000000000000003 x15: 00000000fffc7c20
>>> x16: 0000000000000000 x17: 0000000000000000
>>> x18: 00000000fff6beb8 x19: 0000000000080000
>>> x20: 00000000fffc7a70 x21: 0000000000000000
>>> x22: 0000000000000000 x23: 00000000fff6d8d8
>>> x24: 0000000000000000 x25: 00000000fffc2630
>>> x26: 0000000000000000 x27: 0000000080008000
>>> x28: 0000000000000000 x29: 00000000fff6bb40
>>> 
>>> 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

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-26 13:45     ` fenghua at phytium.com.cn
@ 2014-05-27 13:56       ` fenghua at phytium.com.cn
  2014-05-28  4:44         ` TigerLiu at via-alliance.com
  0 siblings, 1 reply; 20+ messages in thread
From: fenghua at phytium.com.cn @ 2014-05-27 13:56 UTC (permalink / raw)
  To: u-boot


Dear Tom, Tiger, 

> 
> hi Tom,
> 
>> On Thu, May 22, 2014 at 10:26:17PM +0800, fenghua at 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 0x00080000, end = 0x00827024
>>>> using: FDT
>>>> reserving fdt memory region: addr=80000000 size=10000
>>>> ## initrd_high = 0xffffffffffffffff, copy_to_ram = 1
>>>> ramdisk load start = 0x00000000, ramdisk load end = 0x00000000
>>>> ## device tree at 0000000090008000 ... 000000009000a850 (len=22609 [0x5851])
>>>> Loading Device Tree to 000000009fffa000, end 000000009ffff850 ... OK
>>>> Initial value for argc=3
>>>> Final value for argc=3
>>>> ## Transferring control to Linux (at address 80000)...
>>>> Starting kernel ...
>>>> 
>>>> "Synchronous Abort" handler, esr 0x02000000
>>>> ELR:     80000
>>>> LR:      fff90fc8
>>>> x0 : 000000009fffa000 x1 : 000000001c090000
>>>> x2 : 000000001c090000 x3 : 0000000000000020
>>>> x4 : 00000000fff6b834 x5 : 0000000000000000
>>>> x6 : 00000000fff6bb40 x7 : 00000000ffffffd0
>>>> x8 : 000000000000000f x9 : 000000007ff8e000
>>>> x10: 00000000fffb7188 x11: 0000000000000000
>>>> x12: 0000000000006000 x13: 0000000000000004
>>>> x14: 0000000000000003 x15: 00000000fffc7c20
>>>> x16: 0000000000000000 x17: 0000000000000000
>>>> x18: 00000000fff6beb8 x19: 0000000000080000
>>>> x20: 00000000fffc7a70 x21: 0000000000000000
>>>> x22: 0000000000000000 x23: 00000000fff6d8d8
>>>> x24: 0000000000000000 x25: 00000000fffc2630
>>>> x26: 0000000000000000 x27: 0000000080008000
>>>> x28: 0000000000000000 x29: 00000000fff6bb40
>>>> 
>>>> 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 0x80080000 -e 0x80080000 -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          0x80000000 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 at 0x90000000 --data=u-boot.dtb at 0xa0000000 --cores=4

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

I did not test the rootfs yet.

Best regards,
David

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-27 13:56       ` fenghua at phytium.com.cn
@ 2014-05-28  4:44         ` TigerLiu at via-alliance.com
  2014-05-29 13:00           ` fenghua at phytium.com.cn
  0 siblings, 1 reply; 20+ messages in thread
From: TigerLiu at via-alliance.com @ 2014-05-28  4:44 UTC (permalink / raw)
  To: u-boot

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,

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-28  4:44         ` TigerLiu at via-alliance.com
@ 2014-05-29 13:00           ` fenghua at phytium.com.cn
  2014-06-04  4:31             ` Vishal Bhoj
  0 siblings, 1 reply; 20+ messages in thread
From: fenghua at phytium.com.cn @ 2014-05-29 13:00 UTC (permalink / raw)
  To: u-boot


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

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-05-29 13:00           ` fenghua at phytium.com.cn
@ 2014-06-04  4:31             ` Vishal Bhoj
  2014-06-04  9:35               ` Sudeep Holla
  0 siblings, 1 reply; 20+ messages in thread
From: Vishal Bhoj @ 2014-06-04  4:31 UTC (permalink / raw)
  To: u-boot

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, fenghua at phytium.com.cn <fenghua@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 at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

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

* [U-Boot] Booting armv8 kernel on uboot
  2014-06-04  4:31             ` Vishal Bhoj
@ 2014-06-04  9:35               ` Sudeep Holla
  0 siblings, 0 replies; 20+ messages in thread
From: Sudeep Holla @ 2014-06-04  9:35 UTC (permalink / raw)
  To: u-boot

On Wed, Jun 4, 2014 at 5:31 AM, Vishal Bhoj <vishal.bhoj@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
>

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

* [U-Boot] Booting armv8 Kernel on UBoot
@ 2016-07-21  5:14 Rajkumar Ramasamy
  0 siblings, 0 replies; 20+ messages in thread
From: Rajkumar Ramasamy @ 2016-07-21  5:14 UTC (permalink / raw)
  To: u-boot

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
    msr    cptr_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<rajkumar.r@samsung.com> 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 0x80080000
    "loaded file /home/shingu/workspace/linux/linux_mainline_aarch64/arch/arm64/boot/Image from 80080000 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 0x02000000
        ELR:     fef7caa4
        LR:      fef7d60c
        x0 : 00000000fe6fa820 x1 : 0000000000000000
        x2 : 00000000fef94a88 x3 : 0000000000000001
        x4 : 00000000fe6fa4e0 x5 : 0000000000000020
        x6 : ffffff80ffffffc8 x7 : 0000000000000000
        x8 : 00000000fe6fa6e0 x9 : 0000000000000002
        x10: 00000000fe6fa55b x11: 0000000000000002
        x12: 0000000000000002 x13: 00000000ffffffff
        x14: 0000000083006fff x15: 00000000fef7c8e4
        x16: 00000000fef7cb68 x17: 0000000000000000
        x18: 00000000fe6fae00 x19: 00000000fefb7b40
        x20: 0000000000000000 x21: 0000000080080000
        x22: 0000000000000003 x23: 00000000fe6fe058
        x24: 0000000000000000 x25: 00000000fefb0918
        x26: 0000000000000000 x27: 00000000fef7d6d8
        x28: 00000000fe6fe080 x29: 00000000fef7d5ec
        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

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

* [U-Boot] Booting armv8 Kernel on UBoot
@ 2016-07-21  4:11 Rajkumar Ramasamy
  0 siblings, 0 replies; 20+ messages in thread
From: Rajkumar Ramasamy @ 2016-07-21  4:11 UTC (permalink / raw)
  To: u-boot

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 0x80080000
    "loaded file /home/shingu/workspace/linux/linux_mainline_aarch64/arch/arm64/boot/Image from 80080000 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 0x02000000
        ELR:     fef7caa4
        LR:      fef7d60c
        x0 : 00000000fe6fa820 x1 : 0000000000000000
        x2 : 00000000fef94a88 x3 : 0000000000000001
        x4 : 00000000fe6fa4e0 x5 : 0000000000000020
        x6 : ffffff80ffffffc8 x7 : 0000000000000000
        x8 : 00000000fe6fa6e0 x9 : 0000000000000002
        x10: 00000000fe6fa55b x11: 0000000000000002
        x12: 0000000000000002 x13: 00000000ffffffff
        x14: 0000000083006fff x15: 00000000fef7c8e4
        x16: 00000000fef7cb68 x17: 0000000000000000
        x18: 00000000fe6fae00 x19: 00000000fefb7b40
        x20: 0000000000000000 x21: 0000000080080000
        x22: 0000000000000003 x23: 00000000fe6fe058
        x24: 0000000000000000 x25: 00000000fefb0918
        x26: 0000000000000000 x27: 00000000fef7d6d8
        x28: 00000000fe6fe080 x29: 00000000fef7d5ec
        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

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

* [U-Boot] Booting armv8 Kernel on UBoot
@ 2016-07-20 11:28 Rajkumar Ramasamy
  0 siblings, 0 replies; 20+ messages in thread
From: Rajkumar Ramasamy @ 2016-07-20 11:28 UTC (permalink / raw)
  To: u-boot

A non-text attachment was scrubbed...
Name: 201607201658540_4CBBEM6S.gif
Type: image/gif
Size: 13168 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160720/cd43cc4e/attachment.gif>

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

end of thread, other threads:[~2016-07-21  5:14 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-21  8:46 [U-Boot] Booting armv8 kernel on uboot Vishal Bhoj
2014-05-21  9:40 ` Mark Rutland
2014-05-21 15:28   ` Tom Rini
2014-05-21 15:34     ` Mark Rutland
2014-05-22  5:48       ` Vishal Bhoj
2014-05-22 12:39         ` Tom Rini
2014-05-22 13:07           ` Vishal Bhoj
2014-05-22 14:26 ` fenghua at phytium.com.cn
2014-05-22 16:36   ` Tom Rini
2014-05-22 16:55     ` Vishal Bhoj
2014-05-26 13:45     ` fenghua at phytium.com.cn
2014-05-27 13:56       ` fenghua at phytium.com.cn
2014-05-28  4:44         ` TigerLiu at via-alliance.com
2014-05-29 13:00           ` fenghua at phytium.com.cn
2014-06-04  4:31             ` Vishal Bhoj
2014-06-04  9:35               ` Sudeep Holla
2014-05-23  5:38   ` TigerLiu at via-alliance.com
2016-07-20 11:28 [U-Boot] Booting armv8 Kernel on UBoot Rajkumar Ramasamy
2016-07-21  4:11 Rajkumar Ramasamy
2016-07-21  5:14 Rajkumar Ramasamy

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.