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

How to switch from default aarch32 to aarch64?

Hello everyone.

I use Cortex-A55(64bit), but the default is 32bit(aarch32), so ARM starts with 32bit mode at booting time.

The following is our booting process what I want.

BootROM(32bit) -> Bootloader(32bit -> 64bit) -> Linux(64bit)

I'd like to switch the 32bit mode to 64bit mode in bootloader level.

Regards,

Demiahn

Parents
  • What you described could be tricky, depending on exactly how the firmware pieces you mentioned are implemented.  

    In Armv8/9-A there's a basic rule: an AArch64 entity can host AArch32 children, but not the other way round.  Meaning, for example, that an AArch64 hypervisor can host AArch32 VMs.  But an AArch32 hypervisor cannot host AArch64 VMs.

    For a fuller description see here: developer.arm.com/.../Execution-and-Security-states

    If the BootROM and/or Bootloader are running at a higher Exception level than where you want to run the OS, you've got a problem (because of the above mentioned rule).  You'd either have to change the BootROM/BootLoader, or move up even higher in the boot chain until you got back to something using AArch64.

    If the Cortex-A55 is coming out of reset in AArch32, then you won't be able to enter AArch64 without a reset. For Cortex processors that support both Execution states, the one at reset is controlled by a signal;

    https://developer.arm.com/documentation/100453/0401/functional-description/clocks-and-resets/resets?lang=en

    So, if the core is coming out of reset in AArch32 - then you need to find how that signal is controlled on your SoC.  That might be something like a system control processor (a small management MCU) that drives it for example.

    If the processor is coming out of reset in AArch64, but the BootLoader/BootROM is switching to AArch32 - then you'll probably need to tweak the software

Reply
  • What you described could be tricky, depending on exactly how the firmware pieces you mentioned are implemented.  

    In Armv8/9-A there's a basic rule: an AArch64 entity can host AArch32 children, but not the other way round.  Meaning, for example, that an AArch64 hypervisor can host AArch32 VMs.  But an AArch32 hypervisor cannot host AArch64 VMs.

    For a fuller description see here: developer.arm.com/.../Execution-and-Security-states

    If the BootROM and/or Bootloader are running at a higher Exception level than where you want to run the OS, you've got a problem (because of the above mentioned rule).  You'd either have to change the BootROM/BootLoader, or move up even higher in the boot chain until you got back to something using AArch64.

    If the Cortex-A55 is coming out of reset in AArch32, then you won't be able to enter AArch64 without a reset. For Cortex processors that support both Execution states, the one at reset is controlled by a signal;

    https://developer.arm.com/documentation/100453/0401/functional-description/clocks-and-resets/resets?lang=en

    So, if the core is coming out of reset in AArch32 - then you need to find how that signal is controlled on your SoC.  That might be something like a system control processor (a small management MCU) that drives it for example.

    If the processor is coming out of reset in AArch64, but the BootLoader/BootROM is switching to AArch32 - then you'll probably need to tweak the software

Children
No data