From 1334befa560513cf09f2d79f2f2ee8b1ea052e31 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 15 Jun 2008 01:18:23 +0000 Subject: this should be a MD include file; discussed with matthieu --- sys/arch/i386/i386/amdmsr.c | 4 ++-- sys/arch/i386/include/amdmsr.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 sys/arch/i386/include/amdmsr.h (limited to 'sys/arch/i386') 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 @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include 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 + * + * 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_ */ -- cgit v1.2.3