]> xenbits.xensource.com Git - xen.git/commit
xen/arm32: entry: Document the purpose of r11 in the traps handler
authorJulien Grall <julien.grall@linaro.org>
Fri, 2 Feb 2018 14:19:25 +0000 (14:19 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 19 Feb 2018 22:16:40 +0000 (14:16 -0800)
commit9d534c12bf71babb76f1338029841f757191f729
treeacb3c1f03b97b1dd97f56b98a9e4b76819589b7c
parentdbb3553130241ae99d444a6a08b7dc32ce90a272
xen/arm32: entry: Document the purpose of r11 in the traps handler

It took me a bit of time to understand why __DEFINE_TRAP_ENTRY is
storing the original stack pointer in r11. It is working in pair with
return_traps_entry where sp will be restored from r11.

This is fine because per the AAPCS r11 must be preserved by the
subroutine. So in return_from_trap, r11 will still contain the original
stack pointer.

Add some documentation in the code to point the 2 sides to each other.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
(cherry picked from commit dd855aa430f2da9b677c145f0c625a82aaa97110)
xen/arch/arm/arm32/entry.S