Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148738970
D42374.1788349094.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42374.1788349094.diff
View Options
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -104,8 +104,8 @@
#if defined(__i386__) || defined(__amd64__)
#include <machine/cputypes.h>
-#include <machine/md_var.h>
#endif /* __i386__ || __amd64__ */
+#include <machine/md_var.h>
#include <compat/linux/linux.h>
#include <compat/linux/linux_common.h>
@@ -434,14 +434,79 @@
static int
linprocfs_docpuinfo(PFS_FILL_ARGS)
{
- int i;
+ int i, j;
+
+ static char *hwcap_features[] = {
+ "fp",
+ "asimd",
+ "evtstrm",
+ "aes",
+ "pmull",
+ "sha1",
+ "sha2",
+ "crc32",
+ "atomics",
+ "fphp",
+ "asimdhp",
+ "cpuid",
+ "asimdrdm",
+ "jscvt",
+ "fcma",
+ "lrcpc",
+ "dcpop",
+ "sha3",
+ "sm3",
+ "sm4",
+ "asimddp",
+ "sha512",
+ "sve",
+ "asimdfhm",
+ "dit",
+ "uscat",
+ "ilrcpc",
+ "flagm",
+ "ssbs",
+ "sb",
+ "paca",
+ "pacg",
+ };
+ static char *hwcap2_features[] = {
+ "dcpodp",
+ "sve2",
+ "sveaes",
+ "svepmull",
+ "svebitperm",
+ "svesha3",
+ "svesm4",
+ "flagm2",
+ "fpint",
+ "svei8mm",
+ "svef32mm",
+ "svef64mm",
+ "svebf16",
+ "i8mm",
+ "bf16",
+ "dgh",
+ "rng",
+ "bti",
+ };
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, "Features\t:");
+ for (j = 0; j < nitems(hwcap_features); j++) {
+ if ((linux_elf_hwcap & (1ul << j)) != 0) {
+ sbuf_printf(sb, " %s", hwcap_features[j]);
+ }
+ }
+ for (j = 0; j < nitems(hwcap2_features); j++) {
+ if ((linux_elf_hwcap2 & (1ul << j)) != 0) {
+ sbuf_printf(sb, " %s", hwcap2_features[j]);
+ }
+ }
sbuf_cat(sb, "\n");
sbuf_printf(sb,
"CPU implementer\t: \n"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 2, 11:38 AM (20 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29502295
Default Alt Text
D42374.1788349094.diff (1 KB)
Attached To
Mode
D42374: linprocfs: Add arm64 CPU features
Attached
Detach File
Event Timeline
Log In to Comment