xen/arm: Rework HSCTLR_BASE
authorJulien Grall <julien.grall@arm.com>
Fri, 12 Apr 2019 23:00:47 +0000 (00:00 +0100)
committerJulien Grall <julien.grall@arm.com>
Sun, 16 Jun 2019 20:24:45 +0000 (21:24 +0100)
commit04c9a21c7a502d1d148bee4771c3790ed4d505a0
tree1bb1ee4e6da29994c693edaf19b314cad77cf391
parent1c908181a6ba1a54e01fbc903391903928c02d2c
xen/arm: Rework HSCTLR_BASE

The current value of HSCTLR_BASE for Arm64 is pretty wrong. It would
actually turn on SCTLR_EL2.nAA (bit 6) on hardware implementing
ARMv8.4-LSE.

Furthermore, the documentation of what is cleared/set in SCTLR_EL2 is
also not correct and looks like to be a verbatim copy from Arm32.

HSCTLR_BASE is replaced with a bunch of per-architecture new defines
helping to understand better what is the initial value for
SCTLR_EL2/HSCTLR.

Note the defines *_CLEAR are only used to check the state of each bits
are known.

Lastly, the documentation is dropped from arm{32,64}/head.S as it would
be pretty easy to get out-of-sync with the definitions.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrii Anisov <andrii.anisov@epam.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm32/head.S
xen/arch/arm/arm64/head.S
xen/include/asm-arm/processor.h