RFC: Adding a hw.features[2] sysctl

From: vermaden <vermaden_at_interia.pl>
Date: 14 Jan 2008 18:53:37 +0100
current output

# sysctl dev.cpu:
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU0
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.cx_supported: C1/0
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00%

So why not transform this:

CPU: Dual Core AMD Opteron(tm) Processor 280 (2411.12-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x20f12  Stepping = 2
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x1<SSE3>
  AMD Features=0xe2500800<SYSCALL,NX,MMX+,FFXSR,LM,3DNow!+,3DNow!>
  AMD Features2=0x3<LAHF,CMP>
  Cores per package: 2

into this:

# sysctl dev.cpu
dev.cpu.0.model: Dual Core AMD Opteron(tm) Processor 280
dev.cpu.0.class: K8-class
dev.cpu.0.frequency: 2411.12
dev.cpu.0.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFLUSH MMX FXSR SSE SSE2 HTT SYSCALL NX MMX+ FFXSR LM 3DNow!+ 3DNow! LAHF CMP
dev.cpu.0.cores: 2 <-- but that would propably be the same as kern.smp.cpus: 2 so link it to the value of kern.smp.cpus or do not even create it.

I also do not like idea of /dev/cpuinfo it is FreeBSD not Linux:
http://wiki.freebsd.org/AvoidingLinuxisms

Regards
vermaden


----------------------------------------------------------------------
Kupujesz laptopa? Sprawdz nasze testy!
Kliknij >>> http://link.interia.pl/f1cd1
Received on Mon Jan 14 2008 - 17:20:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:26 UTC