xen/arm: vpsci: Rework the logic to start AArch32 vCPU in Thumb mode
authorJulien Grall <julien.grall@arm.com>
Fri, 23 Feb 2018 18:57:29 +0000 (18:57 +0000)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 26 Feb 2018 22:59:09 +0000 (14:59 -0800)
commitcd8b749282475caef095ea2f339a01d1ff9714ae
tree7e8015526dbb8fe62d6c4dff5a8174f784f4c55c
parente7f46d6b9be02fc18ac9818c064fa8024828b606
xen/arm: vpsci: Rework the logic to start AArch32 vCPU in Thumb mode

32-bit domain is able to select the instruction (ARM vs Thumb) to use
when boot a new vCPU via CPU_ON. This is indicated via bit[0] of the
entry point address (see "T32 support" in PSCI v1.1 DEN0022D). bit[0]
must be cleared when setting the PC.

At the moment, Xen is setting the CPSR.T but never clear bit[0]. Clear
it to match the specification.

At the same time, slighlty rework the code to make clear thumb is only for
32-bit domain. Lastly, take the opportunity to switch is_thumb from int
to bool.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
xen/arch/arm/vpsci.c