Date: Tue, 30 Jun 2009 12:35:47 +0000 (UTC) From: Stanislav Sedov <stas@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/share/man/man4 cpuctl.4 src/sys/dev/cpuctl cpuctl.c src/sys/sys cpuctl.h src/usr.sbin/cpucontrol cpucontrol.8 cpucontrol.c Message-ID: <200906301237.n5UCbgms001839@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
stas 2009-06-30 12:35:47 UTC
FreeBSD src repository
Modified files:
share/man/man4 cpuctl.4
sys/dev/cpuctl cpuctl.c
sys/sys cpuctl.h
usr.sbin/cpucontrol cpucontrol.8 cpucontrol.c
Log:
SVN rev 195189 on 2009-06-30 12:35:47Z by stas
- Add support to atomically set/clear individual bits of a MSR register
via cpuctl(4) driver. Two new CPUCTL_MSRSBIT and CPUCTL_MSRCBIT ioctl(2)
calls treat the data field of the argument struct passed as a mask
and set/clear bits of the MSR register according to the mask value.
- Allow user to perform atomic bitwise AND and OR operaions on MSR registers
via cpucontrol(8) utility. Two new operations ("&=" and "|=") have been
added. The first one applies bitwise AND operaion between the current
contents of the MSR register and the mask, and the second performs bitwise
OR. The argument can be optionally prefixed with "~" inversion operator.
This allows one to mimic the "clear bit" behavior by using the command
like this:
cpucontrol -m 0x10&=~0x02 # clear the second bit of TSC MSR
Inversion operator support in all modes (assignment, OR, AND).
Approved by: re (kib)
MFC after: 1 month
Revision Changes Path
1.7 +6 -1 src/share/man/man4/cpuctl.4
1.5 +18 -2 src/sys/dev/cpuctl/cpuctl.c
1.2 +2 -0 src/sys/sys/cpuctl.h
1.6 +55 -5 src/usr.sbin/cpucontrol/cpucontrol.8
1.3 +81 -20 src/usr.sbin/cpucontrol/cpucontrol.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906301237.n5UCbgms001839>
