Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169368705
D14465.id39777.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1020 B
Referenced Files
None
Subscribers
None
D14465.id39777.diff
View Options
Index: head/sys/arm/arm/identcpu-v6.c
===================================================================
--- head/sys/arm/arm/identcpu-v6.c
+++ head/sys/arm/arm/identcpu-v6.c
@@ -56,6 +56,10 @@
SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD,
machine, 0, "Machine class");
+static char cpu_model[64];
+SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD,
+ cpu_model, sizeof(cpu_model), "Machine model");
+
static char hw_buf[81];
static int hw_buf_idx;
static bool hw_buf_newline;
@@ -285,11 +289,13 @@
if (cpu_names[i].implementer == cpuinfo.implementer &&
cpu_names[i].part_number == cpuinfo.part_number) {
cpu_class = cpu_names[i].cpu_class;
- printf("CPU: %s %s r%dp%d (ECO: 0x%08X)\n",
+ snprintf(cpu_model, sizeof(cpu_model),
+ "%s %s r%dp%d (ECO: 0x%08X)",
cpu_names[i].impl_name, cpu_names[i].core_name,
cpuinfo.revision, cpuinfo.patch,
cpuinfo.midr != cpuinfo.revidr ?
cpuinfo.revidr : 0);
+ printf("CPU: %s\n", cpu_model);
break;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 2, 8:31 AM (9 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37790309
Default Alt Text
D14465.id39777.diff (1020 B)
Attached To
Mode
D14465: Create sysctl hw.model on ARM
Attached
Detach File
Event Timeline
Log In to Comment