diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-06-15 01:18:23 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-06-15 01:18:23 +0000 |
commit | 1334befa560513cf09f2d79f2f2ee8b1ea052e31 (patch) | |
tree | 7a112dc487a754609dab3fce33a54744fbc4f820 /sys/arch/i386 | |
parent | 61395e85722f2a2cd003f0854b2f69141bae1919 (diff) |
this should be a MD include file; discussed with matthieu
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/amdmsr.c | 4 | ||||
-rw-r--r-- | sys/arch/i386/include/amdmsr.h | 28 |
2 files changed, 30 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/amdmsr.c b/sys/arch/i386/i386/amdmsr.c index 483d2709b9a..95b9d8791f5 100644 --- a/sys/arch/i386/i386/amdmsr.c +++ b/sys/arch/i386/i386/amdmsr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdmsr.c,v 1.1 2008/06/14 21:31:46 mbalmer Exp $ */ +/* $OpenBSD: amdmsr.c,v 1.2 2008/06/15 01:18:22 deraadt Exp $ */ /* * Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org> @@ -28,7 +28,7 @@ #include <sys/sysctl.h> #include <sys/ioctl.h> #include <sys/conf.h> -#include <sys/amdmsr.h> +#include <machine/amdmsr.h> #include <machine/bus.h> #include <machine/cpufunc.h> diff --git a/sys/arch/i386/include/amdmsr.h b/sys/arch/i386/include/amdmsr.h new file mode 100644 index 00000000000..9e3ca730c70 --- /dev/null +++ b/sys/arch/i386/include/amdmsr.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _SYS_AMDMSR_H_ +#define _SYS_AMDMSR_H_ + +struct amdmsr_req { + u_int32_t addr; /* 32-bit MSR address */ + u_int64_t val; /* 64-bit MSR value */ +}; + +#define RDMSR _IOWR('M', 0, struct amdmsr_req) +#define WRMSR _IOW('M', 1, struct amdmsr_req) + +#endif /* !_SYS_AMDMSR_H_ */ |