summaryrefslogtreecommitdiff
path: root/sys/arch/i386/include
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-06-15 01:18:23 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-06-15 01:18:23 +0000
commit1334befa560513cf09f2d79f2f2ee8b1ea052e31 (patch)
tree7a112dc487a754609dab3fce33a54744fbc4f820 /sys/arch/i386/include
parent61395e85722f2a2cd003f0854b2f69141bae1919 (diff)
this should be a MD include file; discussed with matthieu
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r--sys/arch/i386/include/amdmsr.h28
1 files changed, 28 insertions, 0 deletions
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_ */