diff options
author | johpow01 <john.powell@arm.com> | 2021-08-04 19:38:18 -0500 |
---|---|---|
committer | John <john.powell@arm.com> | 2021-09-27 17:07:52 +0200 |
commit | cb4ec47b5c73e04472984acf821e6be41b98064f (patch) | |
tree | 2489a386867098d385fdf263dc8cc1bcd2f98a4a /bl31 | |
parent | c7c22ab662008ca6cfb8b1926bbaa5fdc8eb399e (diff) |
feat(hcx): add build option to enable FEAT_HCX
FEAT_HCX adds the extended hypervisor configuration register (HCRX_EL2)
and access to this register must be explicitly enabled through the
SCR_EL3.HXEn bit. This patch adds a new build flag ENABLE_FEAT_HCX to
allow the register to be accessed from EL2.
Signed-off-by: John Powell <john.powell@arm.com>
Change-Id: Ibb36ad90622f1dc857adab4b0d4d7a89456a522b
Diffstat (limited to 'bl31')
-rw-r--r-- | bl31/bl31_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bl31/bl31_main.c b/bl31/bl31_main.c index 44bf32cb77..f272af5028 100644 --- a/bl31/bl31_main.c +++ b/bl31/bl31_main.c @@ -85,6 +85,15 @@ void bl31_setup(u_register_t arg0, u_register_t arg1, u_register_t arg2, /* Perform late platform-specific setup */ bl31_plat_arch_setup(); +#if ENABLE_FEAT_HCX + /* + * Assert that FEAT_HCX is supported on this system, without this check + * an exception would occur during context save/restore if enabled but + * not supported. + */ + assert(is_feat_hcx_present()); +#endif /* ENABLE_FEAT_HCX */ + #if CTX_INCLUDE_PAUTH_REGS /* * Assert that the ARMv8.3-PAuth registers are present or an access |