diff options
author | Russ Cox <rsc@x40.(none)> | 2009-09-02 10:09:34 -0700 |
---|---|---|
committer | Russ Cox <rsc@x40.(none)> | 2009-09-02 10:09:34 -0700 |
commit | d26025d12463a902133bdc5b60d377d473294a8d (patch) | |
tree | 5fd4ea1af4a3ff29167c724605ba091f97b98957 | |
parent | 7e0cc8e36ea91d0299f375f3b3476ab58ab71dde (diff) | |
download | xv6-labs-d26025d12463a902133bdc5b60d377d473294a8d.tar.gz xv6-labs-d26025d12463a902133bdc5b60d377d473294a8d.tar.bz2 xv6-labs-d26025d12463a902133bdc5b60d377d473294a8d.zip |
can set just %gs now.
-rw-r--r-- | proc.c | 3 | ||||
-rw-r--r-- | x86.h | 3 |
2 files changed, 2 insertions, 4 deletions
@@ -72,10 +72,9 @@ ksegment(void) c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0); c->gdt[SEG_KCPU] = SEG(STA_W, &c->cpu, 8, 0); lgdt(c->gdt, sizeof(c->gdt)); - loadfsgs(SEG_KCPU << 3); + loadgs(SEG_KCPU << 3); // Initialize cpu-local storage. - asm volatile(""); // Do not let gcc reorder across this line. cpu = c; proc = 0; } @@ -104,9 +104,8 @@ xchg(volatile uint *addr, uint newval) } static inline void -loadfsgs(ushort v) +loadgs(ushort v) { - asm volatile("movw %0, %%fs" : : "r" (v)); asm volatile("movw %0, %%gs" : : "r" (v)); } |