This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Porting code from Cortex-A9 to Cortex-A57

Hi,

I have been using I.MX6Q Sabre sd board (cortex-a9 ). I build image with my own start script and ld script. The image was loaded with u-boot. Now i would like to do the Same with Renesas R-Car M3(cortex A-57). How would i go about this? Can i use the same startup code for this?  

I have read that -"ARMv8 supports two execution states: AArch32, in which the A32 and T32 instruction sets (ARM and Thumb in ARMv7-A) are supported and AArch64, in which the new A64 instruction set is introduced". If i run my startup code in Aarch32 mode, Will it work? What all changes should i be concentrating onto make it run?

Please Help..

 

Regards,

Ajeesh 

  • Hi Ajeesh,

    The short answer is, mostly, yes. :)

    There are a few processor specific settings that are slightly different due to different cache availability (A57 has a built in L2 etc.) and settings to enable coherency but these are minor.

    The bigger problem you might face is processor state at boot, which can be either AArch32 or AArch64. A57 allows this to be configured in HW and many platforms expose a config through a system controller that lets the end user configure this - I don't know if your part allows this.

    If the A57 is fixed to boot into AArch64 then you will need some initial 64bit boot code to reconfigure the system into AArch32 first.

    Pete
  • Hi Peter,
    Thanks For the reply.
    But what about the processor modes we use in the assembly. I have set seen the stack being set for each individual processor modes. Do we have the same modes in Cortex A57(Armv8)?
    Best Regards,
    Ajmal
  • In 32bit mode (AArch32) you will need to set independent SPs etc. per mode as in v7.

    In 64bit mode (AArch64) then you don't need to, all of kernel space (EL1) is one "mode" so has one (-ish) stack pointer.