Immediate runtime exception in BL31

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

Immediate runtime exception in BL31

ソリューションへジャンプ
1,986件の閲覧回数
minersrevolt
Contributor III

I have a custom board built around the S32G3. I am attempting to get into U-Boot. I can successfully load into BL2 and complete execution of that entire codebase. As soon as it goes into BL31 I get a runtime exception @ 0xff6000424. 

Adding a breakpoint at the start of bl31_main.c the application will immediately crash and go here.

Any idea why this might be the case?

0 件の賞賛
返信
1 解決策
1,929件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

For what I can see, the address to load the BL31 is defined in bl31/bl31.ld.S, as BL31_BASE

alejandro_e_0-1726086946883.png

this comes from the following nested definitions:

plat/nxp/s32/s32cc/include/s32cc_platform_def.h:134:#define BL31_BASE (S32_PMEM_START)
plat/nxp/s32/s32cc/include/s32cc_platform_def.h:129:#define S32_PMEM_START (S32_PMEM_END - S32_PMEM_LEN + 1)
plat/nxp/s32/s32cc/include/s32cc_platform_def.h:127:#define S32_PMEM_END (BL33_BASE - 1)
plat/nxp/s32/s32cc/include/s32cc_platform_def.h:112:#define BL33_BASE (S32_DDR0_END - S32_BL33_IMAGE_SIZE - \
plat/nxp/s32/s32cc/include/s32cc_platform_def.h:94:#define S32_DDR0_END 0xffffffff

 

note that this last definition depends on S32_PLATFORM_DDR0_END

alejandro_e_1-1726087186168.png

 

It could be that the top of your ram does not match address 0xffffffff and this is generating the problem. You could define your own S32_PLATFORM_DDR0_END to match your RAM addresses, this in turn, would change S32_DDR0_END as you can see in the image above.

 

Let me know if this information was useful

元の投稿で解決策を見る

3 返答(返信)
1,952件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @minersrevolt ,

We are unable to provide full support for custom designs through this channel. With that said, to be able to help you I need to know if you are using an specific BSP version as base to setup your system or are you using the latest components available in the nxp-auto-linux GitHub? 

I can also recommend to post your problem in the arm community since it is related to the arm trusted firmware.

0 件の賞賛
返信
1,947件の閲覧回数
minersrevolt
Contributor III

I am using the bsp40.0-2.5 release of the arm-trusted firmware. Additionally the BL2 loads BL31 at 0xff600000 but cannot find in the AT-F code base where this is called out. Simply a single define for a board that I am not using anywhere. 

0 件の賞賛
返信
1,930件の閲覧回数
alejandro_e
NXP TechSupport
NXP TechSupport

For what I can see, the address to load the BL31 is defined in bl31/bl31.ld.S, as BL31_BASE

alejandro_e_0-1726086946883.png

this comes from the following nested definitions:

plat/nxp/s32/s32cc/include/s32cc_platform_def.h:134:#define BL31_BASE (S32_PMEM_START)
plat/nxp/s32/s32cc/include/s32cc_platform_def.h:129:#define S32_PMEM_START (S32_PMEM_END - S32_PMEM_LEN + 1)
plat/nxp/s32/s32cc/include/s32cc_platform_def.h:127:#define S32_PMEM_END (BL33_BASE - 1)
plat/nxp/s32/s32cc/include/s32cc_platform_def.h:112:#define BL33_BASE (S32_DDR0_END - S32_BL33_IMAGE_SIZE - \
plat/nxp/s32/s32cc/include/s32cc_platform_def.h:94:#define S32_DDR0_END 0xffffffff

 

note that this last definition depends on S32_PLATFORM_DDR0_END

alejandro_e_1-1726087186168.png

 

It could be that the top of your ram does not match address 0xffffffff and this is generating the problem. You could define your own S32_PLATFORM_DDR0_END to match your RAM addresses, this in turn, would change S32_DDR0_END as you can see in the image above.

 

Let me know if this information was useful

