freebsd-dev/sys/i386/include
Stanislav Sedov e085f869d5 - Add cpuctl(4) pseudo-device driver to provide access to some low-level
features of CPUs like reading/writing machine-specific registers,
  retrieving cpuid data, and updating microcode.
- Add cpucontrol(8) utility, that provides userland access to
  the features of cpuctl(4).
- Add subsequent manpages.

The cpuctl(4) device operates as follows. The pseudo-device node cpuctlX
is created for each cpu present in the systems. The pseudo-device minor
number corresponds to the cpu number in the system. The cpuctl(4) pseudo-
device allows a number of ioctl to be preformed, namely RDMSR/WRMSR/CPUID
and UPDATE. The first pair alows the caller to read/write machine-specific
registers from the correspondent CPU. cpuid data could be retrieved using
the CPUID call, and microcode updates are applied via UPDATE.

The permissions are inforced based on the pseudo-device file permissions.
RDMSR/CPUID will be allowed when the caller has read access to the device
node, while WRMSR/UPDATE will be granted only when the node is opened
for writing. There're also a number of priv(9) checks.

The cpucontrol(8) utility is intened to provide userland access to
the cpuctl(4) device features. The utility also allows one to apply
cpu microcode updates.

Currently only Intel and AMD cpus are supported and were tested.

