diff options
author | Frans Kaashoek <[email protected]> | 2011-07-29 07:31:27 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2011-07-29 07:31:27 -0400 |
commit | 9aa0337dc1452a911ac52698c833246a618fc9f3 (patch) | |
tree | 28e25817d4f7c9f7f1e6988949012f46d6c28fb7 /x86.h | |
parent | dccb915282854476ce47752df6631dcce3b8f661 (diff) | |
download | xv6-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.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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) { |