LS1021a Sec: Job ring access from normal world

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LS1021a Sec: Job ring access from normal world

ソリューションへジャンプ
1,475件の閲覧回数
vsiles
Senior Contributor I

I'm working with a LS1021a board, and using the ls1021atwr target of NXP's SDK 1.9. In this setup, U-boot is compiled in SPL mode, and both SPL and u-boot are run in the Secure World. The switch from Secure to Normal is done by u-boot just prior to call Linux entry point.

My goal is to switch from Secure to Normal priori to start u-boot, so I have to patch a couple places (timer_init and csu initialization for example) to be sure u-boot can run correctly in normal mode. I'm stuck with sec_init (in drivers/crypto/fsl/jr.c) which is used to initialize the RNG.

From what I can observe using printfs, all the values used to program the Job Ring are exactly the same as a valid execution in Secure world, but at some point, the code goes to instantiate_rng -> run_descriptor_jr_idx  where a job is enqueued and then dequeued. In a valid execution, I enter jr_enqueue and jr_dequeue, and they are both successful. In an execution in the Normal world, jr_enqueue is successful but jr_dequeue isn't, it's like the job is never done, or discarded.

From what I gather from the SEC documentation and the values used in u-boot, I think I should be able to enqueue job from the Normal World, but maybe I missed something.

Could anyone help me to understand how to configure the RNG from the Normal world, or point out why it is not possible and what part needs to be perform in the Secure world ?

Best,

Vincent

ラベル(1)
0 件の賞賛
返信
1 解決策
1,190件の閲覧回数
vsiles
Senior Contributor I

Hi ! In the end the issue was not at all a SEC/CAAM issue: my kernel (which is running in between SPL and u-boot, as secure), was setting the ACTLR.SMP bit, to enable caching. With ACTLR.SMP bit set to 1, u-boot doesn't seem to work properly.

For now, I just leave it that way, I'll investigate why later.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,191件の閲覧回数
vsiles
Senior Contributor I

Hi ! In the end the issue was not at all a SEC/CAAM issue: my kernel (which is running in between SPL and u-boot, as secure), was setting the ACTLR.SMP bit, to enable caching. With ACTLR.SMP bit set to 1, u-boot doesn't seem to work properly.

For now, I just leave it that way, I'll investigate why later.

0 件の賞賛
返信