summaryrefslogtreecommitdiff
path: root/arch/x86/include/uapi/asm/mtrr.h
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2015-04-10 20:31:42 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2015-04-10 20:31:42 +1000
commitcb9b9519c1b7e8b3ced34b22bffb090592a6dbb1 (patch)
tree2cd6919dc97025b1e33ae12b75494524968ec28c /arch/x86/include/uapi/asm/mtrr.h
parentb7995a0dfc540e3a9beacb5cfe0e896506323ae3 (diff)
parent836ea414d24bfa10ffffc37a80973429f1c27e24 (diff)
Merge branch 'akpm/master'
Diffstat (limited to 'arch/x86/include/uapi/asm/mtrr.h')
-rw-r--r--arch/x86/include/uapi/asm/mtrr.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/include/uapi/asm/mtrr.h b/arch/x86/include/uapi/asm/mtrr.h
index d0acb658c8f4..0bc86c6fcae0 100644
--- a/arch/x86/include/uapi/asm/mtrr.h
+++ b/arch/x86/include/uapi/asm/mtrr.h
@@ -88,6 +88,10 @@ struct mtrr_state_type {
mtrr_type def_type;
};
+/* Bit fields for enabled in struct mtrr_state_type */
+#define MTRR_STATE_MTRR_FIXED_ENABLED 0x01
+#define MTRR_STATE_MTRR_ENABLED 0x02
+
#define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg))
#define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1)
@@ -103,7 +107,7 @@ struct mtrr_state_type {
#define MTRRIOC_GET_PAGE_ENTRY _IOWR(MTRR_IOCTL_BASE, 8, struct mtrr_gentry)
#define MTRRIOC_KILL_PAGE_ENTRY _IOW(MTRR_IOCTL_BASE, 9, struct mtrr_sentry)
-/* These are the region types */
+/* MTRR memory types, which are defined in SDM */
#define MTRR_TYPE_UNCACHABLE 0
#define MTRR_TYPE_WRCOMB 1
/*#define MTRR_TYPE_ 2*/
@@ -113,5 +117,11 @@ struct mtrr_state_type {
#define MTRR_TYPE_WRBACK 6
#define MTRR_NUM_TYPES 7
+/*
+ * Invalid MTRR memory type. mtrr_type_lookup() returns this value when
+ * MTRRs are disabled. Note, this value is allocated from the reserved
+ * values (0x7-0xff) of the MTRR memory types.
+ */
+#define MTRR_TYPE_INVALID 0xff
#endif /* _UAPI_ASM_X86_MTRR_H */