Move printing the AArch64 ID registers to a new SYSINIT, the previous

location only prints them when booting on SMP with multiple cores.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
This commit is contained in:
Andrew Turner 2016-10-13 09:06:29 +00:00
parent 3e5c48d95f
commit 1890f18cbe
2 changed files with 15 additions and 8 deletions

View File

@ -33,7 +33,9 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/pcpu.h>
#include <sys/smp.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
@ -151,6 +153,17 @@ const struct cpu_implementers cpu_implementers[] = {
CPU_IMPLEMENTER_NONE,
};
static void
identify_cpu_sysinit(void *dummy __unused)
{
int cpu;
CPU_FOREACH(cpu) {
print_cpu_features(cpu);
}
}
SYSINIT(idenrity_cpu, SI_SUB_SMP, SI_ORDER_ANY, identify_cpu_sysinit, NULL);
void
print_cpu_features(u_int cpu)
{

View File

@ -201,7 +201,7 @@ arm64_cpu_attach(device_t dev)
static void
release_aps(void *dummy __unused)
{
int cpu, i;
int i;
intr_pic_ipi_setup(IPI_AST, "ast", ipi_ast, NULL);
intr_pic_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL);
@ -217,14 +217,8 @@ release_aps(void *dummy __unused)
printf("Release APs\n");
for (i = 0; i < 2000; i++) {
if (smp_started) {
for (cpu = 0; cpu <= mp_maxid; cpu++) {
if (CPU_ABSENT(cpu))
continue;
print_cpu_features(cpu);
}
if (smp_started)
return;
}
DELAY(1000);
}