Page MenuHomePhabricator

BL31 el3_exit is marked as function
Open, Needs TriagePublic


When compiling bl31 the el3_exit (lib/el3_runtime/aarch64/context.S) is created using the func macro.
As stated in the header of the func macro it must only be used for functions complying a C-ABI.
Afaik there is no way to specify in the cfi that a function will return to a different ELx ...
Anyway, debug solutions on the market are able to calculate the backtrace down to the lower EL. This is suppressed by creating explicit cfi information RET=X30/LR.

My suggestion is to remove the wrong unwinding information.

Event Timeline

Hi @userid0x0

This makes sense to me. Would you mind preparing a patch that removes the func macro on el3_exit and post it on ?

I can try end of the week. Thanks.

Hi @sandrine-bailleux-arm
Ok, In order to safe iterations.
I plan to suggest a new macro which does the followin

  • creates a new section - as func does
  • sets the alginment - as func does
  • sets the type
  • together with the counterpart end??? is sets the .size

. Proposals for names

  • func_noabi/endfunc_noabi - a non-abi conformant function
  • asmfunc/endasmfunc - a assembly routine/function
  • sym/endsym - short, but the name does not imply that it actually creates a block of code/own section
  • ...

Hi @userid0x0

OK. Regarding naming suggestions, I like func_noabi/endfunc_noabi the most. The reason why I am discounting asmfunc/endasmfunc is because a function implemented in assembly language might still respect the ABI.
I suggest we start with func_noabi/endfunc_noabi and continue the discussion on the patch on Gerrit. Unfortunately, this ticketing system does not have the same visibility as Gerrit or the mailing list and not everyone subscribe to these.