diff options
author | Andre Przywara <andre.przywara@arm.com> | 2022-11-17 16:42:09 +0000 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2023-03-20 13:37:37 +0000 |
commit | ea735bf556f8768fd4c82a7b3c224b529aee057a (patch) | |
tree | c1d33d0cd74ed595f2e9fd8b4d96752c088ce6f3 /services | |
parent | 9448f2b88e4afcea5ef671211882f09e7f64f9df (diff) | |
download | arm-trusted-firmware-ea735bf556f8768fd4c82a7b3c224b529aee057a.tar.gz |
refactor(cpufeat): enable FEAT_VHE for FEAT_STATE_CHECKED
At the moment we only support FEAT_VHE to be either unconditionally
compiled in, or to be not supported at all.
Add support for runtime detection (ENABLE_FEAT_VHE=2), by splitting
is_armv8_1_vhe_present() into an ID register reading function and a
second function to report the support status. That function considers
both build time settings and runtime information (if needed), and is
used before we access VHE related registers.
Also move the context saving code from assembly to C, and use the new
is_feat_vhe_supported() function to guard its execution.
Enable VHE in its runtime detection version for all FVP builds.
Change-Id: Ib397cd0c83e8c709bd6fed603560e39901fa672b
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'services')
-rw-r--r-- | services/std_svc/sdei/sdei_intr_mgmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/std_svc/sdei/sdei_intr_mgmt.c b/services/std_svc/sdei/sdei_intr_mgmt.c index 87a1fb7dc..9862e4f8d 100644 --- a/services/std_svc/sdei/sdei_intr_mgmt.c +++ b/services/std_svc/sdei/sdei_intr_mgmt.c @@ -270,7 +270,7 @@ static void sdei_set_elr_spsr(sdei_entry_t *se, sdei_dispatch_context_t *disp_ct * HCR_EL2.E2H = 1 and HCR_EL2.TGE = 1 */ u_register_t hcr_el2 = read_hcr(); - bool el_is_in_host = is_armv8_1_vhe_present() && + bool el_is_in_host = (read_feat_vhe_id_field() != 0U) && (hcr_el2 & HCR_TGE_BIT) && (hcr_el2 & HCR_E2H_BIT); |