diff --git a/sys/arm64/arm64/cpu_feat.c b/sys/arm64/arm64/cpu_feat.c --- a/sys/arm64/arm64/cpu_feat.c +++ b/sys/arm64/arm64/cpu_feat.c @@ -87,17 +87,19 @@ if (check_status == FEAT_ALWAYS_DISABLE) goto next; - /* The user disabled the feature */ - if ((feat->feat_flags & CPU_FEAT_USER_DISABLED) != 0) - goto next; + if (check_status != FEAT_ALWAYS_ENABLE) { + /* The user disabled the feature */ + if ((feat->feat_flags & CPU_FEAT_USER_DISABLED) != 0) + goto next; - /* - * The feature was disabled by default and the user - * didn't enable it then skip. - */ - if (check_status == FEAT_DEFAULT_DISABLE && - (feat->feat_flags & CPU_FEAT_USER_ENABLED) == 0) - goto next; + /* + * The feature was disabled by default and the user + * didn't enable it then skip. + */ + if (check_status == FEAT_DEFAULT_DISABLE && + (feat->feat_flags & CPU_FEAT_USER_ENABLED) == 0) + goto next; + } /* * Check if the feature has any errata that may need a diff --git a/sys/arm64/include/cpu_feat.h b/sys/arm64/include/cpu_feat.h --- a/sys/arm64/include/cpu_feat.h +++ b/sys/arm64/include/cpu_feat.h @@ -62,7 +62,12 @@ */ FEAT_DEFAULT_ENABLE, - /* We could add FEAT_ALWAYS_ENABLE if a need was found. */ + /* + * Always enabled. Used when there is no way for the kernel to + * work without the feature, e.g. configuring the interrupt + * controller. + */ + FEAT_ALWAYS_ENABLE, } cpu_feat_en; #define CPU_FEAT_STAGE_MASK 0x00000001