summaryrefslogtreecommitdiff
path: root/sys/inc/arch/amd64/msr.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/inc/arch/amd64/msr.h')
-rw-r--r--sys/inc/arch/amd64/msr.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/inc/arch/amd64/msr.h b/sys/inc/arch/amd64/msr.h
index e3f8887..f962d21 100644
--- a/sys/inc/arch/amd64/msr.h
+++ b/sys/inc/arch/amd64/msr.h
@@ -30,13 +30,21 @@
#ifndef _MACHINE_MSR_H_
#define _MACHINE_MSR_H_ 1
+#if !defined(__ASSEMBLER__)
#include <sys/cdefs.h>
#include <sys/types.h>
+#endif /* !__ASSEMBLER__ */
#define IA32_APIC_BASE 0x0000001B
#define IA32_GS_BASE 0xC0000101
+#define IA32_MTRR_CAP 0x000000FE
+#define IA32_DEF_TYPE 0x000002FF
+#define IA32_MTRR_PHYSBASE 0x00000200
+#define IA32_MTRR_PHYSMASK 0x00000201
#define IA32_KERNEL_GS_BASE 0xC0000102
+#define IA32_EFER 0xC0000080
+#if !defined(__ASSEMBLER__)
__always_inline static inline uint64_t
rdmsr(uint32_t msr)
{
@@ -68,4 +76,5 @@ wrmsr(uint32_t msr, uint64_t val)
);
}
+#endif /* !__ASSEMBLER__ */
#endif /* !_MACHINE_MSR_H_ */