cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
steven.starnes
Visitor
Visitor
1,677 Views
Registered: ‎05-18-2018

Bootgen 2018.2 exception level is incorrect

Jump to solution

Hello,

 

I appear to have an issue when creating a boot image via bootgen. 

 

the_ROM_image:
{
   [bootloader, destination_cpu = a53-0]FSBL.elf
   [destination_device=pl]bitStream.bit
   [pmufw_image]pmufw.elf
   [destination_cpu = a53-0, exception_level = el-2]app.elf
}

I generate the boot image via command line and it all runs fine and I flash the image. However whenever I attach to the process and debug from the XSDK the application is running at EL3. It appears the FSBL isn't reading the exception_level parameter and adjusting before launching. Let me know if I need to do something else.

 

0 Kudos
1 Solution

Accepted Solutions
gudishak
Moderator
Moderator
1,630 Views
Registered: ‎06-27-2017

Hi @steven.starnes,

 

bl31.elf(ATF) proivides interfaces to application/OS to run/execute the secure instructsions or access the secure region.

So once you boot bl31 then it expects calls from Application/OS to run by its services. May be thats why it is able to run in EL3 without bl31. Once you load bl31 it expects application will run in EL0/1 and use its services.

 

Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

View solution in original post

4 Replies
gudishak
Moderator
Moderator
1,645 Views
Registered: ‎06-27-2017

Image result for arm exception levels

EL3 is only to run ARM trusted applications. EL0/1 are for general applications.

As you are debugging application, ARM core will run in EL3.

 

Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
steven.starnes
Visitor
Visitor
1,636 Views
Registered: ‎05-18-2018

@gudishak Thank you for the response! So the underlying issue I am having is that if I load a BL31.elf before my app.elf the exception level doesn't change to what my application needs it to be to boot. See below for the bif file:

 

the_ROM_image:
{
   [bootloader, destination_cpu = a53-0]FSBL.elf
   [destination_device=pl]bitStream.bit
   [pmufw_image]pmufw.elf
[destination_cpu = a53-0,exception_level=el-3,trustzone]bl31.elf [destination_cpu = a53-0, exception_level = el-3]app.elf }

The app.elf was built using the XSDK bsp 2018.2 which requires the exception level to be at 3 or 1 and my app.elf needs to run at EL3. I thought that since I put the  exception_level to be set to el-3 the boot loader would set the exception level before handing execution to my application. However, while debugging I noticed my application is executing at exception level 0 not 3. If I remove the bl31.elf from the bif file the application runs fine.

 

 

0 Kudos
gudishak
Moderator
Moderator
1,631 Views
Registered: ‎06-27-2017

Hi @steven.starnes,

 

bl31.elf(ATF) proivides interfaces to application/OS to run/execute the secure instructsions or access the secure region.

So once you boot bl31 then it expects calls from Application/OS to run by its services. May be thats why it is able to run in EL3 without bl31. Once you load bl31 it expects application will run in EL0/1 and use its services.

 

Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.

View solution in original post

steven.starnes
Visitor
Visitor
1,624 Views
Registered: ‎05-18-2018

@gudishak Okay that makes sense then. Thank you for your help!

0 Kudos