cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dnovick
Observer
Observer
4,160 Views
Registered: ‎06-16-2016

Cannot boot xilinx-linux (petalinux build) as secondary OS

Good Day,

 

I'm working on a project wherein I boot OP-TEE in the secure world, and then handoff the bring up to Linux. OP-TEE is booting fine as well as properly doing the handoff. However, Linux failis to boot.

 

I've honed in to the specific call chain and instruction the causes the fault:

 

 Call chaing: zynq_irq_init() -> zynq_early_slcr_init()-> regmap_update_bits()->regmap_mmio_read()->regmap_mmio_read32le().

  • Within regmap_mmio_read32le() there is a DSB SY instruction. This throws an exception and causes kernel panic.
  • If I disable zynq_early_slcr_init(), boot continues, but then fails on zynq_clock_init() with a “Unable to get I/O memory” error – clkc.c line 657 (line numbers may be slightly off due to some debug trace I’ve put in).

If I boot Linux as primary, I have no problems booting. 

 

I have attached two images: terminal01.jpg and terminal03.jpg. The first shows the boot trace (with msgs that I added) when zynq_early_slcr_init() is executed, the second when it is not (i.e. the failure happens in zynq_clock_init())

 

My suspicion is that OP-TEE is locking down access to a number of the MM registers, including the SLCR, to secure world access only. When Linux, running in the normal world tries to read or write from/to these registers, bad things happen. However, at this point, I haven't confirmed that.

 

I am wondering a few things;:

 

- Has anybody done a similar implementation before and encountered the same kinds of issues? If so, how were they addressed?

- Are there any petalinux configuration parameters that I have somehow missed that make this kind of boot config work properly?

 

This issue is pretty much my last thing to take care of before I have everything working. Any help would be extremely appreciated.

 

Thanks,

Dave

 

 

 

 

 

terminal01.jpg
terminal03.jpg
0 Kudos
5 Replies
dnovick
Observer
Observer
4,158 Views
Registered: ‎06-16-2016

Something I forgot to mention. I am already working with the author of the Zynq7000 port of OP-TEE on this issue.

0 Kudos
dnovick
Observer
Observer
4,134 Views
Registered: ‎06-16-2016

Another bit of information. The specific register access that is failing is the one performed by regmap_update_bits(zynq_slcr_regmap, SLCR_L2C_RAM, 0x70707, 0x20202), in response to AR#54190 design advisory. This is part of L2 cache setup. If I remove this step, the L2 cache appears to be setup fine...but I get a similar error on another register access downstream.

 

0 Kudos
sarawell
Newbie
Newbie
3,109 Views
Registered: ‎07-02-2017

hi dnovick

  I am also trying to boot OP-TEE and Linux (provided in xilinx github). Now, I have boot OP-TEE, but can not switch to normal world boot. The log shows OP_TEE have initialized and switched to normal world, but no output from Linux.

DEBUG:   [0x0] TEE-CORE:init_primary_helper:585: Primary CPU switching to normal world boot

I find you have boot linux successfully, but occurs some problems during booting. I have tried a lot, but  it  also failed.

Can you tell me the method that using OP-TEE to boot linux?

Else, I use U-Boot to boot OP-TEE.

Can you give me some help.

Thanks

Jiang

0 Kudos
Anonymous
Not applicable
2,494 Views

Did you get anywhere with this? I am having the exact same problem!

0 Kudos
yamak
Visitor
Visitor
106 Views
Registered: ‎11-05-2018

Did you solve this problem. I have encountered same problem. I couldn't find any solution

0 Kudos