Approved by:	kib
Reviewed by:	rpaulo, cokane, Peter Jeremy
MFC after:	1 month
2008-08-08 16:26:53 +00:00
..
pc - Add constants for the different memory types in the SMAP table. 2007-10-28 21:23:49 +00:00
_bus.h
_inttypes.h
_limits.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
_stdint.h
_types.h Change float_t and double_t to long double on i386. All floating point 2008-03-05 11:21:14 +00:00
acpica_machdep.h Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
apicreg.h
apicvar.h Handle CPUs with APIC IDs higher than 32 (at least one IBM server uses 2007-05-08 22:01:04 +00:00
apm_bios.h
apm_segments.h
asm.h Define an END() macro for use in i386 and amd64 assembly code, akin 2007-08-22 04:26:07 +00:00
asmacros.h Define an END() macro for use in i386 and amd64 assembly code, akin 2007-08-22 04:26:07 +00:00
atomic.h Implement atomic_fetchadd_long() for all architectures and document it. 2008-03-16 21:20:50 +00:00
bootinfo.h Slightly cleanup the 'bootdev' concept on x86 by changing the various 2007-10-24 04:03:25 +00:00
bus_dma.h
bus.h Fix -Wundef warnings found when compiling i386 LINT, GENERIC and 2005-12-05 11:58:35 +00:00
clock.h Now that all platforms use genclock, shuffle things around slightly 2008-04-22 19:38:30 +00:00
cpu.h Clean out sysctl machdep.* related defines. 2006-05-11 17:29:25 +00:00
cpufunc.h - Add cpuctl(4) pseudo-device driver to provide access to some low-level 2008-08-08 16:26:53 +00:00
cputypes.h
cserial.h Prepare for sconfig(8) update. 2006-01-30 13:34:57 +00:00
db_machdep.h
elan_mmcr.h
elf.h PR: 2006-10-04 21:37:10 +00:00
endian.h
exec.h
float.h Oops, back out previous commit since it was to the wrong file. 2008-03-05 11:17:20 +00:00
floatingpoint.h
frame.h Tweak how the MD code calls the fooclock() methods some. Instead of 2005-12-22 22:16:09 +00:00
gdb_machdep.h
ieeefp.h MFamd64 (everything possible up to 1.19; mainly the amd64 implementations 2008-01-11 18:59:35 +00:00
if_wl_wavelan.h
in_cksum.h Fold multiple asm statements into one so that the compiler at a certain 2007-10-20 22:18:42 +00:00
intr_machdep.h Add preliminary support for binding interrupts to CPUs: 2008-03-14 19:41:48 +00:00
ioctl_bt848.h
ioctl_meteor.h
iodev.h Remove the unused major/minor numbers from iodev and memdev. 2008-06-25 07:45:31 +00:00
kdb.h Add kdb_cpu_sync_icache(), intended to synchronize instruction 2007-06-09 21:55:17 +00:00
legacyvar.h Make the PCI code aware of PCI domains (aka PCI segments) so we can 2007-09-30 11:05:18 +00:00
limits.h
md_var.h Initialise (if necessary) the VIA C3/C7 features. 2006-07-12 19:46:08 +00:00
memdev.h Remove the unused M_MEMDEV from the kernel. 2008-06-25 07:52:10 +00:00
metadata.h
minidump.h Merge minidumps from amd64 where they were originally developed. 2006-04-21 04:28:43 +00:00
mp_watchdog.h
mptable.h guard function decls with _KERNEL so user code can include this file 2006-02-22 21:38:33 +00:00
mutex.h Move clock_lock prototype into <machine/clock.h>, where it is more 2006-05-19 18:53:50 +00:00
nexusvar.h Rework how the nexus(4) device works on x86 to better handle the idea of 2008-03-13 20:39:04 +00:00
npx.h Use the method described in IA-32 Intel Architecture Software Developer's 2006-05-30 23:44:21 +00:00
param.h When building a kernel module, define MAXCPU the same as SMP so 2008-03-27 05:03:26 +00:00
pcaudioio.h
pcb_ext.h Explicitly switch to the new TSS by updating the current CPU's TSS selector 2005-09-15 17:30:08 +00:00
pcb.h Remove pcb_switchout, it has not been used for a long time. 2005-12-29 13:23:48 +00:00
pci_cfgreg.h
pcpu.h - Add an integer argument to idle to indicate how likely we are to wake 2008-04-25 05:18:50 +00:00
perfmon.h
pmap.h Make pmap_kenter_attr() static. 2008-08-04 08:04:09 +00:00
pmc_mdep.h Kernel and hwpmc(4) support for callchain capture. 2007-12-07 08:20:17 +00:00
ppireg.h
privatespace.h Test commit after repoman upgrade. Remove one of my many email addresses 2006-05-12 22:38:53 +00:00
proc.h Move GET_STACK_USAGE from MI header to i386/amd64 MD ones. 2008-01-31 08:24:27 +00:00
profile.h Unbreak cc -pg support on i386. In gcc 4.2, %ecx is used as the arg pointer 2008-07-23 11:37:20 +00:00
psl.h
ptrace.h
reg.h - Add macro constants for the various fields in %dr7 and use them in place 2006-11-17 19:20:32 +00:00
reloc.h
resource.h
runq.h
segments.h
setjmp.h Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
sf_buf.h
sigframe.h
signal.h Move MINSIGSTKSZ from <machine/signal.h> to <machine/_limits.h> and rename 2005-08-20 16:44:41 +00:00
smapi.h
smp.h - Remove the old smp cpu topology specification with a new, more flexible 2008-03-02 07:58:42 +00:00
speaker.h Add /dev/speaker support to amd64. 2005-11-11 09:57:32 +00:00
specialreg.h - Add cpuctl(4) pseudo-device driver to provide access to some low-level 2008-08-08 16:26:53 +00:00
stack.h Break out stack(9) from ddb(4): 2007-12-02 20:40:35 +00:00
stdarg.h Use __builtin_va_start instead of __builtin_stdarg_start. GCC4 obsoletes 2006-09-21 01:37:02 +00:00
sysarch.h
timerreg.h The "free-lance" timer in the i8254 is only used for the speaker 2008-03-26 20:09:21 +00:00
trap.h Add POSIX siginfo_t's si_code, this is for upcoming POSIX realtime signal 2005-10-14 03:01:14 +00:00
tss.h
ucontext.h MFamd64: use register_t's. 2005-09-12 03:34:05 +00:00
varargs.h
vm86.h
vmparam.h Enable the automatic creation of superpage reservations. 2008-03-26 03:12:00 +00:00
xbox.h Committed the xbox syscons(8)-able console driver. 2006-03-03 14:52:57 +00:00