summaryrefslogtreecommitdiff
path: root/kc/core/cpu/msr.h
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2022-01-17 12:22:30 +0000
committerAda Christine <adachristine18@gmail.com>2022-01-17 12:22:30 +0000
commit2f2e5b43d2985abd504ecd5672ce783bef904f2f (patch)
tree3c24efcea6b0ce6dda0ee720b3afe250247f2dfb /kc/core/cpu/msr.h
parentdc7152c1cc6412871e1120ed53fb94ed386613cc (diff)
preparing for multitasking
Diffstat (limited to 'kc/core/cpu/msr.h')
-rw-r--r--kc/core/cpu/msr.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/kc/core/cpu/msr.h b/kc/core/cpu/msr.h
new file mode 100644
index 0000000..a5014da
--- /dev/null
+++ b/kc/core/cpu/msr.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <stdint.h>
+
+#define EFER_SCE 1
+
+#define MSR_EFER 0xc0000080
+#define MSR_STAR 0xc0000081
+#define MSR_LSTAR 0xc0000082
+#define MSR_CSTAR 0xc0000083
+#define MSR_SFMASK 0xc0000084
+
+uint64_t msr_read(uint32_t index);
+void msr_write(uint32_t index, uint64_t value);
+