From 6a1d1e0ca3eb300e0efbeb27619c328e265f629d Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 15 Jun 2018 13:53:37 +0000 Subject: [PATCH] Add stubbed arm64 linuxulator /proc/cpuinfo handler Sponsored by: Turing Robotic Industries --- sys/compat/linprocfs/linprocfs.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 586259f2831..ff243bd7840 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -317,6 +317,32 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) return (0); } +#else +/* ARM64TODO: implement non-stubbed linprocfs_docpuinfo */ +static int +linprocfs_docpuinfo(PFS_FILL_ARGS) +{ + int i; + + for (i = 0; i < mp_ncpus; ++i) { + sbuf_printf(sb, + "processor\t: %d\n" + "BogoMIPS\t: %d.%02d\n", + i, 0, 0); + sbuf_cat(sb, "Features\t: "); + sbuf_cat(sb, "\n"); + sbuf_printf(sb, + "CPU implementer\t: \n" + "CPU architecture: \n" + "CPU variant\t: 0x%x\n" + "CPU part\t: 0x%x\n" + "CPU revision\t: %d\n", + 0, 0, 0); + sbuf_cat(sb, "\n"); + } + + return (0); +} #endif /* __i386__ || __amd64__ */ /* @@ -1653,7 +1679,7 @@ linprocfs_uninit(PFS_INIT_ARGS) } PSEUDOFS(linprocfs, 1, VFCF_JAIL); -#if defined(__amd64__) +#if defined(__aarch64__) || defined(__amd64__) MODULE_DEPEND(linprocfs, linux_common, 1, 1, 1); #else MODULE_DEPEND(linprocfs, linux, 1, 1, 1); -- 2.45.2