Skip to content
Snippets Groups Projects
Commit d26025d1 authored by Russ Cox's avatar Russ Cox
Browse files

can set just %gs now.

parent 7e0cc8e3
No related branches found
No related tags found
No related merge requests found
......@@ -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));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment