Commit Graph

73 Commits

Author SHA1 Message Date
yamt 7f82ee6f97 print some more bits 2013-03-06 11:52:53 +00:00
matt 9ac4c42034 Add arm support for cpuctl identify 2013-01-31 23:40:48 +00:00
matt c4936fc4a0 Only complain about binding if we have more than 1 cpu. :)
(we always have more than 0).
2013-01-31 19:47:59 +00:00
dsl 58b5bd2463 Add support for the xsave related data from cpuid 8.n.
Reorder the output so that the 'brand' string - which actually identifies
  the cpu is output first.
2013-01-07 23:20:42 +00:00
dsl 6d15685a79 Use full model number to index name strings - a lot of 256 element arrays
don't matter in usespace.
Update list of intel family 6 model names (all current cpus) to include
everything upto and including sandy bridge and ivy bridge.
My i7 is no longer reported as a random P II.
2013-01-06 23:17:35 +00:00
dsl cbb941ff11 The Intel and AMD docs (more or less) agree on how the cpuid 'extended
family' and 'extended model' bits are used to create larger values
  than the original 16bit value allowed for.
Calculate and save these values 'up-front' and use them throughout.
Untangle the (backwards) nested switch statement for amd 'model 15' cpus.
Works as badly as ever on my i7.
2013-01-05 21:16:22 +00:00
dsl cd90dce7d6 If the IOC_CPU_UCODE_GET_VERSION fails with ENOTTY, try issuing the
request that the amd64 kernel understands.
2013-01-05 16:38:12 +00:00
dsl ef07d271f5 Fix x86_identify() for amd64 2013-01-05 15:33:00 +00:00
dsl 7d87936626 Change the i386 asm x86_identify() so it returns a value instead of writing
into global data.
Fix a stack alignment fubar that would cause a crash on a cirix 486.
Refactor identify code to common setup for normal identify and ucode
identify - which was missing a memset().
2013-01-05 15:27:45 +00:00
dsl 438bdb2a64 #include sys/ioctl.h 2013-01-02 19:24:30 +00:00
drochner 16e95cd0dc avoid dummy structure definition, include a system header instead,
looks just cleaner
2012-10-17 20:22:15 +00:00
drochner 629e6fc4b6 fix for archs w/o cpu ucode driver: add dummy definition 2012-08-31 07:27:27 +00:00
drochner 312c339026 Extend the CPU microcode update framework to support Intel x86 CPUs.
Contrary to the AMD implementation, it doesn't use xcalls to distribute
the update to all CPUs but relies on cpuctl(8) to bind itself to the
right CPU -- to keep it simple and avoid possible problems with
hyperthreading.
Also, it doesn't parse the vendor supplied file to pick the right
part for the present CPU model but relies on userland to prepare
files with specific filenames. I'll commit a pkg for this in a minute
(pkgsrc/sysutils/intel-microcode).
The ioctl interface changed; compatibility is provided (should be
limited to COMPAT_NETBSD6 as soon as this is available).
2012-08-29 17:13:21 +00:00
cegger 3f7c493abc print cpu family for AMD CPU families 0x12 - 0x15 2012-04-17 13:00:09 +00:00
cegger 135e6a1977 report l3 cache information on AMD Family 10h and newer processors 2012-04-05 11:05:53 +00:00
njoly d0e00679ff Use Lk macro when dealing with URLs. While here update or remove some
dead URL links. Another part of PR/29238.
2012-03-15 22:35:02 +00:00
joerg 66dd2755f5 Add __printflike attribution to use vprintf and friends with an argument
as format string.
2012-03-15 02:02:20 +00:00
sborrill 079328a547 Print CPU stepping level 2012-03-02 16:29:31 +00:00
joerg dfa4e075c4 Use uintmax_t for freqency computations to avoid differences between
platforms.
2012-02-29 23:34:01 +00:00
yamt e119700586 use a correct macro.
releng@ ok
2012-02-03 05:06:51 +00:00
wiz ee2d01f9ba Sort sections. Uppercase CPU. 2012-01-14 00:59:56 +00:00
cegger a3f6c06746 Support CPU microcode loading via cpuctl(8).
Implemented and enabled via CPU_UCODE kernel config option
for x86 and Xen Dom0.
Tested on different AMD machines with different
CPU families.

ok wiz@ for the manpages
ok releng@
ok core@ via releng@
2012-01-13 16:05:14 +00:00
chs b364697460 add info on L2 TLBs and 1GB pages. 2011-12-04 17:00:10 +00:00
jruoho be8b5eb28c Define _PATH_CPUCTL. 2011-09-27 11:24:20 +00:00
jruoho cb6e031ff5 Fix wrong err(3) message (no such thing as IOC_CPU_GETINFO). 2011-09-26 06:51:57 +00:00
jdc f8dbae1d18 Add a cs_hwid field to cpustate and use this to store the ci_cpuid (hardware
ID).  Report this as the HwID in cpuctl.
OK jruoho@.
2011-09-11 14:54:49 +00:00
joerg 19f8b044c9 static + __dead 2011-08-27 22:38:48 +00:00
jruoho 7b594ad6a4 Identify AMD Family 11h. From PR bin/41188 by FUKAUMI Naoki. 2011-05-03 09:06:22 +00:00
jmcneill 623e90f32d fix printing of padlock features 2011-02-19 13:34:38 +00:00
cegger 473a16d6eb beautify printing of SVM features across multiple lines 2010-12-15 17:09:07 +00:00
cegger 14bab12404 check for svm feature flags if cpuid function 0x8000000a is available. 2010-02-23 08:46:33 +00:00
mrg f23127ca0a don't call most/all Core2's "(Merom)". 2010-02-16 00:13:14 +00:00
jmcneill 204f5f079e - add newer VIA C7 core and VIA Nano.
- when printing an unknown VIA CPU, default to 'Unknown IDT/VIA' instead of 'C3'
2009-10-02 13:54:01 +00:00
pgoyette 0bade9429b Add a few more processor extended models for Intel Family 6 2009-05-14 20:16:10 +00:00
pgoyette 1463b8efaf 1. Extend CPU probe of Intel processors to handle extended-models. This
allows us to properly identify new Intel 45nm processors, Core i7,
   Atom, and the 45nm Xeon MP.

2. Properly decode several new Intel cache descriptors, as listed in the
   most recent (March 2009) edition of Intel's Application Note 485.

3. Convert decode of the various features masks to use the newly added
   snprintb_m(3) routine.

Addresses my PR bin/41289
Addresses my PR bin/41290
2009-05-13 22:25:51 +00:00
lukem 74f7394a13 Allow WARNS=4 after Christos' fix sys/cdefs.h 2009-04-23 01:37:55 +00:00
lukem 6c17577005 Fix -Wsign-compare issue 2009-04-23 01:36:56 +00:00
christos 33c521093c WARNS=4 2009-04-22 18:10:38 +00:00
lukem d877c4c3c0 Enable WARNS=4 by default, except for:
cpuctl  dumplfs  hprop  ipf  iprop-log  kadmin  kcm  kdc  kdigest
	kimpersonate  kstash  ktutil  makefs  ndbootd  ntp  pppd  quot
	racoon  racoonctl  rtadvd  sntp  sup  tcpdchk  tcpdmatch  tcpdump
	traceroute  traceroute6  user  veriexecgen  wsmoused  zic
(Mostly third-party applications)
2009-04-22 15:23:01 +00:00
ad 4d8f47ae2f cpuctl:
- Add interrupt shielding (direct hardware interrupts away from the
  specified CPUs). Not documented just yet but will be soon.

- Redo /dev/cpu time_t compat so no kernel changes are needed.

x86:

- Make intr_establish, intr_disestablish safe to use when !cold.

- Distribute hardware interrupts among the CPUs, instead of directing
  everything to the boot CPU.

- Add MD code for interrupt sheilding. This works in most cases but there is
  a bug where delivery is not accepted by an LAPIC after redistribution. It
  also needs re-balancing to make things fair after interrupts are turned
  back on for a CPU.
2009-04-19 14:11:36 +00:00
tsutsui 38357705f9 Increase size of buffer for humanize_number(3) to print cache sizes
so that it can return 128KB, 256KB and 512KB properly instead of
truncated 0MB or rounded 1MB.

Problem reported by nisimura@ on port-amd64 and port-i386.
2009-03-16 12:25:40 +00:00
yamt 538489ba39 print some SVM info if available. 2009-03-12 09:10:15 +00:00
ad 47afbfb94e cpuctl list: map hardware id after getting state. avoids screwed up display
when ci_cpuid != cpu_index()
2009-01-28 22:37:09 +00:00
christos 2cd3d9d4aa Remove 3rd buggy copy of this function and use snprintb(3) instead.
No need to allocate MAXPATHLEN buffers anymore.
2008-12-16 22:44:50 +00:00
cegger 1754024de3 redo previous:
check ID in getcpuid(). This way, the other commands (online/offline)
tell the user the real error.
2008-11-19 20:56:08 +00:00
rmind cdaedad50c cpu_identify: check ID against number of processors.
Fix for PR/39955.
2008-11-19 11:05:40 +00:00
christos bdb5cd51ab fix so that we can compile with PIC 2008-10-19 15:22:17 +00:00
ad c1482a51a0 Cosmetic change to previous. 2008-10-15 08:22:06 +00:00
ad 889ba1e151 Don't map cpu index to hardware id. 2008-10-15 08:08:30 +00:00
cegger 9250503c06 do correct octal counting and use CPUID_APM_FLAGS in cpuctl 2008-10-14 15:49:04 +00:00