Add some i386 specific information and make a lot of it available
to user programs via sysctl. We've had this change in our kernels
for some time. Some appears to have moved into the 6.0 code, but
for what it's worth, here's the entire suggested change:
- add cpu extended features capture and output during boot
- add sysctls to expose a number of i386 information:
This patch is against the 5_4_0_RELEASE code
Fix: --- /usr/src.original/sys/i386/include/md_var.h Thu Jun 10 16:30:58 2004
+++ /usr/src/sys/i386/include/md_var.h Fri Aug 12 17:32:43 2005
@@ -46,6 +46,7 @@
extern int busdma_swi_pending;
extern u_int cpu_exthigh;
extern u_int cpu_feature;
+extern u_int cpu_efeature;
extern u_int cpu_fxsr;
extern u_int cpu_high;
extern u_int cpu_id;
--- md_var.h-DIFF ends here ---
--- /usr/src.original/sys/i386/i386/locore.s Fri Feb 4 20:01:40 2005
+++ /usr/src/sys/i386/i386/locore.s Fri Aug 12 17:32:52 2005
@@ -680,6 +680,7 @@
cpuid # cpuid 1
movl %eax,R(cpu_id) # store cpu_id
movl %ebx,R(cpu_procinfo) # store cpu_procinfo
+ movl %ecx,R(cpu_efeature) # store cpu extended features
movl %edx,R(cpu_feature) # store cpu_feature
rorl $8,%eax # extract family type
--- locore.s-DIFF ends here ---
Ben Thomas wrote:
> - add sysctls to expose a number of i386 information:
It might be better to use
instead. This allows you to see all CPU information by calling 'sysctl
hw.cpu'. A lot of oids in the format parent.foo_bar has been converted
to parent.foo.bar in past.
I completely agree. It was a quick hack that we use locally and
could easily be improved. I considered changing this before
I submitted the pr, but since it's taken me over a year to get
around to submitting it at all, I decided to submit the current
code that I use and not the better version.
Björn König wrote:
> Ben Thomas wrote:
>> - add sysctls to expose a number of i386 information:
> It might be better to use
> instead. This allows you to see all CPU information by calling 'sysctl
> hw.cpu'. A lot of oids in the format parent.foo_bar has been converted
> to parent.foo.bar in past.
> Regards Björn
Ben Thomas Virtual Iron Software
firstname.lastname@example.org 43 Nagog Park
978-849-1214 Acton, MA 01720
Is this still applicable?
Hi John, another one I would like to ask you to have a look at.
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped
I believe cpucontrol(8) can provide access to some of the information mentioned in this PR. Closing as OBE. Feel free to reopen if there is interest in adding suggested functionality.