1.\" $OpenBSD: amdmsr.4,v 1.6 2014/01/21 03:15:46 schwarze Exp $ 2.\" 3.\" MSR access driver for AMD Geode LX CPUs with graphics processor. 4.\" Copyright 2008 Marc Balmer <mbalmer@openbsd.org> 5.\" 6.\" Permission to use, copy, modify, and distribute this software for any 7.\" purpose with or without fee is hereby granted, provided that the above 8.\" copyright notice and this permission notice appear in all copies. 9.\" 10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17.\" 18.Dd $Mdocdate: January 21 2014 $ 19.Dt AMDMSR 4 i386 20.Os 21.Sh NAME 22.Nm amdmsr 23.Nd access MSRs on certain AMD Geode LX systems 24.Sh SYNOPSIS 25.Cd "amdmsr0 at mainbus?" 26.Sh DESCRIPTION 27The 28.Nm 29device provides access to the Model Specific Registers (MSRs) on systems with 30an AMD Geode LX CPU and graphics processor. 31.Ss IOCTL INTERFACE 32MSRs can be read or written via 33.Fn ioctl 34calls performed on 35.Pa /dev/amdmsr . 36Declarations and data types are to be found in 37.In machine/amdmsr.h . 38.Pp 39Read or write requests are performed using: 40.Bd -literal -offset xxxx 41struct amdmsr_req { 42 u_int32_t addr; /* 32-bit MSR address */ 43 u_int64_t val; /* 64-bit MSR value */ 44}; 45.Ed 46.Pp 47The 48.Fa RDMSR 49ioctl is used to read an MSR register. 50.Pp 51The 52.Fa WRMSR 53ioctl is used to write an MSR register. 54.Sh SEE ALSO 55.Xr ioctl 2 56.Sh HISTORY 57.Nm 58support was added in 59.Ox 4.4 . 60