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

In aarch32 state, what is the mechanism to switch to aarch64 in software?

Dear sirs,

I'm reading arm v8a specification. I found that when arm is in aarch32 state, only a few exceptions can switch to aarch64 depending on the configuration in the registers. the exceptions are as follows.

abort, physical async abort, physical FIQ and physical IRQ

while other exceptions are still processed in aarch32 state.

My questions are as follows.

Q1: Is my understanding correct?

Q2: If Q1 is yes, why these exceptions can be processed and others can not such as underfined instruction, svc, hvc?

Q3: What is the usage case for switch between aarch32 and aarch64?

In addition, exception return from higher exception level after reset can switch to aarch32, right?

cray

Parents
  • I found that when arm is in aarch32 state, only a few exceptions can switch to aarch64 depending on the configuration in the registers.

    That isn't strictly correct.  Any exception could potentially cause a change of Execution state.

    There are various reasons you might want to switch between the states.  A good example is a 64-bit OS, hosting a mix of 32-bit and 64-bit apps.

    If you are currently running one of the 32-bit apps and you take an exception (e.g. IRQ, SVC from a system call, abort from a page fault,....) you enter the 64-bit OS.  So a AArch32 --> AArch64 transition.  When the OS performs an exception return back into the app, that's an AArch64-->AArch32 transition.

Reply
  • I found that when arm is in aarch32 state, only a few exceptions can switch to aarch64 depending on the configuration in the registers.

    That isn't strictly correct.  Any exception could potentially cause a change of Execution state.

    There are various reasons you might want to switch between the states.  A good example is a 64-bit OS, hosting a mix of 32-bit and 64-bit apps.

    If you are currently running one of the 32-bit apps and you take an exception (e.g. IRQ, SVC from a system call, abort from a page fault,....) you enter the 64-bit OS.  So a AArch32 --> AArch64 transition.  When the OS performs an exception return back into the app, that's an AArch64-->AArch32 transition.

Children