P1014: gcc 10.2: mtocrf instructions

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

P1014: gcc 10.2: mtocrf instructions

ソリューションへジャンプ
2,371件の閲覧回数
renaud
Contributor IV
We have a PPC P1014 based board that runs Linux 5.9 or 5.11 built with gcc 9.3.0. When building with gcc 10.2.0, the system does not start. Using a BDI3000, i trace the exception to the assembly instruction mtocrf i nthe function fdt_next_node: 03037bc: 7c 08 03 a6 mtlr r0 c03037c0: 83 e1 00 2c lwz r31,44(r1) c03037c4: 7d 90 81 20 mtocrf 8,r12 With gcc 9.3.0, the instructions is mtcrf. I read from the https://www.nxp.com/files-static/32bit/doc/ref_manual/EREF_RM.pdf manual mtocrf can be an illegal instruction to some CPUs. Is there a way to prevent the compiler from using this newer instructions? Cheers
0 件の賞賛
返信
1 解決策
2,322件の閲覧回数
renaud
Contributor IV

I found that when not using the flash -mcpu=8540, the mtcrf instructions is used instead and the kernel boots.

元の投稿で解決策を見る

タグ(1)
0 件の賞賛
返信
5 返答(返信)
2,337件の閲覧回数
Pavel
NXP Employee
NXP Employee

The P1014 core is e500v2.

 

See the E500 Core Reference Manual:

https://www.nxp.com/docs/en/reference-manual/E500CORERM.pdf

 

This manual does not have information about problem for using the mtcrtf instruction.

0 件の賞賛
返信
2,323件の閲覧回数
renaud
Contributor IV

I found that when not using the flash -mcpu=8540, the mtcrf instructions is used instead and the kernel boots.

タグ(1)
0 件の賞賛
返信
2,345件の閲覧回数
renaud
Contributor IV

I noticed that when I build our boot loader with gcc 10.2.0, the instruction used is mtcrf not mtocrf.

So I wonder it it is a gcc argument that control its use.

0 件の賞賛
返信
2,363件の閲覧回数
Pavel
NXP Employee
NXP Employee

NXP offers SDK 1.9 for the P1010RDB board. Linux kernel of this SDK is 3.12.37. This SDK provides toolchain for application building.

 

NXP offers also CodeWarrior for Linux application building:

https://www.nxp.com/design/software/development-software/codewarrior-development-tools/codewarrior-n...

 

See also the following pages about using CodeWarrior for Linux kernel debugging:

https://community.nxp.com/t5/CodeWarrior-for-QorIQ/Linux-Kernel-Debugging/td-p/226107

 

https://www.nxp.com/docs/en/user-guide/EPPCELINUXUG.pdf

 

https://www.nxp.com/docs/en/application-note/AN5001.pdf

0 件の賞賛
返信
2,216件の閲覧回数
renaud
Contributor IV

Upsteam gcc has posted a patch which will did not make it to gcc 11 but will come later.

0 件の賞賛
返信