P1014: gcc 10.2: mtocrf instructions

cancel
Showing results for 
Search instead for 
Did you mean: 

P1014: gcc 10.2: mtocrf instructions

Jump to solution
84 Views
renaud
Contributor II
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
35 Views
renaud
Contributor II

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
4 Replies
50 Views
Pavel
NXP TechSupport
NXP TechSupport

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
36 Views
renaud
Contributor II

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
58 Views
renaud
Contributor II

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
76 Views
Pavel
NXP TechSupport
NXP TechSupport

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