freebsd-skq/usr.sbin/Makefile
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

377 lines
5.4 KiB
Makefile

# From: @(#)Makefile 5.20 (Berkeley) 6/12/93
# $FreeBSD$
.include <bsd.own.mk>
# XXX MISSING: mkproto
SUBDIR= ac \
accton \
${_acpi} \
adduser \
amd \
ancontrol \
${_apm} \
${_apmd} \
arp \
${_asf} \
${_atm} \
${_audit} \
${_auditd} \
${_auditreduce} \
${_authpf} \
${_bluetooth} \
${_boot0cfg} \
${_boot98cfg} \
bootparamd \
bsnmpd \
${_btxld} \
burncd \
cdcontrol \
chkgrp \
chown \
chroot \
ckdist \
clear_locks \
config \
${_cpucontrol} \
crashinfo \
cron \
crunch \
ctm \
daemon \
dconschat \
devinfo \
digictl \
diskinfo \
${_dnssec-keygen} \
${_dnssec-signzone} \
${_editmap} \
edquota \
${_eeprom} \
extattr \
extattrctl \
${_faithd} \
fdcontrol \
fdformat \
fdread \
fdwrite \
fifolog \
flowctl \
freebsd-update \
${_ftp-proxy} \
fwcontrol \
getfmac \
getpmac \
gstat \
ifmcstat \
inetd \
iostat \
${_ip6addrctl} \
ipfwpcap \
${_IPXrouted} \
jail \
jexec \
jls \
kbdcontrol \
kbdmap \
${_keyserv} \
${_kgmon} \
${_kgzip} \
kldxref \
lastlogin \
lmcconfig \
${_lpr} \
${_lptcontrol} \
${_mailstats} \
mailwrapper \
${_makemap} \
manctl \
memcontrol \
mergemaster \
mixer \
${_mld6query} \
mlxcontrol \
mountd \
${_mount_nwfs} \
mount_portalfs \
${_mount_smbfs} \
moused \
${_mptable} \
mtest \
mtree \
${_named} \
${_named-checkconf} \
${_named-checkzone} \
${_named.reload} \
${_ndiscvt} \
${_ndp} \
newsyslog \
nfsd \
ngctl \
nghook \
nologin \
${_nscd} \
ntp \
${_nvram} \
${_ofwdump} \
pccard \
pciconf \
periodic \
pkg_install \
pmccontrol \
pmcstat \
${_pnpinfo} \
portsnap \
powerd \
ppp \
${_pppctl} \
pppd \
pppstats \
${_praliases} \
${_praudit} \
procctl \
pstat \
pw \
pwd_mkdb \
quot \
quotaon \
rarpd \
raycontrol \
repquota \
${_rip6query} \
rmt \
${_rndc} \
${_rndc-confgen} \
${_route6d} \
rpcbind \
rpc.lockd \
rpc.statd \
rpc.umntall \
${_rpc.yppasswdd} \
${_rpc.ypupdated} \
${_rpc.ypxfrd} \
${_rrenumd} \
${_rtadvd} \
rtprio \
${_rtsold} \
rwhod \
sa \
${_sade} \
${_sendmail} \
setfib \
setfmac \
setpmac \
${_sicontrol} \
sliplogin \
slstat \
smbmsg \
snapinfo \
${_spkrtest} \
spray \
${_sysinstall} \
syslogd \
tcpdchk \
tcpdmatch \
tcpdrop \
tcpdump \
timed \
traceroute \
${_traceroute6} \
trpt \
tzsetup \
ugidfw \
${_usbdevs} \
vidcontrol \
vipw \
watch \
watchdogd \
wlandebug \
${_wlconfig} \
wpa \
${_ypbind} \
${_yp_mkdb} \
${_yppoll} \
${_yppush} \
${_ypserv} \
${_ypset} \
zic \
${_zzz}
.if ${MACHINE_ARCH} != "arm"
_sysinstall= sysinstall
.endif
.if ${MK_AUDIT} != "no"
_audit= audit
_auditd= auditd
_auditreduce= auditreduce
_praudit= praudit
.endif
.if ${MK_BIND_DNSSEC} != "no" && ${MK_OPENSSL} != "no"
_dnssec-keygen= dnssec-keygen
_dnssec-signzone= dnssec-signzone
.endif
.if ${MK_BIND_NAMED} != "no"
_named= named
_named-checkconf= named-checkconf
_named-checkzone= named-checkzone
_named.reload= named.reload
_rndc= rndc
_rndc-confgen= rndc-confgen
.endif
.if ${MK_BLUETOOTH} != "no"
_bluetooth= bluetooth
.endif
.if ${MK_OPENSSL} != "no"
_keyserv= keyserv
.endif
.if ${MK_PF} != "no"
_ftp-proxy= ftp-proxy
.endif
.if ${MK_INET6} != "no"
_faithd= faithd
_ip6addrctl= ip6addrctl
_mld6query= mld6query
_ndp= ndp
_rip6query= rip6query
_route6d= route6d
_rrenumd= rrenumd
_rtadvd= rtadvd
_rtsold= rtsold
_traceroute6= traceroute6
.endif
.if ${MK_IPX} != "no"
_IPXrouted= IPXrouted
.endif
.if ${MK_NIS} != "no"
_rpc.yppasswdd= rpc.yppasswdd
_rpc.ypupdated= rpc.ypupdated
_rpc.ypxfrd= rpc.ypxfrd
_ypbind= ypbind
_yp_mkdb= yp_mkdb
_yppoll= yppoll
_yppush= yppush
_ypserv= ypserv
_ypset= ypset
.endif
.if ${MK_AUTHPF} != "no"
_authpf= authpf
.endif
.if ${MK_LIBTHR} != "no"
_pppctl= pppctl
.endif
.if ${MK_LPR} != "no"
_lpr= lpr
.endif
.if ${MK_NS_CACHING} != "no"
.if ${MK_LIBTHR} != "no"
_nscd= nscd
.endif
.endif
.if ${MK_SENDMAIL} != "no"
_editmap= editmap
_mailstats= mailstats
_makemap= makemap
_praliases= praliases
_sendmail= sendmail
.endif
.if ${MK_USB} != "no"
_usbdevs= usbdevs
.endif
.if ${MACHINE_ARCH} == "arm"
_kgmon= kgmon
.endif
.if ${MACHINE_ARCH} == "i386"
_apm= apm
_apmd= apmd
_asf= asf
_btxld= btxld
_cpucontrol= cpucontrol
_kgmon= kgmon
_kgzip= kgzip
_lptcontrol= lptcontrol
.if ${MK_NCP} != "no"
_mount_nwfs= mount_nwfs
.endif
_mount_smbfs= mount_smbfs
_mptable= mptable
_ndiscvt= ndiscvt
_pnpinfo= pnpinfo
_sade= sade
_sicontrol= sicontrol
_spkrtest= spkrtest
_zzz= zzz
.if ${MACHINE} == "i386"
.if ${MK_ACPI} != "no"
_acpi= acpi
.endif
_boot0cfg= boot0cfg
_wlconfig= wlconfig
.elif ${MACHINE} == "pc98"
_boot98cfg= boot98cfg
.endif
.endif
# kgzip: builds, but missing support files
# mptable: broken (not 64 bit clean)
# pnpinfo: crashes (not really useful anyway)
.if ${MACHINE_ARCH} == "amd64"
.if ${MK_ACPI} != "no"
_acpi= acpi
.endif
_asf= asf
_boot0cfg= boot0cfg
_btxld= btxld
_cpucontrol= cpucontrol
_kgmon= kgmon
_lptcontrol= lptcontrol
.if ${MK_NCP} != "no"
_mount_nwfs= mount_nwfs
.endif
_mount_smbfs= mount_smbfs
_mptable= mptable
_ndiscvt= ndiscvt
_sade= sade
_sicontrol= sicontrol
_spkrtest= spkrtest
_zzz= zzz
.endif
.if ${MACHINE_ARCH} == "ia64"
.if ${MK_ACPI} != "no"
_acpi= acpi
.endif
_kgmon= kgmon
_mount_smbfs= mount_smbfs
_zzz= zzz
.endif
.if ${MACHINE_ARCH} == "powerpc"
_mount_smbfs= mount_smbfs
_nvram= nvram
_ofwdump= ofwdump
.endif
.if ${MACHINE_ARCH} == "sparc64"
_eeprom= eeprom
_ofwdump= ofwdump
_sade= sade
.endif
.include <bsd.subdir.mk>