P1014: gcc 10.2: mtocrf instructions

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

P1014: gcc 10.2: mtocrf instructions

跳至解决方案
2,367 次查看
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,318 次查看
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,333 次查看
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,319 次查看
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,341 次查看
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,359 次查看
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,212 次查看
renaud
Contributor IV

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

0 项奖励
回复