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
  • To further expand on Martin's response, for the synchronous exceptions this "interworking" layer exists before the pseudocode function for taking the exception (TakeXXXException). So functions like AArch32.Abort and AArch32.CallSupervisor as in Martin's examples. For the asynchronous exceptions there is a layer of implied pseudocode that is not in the manual. This for instance includes the checks whether the asynchronous exception is masked. However, since this layer of code does not appear in the manual, the route_to_aarch64 is included in the TakeXXXException() function. So it is there for the asynchronous exceptions, but not the synchronous ones.

Reply
  • To further expand on Martin's response, for the synchronous exceptions this "interworking" layer exists before the pseudocode function for taking the exception (TakeXXXException). So functions like AArch32.Abort and AArch32.CallSupervisor as in Martin's examples. For the asynchronous exceptions there is a layer of implied pseudocode that is not in the manual. This for instance includes the checks whether the asynchronous exception is masked. However, since this layer of code does not appear in the manual, the route_to_aarch64 is included in the TakeXXXException() function. So it is there for the asynchronous exceptions, but not the synchronous ones.

Children
  • Dear Martin and Michael,

    Thanks very much for your response. This question troubled me for a long time. The architecture manual is so long that I have not read all of it.

    I should dig into it to find more information. Now I'm very happy to get the right answer.

    cray