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

purpose of RSDIS in ACTLR ?

Hello,

What is the purpose of the RSDIS (Return Stack DISable) bit in ACTLR ?

What would be the consequence on code execution if set DISable ?

Is the software able to write this bit ?

Thanks for help

Parents
  • Thanks Yasuhiko,

    The answer is very clear.

    Note there is a discrepancy with the text in Cortex R5 TRM DDI0460D about stack pointer :

    "...When disabled, pushes onto the stack caused by call instructions are disabled and the stack pointer is frozen."

    Which document is right ?

    Best regards,

    Sylvain

Reply
  • Thanks Yasuhiko,

    The answer is very clear.

    Note there is a discrepancy with the text in Cortex R5 TRM DDI0460D about stack pointer :

    "...When disabled, pushes onto the stack caused by call instructions are disabled and the stack pointer is frozen."

    Which document is right ?

    Best regards,

    Sylvain

Children
  • Hi,

    I checked the  Cortex R5 TRM DDI0460D and found the same description in chapter 5.4 as "and the stack pointer is frozen".

    I cannot find any discrepancies.

    The stack pointer in the sentence "and the stack pointer is frozen" will be one of the return stack which holds the predicted return addresses.

    I am afraid you are thinking of the normal stack pointer which is denoted as R13.

    R13 and the return stack pointer are not equal registers.

    Best regards,

    Yasuhiko Koumoto.

  • Hi,

    I was comparing the DDI460D text to your first answer which quotes "...is not frozen" ( extract of ARM DDI 0363G).

    They are different : first one says frozen, second one sys not frozen

    I don't think this makes any difference in processor behavior but it remains the documents are not coherent.

    Best regards,

    Sylvain

  • Oh!,

    I'm sorry but I had been overlooked.

    I think that the return stack is not frozen for Cortex-R4 and is frozen for Cortex-R5.

    Anyway, it would not a big issue because the return stack pointer is invisible.

    Best regards,

    Yasuhiko Koumoto.

  • There are discrepancies between the two documents but in this case it is not an error. When RSDIS is set, the return address stack pointer behaves differently in Cortex-R4 and Cortex-R5. If you will notice, when the prediction is forced to a fixed direction (through the BP field in the ACTLR),  the global history table also behaves differently.