refactor(cpufeat): convert FEAT_HCX to new scheme
Use the generic check function in feat_detect.c, and split the feature
check into two functions, as done for FEAT_FGT before.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Change-Id: I0a4f973427c10d5d15c414ff5e12b18b7e645fae
diff --git a/common/feat_detect.c b/common/feat_detect.c
index 9544b4f..a8c40f7 100644
--- a/common/feat_detect.c
+++ b/common/feat_detect.c
@@ -228,16 +228,6 @@
#endif
}
-/******************************************************************
- * Feature : FEAT_HCX (Extended Hypervisor Configuration Register)
- *****************************************************************/
-static void read_feat_hcx(void)
-{
-#if (ENABLE_FEAT_HCX == FEAT_STATE_ALWAYS)
- feat_detect_panic(is_feat_hcx_present(), "HCX");
-#endif
-}
-
/**************************************************
* Feature : FEAT_RME (Realm Management Extension)
*************************************************/
@@ -341,7 +331,7 @@
read_feat_twed();
/* v8.7 features */
- read_feat_hcx();
+ check_feature(ENABLE_FEAT_HCX, read_feat_hcx_id_field(), "HCX");
/* v9.0 features */
read_feat_brbe();