%3CLINGO-SUB%20id%3D%22lingo-sub-1951427%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBL31%20%E3%81%AE%E5%8D%B3%E6%99%82%E3%83%A9%E3%83%B3%E3%82%BF%E3%82%A4%E3%83%A0%E4%BE%8B%E5%A4%96%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1951427%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E7%A7%81%E3%81%AFS32G3%E3%82%92%E4%B8%AD%E5%BF%83%E3%81%AB%E6%A7%8B%E7%AF%89%E3%81%95%E3%82%8C%E3%81%9F%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%9C%E3%83%BC%E3%83%89%E3%82%92%E6%8C%81%E3%81%A3%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82U-Boot%E3%81%AB%E5%85%A5%E3%82%8D%E3%81%86%E3%81%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82BL2%E3%81%AB%E6%AD%A3%E5%B8%B8%E3%81%AB%E3%83%AD%E3%83%BC%E3%83%89%E3%81%97%E3%80%81%E3%81%9D%E3%81%AE%E3%82%B3%E3%83%BC%E3%83%89%E3%83%99%E3%83%BC%E3%82%B9%E5%85%A8%E4%BD%93%E3%81%AE%E5%AE%9F%E8%A1%8C%E3%82%92%E5%AE%8C%E4%BA%86%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-auto-linux%2Farm-trusted-firmware%2Fblob%2Frelease%2Fbsp40.0-2.5%2Fbl31%2Fbl31_main.c%23L105%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EBL31%3C%2FA%3E%E3%81%AB%E5%85%A5%E3%82%8B%E3%81%A8%E3%81%99%E3%81%90%E3%81%AB%E3%80%81%E3%83%A9%E3%83%B3%E3%82%BF%E3%82%A4%E3%83%A0%E4%BE%8B%E5%A4%96%40%200xff6000424%E3%81%8C%E7%99%BA%E7%94%9F%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3Ebl31_main.c%20%E3%81%AE%E5%85%88%E9%A0%AD%E3%81%AB%E3%83%96%E3%83%AC%E3%83%BC%E3%82%AF%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88%E3%82%92%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AF%E3%81%99%E3%81%90%E3%81%AB%E3%82%AF%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%81%97%E3%80%81%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-auto-linux%2Farm-trusted-firmware%2Fblob%2Frelease%2Fbsp40.0-2.5%2Fbl31%2Faarch64%2Fruntime_exceptions.S%23L308%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%E3%81%93%E3%81%93%3C%2FA%3E%E3%81%AB%E7%A7%BB%E5%8B%95%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%AA%E3%81%9C%E3%81%93%E3%82%8C%E3%81%8C%E5%BD%93%E3%81%A6%E3%81%AF%E3%81%BE%E3%82%8B%E3%81%AE%E3%81%8B%E4%BD%95%E3%81%8B%E8%80%83%E3%81%88%E3%81%AF%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1952520%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E6%97%A5%E6%99%82%3ABL31%E3%81%AE%E5%8D%B3%E6%99%82%E3%83%A9%E3%83%B3%E3%82%BF%E3%82%A4%E3%83%A0%E4%BE%8B%E5%A4%96%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1952520%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Earm-trusted%20%E3%83%95%E3%82%A1%E3%83%BC%E3%83%A0%E3%82%A6%E3%82%A7%E3%82%A2%E3%81%AE%20bsp40.0-2.5%20%E3%83%AA%E3%83%AA%E3%83%BC%E3%82%B9%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%81%95%E3%82%89%E3%81%AB%E3%80%81BL2%20%E3%81%AF%200xff600000%20%E3%81%A7%20BL31%20%E3%82%92%E3%83%AD%E3%83%BC%E3%83%89%E3%81%97%E3%81%BE%E3%81%99%E3%81%8C%E3%80%81%E3%81%93%E3%82%8C%E3%81%8C%E5%91%BC%E3%81%B3%E5%87%BA%E3%81%95%E3%82%8C%E3%82%8B%20AT-F%20%E3%82%B3%E3%83%BC%E3%83%89%20%E3%83%99%E3%83%BC%E3%82%B9%E3%81%A7%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%E7%A7%81%E3%81%8C%E3%81%A9%E3%81%93%E3%81%AB%E3%82%82%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%81%84%E3%81%AA%E3%81%84%E3%83%9C%E3%83%BC%E3%83%89%E3%81%AE%E5%8D%98%E3%81%AA%E3%82%8B%E5%8D%98%E4%B8%80%E3%81%AE%E5%AE%9A%E7%BE%A9%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E