diff options
author | Ed Maste <emaste@FreeBSD.org> | 2018-06-15 13:53:37 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2018-06-15 13:53:37 +0000 |
commit | 6a1d1e0ca3eb300e0efbeb27619c328e265f629d (patch) | |
tree | 0e087eab26c85c4d0430a5fc3909c67de5c01a3e /sys/compat/linprocfs/linprocfs.c | |
parent | e5f97ff2cc244b2c708c911dde97759479d712b8 (diff) |
Add stubbed arm64 linuxulator /proc/cpuinfo handler
Sponsored by: Turing Robotic Industries
Notes
Notes:
svn path=/head/; revision=335198
Diffstat (limited to 'sys/compat/linprocfs/linprocfs.c')
-rw-r--r-- | sys/compat/linprocfs/linprocfs.c | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 586259f28315..ff243bd7840c 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); |