diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -2797,7 +2797,12 @@ install_sys_handler(user_ctr_handler); install_sys_handler(user_idreg_handler); } -SYSINIT(identify_cpu, SI_SUB_CPU, SI_ORDER_MIDDLE, identify_cpu_sysinit, NULL); +/* + * This needs to be after the APs have stareted as they may have errata that + * means we need to mask out ID registers & that could affect hwcaps, etc. + */ +SYSINIT(identify_cpu, SI_SUB_CONFIGURE, SI_ORDER_ANY, identify_cpu_sysinit, + NULL); static void cpu_features_sysinit(void *dummy __unused) diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -263,7 +263,9 @@ { link_elf_late_ireloc(); } -SYSINIT(late_ifunc_resolve, SI_SUB_CPU, SI_ORDER_ANY, late_ifunc_resolve, NULL); +/* Late enough for cpu_feat to have completed */ +SYSINIT(late_ifunc_resolve, SI_SUB_CONFIGURE, SI_ORDER_ANY, + late_ifunc_resolve, NULL); int cpu_idle_wakeup(int cpu)