public inbox for u-boot@lists.denx.de
 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
@ 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
* [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-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

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
  -- strict thread matches above, loose matches on Subject: below --
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox