P1014: gcc 10.2: mtocrf instructions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

P1014: gcc 10.2: mtocrf instructions

Jump to solution
1,244 Views
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 Kudos
1 Solution
1,195 Views
renaud
Contributor IV

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

View solution in original post

Tags (1)
0 Kudos
5 Replies
1,210 Views
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 Kudos
1,196 Views
renaud
Contributor IV

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

Tags (1)
0 Kudos
1,218 Views
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 Kudos
1,236 Views
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 Kudos
1,089 Views
renaud
Contributor IV

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

0 Kudos