Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2018 13:53:37 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r335198 - head/sys/compat/linprocfs
Message-ID:  <201806151353.w5FDrbcO033355@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Fri Jun 15 13:53:37 2018
New Revision: 335198
URL: https://svnweb.freebsd.org/changeset/base/335198

Log:
  Add stubbed arm64 linuxulator /proc/cpuinfo handler
  
  Sponsored by:	Turing Robotic Industries

Modified:
  head/sys/compat/linprocfs/linprocfs.c

Modified: head/sys/compat/linprocfs/linprocfs.c
==============================================================================
--- head/sys/compat/linprocfs/linprocfs.c	Fri Jun 15 13:49:11 2018	(r335197)
+++ head/sys/compat/linprocfs/linprocfs.c	Fri Jun 15 13:53:37 2018	(r335198)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806151353.w5FDrbcO033355>