| commit | 4f1880ca464d531dfe17a2892e24486859cadb5e | [log] [tgz] |
|---|---|---|
| author | Jens Wiklander <jens.wiklander@linaro.org> | Wed Oct 19 17:00:14 2022 +0200 |
| committer | Olivier Deprez <olivier.deprez@arm.com> | Wed Dec 14 12:31:16 2022 +0100 |
| tree | bb5e1a11033e869d2d2d4fc72f03c08943a1fb3f | |
| parent | 6f921599b88ddd2910bd28ea7991f86dce98d3a3 [diff] |
feat(mm): fix FEAT_LPA workaround
In commit da72173c3721 ("feat(mm): handle 52-bit PA (FEAT_LPA/2) as
48-bit.") the PA size is downgraded to 48 bits if a 52-bit PA
configuration is found. However, this isn't enough, for complete
downgrade the tcr_el2.ps field must be updated accordingly. So fix this
by setting tcr_el2.ps to 0x5 when downgrading to 48-bit PA size.
Introduce arch_mm_get_pa_range which returns the pa range index as read
from the ID register and arch_mm_get_pa_bits converting the index to the
implemented physical address size in bits. The 48 bits restriction when
FEAT_LPA is implemented is localized to arch_mm_get_pa_range.
Fix an issue with TCR_EL2 when VHE is implemented, where the physical
address size is forced to 40 bits.
Fixes: da72173c3721 ("feat(mm): handle 52-bit PA (FEAT_LPA/2) as 48-bit.")
Reported-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: Ibd1a5fdf4f0d6d7b0b5e5b4ed588a12a1c97e76e
Hafnium is a hypervisor, initially supporting aarch64 (64-bit Armv8 CPUs).
Get in touch and keep up-to-date at hafnium@lists.trustedfirmware.org. See feature requests and bugs on our bug dashboard.
To jump in and build Hafnium, follow the getting started instructions.
If you want to contribute to the project, see details of how we accept contributions.
More documentation is available on: