-/* $OpenBSD: cpu.c,v 1.1 2017/04/27 10:23:19 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.2 2017/04/29 10:05:49 jsg Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
{ 0, "", NULL },
};
+char cpu_model[64];
+
int cpu_match(struct device *, void *, void *);
void cpu_attach(struct device *, struct device *, void *);
printf(" %s %s r%dp%d", impl_name, part_name, CPU_VAR(midr),
CPU_REV(midr));
+
+ if (CPU_IS_PRIMARY(ci))
+ snprintf(cpu_model, sizeof(cpu_model), "%s %s r%dp%d",
+ impl_name, part_name, CPU_VAR(midr), CPU_REV(midr));
}
int
-/* $OpenBSD: machdep.c,v 1.13 2017/04/11 06:52:13 kettenis Exp $ */
+/* $OpenBSD: machdep.c,v 1.14 2017/04/29 10:05:49 jsg Exp $ */
/*
* Copyright (c) 2014 Patrick Wildt <patrick@blueri.se>
*
/* the following is used externally (sysctl_hw) */
char machine[] = MACHINE; /* from <machine/param.h> */
-char cpu_model[] = "arm64"; // XXX FIX
extern todr_chip_handle_t todr_handle;
int safepri = 0;