summaryrefslogtreecommitdiff
path: root/x86.h
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2011-07-29 07:31:27 -0400
committerFrans Kaashoek <[email protected]>2011-07-29 07:31:27 -0400
commit9aa0337dc1452a911ac52698c833246a618fc9f3 (patch)
tree28e25817d4f7c9f7f1e6988949012f46d6c28fb7 /x86.h
parentdccb915282854476ce47752df6631dcce3b8f661 (diff)
downloadxv6-labs-9aa0337dc1452a911ac52698c833246a618fc9f3.tar.gz
xv6-labs-9aa0337dc1452a911ac52698c833246a618fc9f3.tar.bz2
xv6-labs-9aa0337dc1452a911ac52698c833246a618fc9f3.zip
Map kernel high
Very important to give qemu memory through PHYSTOP :(
Diffstat (limited to 'x86.h')
-rw-r--r--x86.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/x86.h b/x86.h
index 5a59cc2..828d5bc 100644
--- a/x86.h
+++ b/x86.h
@@ -96,6 +96,30 @@ loadgs(ushort v)
asm volatile("movw %0, %%gs" : : "r" (v));
}
+static inline void
+loadfs(ushort v)
+{
+ __asm volatile("movw %0, %%fs" : : "r" (v));
+}
+
+static inline void
+loades(ushort v)
+{
+ __asm volatile("movw %0, %%es" : : "r" (v));
+}
+
+static inline void
+loadds(ushort v)
+{
+ __asm volatile("movw %0, %%ds" : : "r" (v));
+}
+
+static inline void
+loadss(ushort v)
+{
+ __asm volatile("movw %0, %%ss" : : "r" (v));
+}
+
static inline uint
rebp(void)
{